Skip to main content
POST
/
v1
/
conversion
/
quote
Create Quote
curl --request POST \
  --url https://api-sandbox.uqpaytech.com/api/v1/conversion/quote \
  --header 'Content-Type: application/json' \
  --header 'x-auth-token: <api-key>' \
  --header 'x-idempotency-key: <x-idempotency-key>' \
  --data '
{
  "sell_currency": "USD",
  "buy_currency": "SGD",
  "conversion_date": "2024-08-26",
  "sell_amount": "1000.00",
  "buy_amount": "1000.00",
  "transaction_type": "conversion"
}
'
{
  "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
    }
  }
}

Authorizations

x-auth-token
string
header
required

The API token for login provided by UQPay.

Headers

x-on-behalf-of
string

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. If omitted or empty, the request is executed using the master account. More information at Connected Accounts.

x-idempotency-key
string<uuid>
required

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.

Body

application/json
sell_currency
string
required

The currency being sold.

For cross-currency payout scenarios, this should be the currency in the sender's account.
Example: To pay out SGD from a USD account to a beneficiary, set sell_currency = USD.

Example:

"USD"

buy_currency
string
required

The currency being bought.

For cross-currency payout scenarios, this should be the currency the beneficiary will receive.
Example: To pay out SGD from a USD account to a beneficiary, set buy_currency = SGD.

Example:

"SGD"

conversion_date
string
required

Specifies the scheduled date when the currency conversion will be executed. This should be a valid business day.

Example:

"2024-08-26"

sell_amount
string

The amount of sell_currency.

Example:

"1000.00"

buy_amount
string

The amount of buy_currency.

Example:

"1000.00"

transaction_type
enum<string>

Type of transaction.

Available options:
conversion,
payout

Response

OK - Successfully retrieved a payout.

sell_currency
string
required

Currency code ISO_4217.

Example:

"USD"

sell_amount
string
required

The amount of sell_currency.

Example:

"100"

buy_currency
string
required

Currency code ISO_4217.

Example:

"SGD"

buy_amount
string
required

The amount of buy_currency.

Example:

"135.02"

quote_price
object
required