{"uid":"cap_K1IVaedrgQOEecAhmQMmp","slug":"2s-fx-rate-watcher-f42ee9b7","name":"2s FX Rate Watcher","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/watchers/fx-rate?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"base":{"type":"string","description":"Base currency, e.g. USD."},"label":{"type":"string","maxLength":64,"description":"Optional free-text tag."},"quote":{"type":"string","description":"Quote currency, e.g. EUR."},"payload":{"type":"object","description":"Arbitrary JSON echoed back in every callback.","additionalProperties":{}},"maxFires":{"type":"integer","maximum":1000,"minimum":1,"description":"Stop after this many callbacks (default 1)."},"threshold":{"type":"number","minimum":0,"description":"Quote-per-base rate to cross, e.g. 0.95.","exclusiveMinimum":true},"callbackUrl":{"type":"string","maxLength":2048,"description":"Signed event POSTed here (verify X-2s-Signature). Any http(s) URL."},"conditionType":{"enum":["above","below"],"type":"string","description":"Fire when the rate goes above or below the threshold."},"expiresInSeconds":{"type":"integer","maximum":7776000,"minimum":60,"description":"Active window in seconds (default 30d, max 90d)."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.125","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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.125/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.125","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.125","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Y_V6axNwNyEh5NYKUim-A","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.125","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Registers a webhook watcher that fires a signed callback when a currency exchange rate crosses a specified threshold","exampleAgentPrompt":"Set up an fx rate watcher on 2s that fires my webhook at https://hooks.myapp.com/fx-alert when EUR/USD goes below 1.05 — fire up to 3 times and expire after 7 days.","exampleUseCases":[{"title":"Hedge alert for treasury team","prompt":"Watch USD/JPY and POST to https://treasury.acme.com/alerts when the rate goes above 155 — fire just once and keep the watcher active for 30 days, tagging it 'japan-hedge'."},{"title":"Stablecoin depeg monitor","prompt":"Set up a watcher on 2s for USDC/USD: if the rate drops below 0.98, immediately hit my webhook at https://risk.myplatform.io/depeg with a payload of {\"severity\":\"high\"} — max 5 fires, expire in 24 hours."},{"title":"Travel budget trigger","prompt":"Monitor GBP/EUR for me — alert my endpoint at https://myserver.io/travel-budget when the rate goes above 1.20, fire up to 2 times, and let it run for 60 days so I know when to book my trip expenses."}],"resultDescription":"The endpoint registers the watcher and returns a watcher ID or confirmation. When the fx rate crosses the specified threshold, 2s POSTs a signed JSON event (verified via X-2s-Signature header) to the callbackUrl, including the triggered rate, timestamp, and any echoed payload fields. The watcher fires up to maxFires times before deactivating, or until the expiresInSeconds window elapses.","failureModes":["Invalid or unreachable callbackUrl — watcher created but callbacks silently fail","Missing required fields (base, quote, threshold, conditionType, callbackUrl) — 400 validation error","threshold value of 0 or negative — rejected by exclusiveMinimum validation","expiresInSeconds outside 60–7776000 range — validation error","maxFires outside 1–1000 range — validation error","Payment failure (insufficient USDC balance via x402) — 402 response, watcher not registered","Callback signature not verified on receiving end — consumer-side misconfiguration"],"whenToPreferThis":"Use this endpoint when you need event-driven, threshold-based fx rate alerts delivered to a webhook rather than polling a rate endpoint yourself. It is ideal for automating downstream workflows (hedging, notifications, trading triggers) when a currency pair crosses a specific level. Prefer this over periodic polling when low latency on the crossing event matters, when you want to avoid repeated API calls, or when you need the alert to integrate directly into an existing HTTP-based automation pipeline. It supports long-lived watchers (up to 90 days) with configurable fire limits.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-12-02T14:37:10.964Z","isFirstParty":false,"canonicalSlug":"2s-fx-rate-watcher-f42ee9b7"}