CommodityPriceAPI API

CommodityPriceAPI API as documented publicly: 6 operations. Contract generated from the documentation by API Evangelist (2026-10-16); not the provider's own document.

Operations 6

GET / GET / #
GET /v2/rates/latest Get the gold silver ratio from the API #
GET /v3 Usage endpoint GET /v3 returns the current usage and quota information for your account. #
GET /v3/rates/latest/{symbol} Returns the latest palladium spot price (XPD) with bid and ask, per troy ounce, and optionally per gram or tola, in USD unless you ask for another currency. #
GET /v3/rates/{rateid} GET /v3/rates/fluctuation #
GET /v3/{v3id} GET /v3/symbols #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/commoditypriceapi:commoditypriceapi-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

commoditypriceapi-openapi-generated.yml Raw ↑
openapi: 3.1.0
info:
  title: CommodityPriceAPI API
  version: '2026-10-16'
  description: 'GENERATED FROM DOCUMENTATION by API Evangelist on 2026-10-16: 6 operation(s) read from 9 public documentation page(s) (each operation
    names its page in x-source). This is not the provider''s published contract; CommodityPriceAPI has published no machine-readable contract
    that the pipeline could find. Engine: local.'
  x-evidence-tiers:
    code-example: 11
    documentation: -5
    pages-with-code: 8
    pages-read: 9
  x-generated-from: documentation
  x-provenance: generated
  x-authored-by: API Evangelist
  x-generated: '2026-10-16'
  x-generator: generate-contract-from-docs.py
  x-engine: local
  x-sources:
  - https://commoditypriceapi.com
  - https://commoditypriceapi.com/gold-price
  - https://commoditypriceapi.com/silver-price
  - https://commoditypriceapi.com/tools/gold-to-silver-ratio
  - https://commoditypriceapi.com/docs
  - https://commoditypriceapi.com/oil-price-api
  - https://commoditypriceapi.com/copper-price-api
  - https://commoditypriceapi.com/platinum-price-api
  - https://commoditypriceapi.com/palladium-price-api
servers:
- url: https://api.commoditypriceapi.com
paths:
  /:
    get:
      operationId: get
      tags:
      - Api
      summary: GET /
      x-source: https://commoditypriceapi.com/gold-price
      responses:
        '200':
          description: Success (status as documented)
      x-evidence:
        kind: code-example
        language: curl
        snippet: 'curl, fetch, axios — all work 0 SDKs required Just your API key API reference Live gold rates Returns the latest CFD-based spot
          rate for gold (XAU), including bid and ask prices. Rates are sourced from live OTC market feeds and reflect real-world traded prices.
          Endpoint GET https://api.commoditypriceapi.com /v3/rates/latest/xau Every current plan receives real-time rates. Basic plan users receive '
  /v2/rates/latest:
    get:
      operationId: get_v2_rates_latest
      tags:
      - Rates
      summary: Get the gold silver ratio from the API
      description: 'Returns the latest mid‑market rates for the requested commodity symbols. Example response: { "rates": { "XAU": 4000.00, "XAG":
        50.00 } }'
      x-source: https://commoditypriceapi.com/tools/gold-to-silver-ratio
      parameters:
      - name: symbols
        in: query
        required: true
        schema:
          type: string
        description: Comma‑separated list of commodity symbols (e.g., XAU,XAG).
      responses:
        '200':
          description: Success (status as documented)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetV2RatesLatestResponse'
      x-evidence:
        kind: documentation
  /v3:
    get:
      operationId: get_v3
      tags:
      - Api
      summary: Usage endpoint GET /v3 returns the current usage and quota information for your account.
      description: GET /v3/usage Returns the current usage and quota information for your account.
      x-source: https://commoditypriceapi.com/docs
      parameters:
      - name: apiKey
        in: query
        required: true
        schema:
          type: string
        description: Your unique API key.
      responses:
        '200':
          description: Success (status as documented)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetV3Response'
      x-evidence:
        kind: documentation
  /v3/rates/latest/{symbol}:
    get:
      operationId: get_v3_rates_latest_symbol
      tags:
      - Rates
      summary: Returns the latest palladium spot price (XPD) with bid and ask, per troy ounce, and optionally per gram or tola, in USD unless
        you ask for another currency.
      x-source: https://commoditypriceapi.com/palladium-price-api
      parameters:
      - name: symbol
        in: path
        required: true
        schema:
          type: string
      - name: x-api-key
        in: header
        required: true
        schema:
          type: string
        description: Your API key, sent as a request header.
      - name: quote
        in: query
        required: false
        schema:
          type: string
        description: Currency to convert the rate into, e.g. EUR or INR.
      - name: include
        in: query
        required: false
        schema:
          type: string
        description: 'Adds a per‑unit field next to the troy‑ounce rate: gram or tola.'
      - name: metadata
        in: query
        required: false
        schema:
          type: boolean
        description: Include the metadata object (unit and quote currency).
      responses:
        '200':
          description: Success (status as documented)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetV3RatesLatestSymbolResponse'
      x-evidence:
        kind: documentation
  /v3/rates/{rateid}:
    get:
      operationId: get_v3_rates_rateid
      tags:
      - Rates
      summary: GET /v3/rates/fluctuation
      x-source: https://commoditypriceapi.com/docs
      parameters:
      - name: rateid
        in: path
        required: true
        schema:
          type: string
      - name: endDate
        in: query
        required: false
        schema:
          type: string
      - name: startDate
        in: query
        required: false
        schema:
          type: string
      - name: symbols
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success (shape read from the example response on the page)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetV3RatesRateidResponse'
      x-evidence:
        kind: code-example
        language: curl
        snippet: "curl JavaScript Python PHP Copy $ curl \"https://api.commoditypriceapi.com/v3/rates/fluctuation?symbols=xau,wtioil-fut,zw,pl&startDate=2023-12-08&endDate=2023-12-13\"\
          \  -H \"x-api-key: YOUR_API_KEY\" const res = await fetch ( \n \"https://api.commoditypriceapi.com/v3/rates/fluctuation?symbols=xau,wtioil-fut,zw,pl&startDate=2023-12-08&endDate=2023-12-13\"\
          \ , \n { headers : { \"x-api-key\" : \"YOUR_API_KEY\" } } "
        collapsed_from: 5 example path(s) differing only at rateId
  /v3/{v3id}:
    get:
      operationId: get_v3_v3id
      tags:
      - Api
      summary: GET /v3/symbols
      x-source: https://commoditypriceapi.com/docs
      parameters:
      - name: v3id
        in: path
        required: true
        schema:
          type: string
      - name: underlying
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success (shape read from the example response on the page)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetV3V3IdResponse'
      x-evidence:
        kind: code-example
        language: curl
        snippet: "curl JavaScript Python PHP Copy $ curl \"https://api.commoditypriceapi.com/v3/symbols?underlying=WTIOIL-FUT\"  -H \"x-api-key:\
          \ YOUR_API_KEY\" const res = await fetch ( \n \"https://api.commoditypriceapi.com/v3/symbols?underlying=WTIOIL-FUT\" , \n { headers\
          \ : { \"x-api-key\" : \"YOUR_API_KEY\" } } , \n ) ; \n const data = await res . json ( ) ; \nconsole . log ( data ) ; import requests\n\
          res = requests . get ( \n \""
        collapsed_from: 2 example path(s) differing only at v3Id
