Get exchange chart data for specific time ranges displayed on the CoinStats website.
Exchange Connection
Get Exchange Chart
Get exchange chart data for specific time ranges displayed on the CoinStats website.
GET
Get exchange chart data for specific time ranges displayed on the CoinStats website.
50 credits per request
Make sure the exchange is synced first by calling PATCH /sync for up to date infromation.
Required
Required
- portfolioId: Identifier of an exchange portfolio you have connected.
- type: Time range for the chart.
- Exchange must be synced first via PATCH /exchange/sync.
Optional
Optional
- currency: Display currency (defaults to USD).
Authorizations
API key required to access the endpoints. Generate one from your dashboard at https://openapi.coinstats.app and pass it in the X-API-KEY request header. Never expose your key in client-side code.
Query Parameters
The identifier of portfolio, which you received from /exchange/balance call response.
Example:
"66c19c585400000000000000"
One of time periods.
Available options:
24h, 1w, 1m, 3m, 6m, 1y, all Example:
"24h"
Response
Get exchange chart
Array of historical price data points. Each data point is an array containing:
- TIMESTAMP - Unix timestamp in seconds
- USD - Price in USD
- BTC - Price in Bitcoin
- ETH - Price in Ethereum
Example:
[
[
1735120800000,
8.4033,
0.00008561,
0.00240652
],
[
1735120800000,
8.4033,
0.00008561,
0.00240652
]
]