Skip to main content

Query historical orders

Type GET

Description: /v4/history-order


Parameters

NameTypeMandatoryDefaultDescriptionRanges
symbolstringNoN/ATrading pair, if not filled in, represents all
bizTypestringNoN/ABusiness typeSPOT, LEVER
sidestringNoN/AOrder sideBUY, SELL
typestringNoN/AOrder typeLIMIT, MARKET
statestringNoN/AOrder statePARTIALLY_FILLED, FILLED, CANCELED, REJECTED, EXPIRED
fromIdnumberNoN/AStart ID
directionstringNoN/AQuery directionPREV, NEXT
limitnumberNo20Limit number (max 100)
startTimenumberNoN/AStart time (e.g. 1657682804112)
endTimenumberNoN/AEnd time
hiddenCanceledboolNoN/AWhether to hide canceled orders

Limit Flow Rules

  • 10/s/apikey

Response Example

Response
{
"rc": 0,
"mc": "string",
"ma": [{}],
"result": {
"hasPrev": true,
"hasNext": true,
"items": [
// For field information, refer to the Get Single Order API
{
"symbol": "BTC_USDT",
"orderId": "6216559590087220004",
"clientOrderId": "16559590087220001",
"baseCurrency": "string",
"quoteCurrency": "string",
"side": "BUY",
"type": "LIMIT",
"timeInForce": "GTC",
"price": "40000",
"origQty": "2",
"origQuoteQty": "48000",
"executedQty": "1.2",
"leavingQty": "string",
"tradeBase": "2",
"tradeQuote": "48000",
"avgPrice": "42350",
"fee": "string",
"feeCurrency": "string",
"state": "NEW",
"time": 1655958915583,
"ip": "127.0.0.1",
"updatedTime": 1655958915583
}
]
}
}