查询订单信息
/sapi/v1/trade/order
请求类型: GET
是否验签: 是
接口权限: 读取
限频: 每个account 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该account的所有币种和不同到期日的合约的所有私有接口共享该限制) 。
接口描述: 此接口用于查询订单的信息。
请求地址
线上环境(aws客户首选)
请求参数
contract_code
String
true
合约代码(币对)
"BTC-USDT"...
margin_mode
String
true
保证金模式 cross:全仓 ;
order_id
String
false
订单id,order_id和client_order_id必填写一个,若都填写了以order_id为准
client_order_id
String
false
用户自定义订单ID
响应参数
id
String
true
查询id
contract_code
String
true
合约代码
永续:"BTC-USDT"... ,交割:"BTC-USDT-210625"...
side
String
true
买卖方向
buy:买 "sell":卖
position_side
String
true
仓位方向
"long":多 "short":空 “both”:单向持仓
type
String
true
订单类型;枚举
"market": 市价,"limit":限价, "post_only":只挂单
price_match
String
true
最优档位
opponent-对手价、"optimal_5":最优5档,"optimal_10":最优10档,"optimal_20":最优20档
order_id
String
true
订单id
client_order_id
String
true
用户自定义订单ID
margin_mode
String
true
保证金模式
枚举 cross
price
String
true
委托价格
volume
String
true
委托数量
lever_rate
Long
false
杠杆等级
state
String
true
订单状态
new, partially_filled, filled, partially_canceled, canceled,rejected
order_source
String
true
订单来源
(system:系统、web:用户网页、api:用户API、m:用户M站、risk:风控系统、settlement:交割结算、ios:ios客户端、android:安卓客户端、windows:windows客户端、mac:mac客户端、trigger:计划委托触发、tpsl:止盈止损触发、ADL: adl订单)
reduce_only
Boolean
true
只减仓
False、True
time_in_force
String
true
枚举fok, ioc, gtc,非必填,默认是gtc
tp_trigger_price
String
true
止盈触发价格
tp_order_price
String
true
止盈委托价格(最优N档委托类型时无需填写价格)
tp_type
String
true
止盈委托类型,不填默认为market: 市价,maket: 限价:limit ,最优5档: optimal_5,最优10档:optimal_10,最优20档:optimal_20
tp_trigger_price_type
String
false
止盈价格触发类型,默认是最新价
"last":最新价,"mark":标记价格
sl_trigger_price
String
true
止损触发价格
sl_order_price
String
true
止损委托价格(最优N档委托类型时无需填写价格)
sl_type
String
true
止损委托类型,不填默认为 市价,maket: 限价:limit ,最优5档: optimal_5,最优10档:optimal_10,最优20档:optimal_20
sl_trigger_price_type
String
false
止损价格触发类型,默认是最新价
"last":最新价,"mark":标记价格
trade_avg_price
String
true
成交均价
trade_volume
String
true
成交数量
trade_turnover
String
true
成交总金额
fee_currency
String
true
手续费币种,多个则使用","分隔
fee
String
true
总手续费(U)
price_protect
boolean
false
价差保护,默认为false。仅当设置止盈/止损需要该参数。
false 或者 true
profit
String
true
平仓盈亏(使用持仓均价计算,不包含仓位跨结算的已实现盈亏。)
contract_type
String
true
合约类型
swap(永续)、this_week(当周)、next_week(次周)、quarter(当季)、next_quarter(次季)
cancel_reason
String
true
撤单原因
created_time
String
true
订单创建时间, UTC时间戳(MS)
"Limit order cancelation by the client":"用户主动撤销普通限价订单","Order cancelation by system":"系统撤单","Market order circuit-breaker":"市价单熔断","Bankruptcy price of market order":"市价单破产价","Order cancelation due to no matching orders":"没有对手盘导致撤单"," Self trading prevention":"防自成交撤单","Number of maker orders matched with your taker orders exceeding limit":"成交笔数超过最大限制","Order cancelation due to API timeout":"API超时撤单"
updated_time
String
true
订单更新时间, UTC时间戳(MS)
self_match_prevent
String
true
防自成交
cancel_taker: 撤销taker单 cancel_maker:撤销maker单 cancel_both:撤销全部订单
备注: 下列行为,都属于"Order cancelation by system":"系统撤单"的范围。 FOK order cancelation-- fok撤单 IOC order cancelation-- ioc撤单 Order cancelation by the management system-- MGT撤单 Limit maker order cancelation--limit-maker撤单 Order cancelation due to API timeout–api超时撤单 Order cancelation due to forced liquidation--强平撤单 Order cancelation due to ADL--adl撤单 Order cancelation due to delivery futures expiration--交割合约到期
请求示例
响应示例
最后更新于