API Reference

Order History Archive

Rate Limit: 30 requests per 10 seconds

Retrieve finished orders from the past 7 to 90 days.

Request

NameTypeMandatoryDescription
symStringNTrading pair unique identifier(example:
BINANCE_SPOT_ETH_USDT, OKX_PEPR_ETH_USDT)
businessTypeStringNBusiness type
exchangeStringNExchange
beginStringNQuery start millisecond timestamp, the default is to query data from the past 90 days.
endStringNQuery end millisecond timestamp
filterExecutedBooleanNQuery the executed order, default is false, query all orders.
pageStringNCurrent page
pageSizeStringNPage size(Default 1000, max 1000)

Response

FieldTypeRemark
portfolioIdStringPortfolio ID
portfolioNameStringPortfolio Name
orderIdStringOrder ID
clientOrderIdStringCustomer-defined order ID
orderStateStringOrder state(NEW, OPEN, CANCELLED, FILLED, PARTIALLY_FILLED, REJECT, FAIL)
symStringTrading pair unique identifier(example:
BINANCE_SPOT_ETH_USDT, OKX_PEPR_ETH_USDT)
sideStringSide(BUY,SELL)
exchangeOrderTypeStringExchange order type(LIMIT, MARKET)
exchangeTypeStringExchange type(BINANCE, OKX)
orderTypeStringOrder Type(DMA, SYSTEM_LIQ, SYSTEM_REDUCE, REPLACE, MIN_NOTIONAL)
businessTypeStringBusiness type(SPOT, PERP)
orderQtyStringOrder quantity, note: trading unit of OKX is the number of contracts/ trading unit of Binance is the number of coin
quoteOrderQtyStringOrder quote quantity, only use for Spot Market Buy order
limitPriceStringOrder price
timeInForceStringTimeInForce (default GTC,enums:GTC,IOC,FOK,GTX)
reasonStringFail message
executedQtyStringExecuted quantity, note: trading unit of OKX is the number of contracts/ trading unit of Binance is the number of coin
executedAvgPriceStringAverage transaction price
executedAmountStringExecuted quote quantity
reduceOnlyStringReduce position orders only, "true" or "false"
lastExecutedQtyStringLast transaction quantity
lastExecutedPriceStringLast transaction price
lastExecutedAmountStringLast transaction amount
leverageIntegerLeverage
feeStringTransaction fee amount
feeCoinStringTransaction fee coin
rebateStringRabate amount
rebateCoinStringRebate coin
borrowAmountStringBorrow amount
borrowAssetStringBorrow asset
positionSideStringPosition side(NONE/LONG/SHORT)
tpTriggerPriceStringTake-profit trigger price.
tpTriggerTypeStringTake-profit trigger price type:
LAST_PRICE, MARK_PRICE
The default is LAST_PRICE
tpPriceStringTake-profit order price;
If the price is 0, take-profit will be executed at the market price.
slTriggerPriceStringStop-loss trigger price
slTriggerTypeStringStop-loss trigger price type:
LAST_PRICE, MARK_PRICE
The default is LAST_PRICE
slPriceStringStop-loss order price;
If the price is 0, stop-loss will be executed at the market price.
createAtStringCreate time
updateAtStringUpdate time
Language