v1

latestOpenAPI 3.0.22026-07-26123510445.2 KB
Conversion

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

quote_idstring required

A unique UUID identifier for the quote.

sell_currencystring required

Currency code ISO_4217.

sell_amountstring

The amount of the currency that was sold in the conversion.

buy_currencystring required

Currency code ISO_4217.

buy_amountstring

The amount of the currency that was purchased in the conversion.

conversion_datestring required

The designated date on which the currency conversion will be executed. This must be a valid available date for conversion.

Only the current calendar date is supported — past or future dates are not allowed.
Format: YYYY-MM-DD.

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.

conversion_idstring required

A unique UUID identifier for the conversion transaction.

short_reference_idstring required

The reference generated by the system to identify the entity.

sell_currencystring required

Currency code ISO_4217.

sell_amountstring required

The amount of the currency that was sold in the conversion.

buy_currencystring required

Currency code ISO_4217.

buy_amountstring required

The amount of the currency that was purchased in the conversion.

created_datestring required

The timestamp when the conversion transaction was initiated.

currency_pairstring required

The currency pair that the quote is for. The direction of the currency pair is per market convention where possible.

referencestring required

The reference generated by the system to identify the entity.

statusstring required

The current status of the conversion transaction. Valid values are:

  • PROCESSING: Currency conversion request is being processed by the system.
  • AWAITING_FUNDS: System is waiting for the source funds to be available.
  • TRADE_SETTLED: Currency exchange has been executed at the agreed rate.
  • FUNDS_ARRIVED: Converted funds have been received in the target currency.

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"
}