Corgi BankDocumentation
OpenAPI

Fetch a reference-rate publication from the configured source and retain it with the USD rates derived from it

POST/ledger/fx/rate-snapshots

Fresh treasury staff with ledger:treasury:write required (authentication within five minutes). The configured FX_RATE_SOURCE is fetched for a current or past publication_date and retained byte for byte with its SHA-256 and the USD-per-major rates derived from its euro crosses, rounded once to twelve decimals. The local source is the reference-rate simulator, whose rates are generated; the retained source says simulator or provider. A source failure or a date the source has not published answers dependency_failed (502); no source configured answers unavailable. Refetching the same publication returns the snapshot already retained.

Headers

Idempotency-KeystringOptional

Send on every write that creates or changes money or state; a replay with the same key returns the original result with 200.

Body parameters

publication_datestring · dateRequired

A business date, YYYY-MM-DD

Returns

200 OK

document_sha256stringRequired
fetched_atstring · date-timeRequired
fetched_bystringRequired
idstringRequired
publication_datestring · dateRequired

A business date, YYYY-MM-DD

referenceobjectRequired

ReferenceRates is one parsed reference-rate publication.

4 child attributes
datestring · dateRequired

A business date, YYYY-MM-DD

per_eurobjectRequired

Units of the currency per one euro, as published

senderstringRequired
subjectstringRequired
sourcestringRequired

Simulator or provider

usd_per_foreign_majorobjectRequired

Errors

Every error is a problem document with a stable code. See Errors.

400401403404409412413422424429500503

to move to open esc to close