API trade endpoints

Methods

account(optionsopt)

Parameters:
NameTypeAttributesDescription
optionsobject<optional>
Properties
NameTypeAttributesDescription
recvWindownumber<optional>

The value cannot be greater than 60000

allOrders(symbol, optionsopt)

Parameters:
NameTypeAttributesDescription
symbolstring
optionsobject<optional>
Properties
NameTypeAttributesDescription
orderIdnumber<optional>
startTimenumber<optional>
endTimenumber<optional>
limitnumber<optional>
recvWindowstring<optional>

The value cannot be greater than 60000

cancelAndReplace(symbol, side, type, cancelReplaceMode, optionsopt)

Cancel an Existing Order and Send a New Order (TRADE)

Cancels an existing order and places a new order on the same symbol.

Filters are evaluated before the cancel order is placed.

If the new order placement is successfully sent to the engine, the order count will increase by 1.

POST /api/v3/order/cancelReplace

https://binance-docs.github.io/apidocs/spot/en/#cancel-an-existing-order-and-send-a-new-order-trade

Parameters:
NameTypeAttributesDescription
symbolstring
sidestring
typestring
cancelReplaceModestring
optionsobject<optional>
Properties
NameTypeAttributesDescription
timeInForcestring<optional>
quantitynumber<optional>
quoteOrderQtynumber<optional>
pricenumber<optional>
cancelNewClientOrderIdstring<optional>
cancelOrigClientOrderIdstring<optional>
cancelOrderIdnumber<optional>
newClientOrderIdstring<optional>
strategyIdnumber<optional>
strategytypenumber<optional>

The value cannot be less than 1000000.

stopPricenumber<optional>
trailingDeltanumber<optional>
icebergQtynumber<optional>
newOrderRespTypestring<optional>
recvWindownumber<optional>

The value cannot be greater than 60000

cancelOCOOrder(symbol, optionsopt)

Parameters:
NameTypeAttributesDescription
symbolstring
optionsobject<optional>
Properties
NameTypeAttributesDescription
orderListIdnumber<optional>
listClientOrderIdstring<optional>
newClientOrderIdstring<optional>
recvWindownumber<optional>

The value cannot be greater than 60000

cancelOpenOrders(symbol, optionsopt)

Cancel all Open Orders on a Symbol (TRADE)

DELETE /api/v3/openOrders

https://binance-docs.github.io/apidocs/spot/en/#cancel-all-open-orders-on-a-symbol-trade

Parameters:
NameTypeAttributesDescription
symbolstring
optionsobject<optional>
Properties
NameTypeAttributesDescription
recvWindownumber<optional>

The value cannot be greater than 60000

cancelOrder(symbol, optionsopt)

Parameters:
NameTypeAttributesDescription
symbolstring
optionsobject<optional>
Properties
NameTypeAttributesDescription
orderIdnumber<optional>
origClientOrderIdstring<optional>
newClientOrderIdstring<optional>
recvWindownumber<optional>

The value cannot be greater than 60000

getOCOOrder(optionsopt)

Parameters:
NameTypeAttributesDescription
optionsobject<optional>
Properties
NameTypeAttributesDescription
orderListIdnumber<optional>
origClientOrderIdstring<optional>
recvWindownumber<optional>

The value cannot be greater than 60000

getOCOOrders(optionsopt)

Query all OCO (USER_DATA)

GET /api/v3/allOrderList

https://binance-docs.github.io/apidocs/spot/en/#query-all-oco-user_data

Parameters:
NameTypeAttributesDescription
optionsobject<optional>
Properties
NameTypeAttributesDescription
fromIdnumber<optional>
startTimenumber<optional>
endTimenumber<optional>
limitnumber<optional>
recvWindownumber<optional>

The value cannot be greater than 60000

getOpenOCOOrders(optionsopt)

Query Open OCO (USER_DATA)

GET /api/v3/openOrderList

https://binance-docs.github.io/apidocs/spot/en/#query-open-oco-user_data

Parameters:
NameTypeAttributesDescription
optionsobject<optional>
Properties
NameTypeAttributesDescription
recvWindownumber<optional>

