Pular para o conteúdo

Get exchange transfer quote

Requisição

Requests a quote for an exchange transfer.

Segurança
Bearer
Corpoapplication/jsonobrigatório
sender_addressstringobrigatório

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

Exemplo:"alias_usd_lon@rn.eur.uk.london"
receiver_addressstringobrigatório

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

Exemplo:"conct_gbp_lon@rn.eur.uk.london"
amountnumber, >= 0obrigatório

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

Exemplo:100
amount_typestringobrigatório

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"
Exemplo:"SENDER_AMOUNT"
curl -i -X POST \
  https://docs.ripple.com/_mock/pt-br/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"
  }'

Respostas

Successfully quoted exchange transfer.

Corpoapplication/json
typestringobrigatório

Indicates the exchange transfer's quoted FX rate type.

Padrão:"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.

Exemplo:"INDICATIVE"
sender_addressstringobrigatório

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

Exemplo:"alias_usd_lon@rn.eur.uk.london"
receiver_addressstringobrigatório

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

Exemplo:"conct_gbp_lon@rn.eur.uk.london"
source_amountnumberobrigatório

Sending amount of the exchange transfer.

Exemplo:100
destination_amountnumberobrigatório

Receiving amount of the exchange transfer.

Exemplo:89
source_currencystringobrigatório

Sending currency of the exchange transfer.

Exemplo:"USD"
destination_currencystringobrigatório

Receiving currency of the exchange transfer.

Exemplo:"GBP"
fx_transfer_rateobjectobrigatório

Rate used for this exchange transfer.

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