This guide primarily focuses on the JSON response structure. For details on CSV and XML formats, please refer to the Response Formatting guide.
Live Data Structure
Endpoints that provide real-time or latest exchange rates return a JSON object representing the current state of a currency pair.Example Response
Property Definitions
| Property | Type | Description |
|---|---|---|
name | string | The currency pair symbol (e.g., “EURUSD”). |
ask | string | The current lowest price a seller is willing to accept. |
bid | string | The current highest price a buyer is willing to pay. |
time | string | Unix timestamp (in seconds) indicating when the quote was generated. |
Prices are returned as strings to preserve decimal precision. Ensure you parse them as floats or decimals in your application logic as needed.
Historical Data Structure
Endpoints providing historical market data (such as OHLC candlesticks) return a dictionary where keys are timestamps and values are arrays containing price data for that period.Example Response
Structure Breakdown
The response is a dictionary object:- Key: A Unix timestamp (string) representing the start of the time period.
- Value: An array of 8 floating-point numbers representing the OHLC (Open, High, Low, Close) values for both Ask and Bid prices.
Array Index Mapping
For JSON responses, the values in the array map to the following properties by index. XML and CSV responses explicitly use these property names as tags or headers.| Index | Property | Description |
|---|---|---|
| 0 | min_ask | Lowest ask price during the period. |
| 1 | max_ask | Highest ask price during the period. |
| 2 | open_ask | Ask price at the beginning of the period. |
| 3 | close_ask | Ask price at the end of the period. |
| 4 | min_bid | Lowest bid price during the period. |
| 5 | max_bid | Highest bid price during the period. |
| 6 | open_bid | Bid price at the beginning of the period. |
| 7 | close_bid | Bid price at the end of the period. |
