user15153: 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.

user2306: The Cryptsy driver does not support this, or any kind of argument, actually.
https://github.com/timmolter/XChange/blob/df9eb4e4d95c5bb3954b1527f585d9238514fa94/xchange-cryptsy/src/main/java/com/xeiam/xchange/cryptsy/service/polling/CryptsyPublicMarketDataService.java#L39
Neither does BTCE.
https://github.com/timmolter/XChange/blob/df9eb4e4d95c5bb3954b1527f585d9238514fa94/xchange-btce/src/main/java/com/xeiam/xchange/btce/v2/service/polling/BTCEMarketDataService.java#L55
However, the BTCE getTrades method does support a limit argument.
https://github.com/timmolter/XChange/blob/df9eb4e4d95c5bb3954b1527f585d9238514fa94/xchange-btce/src/main/java/com/xeiam/xchange/btce/v2/service/polling/BTCEMarketDataService.java#L78

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

<p>I call the order books like this:</p>

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

<p>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.</p>
 2306: <p>The Cryptsy driver does not support this, or any kind of argument, actually.</p>

<p><a href="https://github.com/timmolter/XChange/blob/df9eb4e4d95c5bb3954b1527f585d9238514fa94/xchange-cryptsy/src/main/java/com/xeiam/xchange/cryptsy/service/polling/CryptsyPublicMarketDataService.java#L39" rel="nofollow">https://github.com/timmolter/XChange/blob/df9eb4e4d95c5bb3954b1527f585d9238514fa94/xchange-cryptsy/src/main/java/com/xeiam/xchange/cryptsy/service/polling/CryptsyPublicMarketDataService.java#L39</a></p>

<p>Neither does BTCE.</p>

<p><a href="https://github.com/timmolter/XChange/blob/df9eb4e4d95c5bb3954b1527f585d9238514fa94/xchange-btce/src/main/java/com/xeiam/xchange/btce/v2/service/polling/BTCEMarketDataService.java#L55" rel="nofollow">https://github.com/timmolter/XChange/blob/df9eb4e4d95c5bb3954b1527f585d9238514fa94/xchange-btce/src/main/java/com/xeiam/xchange/btce/v2/service/polling/BTCEMarketDataService.java#L55</a></p>

<p>However, the BTCE <code>getTrades</code> method does support a limit argument.</p>

<p><a href="https://github.com/timmolter/XChange/blob/df9eb4e4d95c5bb3954b1527f585d9238514fa94/xchange-btce/src/main/java/com/xeiam/xchange/btce/v2/service/polling/BTCEMarketDataService.java#L78" rel="nofollow">https://github.com/timmolter/XChange/blob/df9eb4e4d95c5bb3954b1527f585d9238514fa94/xchange-btce/src/main/java/com/xeiam/xchange/btce/v2/service/polling/BTCEMarketDataService.java#L78</a></p>
