v1

latestOpenAPI 3.0.02026-08-06102185472.3 KB
Exchange transfers

Get exchange transfer quote

Requests a quote for an exchange transfer.

post/exchange_transfers/quote

Request body

sender_addressstring required

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

receiver_addressstring required

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

amountnumber required

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

amount_type'SENDER_AMOUNT' | 'RECEIVER_AMOUNT' required

Amount type of the exchange transfer.<p>To indicate that the amount is expressed in the currency of the account provided by the sender_address value, set to SENDER_AMOUNT.</p> <p>To indicate that the amount is expressed in the currency of the account provided by the receiver_address value, set to RECEIVER_AMOUNT.</p>

Example request

{
  "sender_address": "alias_usd_lon@rn.eur.uk.london",
  "receiver_address": "conct_gbp_lon@rn.eur.uk.london",
  "amount": 100,
  "amount_type": "SENDER_AMOUNT"
}

Response

Successfully quoted exchange transfer.

type'FIRM' | 'INDICATIVE' required

Indicates the exchange transfer's quoted FX rate type.

sender_addressstring required

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

receiver_addressstring required

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

source_amountnumber required

Sending amount of the exchange transfer.

destination_amountnumber required

Receiving amount of the exchange transfer.

source_currencystring required

Sending currency of the exchange transfer.

destination_currencystring required

Receiving currency of the exchange transfer.

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