Central bank base rates – system description

Data model of the base rate register, rules for manual and API entry, the daily sync job and the permission keys.

The module stores MNB (HUF) and ECB (EUR) base rate quotations by day and time, with a source flag. The default interest engine calculates from this series; with several quotations on a day the last one applies.

Data model

Table names carry the installation's own prefix in the database.

TableRoleMain fields
base_ratequotationsbank, currency, valid-from day, time, rate, source (manual / api), note

Process

  1. List: filter by bank, currency, source and date range; sort by date or bank; each row shows whether it is the effective quotation of its day.
  2. Manual save: source = manual; the model validates the date, the number (−20…100), the bank and the HH:MM:SS time; the same key is overwritten (ON DUPLICATE KEY UPDATE). Error codes are translated to language messages.
  3. Download (sync): the base rate library fetches the chosen bank (MNB SOAP, ECB data API), by default 10 years back from the "to" date; every quotation is saved with source = api; invalid ones are skipped and logged; stored and failed counts are returned.
  4. Delete: physical deletion of one row or the selected ones; an empty selection gives error_select.

Background job

The cron/baserate entry point uses the same fetch and save path: both banks by default, from the last day of the series to today, 10 years for an empty series. Optional parameters: bank, from, to; it returns JSON. A separate permission check cannot be determined from the code.

Permissions

  • Base access to the screen; changes also need core modify.
  • Function rights: list, on save add/edit (decided by the record id), delete, the bulk delete right for several rows, sync, debug.
  • No content scope: national, company-independent data.

Known limitations

  • The keys are not classified in the feature registry seeds.
  • MNB download needs PHP SOAP, ECB needs cURL; otherwise error_soap_missing / error_curl_missing. Unknown bank: error_bank_unsupported.
Related topics: base rate background job