Skip to content

Get exchange transfer quote

Request

Requests a quote for an exchange transfer.

Security
Bearer
Bodyapplication/jsonrequired
sender_addressstringrequired

RippleNet account name and address of the sender, in the format accountname@ripplenetaddress. For example, new_york@rn.us.ny.new_york.

Example:"alias_usd_lon@rn.eur.uk.london"
receiver_addressstringrequired

RippleNet account name and address of the receiver, in the format accountname@ripplenetaddress. For example, new_york@rn.us.ny.new_york.

Example:"conct_gbp_lon@rn.eur.uk.london"
amountnumber, >= 0required

Amount transferred, expressed in the curency of the account indicated by the amount_type value.

Example:100
amount_typestringrequired

Amount type of the exchange transfer.

To indicate that the amount is expressed in the currency of the account provided by the sender_address value, set to SENDER_AMOUNT.

To indicate that the amount is expressed in the currency of the account provided by the receiver_address value, set to RECEIVER_AMOUNT.

Enum:"SENDER_AMOUNT""RECEIVER_AMOUNT"
Example:"SENDER_AMOUNT"
curl -i -X POST \
  https://docs.ripple.com/_mock/products/payments-odl/api-docs/ripplenet/reference/openapi/exchange_transfers/quote \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "sender_address": "alias_usd_lon@rn.eur.uk.london",
    "receiver_address": "conct_gbp_lon@rn.eur.uk.london",
    "amount": 100,
    "amount_type": "SENDER_AMOUNT"
  }'

Responses

Successfully quoted exchange transfer.

Bodyapplication/json
typestringrequired

Indicates the exchange transfer's quoted FX rate type.

Default:"FIRM"
Enum ValueDescription
FIRM

A firm exchange rate ensures that the quoted and delivered transfer amounts are equal.

INDICATIVE

An indicative exchange rate allows for movement between quoted rate and transfer execution, such that the quoted amount and delivered amount may differ.

Example:"INDICATIVE"
sender_addressstringrequired

RippleNet account name and address of the sender, in the format accountname@ripplenetaddress. For example, new_york@rn.us.ny.new_york.

Example:"alias_usd_lon@rn.eur.uk.london"
receiver_addressstringrequired

RippleNet account name and address of the receiver, in the format accountname@ripplenetaddress. For example, new_york@rn.us.ny.new_york.

Example:"conct_gbp_lon@rn.eur.uk.london"
source_amountnumberrequired

Sending amount of the exchange transfer.

Example:100
destination_amountnumberrequired

Receiving amount of the exchange transfer.

Example:89
source_currencystringrequired

Sending currency of the exchange transfer.

Example:"USD"
destination_currencystringrequired

Receiving currency of the exchange transfer.

Example:"GBP"
fx_transfer_rateobjectrequired

Rate used for this exchange transfer.

Response
{ "type": "INDICATIVE", "sender_address": "alias_usd_lon@rn.eur.uk.london", "receiver_address": "conct_gbp_lon@rn.eur.uk.london", "source_amount": 100, "destination_amount": 89, "source_currency": "USD", "destination_currency": "GBP", "fx_transfer_rate": { "rate": 0.89, "base_currency": "USD", "counter_currency": "GBP", "rate_type": "BUY" } }