币币交易
批量订单记录查询(指定币对)
查询指定币对订单信息
POST
/
platformapi
/
chainup
/
open
/
record
/
batchQueryOrderListBySymbol
curl --request POST \
--url http://service.xxx.com/platformapi/chainup/open/record/batchQueryOrderListBySymbol \
--header 'Content-Type: application/json' \
--data '"{\n \"symbol\": \"eth1658usdt1658\",\n // \"appKey\": \"xfnh_1637\",\n \"appKey\": \"demoex_2851\",\n // \"startDate\": 1735029787000,\n // \"endDate\": 1736879747000,\n \"startId\":\"1191174940109264939\",\n \"batchSize\": 100,\n \"sign\": \"{{sign}}\"\n}"'{
"code": "0",
"msg": "suc",
"data": {
"list": [
{
"id": 1191174940109265000,
"userId": 24042728,
"side": "SELL",
"orderType": 1,
"status": 2,
"source": 5,
"price": "1147.24",
"volume": "0.007",
"avgPrice": "1148.47",
"dealMoney": "8.03929",
"dealVolume": "0.007",
"ctime": 1657008385000
},
{
"id": 1191174940109265000,
"userId": 24042728,
"side": "SELL",
"orderType": 1,
"status": 2,
"source": 5,
"price": "1147.3",
"volume": "0.005",
"avgPrice": "1148.47",
"dealMoney": "5.74235",
"dealVolume": "0.005",
"ctime": 1657008385000
},
{
"id": 1191174940109265000,
"userId": 24042728,
"side": "SELL",
"orderType": 1,
"status": 2,
"source": 5,
"price": "1147.36",
"volume": "0.009",
"avgPrice": "1148.47",
"dealMoney": "10.33623",
"dealVolume": "0.009",
"ctime": 1657008385000
},
{
"id": 1191174940109265000,
"userId": 24042728,
"side": "SELL",
"orderType": 1,
"status": 2,
"source": 5,
"price": "1147.43",
"volume": "0.008",
"avgPrice": "1148.47",
"dealMoney": "9.18776",
"dealVolume": "0.008",
"ctime": 1657008385000
},
{
"id": 1191174940109265000,
"userId": 24042728,
"side": "SELL",
"orderType": 1,
"status": 2,
"source": 5,
"price": "1147.5",
"volume": "0.008",
"avgPrice": "1148.47",
"dealMoney": "9.18776",
"dealVolume": "0.008",
"ctime": 1657008385000
}
]
}
}接口描述
- 批量查询订单信息 需要指定币对
请求参数
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| appKey | string | 是 | 商户唯一appKey |
| sign | string | 是 | sign |
| symbol | string | 是 | 币对(如 btcusdt) |
| startId | long | 是 | 起始 id(返回 id > startId 的数据) |
| batchSize | long | 否 | 返回数据条数,最大1000,默认100 |
| startDate | long | 否 | 起始时间时间戳 |
| endDate | long | 否 | 截止时间时间戳 |
请求示例
cURL
curl --request POST \
--url http://service.xxx.com/platformapi/chainup/open/record/batchQueryOrderListBySymbol \
--header 'Content-Type: application/json' \
--data '{
"appKey": "{your_app_key}",
"sign": "{sign}",
"symbol": "btcusdt",
"startId": 0,
"batchSize": 100
}'
返回值枚举说明:
- 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 | 总记录数 |
| list | array | 订单列表 |
| └─id | string | 订单ID |
| └─userId | int | 用户ID |
| └─symbol | string | 交易对 |
| └─showSymbol | string | 显示的交易对名称 |
| └─side | string | 交易方向(buy/sell) |
| └─orderType | int | 订单类型 |
| └─status | int | 订单状态 |
| └─source | int | 来源 |
| └─price | string | 订单价格 |
| └─volume | string | 订单数量 |
| └─avgPrice | string | 成交均价 |
| └─dealMoney | string | 成交额 |
| └─dealVolume | string | 成交数量 |
| └─ctime | long | 创建时间(毫秒) |
返回示例
{
"code": "0",
"msg": "suc",
"data": {
"list": [
{
"id": 327184612876959744,
"userId": 4107676,
"side": "BUY",
"orderType": 1,
"status": 4,
"source": 1,
"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,
"price": "2000",
"volume": "12.5",
"avgPrice": "1996.5161097808",
"dealMoney": "24956.45137226",
"dealVolume": "12.5",
"ctime": 1618219033536
},
{
"id": 523243960080728065,
"userId": 4107382,
"side": "BUY",
"orderType": 1,
"status": 2,
"source": 2,
"price": "2001",
"volume": "1",
"avgPrice": "2001",
"dealMoney": "2001",
"dealVolume": "1",
"ctime": 1618219041088
},
{
"id": 523243960080728066,
"userId": 4107382,
"side": "BUY",
"orderType": 1,
"status": 2,
"source": 2,
"price": "2002",
"volume": "1",
"avgPrice": "2002",
"dealMoney": "2002",
"dealVolume": "1",
"ctime": 1618219046448
},
{
"id": 523243960080728067,
"userId": 4107382,
"side": "BUY",
"orderType": 1,
"status": 2,
"source": 2,
"price": "2003",
"volume": "1",
"avgPrice": "2003",
"dealMoney": "2003",
"dealVolume": "1",
"ctime": 1618219058364
}
]
}
}
Body
application/json
symbol
string
requiredappKey
string
requiredstartDate
integer
endDate
integer
startId
string
default: 0requiredbatchSize
integer
default: 100sign
string
requiredResponse
200 - application/json
code
string
requiredmsg
string
requireddata
object
requiredcurl --request POST \
--url http://service.xxx.com/platformapi/chainup/open/record/batchQueryOrderListBySymbol \
--header 'Content-Type: application/json' \
--data '"{\n \"symbol\": \"eth1658usdt1658\",\n // \"appKey\": \"xfnh_1637\",\n \"appKey\": \"demoex_2851\",\n // \"startDate\": 1735029787000,\n // \"endDate\": 1736879747000,\n \"startId\":\"1191174940109264939\",\n \"batchSize\": 100,\n \"sign\": \"{{sign}}\"\n}"'{
"code": "0",
"msg": "suc",
"data": {
"list": [
{
"id": 1191174940109265000,
"userId": 24042728,
"side": "SELL",
"orderType": 1,
"status": 2,
"source": 5,
"price": "1147.24",
"volume": "0.007",
"avgPrice": "1148.47",
"dealMoney": "8.03929",
"dealVolume": "0.007",
"ctime": 1657008385000
},
{
"id": 1191174940109265000,
"userId": 24042728,
"side": "SELL",
"orderType": 1,
"status": 2,
"source": 5,
"price": "1147.3",
"volume": "0.005",
"avgPrice": "1148.47",
"dealMoney": "5.74235",
"dealVolume": "0.005",
"ctime": 1657008385000
},
{
"id": 1191174940109265000,
"userId": 24042728,
"side": "SELL",
"orderType": 1,
"status": 2,
"source": 5,
"price": "1147.36",
"volume": "0.009",
"avgPrice": "1148.47",
"dealMoney": "10.33623",
"dealVolume": "0.009",
"ctime": 1657008385000
},
{
"id": 1191174940109265000,
"userId": 24042728,
"side": "SELL",
"orderType": 1,
"status": 2,
"source": 5,
"price": "1147.43",
"volume": "0.008",
"avgPrice": "1148.47",
"dealMoney": "9.18776",
"dealVolume": "0.008",
"ctime": 1657008385000
},
{
"id": 1191174940109265000,
"userId": 24042728,
"side": "SELL",
"orderType": 1,
"status": 2,
"source": 5,
"price": "1147.5",
"volume": "0.008",
"avgPrice": "1148.47",
"dealMoney": "9.18776",
"dealVolume": "0.008",
"ctime": 1657008385000
}
]
}
}