FinanceActive

Currency Exchange Rates

Live forex rates from European Central Bank (ECB), updated hourly. Returns rates object mapping currency codes to rates relative to base. Pass symbols array to filter (e.g. ['USD','CHF','GBP']). Empty symbols = all 30+ currencies. Use for currency conversion in invoices, pricing, or financial calculations.

Endpointx402 Payment Required

POST

https://agentsvc.io/api/v1/proxy/exchange-rates

Price

$0.001 USDC

Latency P99

~300ms

Provider

agentsvc.io

Input Schema

{ "type": "object", "properties": { "base": { "type": "string", "default": "EUR", "description": "Base currency (e.g. USD, EUR, GBP)" }, "symbols": { "type": "array", "items": { "type": "string" }, "description": "Target currencies to return. Empty = all." } } }

Output Schema

{ "type": "object", "required": [ "base", "date", "rates", "source" ], "properties": { "base": { "type": "string", "description": "Base currency code (e.g. EUR)" }, "date": { "type": "string", "format": "date", "description": "Date of the exchange rates" }, "rates": { "type": "object", "additionalProperties": { "type": "number" }, "description": "Map of currency code → exchange rate relative to base" }, "source": { "type": "string", "description": "Data source attribution. Always: 'European Central Bank via frankfurter.dev'" } }, "example": { "base": "EUR", "date": "2026-04-07", "rates": { "USD": 1.0892, "CHF": 0.9242, "GBP": 0.8594, "JPY": 161.32 }, "source": "European Central Bank via frankfurter.dev" } }

Code Examples

# Step 1: Call without payment → receive 402 with requirements
curl -X POST "https://agentsvc.io/api/v1/proxy/exchange-rates" \
  -H "Content-Type: application/json" \
  -d '{
  "base": "EUR",
  "symbols": [
    "USD",
    "GBP",
    "CHF"
  ]
}'

# Step 2: Sign payment using x402 SDK, then retry
curl -X POST "https://agentsvc.io/api/v1/proxy/exchange-rates" \
  -H "Content-Type: application/json" \
  -H "X-Payment: x402 usdc base <your-signed-payment>" \
  -d '{
  "base": "EUR",
  "symbols": [
    "USD",
    "GBP",
    "CHF"
  ]
}'

Tags

#forex#finance#currency#exchange#ecb

Service Info

Service IDsvc_exchange_03
Categoryfinance
StatusActive
ChainBase (USDC)
Protocolx402
Read API Documentation →