币币交易
分页查询订单记录
根据时间范围分页查询指定交易对的订单信息
POST
/
platformapi
/
chainup
/
open
/
record
/
queryOrderPageByTime
curl --request POST \
--url http://service.xxx.com/platformapi/chainup/open/record/queryOrderPageByTime \
--header 'Content-Type: application/json' \
--data '{
"appKey": "{{appKey}}",
"sign": "{{sign}}",
"symbol": "btcusdt",
"startDate": 1745911095000,
"endDate": 1746170295000,
"page": "3",
"pageSize": "20"
}'{
"code": "0",
"msg": "suc",
"data": {
"count": 243,
"pageSize": 20,
"page": 3,
"list": [
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 2,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "14957.89473684",
"volume": "0.00070372",
"avgPrice": "14793.882097896046",
"dealMoney": "10.4107507099314056",
"dealVolume": "0.00070372",
"ctime": 1745995453132
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 2,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "15078.94736842",
"volume": "0.00069808",
"avgPrice": "14873.398895549862",
"dealMoney": "10.3828223010054482",
"dealVolume": "0.00069808",
"ctime": 1745995453227
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "12900",
"volume": "0.00103724",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995454080
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "13021.05263157",
"volume": "0.0010276",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995454176
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "13142.10526315",
"volume": "0.00101813",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995455005
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "13263.15789473",
"volume": "0.00100884",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995455130
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "13384.21052631",
"volume": "0.00099971",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995455250
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "13505.26315789",
"volume": "0.00099075",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995455395
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "13626.31578947",
"volume": "0.00098195",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995456052
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "13747.36842105",
"volume": "0.0009733",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995456176
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "13868.42105263",
"volume": "0.00096481",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995456259
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "13989.47368421",
"volume": "0.00095646",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995456341
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "14110.52631578",
"volume": "0.00094826",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995457022
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "14231.57894736",
"volume": "0.00094019",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995457104
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "14352.63157894",
"volume": "0.00093226",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995457200
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "14473.68421052",
"volume": "0.00092446",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995457285
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "14594.7368421",
"volume": "0.00091679",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995458042
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 2,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "14715.78947368",
"volume": "0.00090925",
"avgPrice": "14715.78947368",
"dealMoney": "13.38033157894354",
"dealVolume": "0.00090925",
"ctime": 1745995458160
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 2,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "14836.84210526",
"volume": "0.00090183",
"avgPrice": "14836.84210526",
"dealMoney": "13.3803093157866258",
"dealVolume": "0.00090183",
"ctime": 1745995458298
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 2,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "14957.89473684",
"volume": "0.00089454",
"avgPrice": "14942.713796903459",
"dealMoney": "13.3668551998820208",
"dealVolume": "0.00089454",
"ctime": 1745995458980
}
]
}
}API 说明
- 根据时间范围分页查询订单信息,需要指定交易对
- 时间范围不能超过7天
请求参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| appKey | string | 是 | 商户唯一标识 |
| sign | string | 是 | 签名 |
| symbol | string | 是 | 交易对(如:btcusdt) |
| startDate | long | 是 | 开始时间戳 |
| endDate | long | 是 | 结束时间戳 |
| page | long | 否 | 页码,默认1 |
| pageSize | long | 否 | 每页记录数,默认20,最大1000 |
请求示例
cURL
curl --request POST \
--url http://service.xxx.com/platformapi/chainup/open/record/queryOrderPageByTime \
--header 'Content-Type: application/json' \
--data '{
"appKey": "{your_app_key}",
"sign": "{sign}",
"symbol": "btcusdt",
"startDate": 1606823070215,
"endDate": 1606909470215,
"page": 1,
"pageSize": 20
}'
响应值枚举说明:
- status(订单状态):
- 0: init(初始化)
- 1: new(新订单)
- 2: filled(完全成交)
- 3: part_filled(部分成交)
- 4: canceled(已取消)
- 5: pending_cancel(取消中)
- 6: expired(已过期)
- source(订单来源):
- 1: web
- 2: app
- 3: api
- orderType(订单类型):
- 1: 普通订单
- 2: 杠杆订单
- 3: 全仓杠杆订单
- type(委托类型):
- 1: limit(限价单)
- 2: market(市价单)
- 3: stop(止损单)
响应参数
| 名称 | 类型 | 描述 |
|---|---|---|
| count | long | 总记录数 |
| page | long | 当前页码 |
| pageSize | long | 每页记录数 |
| list | array | 订单列表 |
| └─id | string | 订单ID |
| └─userId | int | 用户ID |
| └─side | string | 交易方向(buy/sell) |
| └─orderType | int | 订单类型 |
| └─status | int | 订单状态 |
| └─source | int | 来源 |
| └─symbol | string | 交易对 |
| └─showSymbol | string | 显示的交易对名称 |
| └─price | string | 订单价格 |
| └─volume | string | 订单数量 |
| └─avgPrice | string | 平均成交价格 |
| └─dealMoney | string | 成交金额 |
| └─dealVolume | string | 成交数量 |
| └─ctime | long | 创建时间(毫秒) |
响应示例
{
"code": "0",
"msg": "suc",
"data": {
"count": 5,
"page": 1,
"pageSize": 20,
"list": [
{
"id": 327184612876959744,
"userId": 4107676,
"side": "BUY",
"orderType": 1,
"status": 4,
"source": 1,
"symbol": "btcusdt",
"showSymbol": "BTC/USDT",
"price": "581.57",
"volume": "1",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1606823070215
},
{
"id": 523243960080728064,
"userId": 4107382,
"side": "BUY",
"orderType": 1,
"status": 2,
"source": 2,
"symbol": "btcusdt",
"showSymbol": "BTC/USDT",
"price": "2000",
"volume": "12.5",
"avgPrice": "1996.5161097808",
"dealMoney": "24956.45137226",
"dealVolume": "12.5",
"ctime": 1618219033536
}
]
}
}
Body
application/json
appKey
string
requiredsign
string
requiredsymbol
string
requiredstartDate
integer
requiredendDate
integer
requiredpage
string
default: 1requiredpageSize
string
default: 20requiredResponse
200 - application/json
code
string
requiredmsg
string
requireddata
object
requiredcurl --request POST \
--url http://service.xxx.com/platformapi/chainup/open/record/queryOrderPageByTime \
--header 'Content-Type: application/json' \
--data '{
"appKey": "{{appKey}}",
"sign": "{{sign}}",
"symbol": "btcusdt",
"startDate": 1745911095000,
"endDate": 1746170295000,
"page": "3",
"pageSize": "20"
}'{
"code": "0",
"msg": "suc",
"data": {
"count": 243,
"pageSize": 20,
"page": 3,
"list": [
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 2,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "14957.89473684",
"volume": "0.00070372",
"avgPrice": "14793.882097896046",
"dealMoney": "10.4107507099314056",
"dealVolume": "0.00070372",
"ctime": 1745995453132
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 2,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "15078.94736842",
"volume": "0.00069808",
"avgPrice": "14873.398895549862",
"dealMoney": "10.3828223010054482",
"dealVolume": "0.00069808",
"ctime": 1745995453227
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "12900",
"volume": "0.00103724",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995454080
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "13021.05263157",
"volume": "0.0010276",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995454176
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "13142.10526315",
"volume": "0.00101813",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995455005
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "13263.15789473",
"volume": "0.00100884",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995455130
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "13384.21052631",
"volume": "0.00099971",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995455250
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "13505.26315789",
"volume": "0.00099075",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995455395
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "13626.31578947",
"volume": "0.00098195",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995456052
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "13747.36842105",
"volume": "0.0009733",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995456176
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "13868.42105263",
"volume": "0.00096481",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995456259
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "13989.47368421",
"volume": "0.00095646",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995456341
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "14110.52631578",
"volume": "0.00094826",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995457022
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "14231.57894736",
"volume": "0.00094019",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995457104
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "14352.63157894",
"volume": "0.00093226",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995457200
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "14473.68421052",
"volume": "0.00092446",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995457285
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 0,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "14594.7368421",
"volume": "0.00091679",
"avgPrice": "0",
"dealMoney": "0",
"dealVolume": "0",
"ctime": 1745995458042
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 2,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "14715.78947368",
"volume": "0.00090925",
"avgPrice": "14715.78947368",
"dealMoney": "13.38033157894354",
"dealVolume": "0.00090925",
"ctime": 1745995458160
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 2,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "14836.84210526",
"volume": "0.00090183",
"avgPrice": "14836.84210526",
"dealMoney": "13.3803093157866258",
"dealVolume": "0.00090183",
"ctime": 1745995458298
},
{
"id": 2690536306533251000,
"userId": 24003817,
"side": "BUY",
"orderType": 1,
"status": 2,
"source": 6,
"symbol": "btcusdt",
"showSymbol": "BTC1/USDT4",
"price": "14957.89473684",
"volume": "0.00089454",
"avgPrice": "14942.713796903459",
"dealMoney": "13.3668551998820208",
"dealVolume": "0.00089454",
"ctime": 1745995458980
}
]
}
}