v1
latestOpenAPI 3.0.22026-07-26123510445.2 KBConversion
Create Quote
Create a new FX quote to be used for a conversion. The returned rate includes UQPAY's markup and reflects the final rate applicable within the quote's validity period.
Usage Guidelines
- A quote is required before executing a currency conversion or cross-currency payout.
- The generated quote must be used within its validity period (75 seconds), after which a new quote must be requested if needed.
- Specify both buy_currency and sell_currency, but define only one of either buy_amount or sell_amount. The defined amount represents the dealt (fixed) side, while the other amount will be automatically calculated based on UQPAY's exchange rate.
- A quote created with a specific transaction_type can only be used for the corresponding operation. Mixing usage is not allowed.
- conversion quotes must be used with Create Conversion.
- payout quotes must be used with Create Payout.
post/v1/conversion/quote
Headers
x-on-behalf-ofstring
Specifies the sub-account on whose behalf the request is made. This should be set to the account_id, which can be retrieved via the List Connected Accounts API. If omitted or empty, the request is executed using the master account. More information at Connected Accounts.
x-idempotency-keystring uuid
A unique identifier (UUID) used to maintain operation idempotency, ensuring that repeated executions of the same operation do not result in unintended effects or duplication. It helps preserve data consistency in the face of network errors, retries, or failures.
Request body
Example request
{
"sell_currency": "USD",
"sell_amount": "1000.00",
"buy_currency": "SGD",
"buy_amount": "1000.00",
"conversion_date": "2024-08-26"
}Response
OK - Successfully retrieved a payout.
Example response
{
"sell_currency": "USD",
"sell_amount": "100",
"buy_currency": "SGD",
"buy_amount": "135.02",
"quote_price": {
"currency_pair": "USDSGD",
"direct_rate": "1.358663",
"inverse_rate": "0.736018",
"quote_id": "4e70729d-36dd-4465-80a2-f7282bf46bfa",
"validity": {
"valid_from": 1724393057882,
"valid_to": 1724393132882
}
}
}