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
      }
    ]
  }
}

接口描述

  • 批量查询订单信息 需要指定币对

请求参数

参数名类型必填说明
appKeystring商户唯一appKey
signstringsign
symbolstring币对(如 btcusdt)
startIdlong起始 id(返回 id > startId 的数据)
batchSizelong返回数据条数,最大1000,默认100
startDatelong起始时间时间戳
endDatelong截止时间时间戳

请求示例

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(止损单)

返回参数

字段名类型说明
countlong总记录数
listarray订单列表
└─idstring订单ID
└─userIdint用户ID
└─symbolstring交易对
└─showSymbolstring显示的交易对名称
└─sidestring交易方向(buy/sell)
└─orderTypeint订单类型
└─statusint订单状态
└─sourceint来源
└─pricestring订单价格
└─volumestring订单数量
└─avgPricestring成交均价
└─dealMoneystring成交额
└─dealVolumestring成交数量
└─ctimelong创建时间(毫秒)

返回示例

{
    "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
required
appKey
string
required
startDate
integer
endDate
integer
startId
string
default: 0required
batchSize
integer
default: 100
sign
string
required

Response

200 - application/json
code
string
required
msg
string
required
data
object
required