GET
/
ohlcv
/
{pool}
/
historical
/
Historical
curl --request GET \
  --url https://api.amberdata.com/market/defi/ohlcv/{pool}/historical/ \
  --header 'x-api-key: <api-key>'
"{\n  \"status\": 200,\n  \"title\": \"OK\",\n  \"description\": \"Successful request\",\n  \"payload\": {\n    \"metadata\": {\n      \"columns\": [\n        \"timestamp\",\n        \"open\",\n        \"high\",\n        \"low\",\n        \"close\",\n        \"volume\",\n        \"trades\",\n        \"exchangeId\",\n        \"pairAddress\",\n        \"baseAddress\",\n        \"quoteAddress\"\n      ],\n      \"startDate\":\"2021-06-02 22:13:20 292\"\n      \"endDate\":\"2022-06-03 22:13:20 292\"\n    },\n    \"data\": {\n      \"0xc2e9f25be6257c210d7adf0d4cd6e3e881ba25f8\": [\n        [\n          1622678400000\n          \"0.00037000395865892972\"\n          \"0.00037480147659772051\"\n          \"0.00034645163178048788\"\n          \"0.00034896106031524492\"\n          \"11746.058879139316084194\"\n          \"382\"\n          \"0x1f98431c8ad98523631ae4a59f267346ea31f984\"\n          \"0xc2e9f25be6257c210d7adf0d4cd6e3e881ba25f8\"\n          \"0x6b175474e89094c44da98b954eedeac495271d0f\"\n          \"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2\"\n\n        ],\n        ...\n      ]\n    }\n  }\n}"

Authorizations

x-api-key
string
header
default:API_KEY
required

Path Parameters

pool
string
default:DAI_WETH
required

The pool to retrieve the most current data. Can be the pool/pair symbols or address.

Query Parameters

exchange
string

The exchange(s) for which to retrieve OHLCV. Example: exchange=uniswapv2, uniswapv3

startDate
string<date-time>

FIlter by pairs after this date.

endDate
string<date-time>

FIlter by pairs before this date.

timeInterval
string

[Optional] Time interval.<BR/>[Defaults] minutes | hours | days*

timeFormat
string

[Optional] Time format of the timestamps in the return payload.<BR/>[Defaults] milliseconds | ms* | iso | iso8601 | hr | human_readable

Response

200 - application/json

200

The response is of type any.