The value cannot be greater than 60000

getOrder(symbol, optionsopt)

Parameters:
NameTypeAttributesDescription
symbolstring
optionsobject<optional>
Properties
NameTypeAttributesDescription
orderIdnumber<optional>
origClientOrderIdstring<optional>
recvWindownumber<optional>

The value cannot be greater than 60000

myTrades(symbol, optionsopt)

Parameters:
NameTypeAttributesDescription
symbolstring
optionsobject<optional>
Properties
NameTypeAttributesDescription
orderIdnumber<optional>

This can only be used in combination with symbol.

startTimenumber<optional>
endTimenumber<optional>
fromIdnumber<optional>
limitnumber<optional>
recvWindownumber<optional>

The value cannot be greater than 60000

newOCOOrder(symbol, side, quantity, price, stopPrice, optionsopt)

Parameters:
NameTypeAttributesDescription
symbolstring
sidestring
quantitynumber
pricenumber
stopPricenumber
optionsobject<optional>
Properties
NameTypeAttributesDescription
listClientOrderIdstring<optional>
limitClientOrderIdstring<optional>
limitStrategyIdnumber<optional>
limitStrategytypenumber<optional>

The value cannot be less than 1000000.

limitIcebergQtynumber<optional>
trailingDeltanumber<optional>
stopClientOrderIdstring<optional>
stopStrategyIdnumber<optional>
stopStrategytypenumber<optional>

The value cannot be less than 1000000.

stopLimitPricenumber<optional>
stopIcebergQtynumber<optional>
stopLimitTimeInForcestring<optional>
newOrderRespTypestring<optional>
recvWindownumber<optional>

The value cannot be greater than 60000

newOrder(symbol, side, type, optionsopt)

Parameters:
NameTypeAttributesDescription
symbolstring
sidestring
typestring
optionsobject<optional>
Properties
NameTypeAttributesDescription
timeInForcestring<optional>
quantitynumber<optional>
quoteOrderQtynumber<optional>
pricenumber<optional>
newClientOrderIdstring<optional>
strategyIdnumber<optional>
strategytypenumber<optional>

The value cannot be less than 1000000.

stopPricenumber<optional>
trailingDeltanumber<optional>
icebergQtynumber<optional>
newOrderRespTypestring<optional>
recvWindownumber<optional>

The value cannot be greater than 60000

newOrderTest(symbol, side, type, optionsopt)

Parameters:
NameTypeAttributesDescription
symbolstring
sidestring
typestring
optionsobject<optional>
Properties
NameTypeAttributesDescription
timeInForcestring<optional>
quantitynumber<optional>
quoteOrderQtynumber<optional>
pricenumber<optional>
newClientOrderIdstring<optional>

A unique id among open orders. Automatically generated if not sent.

strategyIdnumber<optional>
strategytypenumber<optional>

The value cannot be less than 1000000.

stopPricenumber<optional>

Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.

trailingDeltanumber<optional>

Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders.

icebergQtynumber<optional>

Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order.

newOrderRespTypestring<optional>

Set the response JSON. ACK, RESULT, or FULL; MARKET and LIMIT order types default to FULL, all other orders default to ACK.

recvWindownumber<optional>

The value cannot be greater than 60000

openOrders(optionsopt)

Current Open Orders (USER_DATA)

GET /api/v3/openOrders

https://binance-docs.github.io/apidocs/spot/en/#current-open-orders-user_data

Parameters:
NameTypeAttributesDescription
optionsobject<optional>
Properties
NameTypeAttributesDescription
symbolstring<optional>
recvWindownumber<optional>

The value cannot be greater than 60000

orderCount(optionsopt)

Query Current Order Count Usage (TRADE)

GET /api/v3/rateLimit/order

https://binance-docs.github.io/apidocs/spot/en/#query-current-order-count-usage-trade

Parameters:
NameTypeAttributesDescription
optionsobject<optional>
Properties
NameTypeAttributesDescription
recvWindownumber<optional>

The value cannot be greater than 60000