Post an unexpired quote once as a conversion through the FX position (conversion service)
/ledger/fx/conversionsOnly 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-KeystringRequiredSend 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_idstringRequiredReturns
200 OK
business_datestring · dateRequiredA business date, YYYY-MM-DD
callerstringRequiredcreated_atstring · date-timeRequiredidstringRequiredjournal_idstringRequiredExample jrnl_2tVh8nqLxq4GbDe0K1F6S9zRcWm
ownerstringRequiredpriceobjectRequiredConversionPrice is the exact result of pricing a conversion on a customer sheet.
10 child attributes
customer_ratestringRequiredTarget major units per source major unit, ten decimals, for display only
source_amountintegerOptionalsource_currency_codestringRequiredsource_usd_equivalentintegerRequiredsource_usd_per_majorstringRequiredspread_usd_minorintegerRequiredtarget_amountintegerOptionaltarget_currency_codestringRequiredtarget_usd_equivalentintegerRequiredtarget_usd_per_majorstringRequiredquote_idstringRequiredrate_sheet_idstringRequiredsource_ledger_account_idstringRequiredExample lacc_2tVh8nqLxq4GbDe0K1F6S9zRcWm
target_ledger_account_idstringRequiredExample lacc_2tVh8nqLxq4GbDe0K1F6S9zRcWm
Errors
Every error is a problem document with a stable code. See Errors.
400401403404409412413422424429500503