Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Fix for issue #62: NewOrder.newClientOrderId() is now passed through to binance when pla… #63

Merged
merged 1 commit into from
Feb 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ public void getBookTickers(BinanceApiCallback<List<BookTicker>> callback) {
@Override
public void newOrder(NewOrder order, BinanceApiCallback<NewOrderResponse> callback) {
binanceApiService.newOrder(order.getSymbol(), order.getSide(), order.getType(),
order.getTimeInForce(), order.getQuantity(), order.getPrice(), order.getStopPrice(), order.getIcebergQty(),
order.getRecvWindow(), order.getTimestamp()).enqueue(new BinanceApiCallbackAdapter<>(callback));
order.getTimeInForce(), order.getQuantity(), order.getPrice(), order.getNewClientOrderId(), order.getStopPrice(),
order.getIcebergQty(), order.getRecvWindow(), order.getTimestamp()).enqueue(new BinanceApiCallbackAdapter<>(callback));
}

@Override
public void newOrderTest(NewOrder order, BinanceApiCallback<Void> callback) {
binanceApiService.newOrderTest(order.getSymbol(), order.getSide(), order.getType(),
order.getTimeInForce(), order.getQuantity(), order.getPrice(), order.getStopPrice(), order.getIcebergQty(),
order.getRecvWindow(), order.getTimestamp()).enqueue(new BinanceApiCallbackAdapter<>(callback));
order.getTimeInForce(), order.getQuantity(), order.getPrice(), order.getNewClientOrderId(), order.getStopPrice(),
order.getIcebergQty(), order.getRecvWindow(), order.getTimestamp()).enqueue(new BinanceApiCallbackAdapter<>(callback));
}

// Account endpoints
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@ public List<BookTicker> getBookTickers() {
@Override
public NewOrderResponse newOrder(NewOrder order) {
return executeSync(binanceApiService.newOrder(order.getSymbol(), order.getSide(), order.getType(),
order.getTimeInForce(), order.getQuantity(), order.getPrice(), order.getStopPrice(), order.getIcebergQty(),
order.getRecvWindow(), order.getTimestamp()));
order.getTimeInForce(), order.getQuantity(), order.getPrice(), order.getNewClientOrderId(), order.getStopPrice(),
order.getIcebergQty(), order.getRecvWindow(), order.getTimestamp()));
}

@Override
public void newOrderTest(NewOrder order) {
executeSync(binanceApiService.newOrderTest(order.getSymbol(), order.getSide(), order.getType(),
order.getTimeInForce(), order.getQuantity(), order.getPrice(), order.getStopPrice(), order.getIcebergQty(),
order.getRecvWindow(), order.getTimestamp()));
order.getTimeInForce(), order.getQuantity(), order.getPrice(), order.getNewClientOrderId(), order.getStopPrice(),
order.getIcebergQty(), order.getRecvWindow(), order.getTimestamp()));
}

// Account endpoints
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ Call<List<Candlestick>> getCandlestickBars(@Query("symbol") String symbol, @Quer
@POST("/api/v3/order")
Call<NewOrderResponse> newOrder(@Query("symbol") String symbol, @Query("side") OrderSide side, @Query("type") OrderType type,
@Query("timeInForce") TimeInForce timeInForce, @Query("quantity") String quantity, @Query("price") String price,
@Query("stopPrice") String stopPrice, @Query("icebergQty") String icebergQty,
@Query("recvWindow") Long recvWindow, @Query("timestamp") Long timestamp);
@Query("newClientOrderId") String newClientOrderId, @Query("stopPrice") String stopPrice,
@Query("icebergQty") String icebergQty, @Query("recvWindow") Long recvWindow, @Query("timestamp") Long timestamp);

@Headers(BinanceApiConstants.ENDPOINT_SECURITY_TYPE_SIGNED_HEADER)
@POST("/api/v3/order/test")
Call<Void> newOrderTest(@Query("symbol") String symbol, @Query("side") OrderSide side, @Query("type") OrderType type,
@Query("timeInForce") TimeInForce timeInForce, @Query("quantity") String quantity, @Query("price") String price,
@Query("stopPrice") String stopPrice, @Query("icebergQty") String icebergQty,
@Query("recvWindow") Long recvWindow, @Query("timestamp") Long timestamp);
@Query("newClientOrderId") String newClientOrderId, @Query("stopPrice") String stopPrice,
@Query("icebergQty") String icebergQty, @Query("recvWindow") Long recvWindow, @Query("timestamp") Long timestamp);

@Headers(BinanceApiConstants.ENDPOINT_SECURITY_TYPE_SIGNED_HEADER)
@GET("/api/v3/order")
Expand Down