{"uid":"cap_332YNL80rMGryJ1J6JQX-","slug":"2s-currency-conversion-api-eb64882d","name":"2s Currency Conversion API","description":"The (most) everything API: 575+ pay-per-call endpoints for AI agents — ground-truth data, a full AI gateway, and agent infrastructure (storage, queues, watchers). USDC via x402, no signup, no API keys, and upto billing: pay actual usage, not the quote.","url":"https://2s.io/api/convert/currency","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","queryParams"],"properties":{"type":{"const":"http"},"method":{"const":"GET"},"queryParams":{"required":["from","to"],"properties":{"to":{"type":"string","description":"Target currency, 3-letter ISO 4217 (e.g. EUR)."},"date":{"type":"string","description":"YYYY-MM-DD for a historical rate; omit for latest."},"from":{"type":"string","description":"Source currency, 3-letter ISO 4217 (e.g. USD)."},"amount":{"type":"number","description":"Amount of the source currency (default 1)."}}}}}}},"responseSchema":null,"example":{"request":{"input":{"type":"http","method":"GET","queryParams":{"to":"EUR","from":"USD","amount":250}}},"response":{"data":{"rate":0.86272,"query":{"to":"EUR","date":null,"from":"USD","amount":250},"result":215.68,"source":{"url":"https://www.frankfurter.dev/","license":"Public data (ECB reference rates)","provider":"European Central Bank reference rates (via Frankfurter)"},"rateDate":"2026-06-17"},"meta":{"cost":{"usd":0.00144,"tier":0},"caller":"x402","version":null,"endpoint":"convert.currency","settlement":{"txHash":"0x15f705d8868606649d562b98785ffdbe51b61e4862ce270e7bdd23f48a56a618","network":"eip155:8453","success":true}}}},"exampleRequest":{"to":"EUR","from":"USD","amount":250},"tags":["x402"],"displayCostAmount":"0.00144","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.00144/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0036","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0036","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_yZgznUquq9rC0fcj9-u31","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0036","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts an amount from one currency to another using live or historical ECB exchange rates","exampleAgentPrompt":"What's 250 USD worth in EUR right now — and what was that same conversion worth on 2024-03-01?","exampleUseCases":null,"resultDescription":"Returns the exchange rate between the two specified currencies, the converted result amount, the date of the rate used, and the data source (European Central Bank via Frankfurter). For historical queries, the rate date reflects the closest available ECB rate to the requested date.","failureModes":["Invalid or unsupported ISO 4217 currency code returns an error — only currencies covered by ECB reference rates are supported","Date too far in the past may not have available ECB data","Missing required 'from' or 'to' query parameters causes a 400-level error","Payment failure (insufficient USDC balance) blocks the request via x402 protocol"],"whenToPreferThis":"Choose this endpoint when you need reliable, ECB-sourced exchange rates for fiat currencies, especially EUR-anchored pairs, with optional historical date lookup. Best for financial calculations, invoice conversion, or compliance use cases where ECB reference rates are preferred. Not suitable for cryptocurrency pairs or real-time tick-by-tick forex data.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-16T12:42:20.075Z","isFirstParty":false}