Skip to Content

查询挂单

请求地址

GET /ftapi/v1/openOrder

请求参数

名称类型是否必须描述
symbolIdSTRINGNO交易对
orderIdLONGNO订单ID
limitINTNO返回条数限制,最大值1000

响应参数

参数名类型描述
codestring响应代码
msgstring响应消息
successboolean是否成功
dataarray挂单列表
data.avgPricestring平均成交价格
data.conditionOrderIdstring条件单ID
data.ctimelong创建时间
data.feeAmountstring已产生的手续费
data.feeAssetIdstring手续费币种
data.leverageinteger杠杆倍数
data.marginModestring保证金模式
data.mtimelong最后更新时间
data.orderIdstring订单唯一ID
data.positionModestring持仓模式
data.postOnlyinteger是否PostOnly
data.pricestring委托价格
data.profitstring已实现盈亏
data.profitRatestring盈亏率
data.quantitystring当前剩余未成交数量
data.reduceOnlyboolean是否只减仓
data.remainingLockedstring剩余冻结保证金
data.sidestring方向
data.statusstring订单状态
data.symbolIdstring交易对标识
data.timeInForcestring有效时间策略
data.totalAmountstring委托总金额
data.totalQuantitystring委托总数量
data.tpSlobject止盈止损设置
data.tradeAmountstring已成交金额
data.tradeQuantitystring已成交数量
data.typestring订单类型
data.uidstring用户ID

请求示例

https://openapi.bittap.com/ftapi/v1/openOrder?symbol=BTC-USDT-M

响应示例

{ "code": "0", "data": [ { "avgPrice": "104616.7", // 平均成交价格(成交金额 / 成交数量) "conditionOrderId": "", // 条件单ID(若非条件单则为空) "ctime": 1762239532998, // 创建时间(毫秒时间戳) "feeAmount": "0.044985181", // 已产生的手续费(单位:feeAssetId) "feeAssetId": "USDT", // 手续费币种(例如 USDT) "leverage": 20, // 杠杆倍数(例如 20x) "marginMode": "CROSSED", // 保证金模式:CROSSED=全仓,ISOLATED=逐仓 "mtime": 1762239539000, // 最后更新时间(毫秒时间戳) "orderId": "111479286124253184", // 订单唯一ID(long转字符串) "positionMode": "HEDGE", // 持仓模式:HEDGE=双向持仓,ONEWAY=单向 "postOnly": 0, // 是否PostOnly:0=否(允许吃单),1=是(仅挂单) "price": "104616.7", // 委托价格(限价单有效) "profit": "0", // 已实现盈亏(仅在已成交后有效) "profitRate": "0", // 盈亏率(profit / 保证金) "quantity": "0.1314", // 当前剩余未成交数量 "reduceOnly": false, // 是否只减仓:true=只减仓,false=正常下单 "remainingLocked": "687.331719", // 剩余冻结保证金(未释放部分) "side": "BUY", // 方向:BUY=买入/做多,SELL=卖出/做空 "status": "OPEN", // 订单状态:OPEN=挂单中,FILLED=已成交,CANCELED=已撤单 "symbolId": "BTC-USDT-M", // 交易对标识(BTC-USDT 永续合约) "timeInForce": "GTC", // 有效时间策略:GTC=一直有效,IOC=立即成交或取消,FOK=全部成交否则取消 "totalAmount": "14196.48619", // 委托总金额(price * totalQuantity) "totalQuantity": "0.1357", // 委托总数量 "tpSl": { // 止盈止损设置 "slExecutePrice": null, // 止损触发时的成交价格(若触发则记录) "slPrice": null, // 止损触发价 "slPriceType": null, // 止损类型(1=限价,2=市价等) "tpExecutePrice": null, // 止盈触发时的成交价格(若触发则记录) "tpPrice": null, // 止盈触发价 "tpPriceType": null // 止盈类型(1=限价,2=市价等) }, "tradeAmount": "449.85181", // 已成交金额(累计成交金额) "tradeQuantity": "0.0043", // 已成交数量 "type": "LIMIT", // 订单类型:LIMIT=限价单,MARKET=市价单 "uid": "76957286" // 用户ID } ], "msg": "Request successful", "success": true }

错误码解释

代码描述
500系统内部错误

代码示例

最后更新于: