v1

latestOpenAPI 3.0.02026-08-06102185472.3 KB
Exchange transfers

Execute exchange transfer

Execute an exchange transfer to move funds from one of your accounts in one currency (USD, for example) to another one of your accounts in another currency (EUR, for example) at an exchange rate set by your peer who maintains both of your accounts on their ledger. An exchange transfer enables you to fund a foreign currency account from your domestic currency account in bulk.

Before you make this request, you may want to use the Quote Exchange Transfer request to see a quote for the exchange transfer you want to make.

post/exchange_transfers/execute

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 used for 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>

end_to_end_idstring

ID set by the sender that is persisted on all fiat node instances that participated in the transfer.

internal_idstring

Internal ID that the sender can optionally specify. Only visible to the sender. Only the sending fiat node instance stores this ID.

user_infoobject

Provide one or more arbitrary key/value pairs.

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 executed exchange transfer.

exchange_transfer_idstring uuid required

Unique identifier of the exchange transfer.

state'EXECUTED' | 'COMPLETED' | 'FAILED' required

State of the 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.

end_to_end_idstring required

ID set by the sender that is persisted on all fiat node instances that participated in the transfer.

internal_idstring required

Internal ID that the sender can optionally specify. Only visible to the sender. Only the sending fiat node instance stores this ID.

Example response

{
  "exchange_transfer_id": "e3b20ba4-28ed-4752-990d-e67887bb331e",
  "state": "EXECUTED",
  "type": "INDICATIVE",
  "sender_address": "sf@rn.us.ca.san_francisco",
  "receiver_address": "sf_gbp@rn.us.ca.san_francisco",
  "source_amount": 1,
  "destination_amount": 355,
  "source_currency": "USD",
  "destination_currency": "GBP",
  "fx_transfer_rate": {
    "rate": 0.89,
    "base_currency": "USD",
    "counter_currency": "GBP",
    "rate_type": "BUY"
  },
  "user_info": [
    {
      "node_address": "rn.us.ny.new_york",
      "state": "EXECUTED"
    }
  ]
}