查询自动减仓历史
类型: GET
描述: /future/user/v1/auto-deleverage/history
限流规则
200/s/apikey
请求参数
| 名称 | 类型 | 必填 | 默认值 | 描述 | 范围 |
|---|---|---|---|---|---|
| id | integer | FALSE | 1 | 页码 | |
| direction | string | FALSE | NEXT | NEXT;PREVIOUS | |
| limit | integer | FALSE | 10 | 单页数量 | |
| startTime | integer | FALSE | N/A | 开始时间 | 默认查询90天前 |
| endTime | integer | FALSE | N/A | 结束时间 | |
| symbol | string | FALSE | N/A | 交易对 |
请求示例
curl -G "https://fapi.xt.com/future/user/v1/auto-deleverage/history" \
-H "validate-appkey: $APPKEY" \ # 必须
-H "validate-timestamp: $TIMESTAMP" \ # 必须
-H "validate-singature: $SIGNATURE" \ # 必须
-H "Content-Type: application/x-www-form-urlencoded" \ # 必须
-d "symbol=btc_usdt" \
-d "page=1" \
-d "size=10" \
-d "startTime=1762074200000" \
-d "endTime=1762074242467" \
响应示例
{
"error": {
"code": "",
"msg": ""
},
"msgInfo": "",
"result": {
"hasNext": false, // 是否有下一页
"hasPrev": false, // 是否有上一页
"items": [ // 数据列表
{
"id": "2876543210987654321", // string,ADL记录ID(Long转string)
"symbol": "BTCUSDT", // string,交易对
"positionSide": "LONG", // string,"LONG" 多头 / "SHORT" 空头
"quantity": "0.028", // string,被ADL强制减仓的数量(张)
"price": "67234.50", // string,ADL执行时的成交价格
"realizedProfit": "-87.60", // string,本次ADL产生的已实现盈亏(通常为负)
"createdTime": 1735698765432, // number,ADL发生时间戳(毫秒)
"welfareAccount": false, // boolean,是否为体验金账户
"uid": 10086, // number,用户UID(Long原样输出,未加序列化)
"accountId": 900123456789 // number,账户ID(Long原样输出)
}
]
},
"returnCode": 0
}
错误码
| 错误码 | 描述 |
|---|---|
| invalid_direction | direction 不正确 |
| invalid_limit | limit参数设置不正确 |
| invalid_symbol | 交易对不存在 |