Skip to main content

Sveriges Riksbank connector for parsimony — all five public APIs (SWEA, SWESTR, Monetary Policy, Turnover, Holdings)

Project description

parsimony-riksbank

Sveriges Riksbank (Sweden's central bank) connector plugin for parsimony. Surfaces all five of the Riksbank's public REST APIs: interest & exchange rates (SWEA), the Swedish Krona Short-Term Rate (SWESTR), Monetary Policy forecasts & outcomes, market Turnover Statistics, and securities Holdings. Keyless — no API credentials required.

Part of the parsimony-connectors monorepo. Distributed standalone on PyPI as parsimony-riksbank.

Connectors

Name Kind Description
riksbank_fetch connector Fetch a SWEA interest/exchange-rate series by id (e.g. SEKEURPMI), windowed or latest.
riksbank_swestr_fetch connector Fetch a SWESTR series — the overnight fixing, a compounded average (1W–6M) or the index.
riksbank_monetary_policy_fetch connector Fetch a Monetary Policy forecast/outcome series (e.g. SEQGDPNAYSA); pick one policy_round vintage or get all.
riksbank_turnover_fetch connector Fetch aggregated turnover for a market (fi/fx/ird) at a frequency (daily/monthly).
riksbank_holdings_fetch connector Fetch the Riksbank's securities holdings (swedish_securities per-ISIN, or swedish_securities_aggregated).
enumerate_riksbank enumerator Enumerate every addressable unit across all five products for catalog indexing.
riksbank_search connector Semantic-search the published riksbank catalog and return matching code + title + score.

Install

pip install parsimony-riksbank

Pulls in a compatible parsimony-core automatically. Verify discovery:

python -c "from parsimony import discover; print([p.name for p in discover.iter_providers()])"

Quick start

from parsimony_riksbank import CONNECTORS

# The Riksbank's GDP forecast (annual % change), latest policy round.
result = CONNECTORS["riksbank_monetary_policy_fetch"](
    series="SEQGDPNAYSA",
    policy_round="2026:1",
)
print(result.data.head())

Catalogs

This plugin ships a riksbank catalog (~156 entries) driven by enumerate_riksbank. riksbank_search loads a published snapshot (overridable via the PARSIMONY_RIKSBANK_CATALOG_URL env var) and falls back to building one in-process when no snapshot is reachable. Maintainers build and push the snapshot with scripts/build_catalog.py.

The catalog code routes the follow-up fetch:

  • bare SWEA id (e.g. SEKEURPMI) → riksbank_fetch(series_id=...)
  • bare SWESTR id (e.g. SWESTR, SWESTRAVG1M) → riksbank_swestr_fetch(series=...)
  • monetary_policy/<id>riksbank_monetary_policy_fetch(series=<id>)
  • turnover/<market>/<frequency>riksbank_turnover_fetch(market=, frequency=)
  • holdings/<dataset>riksbank_holdings_fetch(dataset=<dataset>)

Coverage

The Riksbank publishes five public REST APIs (confirmed against the developer portal's API list); this plugin covers all five.

Catalog covers ALL: yes for the series-shaped products — SWEA /Series and Monetary Policy /forecasts/series_ids are authoritative live enumerations, and SWESTR / Turnover / Holdings have small, stable dimensions enumerated as registries. Connectors cover ALL accessible data: yes — every product has a fetch verb. Notes on deliberate scope:

  • SWESTR PRESWESTR (preliminary 2021 test-period values) is excluded as superseded test data.
  • SWEA derived endpointsCrossRates, ObservationAggregates, CalendarDays — are computed conveniences over the same 117 series (cross-rate calculation, resampling, banking-day lookups), not new addressable series, so they are not catalogued.
  • Turnover is catalogued at the (market, frequency) dataset granularity; the asset/contract/counterparty facets are returned inside each dataset. The Excel-report endpoints duplicate the JSON content and are not wrapped.

Authentication & rate limits

All five products are open / keyless. An optional Ocp-Apim-Subscription-Key (set RIKSBANK_API_KEY or pass api_key=) only raises the keyless quota of 5 requests/minute, 1000/day per IP — recommended for full catalog builds.

Provider

License

See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parsimony_riksbank-0.0.1.tar.gz (27.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parsimony_riksbank-0.0.1-py3-none-any.whl (33.4 kB view details)

Uploaded Python 3

File details

Details for the file parsimony_riksbank-0.0.1.tar.gz.

File metadata

  • Download URL: parsimony_riksbank-0.0.1.tar.gz
  • Upload date:
  • Size: 27.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for parsimony_riksbank-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e615c2f4a13520f8d957f41b28160e0bfe3a00db3bbbd633b0f5e6104a128647
MD5 a70008620780c19df8b939ee7fdaa446
BLAKE2b-256 10ce8e1cf8dbe2efcb496183991c66da08ee527d4a04ac5062e7f674aa5c9fac

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsimony_riksbank-0.0.1.tar.gz:

Publisher: release.yml on ockham-sh/parsimony-connectors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file parsimony_riksbank-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for parsimony_riksbank-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 286a00d931ecab01e28eb3a79e210c238d0d525bcb97b5013f9b0242354d27c1
MD5 522316faf7044bc4594b64a4c901ffd5
BLAKE2b-256 22b1732f0c3b838b21cbd247e0024eef0073c60f27545abc3817e438fe90ddd2

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsimony_riksbank-0.0.1-py3-none-any.whl:

Publisher: release.yml on ockham-sh/parsimony-connectors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page