Get a list of token prices over time
Endpoint: tokenSparklines
Method: POST
The token sparklines endpoint can quickly get a batch of token prices over time, useful for creating sparklines.
Arguments
| Name | Type | Description |
|---|---|---|
| input | TokenSparklineInput! | Required |
| Name | Type | Description |
|---|---|---|
| ids | [String!] ! | The contract address & networkId of the token, joined by a colon. ex: 0xbe042e9d09cb588331ff911c2b46fd833a3e5bd6:1 Required |
Response
| Name | Type | Description |
|---|---|---|
| attribute | SparklineAttribute | Which attribute the sparkline is charting. Defaults to
|
| id | String! | The token id |
| sparkline | ! | List of sparkline values to chart |
Explore
You can then use the results to generate something like this: