v1
latestOpenAPI 3.0.22026-07-26123510445.2 KBConversion
Create Conversion
Create a new currency conversion within your UQPAY account balances. This allows you to exchange one currency for another at the available rate.
Usage Guidelines
- If using a pre-generated quote, provide a valid quote_id. The key conversion parameters (buy_currency, sell_currency, conversion_date) must match the quote details.
- 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.
post/v1/conversion
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
{
"quote_id": "784832f7-1f8a-4b08-ac2a-8719b5b2a590",
"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
{
"conversion_id": "784832f7-1f8a-4b08-ac2a-8719b5b2a590",
"short_reference_id": "P220406-LLCVLRM",
"sell_currency": "USD",
"sell_amount": "10",
"buy_currency": "SGD",
"buy_amount": "7.36",
"created_date": "2024-08-22T17:12:58+08:00",
"currency_pair": "USDSGD",
"reference": "XC240822-TXCRW2EI",
"status": "AWAITING_FUNDS"
}