Skip to content

Commit

Permalink
Fix bitbay tradea request. To get last trades we need to use sort=des…
Browse files Browse the repository at this point in the history
…c parameter.
  • Loading branch information
alobarev committed Dec 17, 2015
1 parent fd30c75 commit 204222a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Expand Up @@ -32,6 +32,6 @@ public interface Bitbay {
public BitbayOrderBook getBitbayOrderBook(@PathParam("currencyPair") String currencyPair) throws IOException;

@GET
@Path("{currencyPair}/trades.json")
@Path("{currencyPair}/trades.json?sort=desc")
public BitbayTrade[] getBitbayTrades(@PathParam("currencyPair") String currencyPair) throws IOException;
}
@@ -1,12 +1,15 @@
package com.xeiam.xchange.btce.v3.service.polling;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import com.xeiam.xchange.Exchange;
import com.xeiam.xchange.btce.v3.dto.marketdata.BTCEDepthWrapper;
import com.xeiam.xchange.btce.v3.dto.marketdata.BTCEExchangeInfo;
import com.xeiam.xchange.btce.v3.dto.marketdata.BTCETickerWrapper;
import com.xeiam.xchange.btce.v3.dto.marketdata.BTCETradesWrapper;
import com.xeiam.xchange.currency.CurrencyPair;

/**
* @author brox
Expand Down Expand Up @@ -88,4 +91,13 @@ public BTCEExchangeInfo getBTCEInfo() throws IOException {
return btce.getInfo();
}

@Override
public List<CurrencyPair> getExchangeSymbols() throws IOException {
List<CurrencyPair> result = new ArrayList<>();
for (String p : getBTCEInfo().getPairs().keySet()) {
result.add(new CurrencyPair(p.toUpperCase().replace('_', '/')));
}
return result;
}

}

0 comments on commit 204222a

Please sign in to comment.