Get multiple orders
流量控制: 5 每 秒
摘要
HTTP 方法
GET
访问路径
/api/v3/orders
功能
Get a list of orders satisfying certain criteria.
API 描述
HTTP头
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
X-API-KEY | string | 是 | ApiKey | "HlkcGxbqBeaF76j4rvPaOasyfPwnkQ 6B6DQ6THZWbvrAGxzEdulXQvOKLrRW ZLnN" |
请求参数
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
accountId | integer | 是 | Account ID | 1 |
market | string | 否 | Trading pair | "LRC-ETH" |
start | integer | 否 | Lower bound of order's creation timestamp in millisecond 默认值 : 0L |
1567053142000 |
end | integer | 否 | Upper bound of order's creation timestamp in millisecond 默认值 : 0L |
1567053242000 |
side | string | 否 | "BUY" or "SELL" 取值范围 : ['BUY', 'SELL'] |
"BUY" |
status | string | 否 | Order status. You can specify one of the following values: 取值范围 : ['processing', 'processed', 'failed', 'cancelled', 'cancelling', 'expired'] |
"processing,p rocessed" |
limit | integer | 否 | Limit of orders (default 50) | 50 |
offset | integer | 否 | Offset of orders (default 0) 默认值 : 0L |
0 |
orderTypes | string | 否 | request.getOrders.orderTypes 取值范围 : ['LIMIT_ORDER', 'MAKER_ONLY', 'TAKER_ONLY', 'AMM'] |
"LIMIT_ORDER" |
tradeChannels | string | 否 | field.SubmitOrderRequest.tradeChannel 取值范围 : ['ORDER_BOOK:0', 'AMM_POOL:1', 'MIXED:2'] |
"ORDER_BOOK,A MM_POOL" |
请求示例
HTTP
CURL
GET https://api3.loopring.io/api/v3/orders?accountId=1&market=LRC-ETH&start=1567053142000&end=1567053242000&side=BUY&status=processing,processed&limit=50&offset=0&orderTypes=LIMIT_ORDER&tradeChannels=ORDER_BOOK,AMM_POOL 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/orders\?accountId\=1\&market\=LRC-ETH\&start\=1567053142000\&end\=1567053242000\&side\=BUY\&status\=processing,processed\&limit\=50\&offset\=0\&orderTypes\=LIMIT_ORDER\&tradeChannels\=ORDER_BOOK,AMM_POOL
响应字段
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
totalNum | integer | 是 | Total number of orders | 10 |
orders | List[Order DetailV3] |
否 | List of order | / |
响应示例
{
"totalNum" : 10,
"orders" : [
{
"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 |
104001 | Empty ApiKey |
104002 | Invalid ApiKey |
104003 | Invalid Account ID |
模型
OrderDetailV3
Response details of order
字段 | 类型 | 必须 | 说明 | 举例 |
---|---|---|---|---|
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" |
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 | 是 | / |