Exchange rate

Get an exchange rate

Returns today's conversion rate for a currency pair. The id path parameter is the 6-character pair (source + target, e.g. usdclp). The rate is resolved for the current date and the caller's company country; if none exists yet, Cardda fetches and stores one from the external provider.

Any id whose length is not exactly 6 returns 400 Bad Request with an empty body.

get/v1/exchange_rates/{id}

Path parameters

idstring required
Example:usdclp

The currency pair as a single 6-character string: the 3-letter source currency followed by the 3-letter target currency (ISO 4217), e.g. usdclp for USD to CLP. Must be exactly 6 characters; any other length returns 400 Bad Request.

Parameters

#/paths/~1v1~1bills/get/parameters/0 — unresolved $ref

Response

The conversion rate for the pair.

idstring uuid required
pairstring required

Concatenated source+target currency codes.

ratestring

The conversion rate (decimal, as a string).

cardda_ratestring nullable

Cardda-adjusted rate applied to conversions, when present.

mastercard_ratestring nullable
from_currencystring nullable
to_currencystring nullable
datestring date
created_atstring date-time
updated_atstring date-time

Example response

{
  "pair": "USDCLP",
  "rate": "946.35000000",
  "cardda_rate": "955.00000000",
  "mastercard_rate": "944.10000000",
  "from_currency": "USD",
  "to_currency": "CLP"
}

Changes