Query User Current Positions
Request URL
GET /ftapi/v1/openPosition
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| symbolId | STRING | NO | Trading pair |
Response Parameters
| Name | Type | Description |
|---|---|---|
| code | STRING | Response Code |
| msg | STRING | Response Message |
| success | BOOLEAN | Success Flag |
| data[].avgEntryPrice | STRING | |
| data[].bkrFee | STRING | |
| data[].closedFee | STRING | |
| data[].ctime | INTEGER | |
| data[].deductFeeAmount | STRING | |
| data[].deductFundingAmount | STRING | |
| data[].deductLossAmount | STRING | |
| data[].entryValue | STRING | |
| data[].feeAmount | STRING | |
| data[].feeAssetId | STRING | |
| data[].frozenFee | STRING | |
| data[].fundAmount | STRING | |
| data[].lastPrice | STRING | |
| data[].lastUpdateTime | INTEGER | |
| data[].leverage | INTEGER | |
| data[].liquidPrice | STRING | |
| data[].maintainMargin | STRING | |
| data[].margin | STRING | |
| data[].marginMode | STRING | |
| data[].marginRate | STRING | |
| data[].markPrice | STRING | |
| data[].otherClosedFee | STRING | |
| data[].otherMaintainMargin | STRING | |
| data[].pnl | STRING | |
| data[].posTpSlSize | INTEGER | |
| data[].positionId | STRING | |
| data[].positionMode | STRING | |
| data[].profitUnreal | STRING | |
| data[].profitUnrealRate | STRING | |
| data[].quantity | STRING | |
| data[].realizedPnl | STRING | |
| data[].side | STRING | |
| data[].symbolId | STRING | |
| data[].tpSl | STRING | |
| data[].tpSlOrders | ARRAY | |
| data[].tpSlSize | INTEGER | |
| data[].uid | STRING |
Request Example
https://openapi.bittap.com/ftapi/v1/openPosition?symbol=BTC-USDT-MResponse Example
{
"code": "0",
"data": [
{
"avgEntryPrice": "103869.3", // Average entry price (average position price)
"bkrFee": "20.4967084842771385693", // Bankruptcy fee (fee at liquidation)
"closedFee": "21.02090413", // Estimated close fee
"ctime": 1762244453000, // Creation time (timestamp, milliseconds)
"deductFeeAmount": "0", // Deducted fee amount (e.g., platform paid)
"deductFundingAmount": "0", // Deducted funding fee amount
"deductLossAmount": "0", // Deducted loss amount
"entryValue": "41610.04158", // Position value (i.e., position value)
"feeAmount": "20.80502079", // Fee generated by current position
"feeAssetId": "USDT", // Fee currency (e.g., USDT)
"frozenFee": "21.02090413", // Frozen fee (not yet settled)
"fundAmount": "0", // Funding fee
"lastPrice": "104502.9", // Latest trade price (market latest price)
"lastUpdateTime": 1762244490921, // Position last update time (timestamp)
"leverage": 100, // Leverage
"liquidPrice": "102849.4", // Liquidation price (will be force closed below this price)
"maintainMargin": "208.0502079", // Maintenance margin (minimum margin required to maintain position)
"margin": "637.12131993", // Current position margin amount
"marginMode": "ISOLATED", // Margin mode: ISOLATED (isolated margin) / CROSSED (cross margin)
"marginRate": "0.4681638652037805", // Margin rate (margin to position value ratio)
"markPrice": "104548.7", // Mark price (used to calculate unrealized PnL)
"otherClosedFee": "0", // Other contract estimated close fee (e.g., combined position)
"otherMaintainMargin": "0", // Other contract maintenance margin
"pnl": "0", // Close position PnL (settled)
"posTpSlSize": 0, // Position level take profit/stop loss order count
"positionId": "418184455859925120", // Position ID
"positionMode": "HEDGE", // Position mode: HEDGE (hedge) / ONE_WAY (one-way)
"profitUnreal": "272.16764", // Unrealized PnL (current floating PnL)
"profitUnrealRate": "0.6541", // Unrealized PnL rate (floating return rate)
"quantity": "0.4006", // Position quantity
"realizedPnl": "-20.80502079", // Realized PnL (PnL from closed portion)
"side": "BUY", // Direction: BUY (long) / SELL (short)
"symbolId": "BTC-USDT-M", // Contract ID, e.g., BTC-USDT perpetual contract
"tpSl": null, // Take profit/stop loss object (null if not set)
"tpSlOrders": [], // Take profit/stop loss order list
"tpSlSize": 0, // Take profit/stop loss order count
"uid": "76957286" // User ID
}
],
"msg": "Request successful",
"success": true
}Error Codes
| Error Code | Description |
|---|---|
| 500 | Server Error |
Code Example
Last updated on: