diff --git a/src/main/java/bisq/markets/api/GraphQLQuery.java b/src/main/java/bisq/markets/api/GraphQLQuery.java index ed499eb..c668f69 100644 --- a/src/main/java/bisq/markets/api/GraphQLQuery.java +++ b/src/main/java/bisq/markets/api/GraphQLQuery.java @@ -114,7 +114,7 @@ public int compareTo(OpenOffer o) { "amount: formattedAmount price: formattedPrice " + "volume: formattedVolume payment_method: paymentMethodId " + "offer_fee_txid: offerFeeTxId } "; - private static final String offersQuery = "query Offers($market: MarketPair, $direction: Direction)" + + private static final String offersQuery = "query Offers($market: MarketPair!, $direction: Direction)" + "{ offers(market: $market, direction: $direction) { " + "buys " + offerFields + "sells " + offerFields + " } }"; @@ -128,7 +128,10 @@ public int compareTo(OpenOffer o) { @Override public Object translateResponse(String response) { GraphQLResponse>> offers = gson.fromJson(response,new TypeToken>>>(){}.getType()); - return offers.getData(); + Map> buysAndSells = offers.getData(); + Map>> ret = new HashMap<>(); + ret.put(variables.get("market"), buysAndSells); + return ret; } }