Get multiple orders
Rate limit: every seconds
API Overview
HTTP method
GET
Path
/api/v3/orders
Summary
Get a list of orders satisfying certain criteria.
API description
HTTP Header
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
| X-API-KEY | string | Y | ApiKey | "HlkcGxbqBeaF76j4rvPaOasyfPwnkQ 6B6DQ6THZWbvrAGxzEdulXQvOKLrRW ZLnN" |
Request parameters
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
| accountId | integer | Y | Account ID | 1 |
| market | string | N | Trading pair | "LRC-ETH" |
| start | integer | N | Lower bound of order's creation timestamp in millisecond Default : 0L |
1567053142000 |
| end | integer | N | Upper bound of order's creation timestamp in millisecond Default : 0L |
1567053242000 |
| side | string | N | "BUY" or "SELL" Allowable : ['BUY', 'SELL'] |
"BUY" |
| status | string | N | Order status. You can specify one of the following values: Allowable : ['processing', 'processed', 'failed', 'cancelled', 'cancelling', 'expired'] |
"processing,processed" |
| limit | integer | N | Limit of orders (default 50) | 50 |
| offset | integer | N | Offset of orders (default 0) Default : 0L |
0 |
| orderTypes | string | N | request.getOrders.orderTypes Allowable : ['LIMIT_ORDER', 'MAKER_ONLY', 'TAKER_ONLY', 'AMM'] |
"LIMIT_ORDER" |
Request example
HTTP
CURL
GET http://aa90cd58e38014a1b864ddc488129b7a-624979106.us-east-2.elb.amazonaws.com/api/v3/orders?accountId=1&market=LRC-ETH&start=1567053142000&end=1567053242000&side=BUY&status=processing,processed&limit=50&offset=0&orderTypes=LIMIT_ORDER HTTP/1.1
Host: aa90cd58e38014a1b864ddc488129b7a-624979106.us-east-2.elb.amazonaws.com
Connection: keep-alive
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: zh,en;q=0.9
X-API-KEY: sra1aavfacurl -H "X-API-KEY:sra1aavfa" http://aa90cd58e38014a1b864ddc488129b7a-624979106.us-east-2.elb.amazonaws.com/api/v3/orders\?accountId\=1\&market\=LRC-ETH\&start\=1567053142000\&end\=1567053242000\&side\=BUY\&status\=processing,processed\&limit\=50\&offset\=0\&orderTypes\=LIMIT_ORDERResponse fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
| totalNum | integer | Y | Total number of orders | 10 |
| orders | List[OrderDetailV3] | N | List of order | / |
Response example
{
"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",
"status" : "processing"
}
]
}
Status code
| Value | Description |
|---|---|
| 100000 | Unknown error |
| 107001 | User ID cannot be empty |
| 104001 | Empty ApiKey |
| 104002 | Invalid ApiKey |
| 104003 | Invalid Account ID |
Model
OrderDetailV3
Response details of order
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
| hash | string | Y | Order hash | "0xfb5e711c2f044e9432 2ed262229cd8f0d0da00 c22e1a00a0f5d881e45a 38e1cf" |
| clientOrderId | string | Y | Order's client-side ID | "200310143135081332" |
| side | string | Y | Order's side Allowable : ['SELL', 'BUY'] |
"SELL" |
| market | string | Y | Trading pair | "LRC-ETH" |
| price | string | Y | Order price | "0.01987608" |
| volumes | OrderVolumesV3 | Y | Wraps data regarding the orders volumes (base, quote, and filled.) | "0" |
| validity | OrderValidityV3 | Y | Wraps data regarding time validity constraints (since and until) | "{start: 1234, end: 2345}" |
| orderType | string | Y | Whether the order has to be treated as a limit, maker, or taker operation. Allowable : ['LIMIT_ORDER', 'TAKER_ONLY', 'MAKER_ONLY'] |
"LIMIT_ORDER" |
| status | string | Y | Order status Allowable : ['processing', 'processed', 'cancelling', 'cancelled', 'expired', 'waiting'] |
"processing" |
OrderVolumesV3
Wraps data regarding the orders volumes (base, quote, and filled.)
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
| baseAmount | string | Y | The amount of base tokens involved in the order. | "0" |
| quoteAmount | string | Y | The amount of quote tokens involved in the order. | "0" |
| baseFilled | string | Y | The amount of requested base tokens filled in the order. | "0" |
| quoteFilled | string | Y | The amount of requested quote tokens filled in the order. | "0" |
| fee | string | Y | 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
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
| start | integer | Y | Timestamp from when the order officially becomes valid and fillable | 0 |
| end | integer | Y | Timestamp from when the order ceases to be valid and fillable | 0 |