Get market orderbook

Rate limit: 5 every second

API Overview


HTTP method

GET

Path

/api/v2/depth

Summary

Returns the order book of a given trading pair.

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
market string Y The id of a trading pair. "LRC-ETH"
level integer Y Order book aggregation level, larger value means further price aggregation. 2
limit integer N Maximum numbers of bids/asks.
Default : 50
50

Request example

HTTP
CURL
GET https://api.loopring.io/api/v2/depth?market=LRC-ETH&level=2&limit=50 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/depth\?market\=LRC-ETH\&level\=2\&limit\=50

Response fields

Field Type Required Description Example
resultInfo ResultInfo Y Information returned by the API /
data Depth N Order book detail. /

Response example

{
    "resultInfo" : {
        "code" : 0,
        "message" : "SUCCESS"
    },
    "data" : {
        "version" : 147,
        "timestamp" : 432312312,
        "bids" : [["0.002","21000","33220000","4"]],
        "asks" : []
    }
}

Status code

Value Description
100000 Unknown error
108000 Unsupported market
108001 Unsupported depth level

Model


Depth

Order book info

Field Type Required Description Example
version integer Y An ever-increasing numeric version number that reflects its change history. 147
timestamp integer Y Update timestamp 432312312
bids List[List[string]] Y Array of bids, each item is an array that contains the price, size, volume and the number of orders aggregated at this price. "[["0.002","21000","3
3220000","4"]]"
asks List[List[string]] Y Array of asks, each item is an array that contains the price, size, volume and the number of orders aggregated at this price. "[]"

results matching ""

    No results matching ""