GET
/
vwap
/
pairs
/
bases
/
{base}
/
quotes
/
{quote}
/
historical
Global VWAP - Pairs Historical
curl --request GET \
  --url https://api.amberdata.com/market/defi/vwap/pairs/bases/{base}/quotes/{quote}/historical \
  --header 'x-api-key: <api-key>'
{
  "status": 200,
  "title": "OK",
  "description": "Successful request",
  "payload": {
    "metadata": {
      "startDate": 1617739560000,
      "endDate": 1617739560000
    },
    "data": [
      {
        "timestamp": 1617739560000,
        "pair": "DAI_WETH",
        "price": "0.00047200434465900475",
        "vwap": "0.00047200434465900475",
        "volume": "5.510246761054205304",
        "baseAddress": "0x6b175474e89094c44da98b954eedeac495271d0f",
        "baseSymbol": "DAI",
        "quoteAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "quoteSymbol": "WETH"
      }
    ]
  }
}

Authorizations

x-api-key
string
header
default:API_KEY
required

Path Parameters

base
string
default:0x6b175474e89094c44da98b954eedeac495271d0f
required

The address of the base. (example is DAI)

quote
string
default:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
required

The address of the base. (Example is WETH)

Query Parameters

startDate
string<date-time>

[Optional] Payload only includes data after this date (inclusive). <BR>The interval can not exceed 12 months (d), 30 days (h) or 24 hours (m).<BR>[Formats] seconds | milliseconds | iso8601<BR>[Examples] 1578531600 | 1578531600000 | 2020-09-01T01:00:00

endDate
string<date-time>

[Optional] Payload only includes data before this date (exclusive). <BR>The interval can not exceed 12 months (d), 30 days (h) or 24 hours (m).<BR>[Formats] seconds | milliseconds | iso8601<BR>[Examples] 1578531600 | 1578531600000 | 2020-09-01T01:00:00

timeInterval
string

[Optional] The time interval of the timeseries in the return payload.<BR/>[Defaults] m* | minute | h | hour | d | day

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.