POST
/
api
/
service
/
fx
/
retrieve-rate
curl --request POST \
  --url https://api.sand.getivy.de/api/service/fx/retrieve-rate \
  --header 'Content-Type: application/json' \
  --header 'X-Ivy-Api-Key: <api-key>' \
  --data '{
  "sourceCurrency": "EUR",
  "targetCurrency": "USDC",
  "sourceAmount": "<string>"
}'
{
  "rate": "<string>",
  "targetAmount": "<string>",
  "sourceAmount": "<string>"
}

Authorizations

X-Ivy-Api-Key
string
header
required

Body

application/json
sourceCurrency
enum<string>
required

The source currency code.

Available options:
EUR
targetCurrency
enum<string>
required

The target currency code.

Available options:
USDC
sourceAmount
string

The amount of source currency to convert. If not provided, only the rate will be returned. Decimal places should be separated by a dot.

Response

200 - application/json
Returns the current exchange rate for the given currency pair.
rate
string
required

The current exchange rate for the given currency pair.

targetAmount
string

The amount of the target currency for the given source amount. Only returned if the source amount is provided.

sourceAmount
string

The amount of source currency to convert. Only returned if the source amount is provided.