Metals-API · Capability

Metals-API

Metals-API provides a free, simple, and lightweight JSON API for current and historical precious metals rates and currency conversion. It supports real-time and historical data for gold, silver, platinum, palladium, and other metals in 170 world currencies.

Run with Naftiko MetalsApiAPI

What You Can Do

GET
Getsymbols — List supported symbols
/symbols
GET
Getlatest — Get latest rates
/latest
GET
Gethistoricalrates — Get historical rates by date
/{date}
GET
Convert — Convert between currencies and metals
/convert
GET
Gettimeseries — Get rates over a time series
/timeseries
GET
Getfluctuation — Get rate fluctuation
/fluctuation
GET
Getcarat — Get gold prices by carat
/carat
GET
Getlowesthighest — Get daily lowest and highest prices
/lowest-highest/{date}
GET
Getohlc — Get OHLC data
/open-high-low-close/{date}

MCP Tools

getsymbols

List supported symbols

read-only idempotent
getlatest

Get latest rates

read-only idempotent
gethistoricalrates

Get historical rates by date

read-only idempotent
convert

Convert between currencies and metals

read-only idempotent
gettimeseries

Get rates over a time series

read-only idempotent
getfluctuation

Get rate fluctuation

read-only idempotent
getcarat

Get gold prices by carat

read-only idempotent
getlowesthighest

Get daily lowest and highest prices

read-only idempotent
getohlc

Get OHLC data

read-only idempotent

Capability Spec

metals-api-capability.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Metals-API
  description: Metals-API provides a free, simple, and lightweight JSON API for current and historical precious metals rates
    and currency conversion. It supports real-time and historical data for gold, silver, platinum, palladium, and other metals
    in 170 world currencies.
  tags:
  - Metals
  - Api
  - API
  created: '2026-05-06'
  modified: '2026-05-06'
