跳到主要内容

查询当前委托

描述

此接口用于查询合约当前未成交的委托单,若全部为否,则全量查询用户所有挂单,并且根据创建时间由早到晚进行排序。

HTTP请求

GET /v3/trade/order/opens

请求参数

参数是否必填类型描述
sideString交易方向,枚举:BUYSELL
symbolString交易对。常用形式为“基础货币”+“报价货币”
ordIdString要查询的订单的订单 ID
clOrdIdString用户自定义订单ID
fromLongordId,查询的起始id,默认从0开始
limitInteger分页页面大小,默认为10,最大为100。
directString枚举:PREV, NEXT;默认是 NEXT

响应参数

参数类型描述
symbolString交易对。常用形式为“基础货币”+“报价货币”
sideString枚举:BUYSELL
typeString订单类型;枚举:MARKET, LIMIT, LIMIT_MAKER
ordIdString订单编号
clOrdIdString用户自定义订单ID
mgnModeString保证金模式;枚举:ISOLATED 逐仓,CROSS 全仓
posSideString持仓方向 LONG-多 或 SHORT-空, 单向持仓为BOTH
pxString委托价格
szString委托张数
stateString订单状态;枚举:NEWPARTIALLY_FILLED
sourceString订单来源;枚举:WEB, APP, API, SMART, WEB_MARGIN, APP_IOS, APP_ANDROID, APP_IOS_MARGIN, APP_ANDROID_MARGIN, API_MARGIN, SMART_MARGIN, WS, WS_MARGIN, GRID, GRID_MARGIN, SYSTEM, COPY_TRADING, TRIGGER, LIQUIDATION, ADL, TRIAL, MARGIN_FL, MARGIN_FL_OFFLINE
reduceOnlyBoolean只减仓
timeInForceString枚举:FOKIOCGTC;可选,默认为 GTC
avgPxString平均成交价格
execQtyString累计成交数量
execAmtString累计成交金额
feeCcyString手续费币种名称
feeAmtString累计手续费数量
deductCcyString手续费抵扣币种名称
deductAmtString累计手续费抵扣数量
stpModeStringEnumerate
- EXPIRE_TAKER
- EXPIRE_MAKER
- EXPIRE_BOTH
默认为NONE
cTimeString订单创建时间, UTC时间戳(MS)
uTimeString订单更新时间, UTC时间戳(MS)

请求示例

{
"symbol": "BTC_USDT_PERP",
"limit": "100"
}

响应示例

{
"code": 200,
"data": [
{
"avgPx": "0",
"cTime": "1719974138337",
"clOrdId": "11c033ce-8d86-49e2-9503-f21c61de51ee",
"deductAmt": "0",
"deductCcy": "0",
"execAmt": "0",
"execQty": "0",
"feeAmt": "0",
"feeCcy": "",
"posSide": "BOTH",
"lever": "20",
"mgnMode": "CROSS",
"ordId": "331382472938094592",
"px": "60000",
"reduceOnly": false,
"side": "SELL",
"slPx": "0",
"slTrgPx": "",
"slTrgPxType": "",
"source": "API",
"state": "NEW",
"stpMode": "EXPIRE_TAKER",
"symbol": "BTC_USDT_PERP",
"sz": "2",
"timeInForce": "GTC",
"tpPx": "",
"tpTrgPx": "",
"tpTrgPxType": "",
"type": "LIMIT",
"uTime": "1719974161941"
},
{
"avgPx": "0",
"cTime": "1719974138335",
"clOrdId": "99048dd0-ba62-48a1-88e3-e567640b0414",
"deductAmt": "0",
"deductCcy": "0",
"execAmt": "0",
"execQty": "0",
"feeAmt": "0",
"feeCcy": "",
"posSide": "BOTH",
"lever": "20",
"mgnMode": "CROSS",
"ordId": "331382472929705985",
"px": "60000",
"reduceOnly": false,
"side": "SELL",
"slPx": "0",
"slTrgPx": "",
"slTrgPxType": "",
"source": "API",
"state": "NEW",
"stpMode": "EXPIRE_TAKER",
"symbol": "BTC_USDT_PERP",
"sz": "2",
"timeInForce": "GTC",
"tpPx": "",
"tpTrgPx": "",
"tpTrgPxType": "",
"type": "LIMIT",
"uTime": "1719974161941"
},
{
"avgPx": "0",
"cTime": "1719974138333",
"clOrdId": "d1dac66e-6728-4f45-b0e7-c24da8456e1e",
"deductAmt": "0",
"deductCcy": "0",
"execAmt": "0",
"execQty": "0",
"feeAmt": "0",
"feeCcy": "",
"posSide": "BOTH",
"lever": "20",
"mgnMode": "CROSS",
"ordId": "331382472921317376",
"px": "60000",
"reduceOnly": false,
"side": "BUY",
"slPx": "0",
"slTrgPx": "",
"slTrgPxType": "",
"source": "API",
"state": "NEW",
"stpMode": "EXPIRE_TAKER",
"symbol": "BTC_USDT_PERP",
"sz": "2",
"timeInForce": "GTC",
"tpPx": "",
"tpTrgPx": "",
"tpTrgPxType": "",
"type": "LIMIT",
"uTime": "1719974161941"
},
{
"avgPx": "0",
"cTime": "1719974138330",
"clOrdId": "55d7b1e0-fbce-4f86-abfa-d1b0e6d5b053",
"deductAmt": "0",
"deductCcy": "0",
"execAmt": "0",
"execQty": "0",
"feeAmt": "0",
"feeCcy": "",
"posSide": "BOTH",
"lever": "20",
"mgnMode": "CROSS",
"ordId": "331382472908734464",
"px": "60000",
"reduceOnly": false,
"side": "BUY",
"slPx": "0",
"slTrgPx": "",
"slTrgPxType": "",
"source": "API",
"state": "NEW",
"stpMode": "EXPIRE_TAKER",
"symbol": "BTC_USDT_PERP",
"sz": "2",
"timeInForce": "GTC",
"tpPx": "",
"tpTrgPx": "",
"tpTrgPxType": "",
"type": "LIMIT",
"uTime": "1719974161941"
}
],
"msg": ""
}