Corgi BankDocumentation
OpenAPI

Post an unexpired quote once as a conversion through the FX position (conversion service)

POST/ledger/fx/conversions

Only the conversion service that quoted may convert its quote, under an Idempotency-Key. The quote must be unexpired and its sheet still approved and valid (ledger.fx_quote_expired, 409), the daily limit is rechecked under a per-customer lock, and the source account's available balance after the conversion must cover its holds (ledger.insufficient_available). One journal moves the customer's source account, each foreign currency's FX position and USD equivalent at the sheet's mid rate with a retained leg, the spread to GL 4240 and the target account; each currency balances on its own. A quote converts once; the same key replays the same conversion after expiry, and GET /ledger/fx/conversions/by-key recovers a lost response. Conversion journals are not generically reversible. Publishes ledger.fx_conversion.posted.

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

quote_idstringRequired

Returns

200 OK

business_datestring · dateRequired

A business date, YYYY-MM-DD

callerstringRequired
created_atstring · date-timeRequired
idstringRequired
journal_idstringRequired

Example jrnl_2tVh8nqLxq4GbDe0K1F6S9zRcWm

ownerstringRequired
priceobjectRequired

ConversionPrice is the exact result of pricing a conversion on a customer sheet.

10 child attributes
customer_ratestringRequired

Target major units per source major unit, ten decimals, for display only

source_amountintegerOptional
source_currency_codestringRequired
source_usd_equivalentintegerRequired
source_usd_per_majorstringRequired
spread_usd_minorintegerRequired
target_amountintegerOptional
target_currency_codestringRequired
target_usd_equivalentintegerRequired
target_usd_per_majorstringRequired
quote_idstringRequired
rate_sheet_idstringRequired
source_ledger_account_idstringRequired

Example lacc_2tVh8nqLxq4GbDe0K1F6S9zRcWm

target_ledger_account_idstringRequired

Example lacc_2tVh8nqLxq4GbDe0K1F6S9zRcWm

Errors

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

400401403404409412413422424429500503

to move to open esc to close