Skip to content

Commit

Permalink
Added orders/recent in hitbtc.
Browse files Browse the repository at this point in the history
  • Loading branch information
kpysniak committed Jul 23, 2014
1 parent 8d3cfa6 commit fbf1b51
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ public interface HitbtcAuthenticated extends Hitbtc {
public HitbtcOrdersResponse getHitbtcActiveOrders(@HeaderParam("X-Signature") ParamsDigest signature, @QueryParam("nonce") long nonce, @QueryParam("apikey") String apiKey
/* @QueryParam("symbols") String symbols */) throws IOException;

@GET
@Path("trading/orders/recent")
HitbtcOrdersResponse getHitbtcRecentOrders(@HeaderParam("X-Signature") ParamsDigest signature,
@QueryParam("nonce") long nonce, @QueryParam("apikey") String apiKey,
@QueryParam("max_results") int max_results) throws IOException;

@POST
@Path("trading/new_order")
@Produces(MediaType.APPLICATION_FORM_URLENCODED)
Expand All @@ -75,4 +81,5 @@ public HitbtcTradeResponse getHitbtcTrades(@HeaderParam("X-Signature") ParamsDig
@Path("trading/balance")
public HitbtcBalanceResponse getHitbtcBalance(@HeaderParam("X-Signature") ParamsDigest signature, @QueryParam("nonce") long nonce, @QueryParam("apikey") String apiKey) throws IOException;


}
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ public HitbtcOrder[] getOpenOrdersRaw() throws ExchangeException, NotAvailableFr
return hitbtcActiveOrders.getOrders();
}

public HitbtcOrder[] getRecentOrdersRaw(int max_results) throws ExchangeException, NotAvailableFromExchangeException, NotYetImplementedForExchangeException, IOException {

HitbtcOrdersResponse hitbtcActiveOrders = hitbtc.getHitbtcRecentOrders(signatureCreator, nextNonce(), apiKey, max_results);
return hitbtcActiveOrders.getOrders();
}

public HitbtcExecutionReport placeMarketOrderRaw(MarketOrder marketOrder) throws ExchangeException, NotAvailableFromExchangeException, NotYetImplementedForExchangeException, IOException {

String symbol = marketOrder.getCurrencyPair().baseSymbol + marketOrder.getCurrencyPair().counterSymbol;
Expand Down

0 comments on commit fbf1b51

Please sign in to comment.