Line Chart Data
Endpoint
GET /v1/tokens/line-chart?tokenId=<TOKEN_ID>&days=<DAYS>
Description
This endpoint returns data for a given token that can be used to create a line chart. The tokenId parameter is required and should be a string in the format <TOKEN_CONTRACT_ADDRESS>:<NETWORK_ID>. The TOKEN_CONTRACT_ADDRESS is the address of the token contract on the specified network, and the NETWORK_ID is the ID of the network the token is on. See supported networks for more info. The days parameter is required and must be an integer between 1 and 90, inclusive. This parameter specifies the number of days of data to include in the response.
Query String Parameters
tokenId (required): A string in the format <TOKEN_CONTRACT_ADDRESS>:<NETWORK_ID> that identifies the token to look up.
days (required): An integer between 1 and 90, inclusive, that specifies the number of days of data to include in the response.
Headers
x-api-key (required): A valid API key.
Example
Response
Notes
Our system listens for trades from decentralized exchanges. The responses for this query are the average price for a token for each hour in the selected date range. If there were no trades within the date range the query will return a 404 Not Found error.
Response Codes
200
: Success. Returns the USD price for the given token.400
: Bad Request. The tokenId or days query string parameter is not provided or days is greater than 90 or less than 1.403: Forbidden. The x-api-key header is not provided or is invalid.
404
: Not Found. No price updates found within the given time range
Last updated