components:
  schemas:
    GetV2RatesLatestResponse:
      type: object
      properties:
        rates:
          type: object
          description: Mapping of symbol to its latest price.
    GetV3Response:
      type: object
      properties:
        plan:
          type: string
          description: Your current plan name in lowercase (e.g. basic , standard , advanced ).
        quota:
          type: integer
          description: Your current allotted quota.
        used:
          type: integer
          description: Your usage since start of month, subscription, or trial.
    GetV3RatesLatestSymbolResponse:
      type: object
      properties:
        success:
          type: boolean
          description: true on a 200 response.
        timestamp:
          type: number
          description: Unix time (seconds) when the response was generated.
        rates:
          type: object
          description: rates.XPD object with rate, bid, ask and optional gram/tola fields.
        metadata:
          type: object
          description: metadata.XPD object with unit and quote currency.
    GetV3RatesRateidResponse:
      type: object
      properties:
        success:
          type: boolean
        startDate:
          type: string
          format: date
        endDate:
          type: string
          format: date
        rates:
          type: object
          properties:
            WTIOIL-FUT:
              type: object
              properties:
                startRate:
                  type: number
                endRate:
                  type: number
                change:
                  type: number
                changePercent:
                  type: number
            XAU:
              type: object
              properties:
                startRate:
                  type: number
                endRate:
                  type: number
                change:
                  type: number
                changePercent:
                  type: number
            XPT:
              type: object
              properties:
                startRate:
                  type: number
                endRate:
                  type: number
                change:
                  type: number
                changePercent:
                  type: number
        unresolved:
          type: object
          properties:
            PL:
              type: object
              properties:
                message:
                  type: string
                resolvedTo:
                  type: string
            ZW:
              type: object
              properties:
                message:
                  type: string
                suggestions:
                  type: array
                  items:
                    type: string
    GetV3V3IdResponse:
      type: object
      properties:
        success:
          type: boolean
        symbols:
          type: array
          items:
            type: object
            properties:
              symbol:
                type: string
              category:
                type: string
              currency:
                type: object
                properties:
                  code:
                    type: string
                  name:
                    type: string
                  symbol:
                    type: string
              unit:
                type: object
                properties:
                  symbol:
                    type: string
                  name:
                    type: string
              name:
                type: string
              description:
                type: string
              status:
                type: string
              contract:
                type: string
              deliveryMonth:
                type: string
              expiresAt:
                type: string
                format: date
              underlying:
                type: string
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
security:
- apiKey: []
tags:
- name: Api
- name: Rates