Query Open Orders
Request URL
GET /ftapi/v1/openOrder
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| symbolId | STRING | NO | Trading pair |
| orderId | LONG | NO | Order ID |
| 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[].avgPrice | STRING | |
| data[].conditionOrderId | STRING | |
| data[].ctime | INTEGER | |
| data[].feeAmount | STRING | |
| data[].feeAssetId | STRING | |
| data[].leverage | INTEGER | |
| data[].marginMode | STRING | |
| data[].mtime | INTEGER | |
| data[].orderId | STRING | |
| data[].positionMode | STRING | |
| data[].postOnly | INTEGER | |
| data[].price | STRING | |
| data[].profit | STRING | |
| data[].profitRate | STRING | |
| data[].quantity | STRING | |
| data[].reduceOnly | BOOLEAN | |
| data[].remainingLocked | STRING | |
| data[].side | STRING | |
| data[].status | STRING | |
| data[].symbolId | STRING | |
| data[].timeInForce | STRING | |
| data[].totalAmount | STRING | |
| data[].totalQuantity | STRING | |
| data[].tpSl | OBJECT | |
| data[].tradeAmount | STRING | |
| data[].tradeQuantity | STRING | |
| data[].type | STRING | |
| data[].uid | STRING |
Request Example
https://openapi.bittap.com/ftapi/v1/openOrder?symbol=BTC-USDT-MResponse Example
{
"code": "0",
"data": [
{
"avgPrice": "104616.7", // Average fill price (fill amount / fill quantity)
"conditionOrderId": "", // Conditional order ID (empty if not conditional order)
"ctime": 1762239532998, // Creation time (millisecond timestamp)
"feeAmount": "0.044985181", // Fee generated (unit: feeAssetId)
"feeAssetId": "USDT", // Fee currency (e.g., USDT)
"leverage": 20, // Leverage (e.g., 20x)
"marginMode": "CROSSED", // Margin mode: CROSSED=cross margin, ISOLATED=isolated margin
"mtime": 1762239539000, // Last update time (millisecond timestamp)
"orderId": "111479286124253184", // Order unique ID (long converted to string)
"positionMode": "HEDGE", // Position mode: HEDGE=hedge mode, ONEWAY=one-way mode
"postOnly": 0, // Post only: 0=no (allow taker), 1=yes (maker only)
"price": "104616.7", // Order price (valid for limit orders)
"profit": "0", // Realized PnL (only valid after fill)
"profitRate": "0", // PnL rate (profit / margin)
"quantity": "0.1314", // Current remaining unfilled quantity
"reduceOnly": false, // Reduce only: true=reduce only, false=normal order
"remainingLocked": "687.331719", // Remaining locked margin (unreleased portion)
"side": "BUY", // Direction: BUY=buy/long, SELL=sell/short
"status": "OPEN", // Order status: OPEN=open, FILLED=filled, CANCELED=canceled
"symbolId": "BTC-USDT-M", // Trading pair identifier (BTC-USDT perpetual contract)
"timeInForce": "GTC", // Time in force strategy: GTC=good till canceled, IOC=immediate or cancel, FOK=fill or kill
"totalAmount": "14196.48619", // Total order amount (price * totalQuantity)
"totalQuantity": "0.1357", // Total order quantity
"tpSl": { // Take profit/stop loss settings
"slExecutePrice": null, // Stop loss execution price (if triggered, recorded)
"slPrice": null, // Stop loss trigger price
"slPriceType": null, // Stop loss type (1=limit, 2=market, etc.)
"tpExecutePrice": null, // Take profit execution price (if triggered, recorded)
"tpPrice": null, // Take profit trigger price
"tpPriceType": null // Take profit type (1=limit, 2=market, etc.)
},
"tradeAmount": "449.85181", // Filled amount (cumulative fill amount)
"tradeQuantity": "0.0043", // Filled quantity
"type": "LIMIT", // Order type: LIMIT=limit order, MARKET=market order
"uid": "76957286" // User ID
}
],
"msg": "Request successful",
"success": true
}Error Codes
| Error Code | Description |
|---|---|
| 500 | Server Error |
Code Example
Last updated on: