Spot
Batch Order Record Query (By Symbol)
Query order information for a specified trading pair
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
}
]
}
}API Description
- Batch query order information requires specifying a trading pair
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| appKey | string | Yes | Unique merchant appKey |
| sign | string | Yes | sign |
| symbol | string | Yes | Trading pair (e.g. btcusdt) |
| startId | long | Yes | Start ID (returns data where id > startId) |
| batchSize | long | No | Number of records to return, max 1000, default 100 |
| startDate | long | No | Start time timestamp |
| endDate | long | No | Deadline timestamp |
Request Example
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
}'
Response Value Enum Description:
- status (Order Status):
- 0: init (Initialized)
- 1: new (New Order)
- 2: filled (Fully Filled)
- 3: part_filled (Partially Filled)
- 4: canceled (Canceled)
- 5: pending_cancel (Canceling)
- 6: expired (Expired)
- source (Order Source):
- 1: web
- 2: app
- 3: api
- orderType (Order Type):
- 1: Regular Order
- 2: Margin Order
- 3: Cross Margin Order
- type (Entrust Type):
- 1: limit (Limit Order)
- 2: market (Market Order)
- 3: stop (Stop Order)
Response Parameters
| Name | Type | Description |
|---|---|---|
| count | long | Total record count |
| list | array | Order list |
| └─id | string | Order ID |
| └─userId | int | User ID |
| └─symbol | string | symbol |
| └─showSymbol | string | symbolName |
| └─side | string | Trade side (buy/sell) |
| └─orderType | int | Order type |
| └─status | int | Order status |
| └─source | int | Source |
| └─price | string | Order price |
| └─volume | string | Order quantity |
| └─avgPrice | string | Average deal price |
| └─dealMoney | string | Deal amount |
| └─dealVolume | string | Deal quantity |
| └─ctime | long | Creation time (milliseconds) |
Response Example
{
"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
}
]
}
}