capability:
  consumes:
  - type: http
    namespace: metals-api
    baseUri: https://metals-api.com/api
    description: Metals-API HTTP API.
    authentication:
      type: apikey
      in: query
      name: access_key
      value: '{{METALS_API_TOKEN}}'
    resources:
    - name: symbols
      path: /symbols
      operations:
      - name: getsymbols
        method: GET
        description: List supported symbols
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: latest
      path: /latest
      operations:
      - name: getlatest
        method: GET
        description: Get latest rates
        inputParameters:
        - name: unit
          in: query
          type: string
          description: Unit of measure (e.g., troy_ounce, gram, kilogram).
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: date
      path: /{date}
      operations:
      - name: gethistoricalrates
        method: GET
        description: Get historical rates by date
        inputParameters:
        - name: date
          in: path
          type: string
          required: true
          description: Date in YYYY-MM-DD format.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: convert
      path: /convert
      operations:
      - name: convert
        method: GET
        description: Convert between currencies and metals
        inputParameters:
        - name: from
          in: query
          type: string
          required: true
          description: Source currency or metal symbol.
        - name: to
          in: query
          type: string
          required: true
          description: Target currency or metal symbol.
        - name: amount
          in: query
          type: number
          required: true
          description: Amount to convert.
        - name: date
          in: query
          type: string
          description: Optional historical date in YYYY-MM-DD format.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: timeseries
      path: /timeseries
      operations:
      - name: gettimeseries
        method: GET
        description: Get rates over a time series
        inputParameters:
        - name: start_date
          in: query
          type: string
          required: true
        - name: end_date
          in: query
          type: string
          required: true
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: fluctuation
      path: /fluctuation
      operations:
      - name: getfluctuation
        method: GET
        description: Get rate fluctuation
        inputParameters:
        - name: start_date
          in: query
          type: string
          required: true
        - name: end_date
          in: query
          type: string
          required: true
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: carat
      path: /carat
      operations:
      - name: getcarat
        method: GET
        description: Get gold prices by carat
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: lowest-highest-date
      path: /lowest-highest/{date}
      operations:
      - name: getlowesthighest
        method: GET
        description: Get daily lowest and highest prices
        inputParameters:
        - name: date
          in: path
          type: string
          required: true
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: open-high-low-close-date
      path: /open-high-low-close/{date}
      operations:
      - name: getohlc
        method: GET
        description: Get OHLC data
        inputParameters:
        - name: date
          in: path
          type: string
          required: true
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    port: 8080
    namespace: metals-api-rest
    description: REST adapter for Metals-API.
    resources:
    - path: /symbols
      name: getsymbols
      operations:
      - method: GET
        name: getsymbols
        description: List supported symbols
        call: metals-api.getsymbols
        outputParameters:
        - type: object
          mapping: $.
    - path: /latest
      name: getlatest
      operations:
      - method: GET
        name: getlatest
        description: Get latest rates
        call: metals-api.getlatest
        outputParameters:
        - type: object
          mapping: $.
    - path: /{date}
      name: gethistoricalrates
      operations:
      - method: GET
        name: gethistoricalrates
        description: Get historical rates by date
        call: metals-api.gethistoricalrates
        with:
          date: rest.date
        outputParameters:
        - type: object
          mapping: $.
    - path: /convert
      name: convert
      operations:
      - method: GET
        name: convert
        description: Convert between currencies and metals
        call: metals-api.convert
        outputParameters:
        - type: object
          mapping: $.
    - path: /timeseries
      name: gettimeseries
      operations:
      - method: GET
        name: gettimeseries
        description: Get rates over a time series
        call: metals-api.gettimeseries
        outputParameters:
        - type: object
          mapping: $.
    - path: /fluctuation
      name: getfluctuation
      operations:
      - method: GET
        name: getfluctuation
        description: Get rate fluctuation
        call: metals-api.getfluctuation
        outputParameters:
        - type: object
          mapping: $.
    - path: /carat
      name: getcarat
      operations:
      - method: GET
        name: getcarat
        description: Get gold prices by carat
        call: metals-api.getcarat
        outputParameters:
        - type: object
          mapping: $.
    - path: /lowest-highest/{date}
      name: getlowesthighest
      operations:
      - method: GET
        name: getlowesthighest
        description: Get daily lowest and highest prices
        call: metals-api.getlowesthighest
        with:
          date: rest.date
        outputParameters:
        - type: object
          mapping: $.
    - path: /open-high-low-close/{date}
      name: getohlc
      operations:
      - method: GET
        name: getohlc
        description: Get OHLC data
        call: metals-api.getohlc
        with:
          date: rest.date
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    port: 9090
    namespace: metals-api-mcp
    transport: http
    description: MCP adapter for Metals-API for AI agent use.
    tools:
    - name: getsymbols
      description: List supported symbols
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: metals-api.getsymbols
      outputParameters:
      - type: object
        mapping: $.
    - name: getlatest
      description: Get latest rates
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: metals-api.getlatest
      with:
        unit: tools.unit
      inputParameters:
      - name: unit
        type: string
        description: Unit of measure (e.g., troy_ounce, gram, kilogram).
      outputParameters:
      - type: object
        mapping: $.
    - name: gethistoricalrates
      description: Get historical rates by date
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: metals-api.gethistoricalrates
      with:
        date: tools.date
      inputParameters:
      - name: date
        type: string
        description: Date in YYYY-MM-DD format.
        required: true
      outputParameters:
      - type: object
        mapping: $.
    - name: convert
      description: Convert between currencies and metals
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: metals-api.convert
      with:
        from: tools.from
        to: tools.to
        amount: tools.amount
        date: tools.date
      inputParameters:
      - name: from
        type: string
        description: Source currency or metal symbol.
        required: true
      - name: to
        type: string
        description: Target currency or metal symbol.
        required: true
      - name: amount
        type: number
        description: Amount to convert.
        required: true
      - name: date
        type: string
        description: Optional historical date in YYYY-MM-DD format.
      outputParameters:
      - type: object
        mapping: $.
    - name: gettimeseries
      description: Get rates over a time series
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: metals-api.gettimeseries
      with:
        start_date: tools.start_date
        end_date: tools.end_date
      inputParameters:
      - name: start_date
        type: string
        description: start_date
        required: true
      - name: end_date
        type: string
        description: end_date
        required: true
      outputParameters:
      - type: object
        mapping: $.
    - name: getfluctuation
      description: Get rate fluctuation
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: metals-api.getfluctuation
      with:
        start_date: tools.start_date
        end_date: tools.end_date
      inputParameters:
      - name: start_date
        type: string
        description: start_date
        required: true
      - name: end_date
        type: string
        description: end_date
        required: true
      outputParameters:
      - type: object
        mapping: $.
    - name: getcarat
      description: Get gold prices by carat
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: metals-api.getcarat
      outputParameters:
      - type: object
        mapping: $.
    - name: getlowesthighest
      description: Get daily lowest and highest prices
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: metals-api.getlowesthighest
      with:
        date: tools.date
      inputParameters:
      - name: date
        type: string
        description: date
        required: true
      outputParameters:
      - type: object
        mapping: $.
    - name: getohlc
      description: Get OHLC data
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: metals-api.getohlc
      with:
        date: tools.date
      inputParameters:
      - name: date
        type: string
        description: date
        required: true
      outputParameters:
      - type: object
        mapping: $.
binds:
- namespace: env
  keys:
    METALS_API_TOKEN: METALS_API_TOKEN