Order History
Order History
Get historical order records
Request frequency limit: 1/1s
Request URL
GET /deepcoin/trade/orders-history
Request Parameters
Field Name | Required | Type | Description |
---|---|---|---|
instType | true | string | Product type Spot: SPOT Contract: SWAP |
instId | false | string | Product ID |
ordType | false | string | Order type Market order: market Limit order: limit Post only: post_only |
state | false | string | Order state Canceled: canceled Filled: filled |
after | false | string | Pagination of data before this ID (older data), value should be ordId from the response |
before | false | string | Pagination of data after this ID (newer data), value should be ordId from the response |
limit | false | integer | Number of results per page, maximum 100 , default 100 |
ordId | false | string | Order ID |
Response Parameters
Field Name | Type | Description |
---|---|---|
instType | string | Product type |
instId | string | Product ID |
tgtCcy | string | Market order quantity type Base currency: base_ccy Quote currency: quote_ccy , only applicable to spot orders |
ccy | string | Margin currency, only applicable to cross margin orders in single-currency margin mode |
ordId | string | Order ID |
clOrdId | string | Custom order ID |
tag | string | Order tag |
px | string | Order price |
sz | string | Order size |
pnl | string | Profit and loss |
ordType | string | Order type Market order: market Limit order: limit Post only: post_only |
side | string | Order side Buy: buy Sell: sell |
posSide | string | Position side |
tdMode | string | Trading mode |
accFillSz | string | Accumulated fill size |
fillPx | string | Latest fill price |
tradeId | string | Latest trade ID |
fillSz | string | Latest fill size |
fillTime | string | Latest fill time |
avgPx | string | Average fill price |
state | string | Order state Pending: live Partially filled: partially_filled |
lever | string | Leverage between 0.01 and 125 , only applicable to margin/futures/perpetual trading |
tpTriggerPx | string | Take profit trigger price |
tpTriggerPxType | string | Take profit trigger price type Last price: last Index price: index Mark price: mark |
tpOrdPx | string | Take profit order price |
slTriggerPx | string | Stop loss trigger price |
slTriggerPxType | string | Stop loss trigger price type Last price: last Index price: index Mark price: mark |
slOrdPx | string | Stop loss order price |
feeCcy | string | Fee currency |
fee | string | Trading fee |
rebateCcy | string | Rebate currency |
source | string | Order source, 13: Limit order generated after strategy order is triggered |
rebate | string | Rebate amount. Platform pays maker rebates to users who reach specified trading levels. Empty string if no rebate. Positive number for fee rebate, e.g., 0.01 |
category | string | Order category |
uTime | string | Order update time, Unix timestamp in milliseconds |
cTime | string | Order creation time, Unix timestamp in milliseconds |
Response Example
{
"code": "0",
"msg": "",
"data": [
{
"instType": "SWAP",
"instId": "BTC-USDT-SWAP",
"tgtCcy": "",
"ccy": "",
"ordId": "1000587866072658",
"clOrdId": "",
"tag": "",
"px": "90000",
"sz": "300",
"pnl": "0",
"ordType": "limit",
"side": "sell",
"posSide": "short",
"tdMode": "cross",
"accFillSz": "300",
"fillPx": "98230.5",
"tradeId": "",
"fillSz": "300",
"fillTime": "1739261250000",
"avgPx": "98230.5",
"state": "filled",
"lever": "1",
"tpTriggerPx": "",
"tpTriggerPxType": "",
"tpOrdPx": "",
"slTriggerPx": "",
"slTriggerPxType": "",
"slOrdPx": "",
"feeCcy": "USDT",
"fee": "8.840745",
"rebateCcy": "",
"source": "",
"rebate": "",
"category": "normal",
"uTime": "1739261250000",
"cTime": "1739261250000"
}
]
}