Query Account Order History
Request URL
GET /ftapi/v1/orderHis
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| symbolId | STRING | NO | Trading pair |
| orderId | LONG | NO | Order ID |
| startTime | LONG | NO | Start time (milliseconds) |
| endTime | LONG | NO | End time (milliseconds) |
| limit | INT | NO | Number of results, max 1000 |
Response Parameters
| Name | Type | Description |
|---|---|---|
| code | STRING | Response Code |
| msg | STRING | Response Message |
| success | BOOLEAN | Success Flag |
| data[].amount | STRING | |
| data[].avgPrice | STRING | |
| data[].cancelAmount | STRING | |
| data[].cancelQuantity | STRING | |
| data[].cancelReason | INTEGER | |
| data[].conditionOrderId | STRING | |
| data[].feeAmount | STRING | |
| data[].feeAssetId | STRING | |
| data[].feeRateMaker | STRING | |
| data[].feeRateTaker | STRING | |
| data[].id | STRING | |
| data[].leverage | INTEGER | |
| data[].liquidationFeeRate | STRING | |
| data[].lockAssetId | STRING | |
| data[].locked | STRING | |
| data[].marginMode | STRING | |
| data[].mtime | INTEGER | |
| data[].orderTime | INTEGER | |
| data[].positionId | STRING | |
| data[].positionMode | STRING | |
| data[].postOnly | INTEGER | |
| data[].price | STRING | |
| data[].profit | STRING | |
| data[].quantity | STRING | |
| data[].reduceOnly | INTEGER | |
| data[].releasedLock | STRING | |
| data[].reverseOrder | INTEGER | |
| data[].side | STRING | |
| data[].slPrice | STRING | |
| data[].slType | STRING | |
| data[].source | INTEGER | |
| data[].status | STRING | |
| data[].symbolId | STRING | |
| data[].timeInForce | STRING | |
| data[].totalAmount | STRING | |
| data[].totalQuantity | STRING | |
| data[].tpPrice | STRING | |
| data[].tpType | STRING | |
| data[].tradeAmount | STRING | |
| data[].tradeQuantity | STRING | |
| data[].type | STRING | |
| data[].uid | STRING |
Request Example
https://openapi.bittap.com/ftapi/v1/orderHis?symbol=BTC-USDT-MResponse Example
{
"code": "0",
"data": [
{
"amount": "0", // Remaining amount (unfilled portion amount)
"avgPrice": null, // Average fill price
"cancelAmount": "11270.64068", // Cancel amount
"cancelQuantity": "0.1084", // Cancel quantity
"cancelReason": 1, // Cancel reason: 1=user initiated, 2=system, etc.
"conditionOrderId": "", // Conditional order ID (empty if not conditional order)
"feeAmount": "0", // Actual fee generated
"feeAssetId": "USDT", // Fee currency code
"feeRateMaker": "0.0003", // Maker fee rate (maker fill)
"feeRateTaker": "0.0005", // Taker fee rate (taker fill)
"id": "111469309137522688", // Order unique ID (long converted to string)
"leverage": 20, // Leverage (e.g., 20x)
"liquidationFeeRate": null, // Liquidation fee rate (empty if not liquidation order)
"lockAssetId": "USDT", // Locked margin currency
"locked": "563.532034", // Locked margin amount
"marginMode": "CROSSED", // Margin mode: CROSSED=cross margin, ISOLATED=isolated margin
"mtime": 1762237162020, // Last update time (millisecond timestamp)
"orderTime": 1762237154298, // Order time (millisecond timestamp)
"positionId": "0", // Position ID (0 if no position)
"positionMode": "HEDGE", // Position mode: HEDGE=hedge mode, ONEWAY=one-way mode
"postOnly": 0, // Post only: 1=yes, 0=no
"price": "103972.7", // Order price
"profit": "0", // PnL (only valid for closed orders)
"quantity": "0", // Remaining unfilled quantity
"reduceOnly": 0, // Reduce only: 1=yes, 0=no
"releasedLock": "563.532034", // Released margin amount
"reverseOrder": 0, // Reverse order: 1=yes, 0=no
"side": "BUY", // Buy/sell direction: BUY=buy/long, SELL=sell/short
"slPrice": null, // Stop loss price
"slType": null, // Stop loss type (e.g., 1=limit stop loss, 2=market stop loss)
"source": 0, // Source: 0=user, 2=system liquidation, 10=reverse order
"status": "CANCELED", // Status: NEW=new, FILLED=filled, CANCELED=canceled
"symbolId": "BTC-USDT-M", // Trading pair identifier (e.g., BTC-USDT contract)
"timeInForce": "GTC", // Time in force strategy: GTC=good till canceled, IOC=immediate or cancel
"totalAmount": "11270.64068", // Total order amount (price * totalQuantity)
"totalQuantity": "0.1084", // Total order quantity
"tpPrice": null, // Take profit price
"tpType": null, // Take profit type (1=limit take profit, 2=market take profit)
"tradeAmount": "0", // Filled amount
"tradeQuantity": "0", // Filled quantity
"type": "LIMIT", // Order type: LIMIT=limit, MARKET=market
"uid": "76957286" // User ID
}
],
"msg": "Request successful",
"success": true
}Error Codes
| Error Code | Description |
|---|---|
| 500 | Server Error |
Code Example
Last updated on: