Asset Prices API
Asset (currency/token) Prices HTTP API documentation
Supported Pairs
The /v1/prices/pairs
API returns a list of price pairs supported by the Spice.ai platform (non-exhaustive).
The /prices/pairs endpoint only returns pairs provided directly from SpiceAI data. Price APIs aggregate data from other providers (decentralized exchanges e.g. Uniswap, centralized aggregators e.g. CoinMarketCap) and support significantly more pairs not listed by this endpoint.
Get supported price pairs
GET
https://data.spiceai.io/v1/prices/pairs
Returns a list of token/currency Spice provided price pairs.
Latest Prices
The /v1/prices/{pair}
API returns the spot (latest) prices of specified token/currency pairs from several exchanges (e.g. Binance, Coinbase, and Gemini), and aggregrates price measures (e.g. average, minimum).
Get latest prices for symbol(s)
GET
https://data.spiceai.io/v1/prices/{pair}
For pair(s), returns the latest prices from several exchanges (e.g. Binance, Coinbase, and Gemini), and aggregate price measures (e.g. average, minimum).
Path Parameters
Name | Type | Description |
---|---|---|
pair | String | One currency/token pair symbols. Always upper-case. e.g. |
Query Parameters
Name | Type | Description |
---|---|---|
pairs | String | One or more currency/token pairs symbols. Always upper-case. e.g. |
Historical Prices
The /v1/prices/historical/{pair}
API returns historical prices of the specified token/currency pair(s).
Get Historical Prices
GET
https://data.spiceai.io/v1/prices/historical/{pair}
Returns historical prices of the specified token/currency pair(s).
Providing both start
and end
will return all prices between the two timestamps at the provided granularity
, however this must not be more than 10,000 prices.
If no start
or end
is provided then the 10 most recent prices based on the provided granularity
will be returned.
If only start
is provided then the next 10 subsequent prices after start
will be returned. If only end
is provided then the 10 most recent prices before end
will be returned.
Path Parameters
Name | Type | Description |
---|---|---|
pair | String | One currency/token pair symbols. Always upper-case. e.g. |
Query Parameters
Name | Type | Description |
---|---|---|
pairs | String | One or more currency/token pairs symbols. Always upper-case. e.g. |
start | Int | UNIX timestamp of the start of the range to retrieve historical prices, cannot be before 12 months ago |
end | Int | UNIX timestamp of the end of the range to retrieve historical prices, cannot be before 12 months ago |
granularity | String | Duration between each price returned (e.g.
,
,
), default is
|
Last updated