Corgi BankDocumentation
OpenAPI

Create an FX quote

POST/fx-quotes

The customer's own instruction: a customer token, or a service holding accounts:fx:quote acting on an instruction it is carrying out. pair is BASE/QUOTE (for example EUR/USD) and side says whether the customer buys or sells the base currency, which fixes which of their accounts the money leaves and which it arrives in: buying the base means it arrives in the base-currency account. Exactly one leg carries the amount, in its own currency's minor units (JPY has none, KWD three). source_account_id and target_account_id name the customer's own open deposit accounts, whose currencies must match the pair and side. The quote is struck on the bank's current approved customer sheet and answers the rate, both amounts, their currencies and when it expires; it is held unbooked until it is booked, cancelled or expires. The ledger's per-conversion and daily customer limits apply (ledger.fx_limit_exceeded, 422), an unsupported currency is ledger.currency_unsupported (422) and no valid sheet is ledger.fx_rate_unavailable (409). The Idempotency-Key is scoped to the customer and source account and bound to the request; a replay returns the quote already struck with 200.

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

base_amountintegerOptional
customer_idstringRequired

Example cust_2tVh8nqLxq4GbDe0K1F6S9zRcWm

pairstringRequired
quote_amountintegerOptional
sidestringRequired
source_account_idstringRequired

Example acct_2tVh8nqLxq4GbDe0K1F6S9zRcWm

target_account_idstringRequired

Example acct_2tVh8nqLxq4GbDe0K1F6S9zRcWm

Returns

200 OK

The FX Quote object.

Errors

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

400401403404409412413422424429500503

to move to open esc to close