Get order details
流量控制: 5 每 秒
摘要
HTTP 方法
GET
访问路径
/api/v3/order
功能
Get the details of an order based on order hash.
API 描述
HTTP头
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
X-API-KEY | string | 是 | ApiKey | "HlkcGxbqBeaF76j4rvPaOasyfPwnkQ 6B6DQ6THZWbvrAGxzEdulXQvOKLrRW ZLnN" |
请求参数
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
accountId | integer | 是 | Account ID, could be empty if hash query is presented. | 1 |
orderHash | string | 是 | Order hash | "133754509012 921794171549 748495717930 699115173547 203971250276 332426804700 75859" |
请求示例
HTTP
CURL
GET https://api3.loopring.io/api/v3/order?accountId=1&orderHash=13375450901292179417154974849571793069911517354720397125027633242680470075859 HTTP/1.1
Host: api3.loopring.io
Connection: keep-alive
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: zh,en;q=0.9
X-API-KEY: sra1aavfa
curl -H "X-API-KEY:sra1aavfa" https://api3.loopring.io/api/v3/order\?accountId\=1\&orderHash\=13375450901292179417154974849571793069911517354720397125027633242680470075859
响应字段
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
hash | string | 是 | Order hash | "0xfb5e711c2f 044e94322ed2 62229cd8f0d0 da00c22e1a00 a0f5d881e45a 38e1cf" |
clientOrderId | string | 是 | Order's client-side ID | "200310143135 081332" |
side | string | 是 | Order's side 取值范围 : ['SELL', 'BUY'] |
"SELL" |
market | string | 是 | Trading pair | "LRC-ETH" |
price | string | 是 | Order price | "0.01987608" |
volumes | Order Volumes V3 |
是 | Wraps data regarding the orders volumes (base, quote, and filled.) | "0" |
validity | Order Validity V3 |
是 | Wraps data regarding time validity constraints (since and until) | "{start: 1234, end: 2345}" |
orderType | string | 是 | Whether the order has to be treated as a limit, maker, or taker operation. 取值范围 : ['LIMIT_ORDER', 'TAKER_ONLY', 'MAKER_ONLY'] |
"LIMIT_ORDER" |
tradeChannel | string | 是 | Order channel, can be ORDER_BOOK, AMM_POOL, MIXED 取值范围 : ['ORDER_BOOK', 'AMM_POOL', 'MIXED'] |
"ORDER_BOOK" |
status | string | 是 | Order status 取值范围 : ['processing', 'processed', 'cancelling', 'cancelled', 'expired', 'waiting'] |
"processing" |
storageInfo | Storage Info |
否 | field.OrderDetail.storageInfo | "accountId,to kenId,storag eId" |
响应示例
{
"hash" : "0xfb5e711c2f044e94322ed262229cd8f0d0da00c22e1a00a0f5d881e45a38e1cf",
"clientOrderId" : "200310143135081332",
"side" : "SELL",
"market" : "LRC-ETH",
"price" : "0.01987608",
"volumes" : {
"baseAmount" : "0",
"quoteAmount" : "0",
"baseFilled" : "0",
"quoteFilled" : "0",
"fee" : "0"
},
"validity" : {
"start" : 0,
"end" : 0
},
"orderType" : "LIMIT_ORDER",
"tradeChannel" : "ORDER_BOOK",
"status" : "processing",
"storageInfo" : {
"accountId" : integer,
"tokenId" : integer,
"storageId" : integer
}
}
状态码
状态码 | 描述 |
---|---|
100000 | Unknown error |
107001 | User ID cannot be empty |
107002 | Order Hash cannot be empty |
107003 | Order does not exist |
104001 | Empty ApiKey |
104002 | Invalid ApiKey |
104003 | Invalid Account ID |
模型
OrderVolumesV3
Wraps data regarding the orders volumes (base, quote, and filled.)
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
baseAmount | string | 是 | The amount of base tokens involved in the order. | "0" |
quoteAmount | string | 是 | The amount of quote tokens involved in the order. | "0" |
baseFilled | string | 是 | The amount of requested base tokens filled in the order. | "0" |
quoteFilled | string | 是 | The amount of requested quote tokens filled in the order. | "0" |
fee | string | 是 | The amount of quote or base token amount used to pay for the orders fee. Whether this data refers to the base or quote token, one can find out by looking at the orders side | "0" |
OrderValidityV3
Wraps data regarding time validity constraints (since and until
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
start | integer | 是 | Timestamp from when the order officially becomes valid and fillable | 0 |
end | integer | 是 | Timestamp from when the order ceases to be valid and fillable | 0 |
StorageInfo
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
accountId | integer | 是 | / | |
tokenId | integer | 是 | / | |
storageId | integer | 是 | / |