Get market candlestick

Rate limit: 3 every second

API Overview


HTTP method

GET

Path

/api/v2/candlestick

Summary

Return the candlestick data 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 Trading pair ID, multi-market is not supported "LRC-ETH"
interval string Y Candlestick interval, Supported values are: 1min, 5min, 15min, 30min, 1hr, 2hr, 4hr, 12hr, 1d, 1w "5min"
start integer N Start time 1584479105000
end integer N End time 1584565505000
limit integer N Number of data points. If more data points are available, the API will only return the first 'limit' data points. 120

Request example

HTTP
CURL
GET https://api.loopring.io/api/v2/candlestick?market=LRC-ETH&interval=5min&start=1584479105000&end=1584565505000&limit=120 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/candlestick\?market\=LRC-ETH\&interval\=5min\&start\=1584479105000\&end\=1584565505000\&limit\=120

Response fields

Field Type Required Description Example
resultInfo ResultInfo Y Information returned by the API /
data List[List[string]] N Candlestick data, each set of data includes start time, number of transactions, opening price, closing price, highest price, lowest price, total transaction volume of Base Token, total transaction volume of Quote Token "[["1584565500000","5
","1.5","5.5","8.8",
"0.5","0.5","0.5"]]"

Response example

{
    "resultInfo" : {
        "code" : 0,
        "message" : "SUCCESS"
    },
    "data" : [["1584565500000","5","1.5","5.5","8.8","0.5","0.5","0.5"]]
}

Status code

Value Description
100000 Unknown error
100001 Invalid argument

results matching ""

    No results matching ""