get https://web3api.io/api/v2/market/defi/twap/pairs/bases//quotes//historical
Retrieves the historical TWAP for the specified base, quote pair - this is the global TWAP across all supported contracts.
Default results are over 1 minute intervals with a 60 minutes lookback period.
TWAP is calculated as a time weighted moving average across all contracts.
Time Range Limit
The maximum time range (difference between startDate and endDate) is:
- 1 day with minutely data
- 31 days with hourly data
- 1 year with daily data
Not specifying startDate and endDate
If the startDate and endDate query parameters are not provided, the API will return the data from the previous 24 hours with a 1 minute frequency.
Response Data
Field | Type | Description |
---|---|---|
timestamp | number | string | The time at which the event occured. |
pair | string | The name of the pair. |
price | number | The price of the pair. |
twap | number | The Time Weighted Average Price. |
volume | number | The volume of the pair at this point in time. |
baseAddress | string | Same as passed in parameter |
baseSymbol | string | Symbol of the base asset |
quoteAddress | string | Same as passed in parameter |
quoteSymbol | string | Symbol of the quote asset |