API Reference

Order History

Rate Limit: 30 requests per 10 seconds

Retrieve finished orders from the past 7 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 7 days.
endStringNQuery end millisecond timestamp
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)
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)
createAtStringCreate time
updateAtStringUpdate time
Language