获取持仓
返回调用方的合约持仓,可选择按市场交易对过滤。
请求参数
| 名称 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
| symbol | String | 否 | 可选的市场交易对过滤条件(例如 BTC-PERP)。省略以返回所有持仓。 |
响应内容
| 名称 | 类型 | 描述 |
|---|---|---|
| marginType | String | 仓位的保证金模式(例如 CROSS 或 ISOLATED)。 |
| entryPrice | Double | 仓位的平均开仓价格。 |
| markPrice | Double | 用于对仓位估值的最新标记价格。 |
| symbol | String | 仓位的市场交易对(例如 BTC-PERP)。 |
| side | String | 仓位方向(BUY 为多头,SELL 为空头)。 |
| notionalValue | Double | 仓位的名义价值,以结算币种计。 |
| settleWithAsset | String | 用于结算此仓位盈亏和手续费的资产。 |
| unrealizedProfitLoss | Double | 按最新标记价格计算的未实现盈亏。 |
| totalMaintenanceMargin | Double | 当前仓位所需的维持保证金总额。 |
| size | Integer | 仓位数量(合约张数)。 |
| liquidationPrice | Double | 基于当前保证金和标记价格估算的强平价格。 |
| isolatedLeverage | Double | 仓位上配置的逐仓杠杆;仅在逐仓保证金模式下适用。 |
| timestamp | Long | 仓位快照的服务器时间戳,单位为自 epoch 起的毫秒数。 |
| positionMode | String | 仓位模式:ONE_WAY(净仓位)或 HEDGE(独立的多空仓位)。 |
| positionDirection | String | 对冲模式下的仓位方向(LONG 或 SHORT)。 |
| positionId | String | 仓位的唯一标识符。 |
| walletName | String | 持有该仓位的钱包名称。 |
| currentLeverage | Double | 当前实际应用于仓位的有效杠杆。 |
| minimumRequiredMargin | Double | 以当前数量持有该仓位所需的最小起始保证金。 |
takeProfitOrder:
| 名称 | 类型 | 描述 |
|---|---|---|
| orderId | String | |
| side | String | BUY · SELL |
| triggerPrice | Double | |
| triggerUseLastPrice | Boolean |
stopLossOrder:
| 名称 | 类型 | 描述 |
|---|---|---|
| orderId | String | |
| side | String | BUY · SELL |
| triggerPrice | Double | |
| triggerUseLastPrice | Boolean |
example
GET
https://api.btse.com/futures/api/v3/trade/positionsResponse (default)
[
{
"marginType": "ISOLATED",
"entryPrice": 60010,
"markPrice": 60010,
"symbol": "BTC-PERP",
"side": "BUY",
"notionalValue": 3.6006,
"settleWithAsset": "USD",
"unrealizedProfitLoss": 0,
"totalMaintenanceMargin": 0.01872312,
"size": 6,
"liquidationPrice": 53271.59177724,
"isolatedLeverage": 10,
"timestamp": 1784882344522,
"takeProfitOrder": null,
"stopLossOrder": null,
"positionMode": "ONE_WAY",
"positionDirection": null,
"positionId": "BTC-PERP-USDT",
"walletName": "BTC-PERP Isolated Wallet",
"currentLeverage": 7.53,
"minimumRequiredMargin": 0.41018054
}
]