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"
  }
}
PropertyTypeDescription
errorobject or nullIf there's an error, this will be returned.
error.messagestringThe error message.
dataobject or nullIf successful, this will be returned.
data.sourcestringAsset name of the source. This will always be XAU
data.timestampstringThe datetime with timezone string in ISO-8601 format.
data.ratesmapThe map of rates. Key is {source ISO-3}{currency ISO-3}.
data.rates[source:currency]numberThe rate of the currency against the source.
data.unitstringThe unit source of the rate.

Copyright © 2024 Qbix Technology Sdn. Bhd. All rights reserved.