Skip to main content
GET
/
ohlcv
/
{pool}
/
historical
/
Historical
curl --request GET \
  --url https://api.amberdata.com/market/defi/ohlcv/{pool}/historical/ \
  --header 'x-api-key: <api-key>'
{
  "status": 200,
  "title": "OK",
  "description": "Successful request",
  "payload": {
    "metadata": {
      "columns": [
        "timestamp",
        "open",
        "high",
        "low",
        "close",
        "volume",
        "quoteVolume",
        "trades",
        "exchangeId",
        "pairAddress",
        "baseAddress",
        "quoteAddress"
      ],
      "startDate": 1727904832187,
      "endDate": 1759527232187
    },
    "data": {
      "0x10d05e057cb1ee7eac0559aa7f09bf06f44fd718": [
        [
          1727913600000,
          "0.0004105818335350145800011301445552145",
          "0.0004105818335350145800011301445552145",
          "0.0004105818335350145800011301445552145",
          "0.0004105818335350145800011301445552145",
          "6.3820423846392694",
          "0.0026203506639833680000000000000000002340430932402863",
          "1",
          "0x10d05e057cb1ee7eac0559aa7f09bf06f44fd718",
          "0x05f4e094c8f77d001a05dc7ffef208ccbea47079",
          "0x6b175474e89094c44da98b954eedeac495271d0f",
          "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
        ]
      ]
    }
  }
}

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

status
integer

HTTP status code

Example:

200

title
string

Status title

Example:

"OK"

description
string

Status description

Example:

"Successful request"

payload
object
I