查询历史订单
类型: GET
接口: /spot/v4/history-order
限流规则
10次/秒/apikey
参数
参数名 | 类型 | 是否必填 | 默认值 | 描述 |
---|---|---|---|---|
symbol | string | 否 | 交易对,如不填写则代表全部 | |
bizType | string | 否 | SPOT(现货), LEVER(杠杆) | |
side | string | 否 | BUY(买入), SELL(卖出) | |
type | string | 否 | LIMIT(限价), MARKET(市价) | |
state | string | 否 | 订单状态,PARTIALLY_FILLED(部分成交), FILLED(完全成交), CANCELED(已取消), REJECTED(已拒绝), EXPIRED(已过期) | |
fromId | number | 否 | 起始ID | |
direction | string | 否 | 查询方向:PREV(向前), NEXT(向后) | |
limit | number | 否 | 20 | 限制条数,最大100 |
startTime | number | 否 | 开始时间,例如:1657682804112 | |
endTime | number | 否 | 结束时间 | |
hiddenCanceled | boolean | 否 | 是否隐藏已取消订单 |
响应示例
响应
{
"rc": 0,
"mc": "string",
"ma": [{}],
"result": {
"hasPrev": true,
"hasNext": true,
"items": [ // // 关于字段信息,请参考“获取单个”接口
{
"symbol": "BTC_USDT",
"orderId": "6216559590087220004",
"clientOrderId": "16559590087220001",
"baseCurrency": "string",
"quoteCurrency": "string",
"side": "BUY",
"type": "LIMIT",
"timeInForce": "GTC",
"price": "40000",
"origQty": "2",
"origQuoteQty": "48000",
"executedQty": "1.2",
"leavingQty": "string",
"tradeBase": "2",
"tradeQuote": "48000",
"avgPrice": "42350",
"fee": "string",
"feeCurrency": "string",
"state": "NEW",
"time": 1655958915583,
"updatedTime": 1655958915583
}
]
}
}