Skip to content

Get historic FX rate

Request

Returns the exchange rate between two currencies for a specific historical date.

Security
oauth2ClientCredentials(Required scopes: fx:write)
Headers
business_idstringrequired

Business identifier for the request

Bodyapplication/jsonrequired
fromstringrequired

Source currency code (ISO 4217)

Example:"USD"
tostringrequired

Target currency code (ISO 4217)

Example:"KES"
datestringrequired

Historical date (YYYY-MM-DD)

Example:"2024-12-02"
curl -i -X POST \
  https://developer.boyahq.com/_mock/v2/openapi/fx/historic-rate \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'business_id: string' \
  -d '{
    "from": "USD",
    "to": "KES",
    "date": "2024-12-02"
  }'

Responses

Historic rate returned successfully

Bodyapplication/json
fromstringrequired
Example:"USD"
tostringrequired
Example:"KES"
ratenumberrequired
Example:129.122
timestampstringrequired
Example:"2026-04-23T00:00:00Z"
markupobject(FxMarkupDto)required
Response
{ "from": "USD", "to": "KES", "rate": 129.122, "timestamp": "2026-04-23T00:00:00Z", "markup": { "buy": 2, "sell": 2 } }