Exchange Rate
api.strale.io/x402/exchange-rate
Exchange Rate: Get the current exchange rate between two currencies from the European Central Bank, with the inverse rate and the date.
GET
https://api.strale.io/x402/exchange-rateUptime100% of 4 checks in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://api.strale.io/x402/exchange-rate?from=%3Cfrom%3E&to=%3Cto%3E");
console.log(await res.json());Example input
{
"from": {
"description": "Source currency (ISO 4217, e.g. USD)",
"required": true,
"type": "string"
},
"to": {
"description": "Target currency (ISO 4217, e.g. EUR)",
"required": true,
"type": "string"
}
}