Skip to main content
GET
/
openapi
/
v1
/
commodities
/
gold-dxy
Gold vs DXY correlation
curl --request GET \
  --url https://api.hayinsights.com/openapi/v1/commodities/gold-dxy \
  --header 'X-API-Key: <api-key>'
{
  "success": true,
  "statusCode": 200,
  "data": {
    "period": "3m",
    "series": {
      "gold": [
        {
          "date": "2026-03-22",
          "pctChange": 0,
          "value": 4464.66
        },
        {
          "date": "2026-06-19",
          "pctChange": -6.17,
          "value": 4189.22
        }
      ],
      "dxy": [
        {
          "date": "2026-03-22",
          "pctChange": 0,
          "value": 99.35
        },
        {
          "date": "2026-06-19",
          "pctChange": 1.42,
          "value": 100.757
        }
      ]
    }
  },
  "meta": {
    "timestamp": "2026-06-19T08:50:00.912Z"
  }
}

Authorizations

X-API-Key
string
header
required

Your HayInsights API key (prefixed apk_). Create and manage keys in the HayInsights dashboard (Account → API keys).

Send it in the X-API-Key header on every request to /openapi/v1/*. Which data domains you may access and your request quota are both governed by the subscription plan attached to the key — see the Plans & features and Rate limits guides.

Query Parameters

period
enum<string>
default:3m

Look-back window.

ValueDescription
1mLast 1 month
3mLast 3 months
ytdYear-to-date
Available options:
1m,
3m,
ytd

Response

Rebased gold and DXY series.

Standard success envelope shared by every endpoint. Each operation's response wrapper extends this (via allOf) and adds a typed data property.

success
boolean
required

Always true for a successful response.

Example:

true

statusCode
integer
required

Mirrors the HTTP status code.

Example:

200

data
object
required

Rebased gold and US Dollar Index (DXY) series for correlation analysis.

meta
object

Response metadata. Always present; timestamp is the server time the response was generated.