Skip to content

查询当前持仓

查询当前持仓

查询用户的当前持仓列表。

HTTP 请求

GET
/api/perp-trade-api/curr-info/positions

请求频率限制:

  • 建议不超过 10 次/秒

认证要求:

  • 需要 JWT Token
  • 需要 X-Wallet-Address 请求头

请求头

名称 类型 必填 描述
Authorization string JWT Token,格式:Bearer {token}
X-Wallet-Address string 钱包地址

请求参数

名称 类型 必填 描述
symbol string 交易对,如 ETH-PERP,不传则查询所有交易对

响应字段说明

返回持仓数组,每个持仓包含:

名称 类型 描述
id long 持仓 ID
userAddress string 用户地址
symbol string 交易对
avgEntryPrice string 平均开仓价格
margin string 保证金
leverage string 杠杆
quantity string 数量
createdAt long 创建时间(毫秒)
updatedAt long 更新时间(毫秒)
positionSelectedLeverage string 选择的杠杆
marginType string 保证金类型
oraclePrice string 预言机价格
midMarketPrice string 中间市场价格
liquidationPrice string 强平价格
side string 方向(LONG/SHORT)
positionValue string 仓位价值
unrealizedProfit string 未实现盈亏
roe string 未实现盈亏百分比
fundingDue string 未结算资金费率
fundingFeeNext string 预计下次资金费率
settlementFundingFee string 此仓位已结资金费率
netMargin string 净保证金
isDeliste integer 是否已经下线
positionQtyReducible string 可减少仓位数量
tpPrice string 止盈价格
slPrice string 止损价格
tpslNum integer 止盈止损订单总数

响应示例

{
  "code": 200,
  "message": "success",
  "data": [
    {
      "id": 123,
      "userAddress": "0xab7f6e97232d633689cf762989455cceb769587c69a9f09a23f537f5605f9e78",
      "symbol": "ETH-PERP",
      "avgEntryPrice": "2500",
      "margin": "500",
      "leverage": "5",
      "quantity": "1",
      "createdAt": 1700000000000,
      "updatedAt": 1700000000000,
      "positionSelectedLeverage": "5",
      "marginType": "ISOLATED",
      "oraclePrice": "2505",
      "midMarketPrice": "2505",
      "liquidationPrice": "2000",
      "side": "LONG",
      "positionValue": "2505",
      "unrealizedProfit": "5",
      "roe": "0.01",
      "fundingDue": "0.1",
      "fundingFeeNext": "0.0001",
      "settlementFundingFee": "0.5",
      "netMargin": "505",
      "isDeliste": 0,
      "positionQtyReducible": "1",
      "tpPrice": "2600",
      "slPrice": "2400",
      "tpslNum": 2
    }
  ]
}