Gold
Get Rates
Obtain the latest gold rates in various currencies.
Obtain the latest gold rates in various currencies.
GET /gold/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": "XAU",
"timestamp": "timestamp",
"rates": {
"XAUAED": 9817.360321985456,
"XAUAFN": 182739.75461391345,
"XAUALL": 244847.5440646729,
...
},
"unit": "per troy ounce"
}
}
| 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 XAU |
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. |