FX rate history

Returns JSON with 90 days of daily ECB euro reference rates (free at ecb.europa.eu) for up to 10 currencies, rebased to any base as cross rates we calculate, with min, max and percent change.

Use when you need historical exchange rates, forex history or the recent trend of a currency.

Do not use for rates older than 90 days, live quotes or crypto (one ECB rate per business day).

Price: 0.005 USDC per call (x402, eip155:8453). Typical response time: 1500 ms (p95).

Call it over HTTP (x402)

POST https://x402-gateway.blackwoodstate8.workers.dev/v1/fx-history. A request without payment gets 402 Payment Required with the PAYMENT-REQUIRED header; any x402 client signs an EIP-3009 authorization and retries with PAYMENT-SIGNATURE (or X-PAYMENT). Invalid input is answered with 400 and not charged.

curl -i -X POST https://x402-gateway.blackwoodstate8.workers.dev/v1/fx-history -H 'content-type: application/json' -d '{"symbols":["USD","BRL"],"days":7}'
Pay to0xdf5178C9C686ED466988C44063b3CEa200f6bf47
Asset0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 (USDC)
Amount5000 atomic units (0.005 USDC)
Authorization window60 s

Call it over MCP

Streamable HTTP at https://x402-gateway.blackwoodstate8.workers.dev/mcp, tool blackwood_fx_history. Payment goes in _meta["x402/payment"]; without it the tool returns the payment requirements.

Input

FieldTypeMeaning
symbolsarrayCurrencies to return, ISO 4217, up to 10, e.g. ["USD", "BRL"]
base (optional)stringBase currency, ISO 4217 (EUR when omitted), e.g. USD
days (optional)integerCalendar days back from endDate, 1 to 90 (90 when omitted; ignored with startDate), e.g. 30
startDate (optional)stringFirst day, YYYY-MM-DD, within the last 90 days, e.g. 2026-09-01
endDate (optional)stringLast day, YYYY-MM-DD (latest ECB day when omitted), e.g. 2026-09-30

Example:

{
  "symbols": [
    "USD",
    "BRL"
  ],
  "days": 7
}

Output

Real example:

{
  "base": "EUR",
  "startDate": "2026-10-12",
  "endDate": "2026-10-16",
  "days": 5,
  "truncated": false,
  "series": [
    {
      "date": "2026-10-12",
      "rates": {
        "USD": 1.1181,
        "BRL": 5.5819
      }
    },
    {
      "date": "2026-10-13",
      "rates": {
        "USD": 1.1188,
        "BRL": 5.6125
      }
    },
    {
      "date": "2026-10-14",
      "rates": {
        "USD": 1.1195,
        "BRL": 5.6246
      }
    },
    {
      "date": "2026-10-15",
      "rates": {
        "USD": 1.1208,
        "BRL": 5.6679
      }
    },
    {
      "date": "2026-10-16",
      "rates": {
        "USD": 1.1253,
        "BRL": 5.7197
      }
    }
  ],
  "stats": {
    "USD": {
      "first": 1.1181,
      "last": 1.1253,
      "min": 1.1181,
      "max": 1.1253,
      "changePct": 0.64
    },
    "BRL": {
      "first": 5.5819,
      "last": 5.7197,
      "min": 5.5819,
      "max": 5.7197,
      "changePct": 2.47
    }
  },
  "attribution": "Source: European Central Bank (ECB) euro foreign exchange reference rates, available free of charge at ecb.europa.eu",
  "note": "ECB reference rates are for information purposes only, published once per business day; they are not trading rates. Rates against a base other than EUR and the statistics are calculated by Blackwood State from the ECB euro rates."
}
JSON Schema
{
  "type": "object",
  "properties": {
    "base": {
      "type": "string"
    },
    "startDate": {
      "type": "string"
    },
    "endDate": {
      "type": "string"
    },
    "days": {
      "type": "number"
    },
    "truncated": {
      "type": "boolean"
    },
    "series": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "rates": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "number"
            }
          }
        },
        "required": [
          "date",
          "rates"
        ],
        "additionalProperties": false
      }
    },
    "stats": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "object",
        "properties": {
          "first": {
            "type": "number"
          },
          "last": {
            "type": "number"
          },
          "min": {
            "type": "number"
          },
          "max": {
            "type": "number"
          },
          "changePct": {
            "type": "number"
          }
        },
        "required": [
          "first",
          "last",
          "min",
          "max",
          "changePct"
        ],
        "additionalProperties": false
      }
    },
    "attribution": {
      "type": "string"
    },
    "note": {
      "type": "string"
    },
    "next": {
      "type": "object",
      "properties": {
        "service": {
          "type": "string",
          "description": "Service id of the suggested next paid call"
        },
        "tool": {
          "type": "string",
          "description": "MCP tool name of the same call"
        },
        "method": {
          "type": "string",
          "enum": [
            "GET",
            "POST"
          ]
        },
        "url": {
          "type": "string",
          "description": "Paid route of the next call"
        },
        "useWhen": {
          "type": "string",
          "description": "When the next call is the right one"
        },
        "sample": {
          "type": "string",
          "description": "Free fixed sample of the whole family"
        }
      },
      "required": [
        "service",
        "tool",
        "method",
        "url",
        "useWhen",
        "sample"
      ],
      "additionalProperties": false,
      "description": "Suggested next paid call in the same family (call it in a loop when the task continues)"
    }
  },
  "required": [
    "base",
    "startDate",
    "endDate",
    "days",
    "truncated",
    "series",
    "stats",
    "attribution",
    "note"
  ],
  "additionalProperties": false
}

More

Free schema and example: GET https://x402-gateway.blackwoodstate8.workers.dev/v1/fx-history. OpenAPI 3.1 · llms.txt · All services