{"id":27888846,"url":"https://github.com/belidzs/mnb","last_synced_at":"2025-07-12T03:42:51.572Z","repository":{"id":65330856,"uuid":"172150577","full_name":"belidzs/mnb","owner":"belidzs","description":"Pythonic access to the exchange rate API hosted by Magyar Nemzeti Bank (MNB, Central Bank of Hungary)","archived":false,"fork":false,"pushed_at":"2023-01-28T17:49:24.000Z","size":46,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-06-06T15:27:31.632Z","etag":null,"topics":["currency","exchange-rates","mnb","python","soap-client","zeep"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/belidzs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-22T23:59:51.000Z","updated_at":"2025-05-07T17:58:30.000Z","dependencies_parsed_at":"2023-02-15T18:01:39.397Z","dependency_job_id":null,"html_url":"https://github.com/belidzs/mnb","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/belidzs/mnb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belidzs%2Fmnb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belidzs%2Fmnb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belidzs%2Fmnb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belidzs%2Fmnb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/belidzs","download_url":"https://codeload.github.com/belidzs/mnb/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belidzs%2Fmnb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262022374,"owners_count":23246305,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["currency","exchange-rates","mnb","python","soap-client","zeep"],"created_at":"2025-05-05T09:28:59.911Z","updated_at":"2025-06-26T07:31:58.172Z","avatar_url":"https://github.com/belidzs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MNB\n\nThis package provides Pythonic access to the exchange rate API hosted by Magyar Nemzeti Bank (MNB, Central Bank of Hungary).\n\n## Background\n\nMNB exposes a publicly available exchange rate API as a SOAP service where they publish their official daily rate between Hungarian Forint (HUF) and most other currencies.\n\nThe official documentation of their API is [available here](https://www.mnb.hu/letoltes/aktualis-es-a-regebbi-arfolyamok-webszolgaltatasanak-dokumentacioja-1.pdf) (only in Hungarian).\n\n## Installation\n\nSince this package is published to PyPI, you can install it with any PyPI-compatible package manager, such as `pip`:\n\n```\npip install mnb\n```\n\n## Usage\n\n### Create a Client\n```python\n(mnb-py3.11) vscode ➜ /workspaces/mnb/src (develop) $ python\nPython 3.11.1 (main, Jan 11 2023, 14:15:54) [GCC 10.2.1 20210110] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\u003e\u003e\u003e from mnb import Mnb\n\u003e\u003e\u003e client = Mnb()\n```\n\n### GetInfo()\nReturns the first and the last day when rates were published, including all available currencies.\n\n```python\n\u003e\u003e\u003e client.get_info()\nInfo(first_date=datetime.date(1949, 1, 3), last_date=datetime.date(2023, 1, 16), currencies=['HUF', 'EUR', 'AUD', 'BGN', 'BRL', 'CAD', 'CHF', 'CNY', 'CZK', 'DKK', 'GBP', 'HKD', 'HRK', 'IDR', 'ILS', 'INR', 'ISK', 'JPY', 'KRW', 'MXN', 'MYR', 'NOK', 'NZD', 'PHP', 'PLN', 'RON', 'RSD', 'RUB', 'SEK', 'SGD', 'THB', 'TRY', 'UAH', 'USD', 'ZAR', 'ATS', 'AUP', 'BEF', 'BGL', 'CSD', 'CSK', 'DDM', 'DEM', 'EEK', 'EGP', 'ESP', 'FIM', 'FRF', 'GHP', 'GRD', 'IEP', 'ITL', 'KPW', 'KWD', 'LBP', 'LTL', 'LUF', 'LVL', 'MNT', 'NLG', 'OAL', 'OBL', 'OFR', 'ORB', 'PKR', 'PTE', 'ROL', 'SDP', 'SIT', 'SKK', 'SUR', 'VND', 'XEU', 'XTR', 'YUD'])\n```\n\n### GetCurrencies()\nReturns all available currencies.\n\n```python\n\u003e\u003e\u003e client.get_currencies()\n['HUF', 'EUR', 'AUD', 'BGN', 'BRL', 'CAD', 'CHF', 'CNY', 'CZK', 'DKK', 'GBP', 'HKD', 'HRK', 'IDR', 'ILS', 'INR', 'ISK', 'JPY', 'KRW', 'MXN', 'MYR', 'NOK', 'NZD', 'PHP', 'PLN', 'RON', 'RSD', 'RUB', 'SEK', 'SGD', 'THB', 'TRY', 'UAH', 'USD', 'ZAR', 'ATS', 'AUP', 'BEF', 'BGL', 'CSD', 'CSK', 'DDM', 'DEM', 'EEK', 'EGP', 'ESP', 'FIM', 'FRF', 'GHP', 'GRD', 'IEP', 'ITL', 'KPW', 'KWD', 'LBP', 'LTL', 'LUF', 'LVL', 'MNT', 'NLG', 'OAL', 'OBL', 'OFR', 'ORB', 'PKR', 'PTE', 'ROL', 'SDP', 'SIT', 'SKK', 'SUR', 'VND', 'XEU', 'XTR', 'YUD']\n```\n\n### GetCurrencyUnits()\nReturns the unit for each currency passed in the parameter.\n\n```python\n\u003e\u003e\u003e client.get_currency_units([\"EUR\", \"JPY\"])\n[CurrencyUnit(currency='EUR', unit=1), CurrencyUnit(currency='JPY', unit=100)]\n```\n\n### GetCurrentExchangeRates()\nReturns the latest available exchange rates for all currencies.\n\nNote: Rates are not published over the weekends and public holidays.\n\n```python\n\u003e\u003e\u003e client.get_current_exchange_rates()\n\u003cElement Day at 0x7f9ef8b09300\u003e\nDay(date=datetime.date(2023, 1, 16), rates=[Rate(currency='AUD', rate=256.81), Rate(currency='BGN', rate=203.99), Rate(currency='BRL', rate=72.36), Rate(currency='CAD', rate=275.26), Rate(currency='CHF', rate=398.61), Rate(currency='CNY', rate=54.8), Rate(currency='CZK', rate=16.62), Rate(currency='DKK', rate=53.63), Rate(currency='EUR', rate=398.98), Rate(currency='GBP', rate=449.86), Rate(currency='HKD', rate=47.2), Rate(currency='IDR', rate=0.0245), Rate(currency='ILS', rate=107.78), Rate(currency='INR', rate=4.52), Rate(currency='ISK', rate=2.59), Rate(currency='JPY', rate=2.872), Rate(currency='KRW', rate=0.2981), Rate(currency='MXN', rate=19.56), Rate(currency='MYR', rate=85.43), Rate(currency='NOK', rate=37.25), Rate(currency='NZD', rate=235.75), Rate(currency='PHP', rate=6.76), Rate(currency='PLN', rate=84.92), Rate(currency='RON', rate=80.69), Rate(currency='RSD', rate=3.4), Rate(currency='RUB', rate=5.39), Rate(currency='SEK', rate=35.4), Rate(currency='SGD', rate=279.24), Rate(currency='THB', rate=11.18), Rate(currency='TRY', rate=19.62), Rate(currency='UAH', rate=10.03), Rate(currency='USD', rate=368.71), Rate(currency='ZAR', rate=21.6)])\n```\n\n### GetDateInterval()\nReturns the first and the last day when rates were published.\n\n```python\n\u003e\u003e\u003e client.get_date_interval()\n(datetime.date(1949, 1, 3), datetime.date(2023, 1, 16))\n```\n\n### GetExchangeRates()\nReturns the list of rates published between the provided range for the currencies provided.\n\n```python\n\u003e\u003e\u003e import datetime\n\u003e\u003e\u003e client.get_exchange_rates(datetime.date(2023, 1, 13), datetime.date(2023, 1, 14), [\"EUR\", \"USD\"])\n\u003cElement Day at 0x7f9ef7fcb980\u003e\n[Day(date=datetime.date(2023, 1, 13), rates=[Rate(currency='EUR', rate=396.19), Rate(currency='USD', rate=365.39)])]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelidzs%2Fmnb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbelidzs%2Fmnb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelidzs%2Fmnb/lists"}