78trust / 100

Data Ecb Fx Reference

by API Acre in Markets & finance

x402 APIPassing, checked 4 h ago

Convert an amount between two supported currencies using one validated ECB daily reference-rate observation. The underlying ECB statistics are available free from the ECB Data Portal; the fee covers bounded retrieval, validation, clearly labelled cross-rate calculation, and x402 delivery.

POST
https://apiacre.com/v1/data/ecb-fx-reference
Price
$0.002
per call in USDC
Uptime
95.0%
last 30 days
Response time
270 ms
384 ms slowest 5%
Last check
Passed
4 h ago, next any minute now

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Status and outage history · Atom feed · Watch with other listings

How to call it

POST https://apiacre.com/v1/data/ecb-fx-reference

Each call costs $0.002 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

POST https://apiacre.com/v1/data/ecb-fx-reference
content-type: application/json

{
  "amount": "100",
  "base_currency": "GBP",
  "on_or_before": null,
  "quote_currency": "USD"
}

Parameters

ParameterTypeRequiredDescription
amountstringNo
base_currencystringYes One of: AUD, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR.
on_or_beforestring or nullNo
quote_currencystringYes One of: AUD, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR.

Example response

The provider's example. We can't check it without paying.

Example response, 51 lines
{
  "data": {
    "amount": "100",
    "baseCurrency": "GBP",
    "basis": {
      "basePerEur": "0.85585",
      "denomination": "EUR",
      "formula": "quotePerEur / basePerEur",
      "quotePerEur": "1.1576"
    },
    "convertedAmount": "135.2573465",
    "disclaimer": "Reference data only, not financial advice or a guarantee ...",
    "inverseRate": "0.739331375259",
    "limitations": [
      "ECB reference rates are usually published on TARGET busin...",
      "A converted amount is arithmetic evidence only; banks, ex...",
      "ECB observations can be revised, interrupted, or withdraw...",
      "Coverage is limited to the explicitly supported active EC..."
    ],
    "networkRequestsMade": 1,
    "quoteCurrency": "USD",
    "rate": "1.352573464976",
    "referenceDate": "2026-08-18",
    "referenceLagDays": 1,
    "requestedOnOrBefore": null,
    "retrievedAt": "2026-08-19T04:00:00+00:00",
    "source": {
      "dataset": "EXR daily euro foreign exchange reference rates",
      "provider": "European Central Bank",
      "requestUrl": "https://data-api.ecb.europa.eu/service/data/EXR/D.GBP+USD...",
      "seriesKeys": [
        "EXR.D.GBP.EUR.SP00.A",
        "EXR.D.USD.EUR.SP00.A"
      ]
    },
    "warnings": [
      "The latest common reference observation is 1 calendar day...",
      "API Acre derived this cross rate by dividing two unmodifi..."
    ]
  },
  "meta": {
    "cached": false,
    "duration_ms": 42,
    "next_actions": [],
    "sources": [],
    "warnings": []
  },
  "request_id": "018f1f54-7f38-7ba2-8dc3-5f90272d9f1a",
  "service": "data.ecb-fx-reference",
  "version": "1"
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.002.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://apiacre.com/v1/data/ecb-fx-reference' \
  -H 'content-type: application/json' \
  --data-raw '{"amount":"100","base_currency":"GBP","on_or_before":null,"quote_currency":"USD"}'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://apiacre.com/v1/data/ecb-fx-reference' \
  -H 'content-type: application/json' \
  --data-raw '{"amount":"100","base_currency":"GBP","on_or_before":null,"quote_currency":"USD"}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.002 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.002" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.002 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapiacre.com%2Fv1%2Fdata%2Fecb-fx-reference&method=POST
const res = await pay("https://apiacre.com/v1/data/ecb-fx-reference", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "amount": "100",
    "base_currency": "GBP",
    "on_or_before": null,
    "quote_currency": "USD"
  }),
});
console.log(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.002 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.002"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.post(
        "https://apiacre.com/v1/data/ecb-fx-reference",
        json={
            "amount": "100",
            "base_currency": "GBP",
            "on_or_before": None,
            "quote_currency": "USD",
        },
    )
    print(res.status_code, res.text)

Security scan

No findings

We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
4 h agoPassed402178 ms$0.002
14 h agoPassed402209 ms$0.002
23 h agoPassed402234 ms$0.002
34 h agoPassed402168 ms$0.002
47 h agoPassed402111 ms$0.002
Show 10 older checks
4 days agoTimed out---
5 days agoTimed out---
6 days agoPassed402292 ms$0.002
6 days agoTimed out---
6 days agoTimed out---
7 days agoPassed402349 ms$0.002
7 days agoPassed402289 ms$0.002
8 days agoPassed402285 ms$0.002
8 days agoPassed402336 ms$0.002
8 days agoPassed402262 ms$0.002