Skip to Content
📈 Futures API交易接口查询用户当前持仓

查询用户当前持仓

请求地址

GET /ftapi/v1/openPosition

请求参数

名称类型是否必须描述
symbolIdSTRINGNO交易对

响应参数

参数名类型描述
codestring响应代码
msgstring响应消息
successboolean是否成功
dataarray持仓列表
data.avgEntryPricestring平均开仓价
data.bkrFeestring破产手续费
data.closedFeestring预计平仓手续费
data.ctimelong创建时间
data.deductFeeAmountstring抵扣的手续费金额
data.deductFundingAmountstring抵扣的资金费用金额
data.deductLossAmountstring抵扣的亏损金额
data.entryValuestring仓位价值
data.feeAmountstring当前仓位产生的手续费
data.feeAssetIdstring手续费币种
data.frozenFeestring冻结手续费
data.fundAmountstring资金费用
data.lastPricestring最新成交价
data.lastUpdateTimelong仓位最近更新时间
data.leverageinteger杠杆倍数
data.liquidPricestring强平价格
data.maintainMarginstring维持保证金
data.marginstring当前仓位保证金金额
data.marginModestring保证金模式
data.marginRatestring保证金率
data.markPricestring标记价格
data.otherClosedFeestring其它合约预计平仓手续费
data.otherMaintainMarginstring其它合约维持保证金
data.pnlstring平仓盈亏
data.posTpSlSizeinteger仓位层级止盈止损订单数量
data.positionIdstring仓位 ID
data.positionModestring持仓模式
data.profitUnrealstring未实现盈亏
data.profitUnrealRatestring未实现盈亏率
data.quantitystring仓位数量
data.realizedPnlstring已实现盈亏
data.sidestring方向
data.symbolIdstring合约 ID
data.tpSlobject止盈止损对象
data.tpSlOrdersarray止盈止损订单列表
data.tpSlSizeinteger止盈止损单数量
data.uidstring用户 ID

请求示例

https://openapi.bittap.com/ftapi/v1/openPosition?symbol=BTC-USDT-M

响应示例

{ "code": "0", "data": [ { "avgEntryPrice": "103869.3", // 平均开仓价(平均持仓价格) "bkrFee": "20.4967084842771385693", // 破产手续费(爆仓时的手续费) "closedFee": "21.02090413", // 预计平仓手续费 "ctime": 1762244453000, // 创建时间(时间戳,毫秒) "deductFeeAmount": "0", // 抵扣的手续费金额(如平台代付) "deductFundingAmount": "0", // 抵扣的资金费用金额 "deductLossAmount": "0", // 抵扣的亏损金额 "entryValue": "41610.04158", // 仓位价值(即持仓价值) "feeAmount": "20.80502079", // 当前仓位产生的手续费 "feeAssetId": "USDT", // 手续费币种(如 USDT) "frozenFee": "21.02090413", // 冻结手续费(尚未结算) "fundAmount": "0", // 资金费用(Funding Fee) "lastPrice": "104502.9", // 最新成交价(市场最新价) "lastUpdateTime": 1762244490921, // 仓位最近更新时间(时间戳) "leverage": 100, // 杠杆倍数 "liquidPrice": "102849.4", // 强平价格(低于该价格将被强制平仓) "maintainMargin": "208.0502079", // 维持保证金(维持仓位所需最小保证金) "margin": "637.12131993", // 当前仓位保证金金额 "marginMode": "ISOLATED", // 保证金模式:ISOLATED(逐仓)/ CROSSED(全仓) "marginRate": "0.4681638652037805", // 保证金率(保证金与仓位价值比) "markPrice": "104548.7", // 标记价格(用于计算未实现盈亏) "otherClosedFee": "0", // 其它合约预计平仓手续费(例如组合仓位) "otherMaintainMargin": "0", // 其它合约维持保证金 "pnl": "0", // 平仓盈亏(已结算) "posTpSlSize": 0, // 仓位层级止盈止损订单数量 "positionId": "418184455859925120", // 仓位 ID "positionMode": "HEDGE", // 持仓模式:HEDGE(对冲)/ ONE_WAY(单向) "profitUnreal": "272.16764", // 未实现盈亏(当前浮动盈亏) "profitUnrealRate": "0.6541", // 未实现盈亏率(浮动收益率) "quantity": "0.4006", // 仓位数量 "realizedPnl": "-20.80502079", // 已实现盈亏(已平仓部分的盈亏) "side": "BUY", // 方向:BUY(做多) / SELL(做空) "symbolId": "BTC-USDT-M", // 合约 ID,例如 BTC-USDT 永续合约 "tpSl": null, // 止盈止损对象(未设置则为 null) "tpSlOrders": [], // 止盈止损订单列表 "tpSlSize": 0, // 止盈止损单数量 "uid": "76957286" // 用户 ID } ], "msg": "Request successful", "success": true }

错误码解释

代码描述
500系统内部错误

代码示例

最后更新于: