convert

Convert an amount between currencies at a live or...

Convert an amount between currencies at a live or historical exchange rate. Pass from + to (3-letter ISO 4217 codes) and optional amount (default 1) and date (YYYY-MM-DD for a historical rate; omit for the latest). Returns the converted result, the per-unit rate, and the effective rate date. Live data from the European Central Bank reference rates (via Frankfurter) — fetched per request, never stale; weekends/holidays use the last published business day. Coverage is the ECB major currencies. Distinct from fx.rates (the raw rate table) — this is the agent-friendly "X from = ? to" call.

get/api/convert/currency

Request

  • Base URL: https://2s.io
  • URL: https://2s.io/api/convert/currency
  • Auth: API key in header PAYMENT-SIGNATURE

Query parameters

fromstring required

Start of the range.

tostring required

End of the range.

amountnumber

Amount.

datestring

Date in YYYY-MM-DD format.

trial1

Try before you buy. Set to 1 for one free real call per endpoint per hour — no wallet or payment needed — to verify the endpoint before paying. Equivalent to sending the "X-2s-Trial: 1" request header. Listed only on operations that offer a trial; the others always answer 402.

Response

(unresolved $ref)

Changes

No recorded changes to this operation across all 1 revision of this API.