Add or update an exchange rate.
POST
/api/exchange-rates
const url = 'https://api.tradr.cloud/api/exchange-rates';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"baseCurrency":"USD","effectiveDate":"2026-04-15","quoteCurrency":"EUR","rate":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.tradr.cloud/api/exchange-rates \ --header 'Content-Type: application/json' \ --data '{ "baseCurrency": "USD", "effectiveDate": "2026-04-15", "quoteCurrency": "EUR", "rate": "example" }'Authed. A rate is keyed by base, quote, and effective date, so posting the same three again replaces the value rather than adding a duplicate. Because a rate change moves historical converted totals, call the preview endpoint first if you want to show the impact before saving.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
baseCurrency
required
string
Example
USDeffectiveDate
required
string format: date
quoteCurrency
required
string
Example
EURrate
required
Positive decimal.
string
Responses
Section titled “Responses”The stored rate.
Validation error