跳到主要内容

获取全部合约仓位信息

限频规则:5次/秒/UID

描述

返回指定productType当前全部的持仓信息

HTTP请求

  • GET /api/v2/mix/position/all-position
请求示例
curl "https://api.bitget.com/api/v2/mix/position/all-position?productType=USDT-FUTURES&marginCoin=USDT" \
-H "ACCESS-KEY:*******" \
-H "ACCESS-SIGN:*" \
-H "ACCESS-PASSPHRASE:*" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:en-US" \
-H "Content-Type: application/json"

请求参数

参数名参数类型是否必须描述
productTypeString产品类型
USDT-FUTURES USDT专业合约
COIN-FUTURES 混合合约
USDC-FUTURES USDC专业合约
SUSDT-FUTURES USDT专业合约模拟盘
SCOIN-FUTURES 混合合约模拟盘
SUSDC-FUTURES USDC专业合约模拟盘
marginCoinString保证金币种,必须大写,例如USDT
返回示例
{
"code": "00000",
"msg": "success",
"requestTime": 21312312312321,
"data": [
{
"marginCoin": "USDT",
"symbol": "BTCUSDT",
"holdSide": "long",
"openDelegateSize": "0.01",
"marginSize": "9.6695050093373343",
"available": "0.01",
"locked": "0.09",
"total": "0.01",
"leverage": "20",
"achievedProfits": "0",
"openPriceAvg": "25000",
"marginMode": "isolated",
"posMode": "hedge_mode",
"unrealizedPL": "1",
"liquidationPrice": "24144.1124161806977798",
"keepMarginRate": "0.004",
"markPrice": "25100",
"breakEvenPrice": "24778.97",
"totalFee": "1.45",
"deductedFee": "0.388",
"takeProfit": "3",
"stopLoss": "2",
"takeProfitId": "11111111",
"stopLossId": "11111111",
"marginRatio": "0.1082149545822005",
"assetMode":"single",
"cTime": "1691382137448",
"uTime": "1691382137999"
}
]
}

返回参数

返回字段参数类型字段说明
>symbolString币对名称
>marginCoinString保证金币种
>holdSideString持仓方向
long: 多仓
short: 空仓
>openDelegateSizeString当前委托待成交的数量(基础币)
>marginSizeString保证金数量 (保证金币种)
>availableString仓位可用(基础币)
>lockedString仓位冻结(基础币)
>totalString仓位总数量(available + locked)
>leverageString杠杆倍数
>achievedProfitsString已实现盈亏(不包含资金费用和手续费)
>openPriceAvgString平均开仓价
>marginModeString保证金模式
crossed:全仓
isolated: 逐仓
>posModeString持仓模式
one_way_mode 单向持仓
hedge_mode 双向持仓
>unrealizedPLString未实现盈亏
>liquidationPriceString预估强平价
小于等于0,代表永不爆仓
>keepMarginRateString仓位档位维持保证金率
>markPriceString标记价格
>breakEvenPriceString仓位盈亏平衡价
>totalFeeString资金费用,仓位存续期间,资金费用的累加值,初始值为空,表示还没收取过资金费
>takeProfitString止盈价格
>stopLossString止损价格
>takeProfitIdString止盈订单ID
>stopLossIdString止损订单ID
>deductedFeeString已扣手续费,仓位存续期间扣除的交易手续费
>marginRatioString维持保证金率(0.1代表10%)
>cTimeString创建时间 时间戳 毫秒
集合中从最新时间开始降序。
>assetModeStringsingle : 单币种保证金
union:多币种联合保证金
>uTimeString最近更新时间 时间戳 毫秒