Polygon · Capability

Polygon Forex REST API — Conversion

Forex — Conversion. 1 operation. Lead operation: Convert From One Currency To Another. Self-contained Naftiko capability covering one Polygon business surface.

Run with Naftiko PolygonForexConversion

What You Can Do

GET
Getforexconversion — Convert From One Currency To Another
/v1/v1/conversion/{from}/{to}

MCP Tools

convert-one-currency-another

Convert From One Currency To Another

read-only idempotent

Capability Spec

forex-conversion.yaml Raw ↑
naftiko: "1.0.0-alpha2"

info:
  label: "Polygon Forex REST API — Conversion"
  description: >-
    Forex — Conversion. 1 operation. Lead operation: Convert From One Currency To Another.
    Self-contained Naftiko capability covering one Polygon business surface.
  tags:
    - Polygon
    - Forex
    - Conversion
  created: "2026-05-29"
  modified: "2026-05-29"

binds:
  - namespace: env
    keys:
      POLYGON_API_KEY: POLYGON_API_KEY

capability:

  consumes:
    - type: http
      namespace: "forex-conversion"
      baseUri: "https://api.polygon.io"
      description: "Polygon Forex REST API — Conversion business capability."
      authentication:
        type: bearer
        token: "{{env.POLYGON_API_KEY}}"
      resources:
        - name: "conversion-from-to"
          path: "/v1/conversion/{from}/{to}"
          operations:
            - name: "getForexConversion"
              method: GET
              description: "Convert From One Currency To Another"
              inputParameters:
                - name: "from"
                  in: path
                  type: string
                  required: true
                - name: "to"
                  in: path
                  type: string
                  required: true
                - name: "amount"
                  in: query
                  type: number
                  required: false
                - name: "precision"
                  in: query
                  type: integer
                  required: false
              outputRawFormat: json
              outputParameters:
                - name: result
                  type: object
                  value: "$."

  exposes:
    - type: rest
      namespace: "forex-conversion-rest"
      port: 8080
      description: "REST adapter for Polygon Forex REST API — Conversion."
      resources:
        - path: "/v1/v1/conversion/{from}/{to}"
          name: "conversion-from-to"
          description: "REST surface for conversion-from-to."
          operations:
            - method: GET
              name: "getForexConversion"
              description: "Convert From One Currency To Another"
              call: "forex-conversion.getForexConversion"
              with:
                from: "rest.from"
                to: "rest.to"
                amount: "rest.amount"
                precision: "rest.precision"
              outputParameters:
                - type: object
                  mapping: "$."

    - type: mcp
      namespace: "forex-conversion-mcp"
      port: 9090
      transport: http
      description: "MCP adapter for Polygon Forex REST API — Conversion."
      tools:
        - name: "convert-one-currency-another"
          description: "Convert From One Currency To Another"
          hints:
            readOnly: true
            destructive: false
            idempotent: true
          call: "forex-conversion.getForexConversion"
          with:
            from: "tools.from"
            to: "tools.to"
            amount: "tools.amount"
            precision: "tools.precision"
          outputParameters:
            - type: object
              mapping: "$."