Skip to main content

Query Historical Orders

Response Example

{
"success": true,
"code": 0,
"data": [
{
"orderId": "739211854408619008",
"symbol": "DOGE_USDT",
"positionId": 1110417836,
"price": 0.18695,
"priceStr": "0.186950000000000000",
"vol": 1,
"leverage": 20,
"side": 3,
"category": 1,
"orderType": 5,
"dealAvgPrice": 0.18695,
"dealVol": 1,
"orderMargin": 0.93475,
"takerFee": 0,
"makerFee": 0,
"profit": 0,
"feeCurrency": "USDT",
"openType": 1,
"state": 3,
"externalOid": "test00002",
"errorCode": 0,
"usedMargin": 0.93475,
"createTime": 1761912240000,
"updateTime": 1761912240000,
"positionMode": 1,
"version": 2,
"showCancelReason": 1,
"showProfitRateShare": 0,
"bboTypeNum": 0,
"totalFee": 0,
"zeroSaveTotalFeeBinance": 0,
"zeroTradeTotalFeeBinance": 0
}
]
}
  • GET /api/v1/private/order/list/close_orders

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
symbolstringtrueTrading pair
start_timelongfalseStart time, Unix millisecond timestamp
end_timelongfalseEnd time, Unix millisecond timestamp
page_numintfalsePage number; default 1
page_sizeintfalsePage size; default 20; max cannot exceed 1000

Response Parameters:

ParameterTypeDescription
pageSizeintPage size
totalCountintTotal count
totalPageintTotal pages
currentPageintCurrent page
orderIdlongOrder ID
symbolstringContract
positionIdlongPosition id
pricedecimalOrder price
voldecimalOrder quantity
leveragelongLeverage
sideintOrder side;1: open long,2: close short,3: open short,4: close long
categoryintOrder category;1: limit,2: liquidation custody,3: custody close,4: ADL reduction;5: delivery order;6: liquidation hedge
dealAvgPricedecimalAverage deal price
dealVoldecimalDeal quantity
orderMargindecimalOrder margin
takerFeedecimalTaker fee
makerFeedecimalMaker fee
profitdecimalClose PnL
feeCurrencystringFee currency
openTypeintOpen type,1: isolated,2: cross
stateintOrder status,1: pending,2: unfilled,3: filled,4: canceled,5: invalid
externalOidstringExternal order ID
createTimedateCreated time
updateTimedateUpdated time
bboTypeNumintLimit order type - BBO type; 0: not BBO;1: best opposite 1;2: best opposite 5;3: same-side 1;4: same-side 5;
lossTrendintStop-loss price type;1: latest price;2: fair price;3: index price
profitTrendintTake-profit price type;
takeProfitPricedecimalTake-profit price
stopLossPricedecimalStop-loss price
priceProtectintPrice difference protection 1: on;0: off
positionModeintPosition mode;1: dual-side;2: one-way