Skip to content

API reference / Quittio \ Country \ DE \ Dunning

BundesbankBaseRates

final readonly class in quittio/country-de

Quittio\Country\DE\Dunning\BundesbankBaseRates · Source

Fetches the base rate according to section 247 BGB from the statistics API of the Deutsche Bundesbank (time series BBIN1.M.DE.BBK.BBKBAS2.EUR.ME, formerly SU0115). The series has a value per month; the rate changes on 1 January and 1 July, so the values of January and July are the table entries. A new rate appears once the Bundesbank has published the value of that month.

Constants#

ConstantValueDescription
URL'https://api.statistiken.bundesbank.de/rest/data/BBIN1/M.DE.BBK.BBKBAS2.EUR.ME?format=csv&lang=de&startPeriod=%s'

Methods#

MethodDescription
->__construct()
->fetch()
::parse()Reads the January and July values of the CSV download ("2026-07;1,52;…").

__construct()#

public function __construct(
    (Closure(string $url, int $timeout): string)|null $http = null,
    int $timeout = 15,
)
ParameterTypeDescription
$http(Closure(string $url, int $timeout): string)|null = nullreturns the response body, throws on failure
$timeoutint = 15

fetch()#

public function fetch(string $since = '2002-01'): array<string, string>
ParameterTypeDescription
$sincestring = '2002-01'first month (YYYY-MM)
Returns
array<string, string> – ISO date => rate in percent, e.g. ['2026-07-01' => '1.52']

parse()#

public static function parse(string $csv): array<string, string>

static

Reads the January and July values of the CSV download ("2026-07;1,52;…").

ParameterTypeDescription
$csvstring
Returns
array<string, string>

The open core packages are MIT licensed. The legal wording of the country packs must be confirmed by a tax adviser.