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

Adding All open orders request #400

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.binance.api</groupId>
<artifactId>binance-api-client</artifactId>
<version>1.0.1</version>
<version>1.1.0</version>
<licenses>
<license>
<name>The MIT License</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@ public interface BinanceApiRestClient {
*/
List<Order> getOpenOrders(OrderRequest orderRequest);

/**
* Get all the open orders for an account
* @param allOpenOrdersRequest all open orders request
* @return list of all the open orders for an account
*/
List<Order> getAllOpenOrders(AllOpenOrdersRequest allOpenOrdersRequest);

/**
* Get all account orders; active, canceled, or filled.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package com.binance.api.client.domain.account.request;


import com.binance.api.client.constant.BinanceApiConstants;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
* Request object to retrieve all the open orders without symbol
*/

@JsonIgnoreProperties(ignoreUnknown = true)
public class AllOpenOrdersRequest {

private Long recvWindow;

private Long timestamp;

public AllOpenOrdersRequest() {
this.timestamp = System.currentTimeMillis();
this.recvWindow = BinanceApiConstants.DEFAULT_RECEIVING_WINDOW;
}

public Long getRecvWindow() {
return recvWindow;
}

public AllOpenOrdersRequest recvWindow(Long recvWindow) {
this.recvWindow = recvWindow;
return this;
}

public Long getTimestamp() {
return timestamp;
}

public AllOpenOrdersRequest timestamp(Long timestamp) {
this.timestamp = timestamp;
return this;
}

@Override
public String toString() {
return new ToStringBuilder(this, BinanceApiConstants.TO_STRING_BUILDER_STYLE)
.append("recvWindow", recvWindow)
.append("timestamp", timestamp)
.toString();
}

}
Loading