跳转到主要内容

Documentation Index

Fetch the complete documentation index at: https://developer.wooxpro.com/llms.txt

Use this file to discover all available pages before exploring further.

查询仓位详情V2 (KEYED)

适用于查询指定合约的仓位详情V2

请求URL

GET https://cloud-api.wooxpro.com/contract/private/position-v2

请求限制

参见 速率限制详细

请求参数

请求
curl -H 'X-BM-KEY:{{AccessKey}}'
https://cloud-api.wooxpro.com/contract/private/position-v2?symbol=BTCUSDT
参数类型是否必填描述
symbolString选填合约交易对(如BTCUSDT)
accountString选填交易用户
-futures=合约主账号(默认)
-copy_trading=跟单子账号
注意
  • 不传symbol,有仓位的交易对才返回数据,没有仓位的交易对不返回数据
  • 传了symbol,不管有没有仓位,都返回数据,如果用户没有仓位,则仓位相关的字段展示0

响应详情

单向持仓模式下:
{
  "code": 1000,
  "message": "Ok",
  "data": [
    {
      "symbol": "BTCUSDT",
      "leverage": "51",
      "timestamp": 1746687390815,
      "current_fee": "0.0000397",
      "open_timestamp": 0,
      "current_value": "0",
      "mark_price": "98952",
      "position_value": "0",
      "position_cross": "0",
      "maintenance_margin": "0",
      "close_vol": "0",
      "close_avg_price": "0",
      "open_avg_price": "0",
      "entry_price": "0",
      "current_amount": "0",
      "position_amount": "5",
      "realized_value": "0",
      "mark_value": "0",
      "account": "futures",
      "open_type": "isolated",
      "position_side": "both",
      "unrealized_pnl": "0",
      "liquidation_price": "0",
      "max_notional_value": "500000",
      "initial_margin": "0"
    }
  ],
  "trace": "37ffeecd-3a6f-494a-8337-5c3a6012abfa"
}
双向持仓模式下:
{
  "code": 1000,
  "message": "Ok",
  "data": [
    {
      "symbol": "BTCUSDT",
      "leverage": "51",
      "timestamp": 1746687096451,
      "current_fee": "0.0000397",
      "open_timestamp": 0,
      "current_value": "0",
      "mark_price": "98911.62032609",
      "position_value": "0",
      "position_cross": "0",
      "maintenance_margin": "0",
      "close_vol": "0",
      "close_avg_price": "0",
      "open_avg_price": "0",
      "entry_price": "0",
      "current_amount": "0",
      "position_amount": "5",
      "realized_value": "0",
      "mark_value": "0",
      "account": "futures",
      "open_type": "isolated",
      "position_side": "long",
      "unrealized_pnl": "0",
      "liquidation_price": "0",
      "max_notional_value": "500000",
      "initial_margin": "0"
    },
    {
      "symbol": "BTCUSDT",
      "leverage": "51",
      "timestamp": 1746687096451,
      "current_fee": "0.0000397",
      "open_timestamp": 0,
      "current_value": "0",
      "mark_price": "98911.62032609",
      "position_value": "0",
      "position_cross": "0",
      "maintenance_margin": "0",
      "close_vol": "0",
      "close_avg_price": "0",
      "open_avg_price": "0",
      "entry_price": "0",
      "current_amount": "0",
      "position_amount": "5",
      "realized_value": "0",
      "mark_value": "0",
      "account": "futures",
      "open_type": "isolated",
      "position_side": "short",
      "unrealized_pnl": "0",
      "liquidation_price": "0",
      "max_notional_value": "500000",
      "initial_margin": "0"
    }
  ],
  "trace": "ab2131db-5827-45ca-a1be-94522510e107"
}
字段类型描述
leverageString杠杆倍数
symbolString合约名称
current_feeString当前仓位总费用
open_timestampLong开仓时间戳
current_valueString最新价格计算的仓位价值
mark_priceString标记价格
mark_valueString标记价格计算的仓位价值
position_valueString持仓均价计算的仓位价值
open_avg_priceString开仓均价
close_avg_priceString平仓均价
entry_priceString持仓均价
close_volString平仓量
position_crossString追加到仓位的保证金
initial_marginString仓位保证金
maintenance_marginString维持保证金
open_typeString仓位类型
-cross=全仓
-isolated=逐仓
position_sideString仓位方向
-long=多仓
-short=空仓
-both=单向仓位
liquidation_priceString强平价
max_notional_valueString当前最大可持仓价值
current_amountString当前仓位数量
position_amountString当前仓位方向数量
-双向持仓=正数
-单向持仓=正数代表多仓,负数代表空仓
unrealized_pnlString未实现盈亏(PNL)
realized_valueString已实现盈亏
accountString交易用户
-futures=合约主账号
-copy_trading=跟单子账号
timestampLong当前时间戳(ms)