Currency
Get Rates
Obtain the latest exchange rates in various currencies, denominated in USD.
Obtain the latest exchange rates in various currencies, denominated in USD.
GET /currency/rates HTTP/1.1
Host: mock.qbix.dev/api
Accept: application/json
Be warned that the server may return "I'm a teapot" error.
Response
Body
Accepts:
application/json{
"error": null,
"data": {
"source": "USD",
"timestamp": "timestamp",
"rates": {
"USDAED": 3.6729727546978457,
"USDAFN": 68.36849396206448,
"USDALL": 91.60490487348703,
...
},
"unit": "per 1 dollar"
}
}
| Property | Type | Description |
|---|---|---|
error | object or null | If there's an error, this will be returned. |
error.message | string | The error message. |
data | object or null | If successful, this will be returned. |
data.source | string | Asset name of the source. This will always be USD |
data.timestamp | string | The datetime with timezone string in ISO-8601 format. |
data.rates | map | The map of rates. Key is {source ISO-3}{currency ISO-3}. |
data.rates[source:currency] | number | The rate of the currency against the source. |
data.unit | string | The unit source of the rate. |