Rest API
Rest API enables users to request the latest price update for multiple data pairs or historical prices up to 1 month for a single data pair. We will enable historical data going back up to 6 months in the near future. History data response will contain OHLC data (Open price, High price, Low price, Close price) for the requested time resolution which will facilitate building candlestick charts.
Important: Please make sure you read and understand Terms of Use before start using Supra products and services.
Base URL
Endpoint: Get Historical Price Data for Trading Pair
Request URL
Headers
x-api-key
Query Parameters
trading_pair
String
The trading pair for which to retrieve historical data. Example: btc_usd, eth_usd, etc.
btc_usd
startDate
Integer
The starting timestamp for the data range in Unix milliseconds (UTC). This determines the beginning of the data range.
1732014893723
endDate
Integer
The ending timestamp for the data range in Unix milliseconds (UTC). This determines the end of the data range.
1732014910000
Resolution
Integer
The time interval between data points in minutes. Typical intervals could be 1, 5, 15, 30, 60, etc.
5
Example Request
Response
The response contains historical price data for the given trading pair in the specified time range and interval. The response is typically in JSON format.
Endpoint: Get Latest Price Data for Trading Pair
Request URL
Parameters
trading_pair
String
The trading pair for which to retrieve latest price data
btc_usdt
Example Request
Response
Status Codes
200 OK: The request was successful, and data is returned.
400 Bad Request: The request was invalid or improperly formatted.
404 Not Found: The requested trading pair or data could not be found.
500 Internal Server Error: A server error occurred while processing the request.
Last updated