Skip to content

Get rate by ID

Request

Gets a configured exchange rate by ID.

Security
Bearer
Path
rate_idstring, (uuid)required

Provide the rate_id of the exchange rate you want to return.

curl -i -X GET \
  'https://docs.ripple.com/_mock/products/payments-odl/api-docs/ripplenet/reference/openapi/config/rates/{rate_id}' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

Sucessfully returned rate.

Bodyapplication/json
rate_idstring, (uuid)required

Unique identifier of the exchange rate.

Example:"328b3e50-7983-46d5-94a0-ef004d78db1d"
expiration_offsetintegerrequired

(DEPRECATED) This property is deprecated. Refer to expires_at to determine rate expiration.

Amount of time in milliseconds that the rate is valid for after the rate's created_date value. For example, if the expiration_offset value is 100000 milliseconds, the rate expires 100000 milliseconds after this created_date value. If set to 0, the rate does not expire.

Example:95000
order_typestringrequired

Order type for the exchange rate.

Enum:"buy""sell"
Example:"buy"
rate_scaleintegerrequired

Number of decimal places to which the exchange rate is calculated. For example, if the rate_scale value is set to 9 and the rate value is set to 1.25, the scaled value of the rate is 1.250000000.

Default:9
Example:9
ratenumberrequired

Exchange rate for the specified base and counter currency.

Example:0.89
base_currencystringrequired

Base currency of the exchange rate.

Example:"USD"
counter_currencystringrequired

Counter currency of the exchange rate.

Example:"GBP"
source_currencystringrequired

If order_type is set to buy, this is set to the base currency. If order_type is set to sell, this is set to the counter currency.

Example:"USD"
destination_currencystringrequired

If order_type is set to buy, this is set to the counter currency. If order_type is set to sell, this is set to the base currency.

Example:"GBP"
source_ledgerstringrequired

Source ledger associated with the exchange rate.

Example:"rn.eur.uk.london"
destination_ledgerstringrequired

Destination ledger associated with the exchange rate.

Example:"rn.eur.uk.london"
source_ledger_accountstringrequired

Account on the source ledger associated with rate.

Example:"alias_usd_lon"
destination_ledger_accountstringrequired

Account on the destination ledger associated with rate.

Example:"conct_gbp_lon"
created_datestring, (date-time)required

Date and time at which the exchange rate was created, as an ISO-8601 timestamp in UTC. Fiat determines a rate's expiration date and time based on this value and expiration_offset value. For example, if the expiration_offset value is 100000 milliseconds, the rate expires 100000 milliseconds after this created_date value.

expires_atstring, (date-time)

The time in which this rate expires in system local timezone

lower_limitnumberrequired

For a slab-based exchange rate, indicates the lower limit of the slab.

Example:0
upper_limitnumberrequired

For a slab-based exchange rate, indicates the upper limit of the slab.

Example:1000
payout_methodstring

The payout method for the rate.

Example:"LOCAL_RAILS"
value_typestringrequired

Indicates whether the rate is a live exchange rate (MARGIN) or an exchange rate manually configured by Ripple (RATE). If this value is MARGIN, then margin_type will show a value.

Enum:"MARGIN""RATE"
Example:"MARGIN"
margin_typestringrequired

Indicates the unit of margin applied in addition to the rate provided by Ripple. This field has a value only if value_type = MARGIN. If value_type is RATE, this field is null.

Value:"BPS"
Example:"BPS"
Response
{ "rate_id": "328b3e50-7983-46d5-94a0-ef004d78db1d", "expiration_offset": 95000, "order_type": "buy", "rate_scale": 9, "rate": 0.89, "base_currency": "USD", "counter_currency": "GBP", "source_currency": "USD", "destination_currency": "GBP", "source_ledger": "rn.eur.uk.london", "destination_ledger": "rn.eur.uk.london", "source_ledger_account": "alias_usd_lon", "destination_ledger_account": "conct_gbp_lon", "created_date": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z", "lower_limit": 0, "upper_limit": 1000, "payout_method": "LOCAL_RAILS", "value_type": "MARGIN", "margin_type": "BPS" }