Attest tools · currency_convert

Currency conversion (reference rates)

a task needs an indicative conversion of an amount between two of about 30 major currencies (AUD, USD, GBP, JPY, NZD, CAD, CNY and others) at the latest European Central Bank reference rates, for estimates or reports,…

1 credit per successful callPOST /api/v1/currency/convert

Bearer key · JSON

POST /api/v1/currency/convert

curl -s -X POST https://getattest.com.au/api/v1/currency/convert \
  -H "authorization: Bearer $ATTEST_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'

Send the key as a bearer token in the authorization header. One key and one credit balance cover every service, including Attest Capture. A failed call is refunded automatically. No key yet? POST /api/v1/keys issues one with 25 free credits and no signup — see the key guide.

For agents

Use when

Use this when a task needs an indicative conversion of an amount between two of about 30 major currencies (AUD, USD, GBP, JPY, NZD, CAD, CNY and others) at the latest European Central Bank reference rates, for estimates or reports, not for transactions. The ECB publishes the euro rates free of charge on its website.

Not documented yet: a captured example response. This page only shows what the module publishes about itself, so the missing parts are absent rather than guessed at.

3 fields

Input

Scroll the table horizontally to see all fields.

Field / Type / Required / What it does
FieldTypeRequiredWhat it does
amountnumberRequiredThe amount to convert, as a JSON number. A numeric string is refused rather than guessed at.
fromstringRequiredThree-letter code of the currency the amount is in.
tostringRequiredThree-letter code to convert to.

HTTP 200

Response

Every successful response also carries call_id (your receipt for the charge), credits_charged and credits_remaining.

Scroll the table horizontally to see all fields.

Field / What it holds
FieldWhat it holds
rateThe rate used, derived from the ECB euro reference rates.
resultThe converted amount, rounded for money.
result_rawThe unrounded conversion, for callers doing their own rounding.
rates_dateThe date of the ECB rate table used.
sourceThe ECB table and its date.
source_urlThe ECB page the rates are published on, free of charge.
noteThat these are indicative reference rates for estimates and reports, not transaction rates.

Machine-readable failures

Errors

Errors return JSON such as {"error":"invalid_api_key"}. A failed call is refunded automatically.

Scroll the table horizontally to see all fields.

Code / Status / Meaning
CodeStatusMeaning
amount_required400No amount was sent.
invalid_amount400amount is not a finite JSON number.
amount_too_large400amount is beyond the range this service converts.
unknown_currency400from or to is not a currency in the ECB table.
result_too_large400The converted amount cannot be returned as a JSON number.
rates_unavailable502The ECB rate file could not be read. Not charged.

On every service

Scroll the table horizontally to see all fields.

Code / Status / Meaning
CodeStatusMeaning
invalid_api_key401The authorization header is missing or the key is unknown.
insufficient_credits402The balance is below this call's cost. The response carries credits_required and credits_remaining.
rate_limit_exceeded429Free keys share 10 calls a minute across every service. The response carries limit and window_seconds.
services_unavailable503The credit store could not be reached. Retry once after 30 seconds.

Where the answer comes from

Source and scope

Euro foreign exchange reference rates published by the European Central Bank, which makes them available free of charge on its website (https://www.ecb.europa.eu).

Attest reports what it read, with the source it read it from. It is general information, not advice, and not a legal record.

All Attest tools · Service list as JSON · OpenAPI

Same key as every Attest tool

One key. One balance. 1 credit a call.

Issue a free key, then use it here, on Attest Capture and on every other tool in the box.

Get a free key