成交历史
返回调用方在某交易对上的近期成交记录,可选择按时间范围、数量、订单 ID 或客户端订单 ID 进行筛选。
请求参数
| 名称 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
| symbol | String | 是 | 交易对 |
| startTime | Long | 否 | 仅包含在此 Unix 毫秒时间戳(含)之后的成交 |
| endTime | Long | 否 | 仅包含在此 Unix 毫秒时间戳(含)之前的成交 |
| count | Integer | 否 | 返回成交的最大数量,默认为 10 |
| clOrderId | String | 否 | 用于筛选的客户端订单 ID |
| orderId | String | 否 | 用于筛选的订单 ID |
| isMatchSymbol | Boolean | 否 | 若为 true,则按基础/计价货币而非精确的 symbol 字符串匹配成交,以同时覆盖同一交易对的别名交易对 |
响应内容
| 名称 | 类型 | 描述 |
|---|---|---|
| serialId | Long | 此成交记录的单调递增序列标识符。 |
| tradeId | String | 唯一的成交标识符。 |
| orderId | String | 此成交所对应订单的标识符。 |
| clOrderId | String | 发起订单的客户端订单标识符。 |
| symbol | String | 交易对,格式为 BASE-QUOTE(例如 BTC-USDT)。 |
| base | String | 交易对的基础货币。 |
| quote | String | 交易对的计价货币。 |
| orderSide | String | 订单方向:BUY 或 SELL。 |
| orderType | Integer | 发起订单的数字订单类型代码(限价、市价、锚定、TWAP)。 |
| triggerType | Integer | 数字触发订单类型代码(止损、止盈、止损限价或止盈限价)。仅当发起订单为触发订单时才有意义。 |
| triggerPrice | Double | 发起订单的触发价格。仅当发起订单为触发订单时才有意义。 |
| price | Double | 此成交的执行价格。 |
| size | Double | 发起订单的原始订单数量。 |
| filledSize | Double | 此成交填充的数量,以基础货币计。 |
| feeCurrency | String | 收取交易手续费所用的货币。 |
| feeAmount | Double | 此成交收取的交易手续费金额,以 feeCurrency 计。 |
| timestamp | Long | 成交执行时间戳,单位为 Unix 纪元毫秒。 |
example
GET
https://api.btse.com/spot/api/v4/trade/trade_historyResponse (default)
[
{
"serialId": 375599088,
"tradeId": "de1a79b8-f408-4e05-b8b7-7ed3c4e86542",
"orderId": "6c72d906-cb8f-469c-8ab0-b97bc8dff9c2",
"clOrderId": null,
"symbol": "BTC-USD",
"base": "BTC",
"quote": "USD",
"orderSide": "BUY",
"orderType": 77,
"triggerType": 0,
"triggerPrice": 0,
"price": 64235.97008,
"size": 1.9,
"filledSize": 0.00002,
"feeCurrency": "BTC",
"feeAmount": 1e-8,
"timestamp": 1784890959551
},
{
"serialId": 375599086,
"tradeId": "7ed825de-1903-4020-b74f-e04cdce835b9",
"orderId": "1ec3cc46-928a-4cbe-8683-852bc5de7f9f",
"clOrderId": null,
"symbol": "BTC-USD",
"base": "BTC",
"quote": "USD",
"orderSide": "BUY",
"orderType": 77,
"triggerType": 0,
"triggerPrice": 0,
"price": 64234.684332,
"size": 1.9,
"filledSize": 0.00002,
"feeCurrency": "BTC",
"feeAmount": 1e-8,
"timestamp": 1784890649859
},
{
"serialId": 375599084,
"tradeId": "68ec4220-4e9b-4d7a-a0c6-560b46f7605a",
"orderId": "ca099453-6553-4eae-b696-26f59c50c3b2",
"clOrderId": null,
"symbol": "BTC-USD",
"base": "BTC",
"quote": "USD",
"orderSide": "BUY",
"orderType": 77,
"triggerType": 0,
"triggerPrice": 0,
"price": 64234.684332,
"size": 1.9,
"filledSize": 0.00002,
"feeCurrency": "BTC",
"feeAmount": 1e-8,
"timestamp": 1784890619788
}
]