CommodityPriceAPI Rates API

The Rates API from CommodityPriceAPI — 3 operation(s) for rates.

Operations 3

GET /v2/rates/latest Get the gold silver ratio from the API #
GET /v3/rates/latest/{symbol} Returns the latest palladium spot price (XPD) with bid and ask, per troy ounce… #
GET /v3/rates/{rateid} GET /v3/rates/fluctuation #

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-rates-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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-rates-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: CommodityPriceAPI Rates 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
security:
- apiKey: []
tags:
- name: Rates
paths:
  /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/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…
      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
components:
  schemas:
    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
    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.
    GetV2RatesLatestResponse:
      type: object
      properties:
        rates:
          type: object
          description: Mapping of symbol to its latest price.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key