Skip to content

REST API to get real-time gold futures price in USD from the Chicago Mercantile Exchange (CME). One endpoint. Clean JSON. 5,000 free requests/month.

Notifications You must be signed in to change notification settings

omkarcloud/gold-price-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Gold Price API

REST API to get real-time gold futures price in USD from the Chicago Mercantile Exchange (CME). One endpoint. Clean JSON. 5,000 free requests/month.

Features

  • Real-time gold futures price from the CME
  • One endpoint, no parameters — just call /price
  • Clean JSON response with price and timestamp
  • 99.99% uptime SLA
  • 5,000 requests/month on free tier
  • Example Response:
{
  "price_usd": 5030.7,
  "updated_at": "2026-02-09T10:12:49+00:00"
}

Get API Key

Create an account at omkar.cloud to get your API key, and use it in requests. 5000 requests are free every month.

Quick Start

curl -X GET "https://gold-price-api.omkar.cloud/price" \
  -H "API-Key: YOUR_API_KEY"
{
  "price_usd": 5030.7,
  "updated_at": "2026-02-09T10:12:49+00:00"
}

Installation

Python

pip install requests
import requests

response = requests.get(
    "https://gold-price-api.omkar.cloud/price",
    headers={"API-Key": "YOUR_API_KEY"}
)

data = response.json()
print(f"Gold Price: ${data['price_usd']} USD")

Node.js

npm install axios
import axios from "axios";

const response = await axios.get("https://gold-price-api.omkar.cloud/price", {
    headers: { "API-Key": "YOUR_API_KEY" }
});

console.log(`Gold Price: $${response.data.price_usd} USD`);

API Reference

Endpoint

GET https://gold-price-api.omkar.cloud/price

Headers

Header Required Description
API-Key Yes API key from omkar.cloud/api-key

Parameters

None. Just call the endpoint with your API key.

Response Fields

Field Type Description
price_usd number Current gold futures price in USD (e.g., 5030.7)
updated_at string Last updated timestamp in ISO 8601 format

Examples

Get gold price in Python

import requests

response = requests.get(
    "https://gold-price-api.omkar.cloud/price",
    headers={"API-Key": "YOUR_API_KEY"}
)

data = response.json()
print(f"Gold: ${data['price_usd']} (updated {data['updated_at']})")

Build a price alert

import requests

ALERT_THRESHOLD = 5000

response = requests.get(
    "https://gold-price-api.omkar.cloud/price",
    headers={"API-Key": "YOUR_API_KEY"}
)

price = response.json()["price_usd"]
if price > ALERT_THRESHOLD:
    print(f"Gold crossed ${ALERT_THRESHOLD}! Current: ${price}")

Track gold price over time

import requests
import time

prices = []
for _ in range(10):
    response = requests.get(
        "https://gold-price-api.omkar.cloud/price",
        headers={"API-Key": "YOUR_API_KEY"}
    )
    data = response.json()
    prices.append(data["price_usd"])
    print(f"${data['price_usd']} at {data['updated_at']}")
    time.sleep(60)

Error Handling

response = requests.get(
    "https://gold-price-api.omkar.cloud/price",
    headers={"API-Key": "YOUR_API_KEY"}
)

if response.status_code == 200:
    data = response.json()
elif response.status_code == 401:
    # Invalid API key
    pass
elif response.status_code == 429:
    # Rate limit exceeded
    pass

Rate Limits

Plan Price Requests/Month
Free $0 5,000
Starter $25 100,000
Grow $75 1,000,000
Scale $150 10,000,000

Most gold price APIs charge $99/month for unlimited access. We don't. Start free, scale cheap.

Questions? We have answers.

Reach out anytime. We will solve your query within 1 working day.

Contact Us on WhatsApp about Gold Price API

Contact Us on Email about Gold Price API

About

REST API to get real-time gold futures price in USD from the Chicago Mercantile Exchange (CME). One endpoint. Clean JSON. 5,000 free requests/month.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published