GET
/
prices
/
asset
/
{asset}
/
historical
Assets Historical
curl --request GET \
  --url https://api.amberdata.com/market/defi/prices/asset/{asset}/historical \
  --header 'x-api-key: <api-key>'
{
  "status": 200,
  "title": "OK",
  "description": "Successful request",
  "payload": {
    "metadata": {
      "startDate": 1633374914078,
      "endDate": 1633461314078
    },
    "data": [
      {
        "timestamp": 1633462380000,
        "asset": "0x6b175474e89094c44da98b954eedeac495271d0f",
        "price": "0.00029319",
        "volume": "0.46585033"
      }
    ]
  }
}

Authorizations

x-api-key
string
header
default:API_KEY
required

Path Parameters

asset
string
default:0x6b175474e89094c44da98b954eedeac495271d0f
required

The address of the asset. (example is DAI)

Query Parameters

startDate
string<date-time>

FIlter by pairs after this date.

endDate
string<date-time>

FIlter by pairs before this date.

timeInterval
string

Time interval to return the historical data in ("days" | "hours" | "minutes")

lookbackPeriod
integer

[Optional] Number of historical data points used in the calculation.<BR/>[Defaults] 60 for minutely, 24 for hourly and 20 for daily

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 object.