Get multiple orders

Rate limit: 3 every second

API Overview


HTTP method

GET

Path

/api/v2/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
fromHash string N Pagination of data to return records earlier than the requested hash "26001051253364689664
17510367500403435128
94150245200567415610
3328855968837178"
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

Request example

HTTP
CURL
GET https://api.loopring.io/api/v2/orders?accountId=1&market=LRC-ETH&start=1567053142000&end=1567053242000&fromHash=2600105125336468966417510367500403435128941502452005674156103328855968837178&side=BUY&status=processing,processed&limit=50&offset=0 HTTP/1.1
Host: api.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://api.loopring.io/api/v2/orders\?accountId\=1\&market\=LRC-ETH\&start\=1567053142000\&end\=1567053242000\&fromHash\=2600105125336468966417510367500403435128941502452005674156103328855968837178\&side\=BUY\&status\=processing,processed\&limit\=50\&offset\=0

Response fields

Field Type Required Description Example
resultInfo ResultInfo Y Information returned by the API /
data OrdersDetail N Response orders /

Response example

{
    "resultInfo" : {
        "code" : 0,
        "message" : "SUCCESS"
    },
    "data" : {
        "totalNum" : 10,
        "orders" : [
            {
                "hash" : "0xfb5e711c2f044e94322ed262229cd8f0d0da00c22e1a00a0f5d881e45a38e1cf",
                "clientOrderId" : "200310143135081332",
                "size" : "8210000000000001024",
                "volume" : "163182534700000032",
                "price" : "0.01987608",
                "filledSize" : "0",
                "filledVolume" : "0",
                "filledFee" : "0",
                "status" : "processing",
                "validSince" : 1583929591,
                "validUntil" : 1586521591,
                "createdAt" : 1583933191494,
                "side" : "SELL",
                "market" : "LRC-ETH",
                "orderType" : "LIMIT_ORDER"
            }
        ]
    }
}

Status code

Value Description
100000 Unknown error
107001 User ID cannot be empty
104001 Empty ApiKey
104002 Invalid ApiKey
104003 Invalid Account ID

Model


OrdersDetail

Response orders

Field Type Required Description Example
totalNum integer Y Total number of orders 10
orders List[OrderDetail] N List of order /

OrderDetail

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"
size string Y Order size, as wei in base token "8210000000000001024"
volume string Y Order volume, as wei in quote token "163182534700000032"
price string Y Order price "0.01987608"
filledSize string Y Filled size, as wei in base token "0"
filledVolume string Y Filled volume, as wei in quote token "0"
filledFee string Y Fees charged "0"
status string Y Order status
Allowable : ['processing', 'processed', 'cancelling', 'cancelled', 'expired', 'waiting']
"processing"
validSince integer Y Timestamp for order to become valid 1583929591
validUntil integer Y Timestamp for order to become invalid 1586521591
createdAt integer Y Order creation timestamp 1583933191494
side string Y Order's side
Allowable : ['SELL', 'BUY']
"SELL"
market string Y Trading pair "LRC-ETH"
orderType string Y field.OrderDetail.orderType
Allowable : ['LIMIT_ORDER', 'TAKER_ONLY', 'MAKER_ONLY']
"LIMIT_ORDER"

results matching ""

    No results matching ""