Skip to content

Get exchange rates

GET
/iou/exchange_rates/{base}/{counter}

Retrieve an exchange rate for a given currency pair at a specific time.

base
required
string
  • Base currency of the pair as issuer address, followed by _ and the currency code. (Or XAH with no issuer)

  • Examples: XAH or rEvernodee8dJLaFsujS6q1EiXvZYmHXr8_EVR

counter
required
string
  • Counter currency of the pair as issuer address, followed by _ and a currency code. (Or XAH with no issuer)

  • Examples: XAH or rEvernodee8dJLaFsujS6q1EiXvZYmHXr8_EVR

date
string format: date-time
  • Specific date time the request should be based on. Defaults to now.

  • Format: 1970-01-01T00:00:00Z

Success response

  • rate = The latest exchange rate, or 0 if the exchange rate could not be determined

  • ledger_index = The ledger_index the rate was taken from

  • tx_hash = The transaction hash which this rate is taken from

  • timestamp = The timestamp of the rate

object
rate
required

The latest exchange rate, or 0 if the exchange rate could not be determined

number
ledger_index
required

The ledger_index the rate was taken from.

number
tx_hash
required

The transaction hash which this rate is taken from.

string
timestamp
required

The timestamp of the rate.

string

Query input malformed

ValidationError
object
message
required
string
code
string
path
string
x-ratelimit-limit
integer

Maximum number of requests in the rate limit window.

x-ratelimit-remaining
integer

Number of remaining request in current rate limit window.

x-ratelimit-reset
integer

The seconds until the current rate limit window resets.

Too Many Requests

x-ratelimit-limit
integer

Maximum number of requests in the rate limit window.

x-ratelimit-remaining
integer

Number of remaining request in current rate limit window.

x-ratelimit-reset
integer

The seconds until the current rate limit window resets.