View as Markdown

Currency interest rates

Currency interest rates are the annual rates per currency, bank and tenor the platform prices FX forwards with. A rate belongs to a set: Aleta's shared global set, with its source as provider, Aleta's manual set, or your own external set. Reading requires the market_data:read scope and the market data module at read level, writing market_data:write and the module at read-write level. You write only your own set. Your own rates are stored and listed; the calculation does not read them.

Data model

idstring

Stable identifier for the rate. A UUID for your own rate; an opaque id for a rate in Aleta's sets.

currency_codestring

ISO 4217 code.

datestring

ISO date (yyyy-mm-dd).

ratedecimal string

Annual rate, may be zero or negative.

brokeragestring | null

The quoting bank. Always set on your own rate; may be null on a rate in Aleta's sets.

tenor_daysinteger | null

Lifetime of the rate in days, 1 to 36500. Always set on your own rate; may be null on a rate in Aleta's sets.

setstring

global, manual or external (your own).

providerstring | null

The source of a global rate, as the legacy platform names it: six, danmarks_nationalbank, legacy, reuters, bloomberg or calculated. null for the other sets and for a global rate without a known source. A rate in Aleta's sets is always in global or manual.

ownerstring

aleta for Aleta's sets, tenant for your own.

originstring

legacy when the rate comes from the legacy platform, v1 when it was made here (your own, or by Aleta's own rate feeds). A legacy rate of your own is read-only until your move to v1 is done (409 legacy_managed).


GET/v1/currency-interest-rates

List currency interest rates

Returns the rates in a date range, Aleta's sets and your own, in the standard v1 list envelope, ordered by currency, date, brokerage, tenor and source. The range has no upper bound, so the list is read one page at a time: follow next_cursor until it is null. The page has no as_of: it reads a range, not one date.

Query parameters

from_datestring

ISO date. Required.

to_datestring

ISO date, on or after from_date. Required.

currency_codestring

Only this currency. Optional; not a three-letter code is a 400 problem.

setstring

Only this set: global, manual or external. Optional; anything else is a 400 problem.

limitinteger

Page size. Optional.

cursorstring

next_cursor of the previous page. Optional; a cursor this list did not issue is a 400 problem.

Errors

400 for a missing or invalid date, to_date before from_date, an invalid currency_code, set or cursor; 403 without the scope or the module. Any other query parameter is a 400 problem.

Request
GET/v1/currency-interest-rates
curl -G https://api.aleta.ai/v1/currency-interest-rates \
  -H "Authorization: Bearer {access_token}" \
  -d from_date=2026-10-01 \
  -d to_date=2026-10-31 \
  -d currency_code=DKK
Response
{
  "data": [
    {
      "id": "Y2lyfERLS3wyMDI2LTEwLTA3fDMwfG1hbnVhbHxTRUI",
      "currency_code": "DKK",
      "date": "2026-10-07",
      "rate": "1.5",
      "brokerage": "SEB",
      "tenor_days": 30,
      "set": "global",
      "provider": "six",
      "owner": "aleta",
      "origin": "legacy"
    }
  ],
  "next_cursor": null,
  "limit": 100
}

POST/v1/currency-interest-rates

Create a currency interest rate

Stores your own rate (set external). A rate on the same currency, date, brokerage and tenor replaces yours. Returns 201 for a new rate and 200 when it replaced one. Supports ?dry_run=true and an Idempotency-Key header, and every write is kept in the change log.

Body parameters

currency_codestring

ISO 4217 code. Required.

datestring

ISO date. Required.

ratedecimal string

Annual rate. Required.

brokeragestring

The quoting bank. Required.

tenor_daysinteger

1 to 36500. Required.

setstring

external, or left out. Another set or a provider is a 403 aleta_owned problem.

providerstring

Must be left out: the providers are Aleta's (403 aleta_owned).

Errors

  • 400: a currency that is no three-letter code or no known currency, an invalid date, a rate that is no decimal or has more than 10 digits before the point, an empty brokerage or one longer than 200 characters, a tenor outside 1 to 36500, or a field the body does not take.
  • 403 aleta_owned: another set or a provider; next_action names POST /v1/currency-interest-rates for your own rate.
  • 409 legacy_managed: your rate on the same key came from the legacy platform, which is still master for you.
Request
POST/v1/currency-interest-rates
curl -X POST https://api.aleta.ai/v1/currency-interest-rates \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{
    "currency_code": "DKK",
    "date": "2026-10-07",
    "rate": "-0.25",
    "brokerage": "SEB",
    "tenor_days": 30
  }'
Response
{
  "id": "019a1f4e-6c1d-7b42-9d3e-2f6a0c8b1e56",
  "currency_code": "DKK",
  "date": "2026-10-07",
  "rate": "-0.25",
  "brokerage": "SEB",
  "tenor_days": 30,
  "set": "external",
  "provider": null,
  "owner": "tenant",
  "origin": "v1"
}

PATCH/v1/currency-interest-rates/{id}

Update a currency interest rate

Changes the rate of one of your own rates; the currency, date, brokerage and tenor are the rate's key, so change one with a DELETE and a POST. Body: rate and an optional reason, kept in the change log; any other field is a 400 problem. Returns 200. Supports ?dry_run=true and Idempotency-Key. An unknown id is a 404, the id of a rate in Aleta's sets a 403 aleta_owned whose next_action names POST /v1/currency-interest-rates, and a rate of yours from the legacy platform a 409 legacy_managed while legacy is master for you, in that order.


DELETE/v1/currency-interest-rates/{id}

Delete a currency interest rate

Retracts one of your own rates: it leaves every list, and the record stays. Optional query parameter reason. Any query parameter other than reason and dry_run is a 400 problem. Returns 204; a repeat with the same Idempotency-Key answers the same, without one it is a 404. Supports ?dry_run=true. An unknown or retracted id is a 404, the id of a rate in Aleta's sets a 403 aleta_owned whose next_action names POST /v1/currency-interest-rates, a rate of yours from the legacy platform a 409 legacy_managed while legacy is master for you.