For sometime I am using this java API http://xeiam.com/xchange/ for building bitcoin trading robots. Today I got a bit stuck and I wanted to see if somebody had the same issue before.

I call the order books like this:

OrderBook orderBook = exchangeMarket.getExchange().getPollingMarketDataService().
                                getOrderBook(CurrencyPair.LTC_BTC, new int[] {20});

My problem is that the orderBook object contains 100 asks and 100 bids. I just want 20. Does anybody know why this is not returning the amount I pass in the second parameter? BTW, if I try 150, it also returns 100. I don't know how to modify the amount of returned elements.

  • The xchange docs say that the meaning of getOrderBook's second argument is exchange-specific. Does the exchange you're polling support limits? Do they support them in the manner that you're using them?
    – Nick ODell
    Apr 25, 2015 at 18:54
  • @Nick ODell I am interested in the exchanges Cryptsy and BTCE, but I am not sure how to find if they support limits. Also if they do support, how do I pass the parameter? I tried different things like new Integer[]{20,20}... but nothing worked, I would like to confirm that indeed there is no such support in those exchanges.
    – sfrj
    Apr 26, 2015 at 11:03

1 Answer 1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.