Get CFD Order History
Get CFD Order History
Descriptionâ
This endpoint is used to query historical orders on a CFD account.
HTTP Requestâ
- GET /api/v3/cfd/trade/history-order
- Rate limit: 10/sec/UID
- Permission: UTA trade (read-only)
Request
curl "https://api.bitget.com/api/v3/cfd/trade/history-order?symbol=XAUUSD&limit=10" \
-H "ACCESS-KEY:your apiKey" \
-H "ACCESS-SIGN:*" \
-H "ACCESS-PASSPHRASE:*" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:en-US" \
-H "Content-Type: application/json"
Request Parametersâ
| Parameters | Type | Required | Description | Comments |
|---|---|---|---|---|
| symbol | String | Yes | Trading pair name | |
| subUid | String | No | Sub-account UID Used to query a sub-account's historical orders | |
| startTime | String | No | Start time A Unix millisecond timestamp | The query span per request must not exceed 30 days The maximum lookback period is 90 days |
| endTime | String | No | End time A Unix millisecond timestamp | The query span per request must not exceed 30 days The maximum lookback period is 90 days |
| limit | String | No | Number of entries per page Default: 10, range [1, 50] For the first page, the number of entries returned may be greater than the specified limit | |
| pageNo | String | No | Page number | |
| cursor | String | No | Cursor Not required for the first page Required from the second page onward: pass the orderId of the last record from the previous page's response |
Response
{
"code": "00000",
"msg": "success",
"requestTime": 1740000000000,
"data": {
"list": [
{
"symbol": "XAUUSD",
"orderType": "limit",
"side": "buy",
"price": "2620.00",
"qty": "1",
"cumExecQty": "1",
"takeProfit": "2650.00",
"stopLoss": "2600.00",
"status": "filled",
"trxId": "111111111111111111",
"orderId": "111111111111111112"
}
]
}
}
Response Parametersâ
| Parameters | Type | Description | Comments |
|---|---|---|---|
| list | List\<Object> | List | |
| > symbol | String | Trading pair name | |
| > orderType | String | Order typelimit: Limit ordermarket: Market order | |
| > side | String | Trade sidebuy: Buysell: Sell | |
| > price | String | Order price | |
| > qty | String | Order quantity | |
| > cumExecQty | String | Cumulative filled quantity | |
| > takeProfit | String | Take-profit price | |
| > stopLoss | String | Stop-loss price | |
| > status | String | Order statuspartially_filled: Partially filledfilled: Fully filledcancelled: Canceled | |
| > trxId | String | Request ID | |
| > orderId | String | Order ID |