Create Fx Rate
POST
/api/v1/exchange-rates
const url = 'https://example.com/api/v1/exchange-rates';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"from_currency":"example","to_currency":"example","rate":1,"date":"2026-04-15"}'};
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://example.com/api/v1/exchange-rates \ --header 'Content-Type: application/json' \ --data '{ "from_currency": "example", "to_currency": "example", "rate": 1, "date": "2026-04-15" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
ExchangeRateCreate
object
Example generated
{ "from_currency": "example", "to_currency": "example", "rate": 1, "date": "2026-04-15"}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
ExchangeRateOut
object
id
required
Id
Exchange rate id.
integer
from_currency
required
From Currency
Source currency, ISO 4217 code.
string
to_currency
required
To Currency
Target currency, ISO 4217 code.
string
rate
required
Rate
Exchange rate: 1 unit of from_currency in to_currency.
string
date
required
Date
Date the rate applies to.
string format: date
source
Source
Where the rate came from: ‘manual’ or ‘auto’ (frankfurter.app/ECB).
string
Example
{ "source": "manual"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}