跳到主要内容

获取订单详情

限速规则 20次/1s (UID)

描述

获取订单详情

如果通过clientOid查询订单明细,需要满足以下要求:

  • clientOid是自己设置的,非系统生成
  • 这个订单处于完全未成交状态

HTTP请求

  • GET /api/v2/spot/trade/orderInfo
请求示例
curl "https://api.bitget.com/api/v2/spot/trade/orderInfo?orderId=1234567890" \
-H "ACCESS-KEY:*******" \
-H "ACCESS-SIGN:*" \
-H "ACCESS-PASSPHRASE:*" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:en-US" \
-H "Content-Type: application/json"

请求参数

参数名参数类型是否必须描述
orderIdString订单ID,和clientOid必填其中一个
clientOidString客户自定义ID,和orderId必填其中一个
requestTimeString请求时间 Unix毫秒时间戳格式
receiveWindowString有效窗口期 单位毫秒 窗口期不超过60s
返回示例
{
"code": "00000",
"msg": "success",
"requestTime": 1695865476577,
"data": [
{
"userId": "**********",
"symbol": "BTCUSDT",
"orderId": "121211212122",
"clientOid": "121211212122",
"price": "0",
"size": "10.0000000000000000",
"orderType": "market",
"side": "buy",
"status": "filled",
"priceAvg": "13000.0000000000000000",
"baseVolume": "0.0007000000000000",
"quoteVolume": "9.1000000000000000",
"enterPointSource": "API",
"feeDetail": "{\"BGB\":{\"deduction\":true,\"feeCoinCode\":\"BGB\",\"totalDeductionFee\":-0.0041,\"totalFee\":-0.0041},\"newFees\":{\"c\":0,\"d\":0,\"deduction\":false,\"r\":-0.112079256,\"t\":-0.112079256,\"totalDeductionFee\":0}}",
"orderSource": "market",
"cTime": "1695865232127",
"uTime": "1695865233051"
}
]
}

返回参数

返回字段参数类型字段说明
userIdString账户id
symbolString交易对名称
orderIdString订单ID
clientOidString自定义ID
priceString委托价格
sizeString委托数量
limit时表示base coin数量;
market-buy表示quote coin数量;
market-sell表示base coin数量
orderTypeString订单类型
limit限价
market市价
sideString交易方向
statusString订单状态
live 未成交
partially_filled 部分成交
filled 全部成交
cancelled 已撤销
priceAvgString成交价格
baseVolumeString成交数量,左币
quoteVolumeString成交总额,右币
enterPointSourceString订单来源
WEB WEB客户端
IOS IOS客户端
ANDROID Andriod客户端
API API客户端
SYS 系统订单
cTimeString创建时间,Unix毫秒时间戳,例如1690196141868
uTimeString更新时间,Unix毫秒时间戳,例如1690196141868
orderSourceString订单来源
normal 正常下单
market 市价单
spot_trader_buy 现货带单买 (交易员)
spot_follower_buy现货跟单买 (跟随者)
spot_trader_sell 现货带单卖(交易员)
spot_follower_sell 现货跟单卖(跟随者)
feeDetailString手续费明细
> newFeesString手续费明细newFees
>> cString优惠券抵扣的金额,单位:交易所得币种
>> dStringBGB抵扣的金额, 单位:BGB
>> rString如BGB余额不够抵扣手续费,则剩下的用所得币抵扣
>> tString手续费应付金额,单位:所得币种
>> deductionString忽略
>> totalDeductionFeeString忽略
> BGBString如果没有newFees字段,则代表此数据是较早的历史数据,此key是抵扣手续费的币种(不是固定的,如果开启了BGB抵扣,则是BGB,如果没有开启BGB抵扣,则是交易获得币种)
>> deductionString是否有手续费抵扣
>> feeCoinCodeString手续费币种
>> totalDeductionFeeString抵扣金额 单位:BGB
>> totalFeeString手续费应付金额,单位:所得币种