Corgi BankDocumentation
OpenAPI

Propose a customer conversion or closing rate sheet bound to a retained publication

POST/ledger/fx/rate-sheets

Fresh treasury staff with ledger:treasury:write and an Idempotency-Key bound to the exact sheet. Every line's usd_per_foreign_major must equal the named snapshot's derived rate (no typed rates), lines are sorted and unique, and the snapshot must be the latest retained from its source on or before business_date and at most five days old. A customer_conversion sheet is for the current business date, valid for at most 24 hours, with spreads of 0 to 1000 basis points, a per-conversion limit per line and a daily per-customer limit, and only in currencies the ledger holds; a closing_revaluation sheet carries mid rates for a current or past business date. Proposals publish ledger.fx_rate_sheet.proposed.

Headers

Idempotency-KeystringRequired

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

business_datestring · dateRequired

A business date, YYYY-MM-DD

daily_customer_limit_usd_minorintegerOptional
evidencestringRequired
linesarray of objectsRequired
5 child attributes
currency_codestringRequired
customer_buy_spread_bpsintegerOptional

The customer buys the currency: ask = mid × (1 + bps/10000)

customer_sell_spread_bpsintegerOptional

The customer sells the currency: bid = mid × (1 − bps/10000)

max_conversion_usd_minorintegerOptional
usd_per_foreign_majorstringRequired
policy_referencestringRequired
purposestringRequired
rate_snapshot_idstringRequired
valid_fromstring · date-time or nullOptional
valid_untilstring · date-time or nullOptional

Returns

200 OK

actorstringRequired
atstring · date-timeRequired
business_datestring · dateRequired

A business date, YYYY-MM-DD

content_sha256stringRequired
daily_customer_limit_usd_minorintegerOptional
decisionobject or nullOptional
5 child attributes
actorstringRequired
approvebooleanRequired
atstring · date-timeRequired
content_sha256stringRequired
evidencestringRequired
evidencestringRequired
idstringRequired
linesarray of objectsRequired
5 child attributes
currency_codestringRequired
customer_buy_spread_bpsintegerOptional

The customer buys the currency: ask = mid × (1 + bps/10000)

customer_sell_spread_bpsintegerOptional

The customer sells the currency: bid = mid × (1 − bps/10000)

max_conversion_usd_minorintegerOptional
usd_per_foreign_majorstringRequired
policy_referencestringRequired
purposestringRequired
rate_snapshot_idstringRequired
rate_snapshot_sha256stringRequired
statusstringRequired

Proposed, approved or rejected

valid_fromstring · date-time or nullOptional
valid_untilstring · date-time or nullOptional

Errors

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

400401403404409412413422424429500503

to move to open esc to close