fittings-treasury-reporting-rate
Original:🇺🇸 English
Translated
1 scripts
The Treasury's official quarterly 'Reporting Rates of Exchange' for a country's currency, as required for federal financial reporting. Called as GET /v1/treasury/reporting-rate, it takes country, currency, asOf and returns found, exchangeRate, recordDate, fiscalQuarter. Distinct from the neighbouring services in this domain by: official, rates, required, financial. Federal grantees, contractors and anyone filing in USD must convert at the Treasury rate rather than a market rate, and using the wrong one makes the filing wrong. Reading this schema and dry-running the call are free and need no wallet; a real call costs $0.003, paid in USDC on Base over x402.
1installs
Sourcefittings-sh/fittings
Added on
NPX Install
npx skill4agent add fittings-sh/fittings fittings-treasury-reporting-rateTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →US Treasury reporting rate of exchange
treasury.reporting-ratehttps://fittings.shThe Treasury's official quarterly 'Reporting Rates of Exchange' for a country's currency, as required for federal financial reporting.
The call
GET https://fittings.sh/v1/treasury/reporting-rate| Field | Type | Required | Notes |
|---|---|---|---|
| string | yes | Country as Treasury names it, e.g. 'Canada' |
| string | no | Optional currency name, e.g. 'Dollar', to disambiguate |
| string | no | Optional ISO date; returns the rate in force on that date |
Example input:
json
{
"country": "Canada",
"asOf": "2024-03-31"
}Cost and provenance
| Price | $0.003 |
| Source | US Treasury Bureau of the Fiscal Service, Fiscal Data API, public domain |
| Licence | public-domain |
Why call it rather than answer from memory
Federal grantees, contractors and anyone filing in USD must convert at the Treasury rate rather than a market rate, and using the wrong one makes the filing wrong.
Calling it
A skill is loaded on its own, so this document has to be enough by itself. It
does not assume the general skill is also loaded.
ships alongside this file; if it is missing (this document reached you without
the rest of the skill), fetch it once with
.
fittingscall.mjscurl -sO https://fittings.sh/skill/call.mjsFree, and needs no wallet. Read the schema and see what a call would cost:
bash
curl -s https://fittings.sh/catalog/treasury.reporting-rate | jqPaying. The endpoint answers with a signed quote,
you sign an authorization, and a facilitator settles it — you never send a
transaction and never pay gas. Before it spends anything, the client checks its
own hash against the gateway and refuses rather than sign with logic the
gateway has moved past:
402 Payment Requiredbash
# Dry run. Prints the quote and pays nothing, because no key is set.
node call.mjs treasury.reporting-rate country=Canada asOf=2024-03-31
# For real: a wallet holding USDC on Base, and nothing else.
export FITTINGS_PRIVATE_KEY=0x...
node call.mjs treasury.reporting-rate country=Canada asOf=2024-03-31Spending is never a side effect of curiosity: with no
the client fetches the quote and stops. caps what it will
pay without asking, and defaults to $0.05.
FITTINGS_PRIVATE_KEYFITTINGS_MAX_PRICEUse a throwaway wallet holding a few dollars, not a main one. The key sits
in plaintext wherever the agent runs, and the whole cost of entry is USDC on
Base — no account, no API key, and no ETH, because the payer signs off-chain and
the facilitator broadcasts and pays the gas.
Writing your own client instead of using this one? and
on npm, and the skill records the two things that cost
real debugging time: the challenge is in a response header rather than the body,
and it must be re-signed from the exact request being retried.
@x402/core@x402/evmfittingsIf this is not the right service,
searches all of them for free.
https://fittings.sh/catalog/search?q=...