Fio Bank API in Python.
From PyPI:
pip install fiobank
In case you have an adventurous mind, give a try to the source:
pip install git+https://github.com/honzajavorek/fiobank.git#egg=fiobank
First, get your API token.
Initialization of the client:
>>> from fiobank import FioBank
>>> client = FioBank(token='...', decimal=True)Account information:
>>> client.info()
{
'currency': 'CZK',
'account_number_full': 'XXXXXXXXXX/2010',
'balance': Decimal('42.00'),
'account_number': 'XXXXXXXXXX',
'bank_code': '2010'
}Listing transactions within a period:
>>> gen = client.period('2013-01-20', '2013-03-20')
>>> list(gen)[0]
{
'comment': 'N\xe1kup: IKEA CR, BRNO, CZ, dne 17.1.2013, \u010d\xe1stka 2769.00 CZK',
'recipient_message': 'N\xe1kup: IKEA CR, BRNO, CZ, dne 17.1.2013, \u010d\xe1stka 2769.00 CZK',
'user_identification': 'N\xe1kup: IKEA CR, BRNO, CZ, dne 17.1.2013, \u010d\xe1stka 2769.00 CZK',
'currency': 'CZK',
'amount': Decimal('-2769.0'),
'instruction_id': 'XXXXXXXXXX',
'executor': 'Vilém Fusek',
'date': datetime.date(2013, 1, 20),
'type': 'Platba kartou',
'transaction_id': 'XXXXXXXXXX'
}Getting transactions with account information in one request:
>>> info, transactions = client.transactions('2013-01-20', '2013-03-20')
(
{'currency': 'CZK', 'account_number_full': 'XXXXXXXXXX/2010', 'balance': 42.00, 'account_number': 'XXXXXXXXXX', 'bank_code': '2010'},
<generator object _parse_transactions at 0x170c190>
)Listing transactions from a single account statement:
>>> client.statement(2013, 1) # 1 is January only by coincidence - arguments mean 'first statement of 2013'Listing transactions from the last (most recent) account statement:
>>> client.last_statement() # transactions of the last statement
>>> client.last_statement(2013) # transactions of the last statement of 2013This resolves the most recent statement number (via Fio's undocumented
lastStatement endpoint, also used by the official Fio API Plus application)
and returns its transactions, just like statement(). It raises
ValueError when there's no statement for the given year.
Listing the latest transactions:
>>> client.last() # return transactions added from last listing
>>> client.last(from_id='...') # sets cursor to given transaction_id and returns following transactions
>>> client.last(from_date='2013-03-01') # sets cursor to given date and returns following transactionsGetting the latest transactions with account information in one request:
>>> info, transactions = client.last_transactions()
(
{'currency': 'CZK', 'account_number_full': 'XXXXXXXXXX/2010', 'balance': 42.00, 'account_number': 'XXXXXXXXXX', 'bank_code': '2010'},
<generator object _parse_transactions at 0x170c190>
)Fio API documentation (Section 8.3) states that a single token should be used only once per 30s. Otherwise, an HTTP 409 Conflict will be returned.
The client automatically retries throttling errors up to 3 times with
exponential backoff. If all attempts fail,
fiobank.ThrottlingError will be raised.
- Use
decimal=Truefor money-safeDecimalvalues. Without it, - amounts are parsed as
float.
- Use
- Date arguments accept
date,datetime, or ISO-like strings - (e.g.
YYYY-MM-DDandYYYY-MM-DDTHH:MM:SS).
- Date arguments accept
Install using uv:
git clone git@github.com:honzajavorek/fiobank.git cd fiobank uv sync
Then run tests:
uv run pytest
Release flow is automated by GitHub Actions in .github/workflows/release.yml.
Make sure you have the latest commits:
git pull
Bump the version in pyproject.toml using uv:
uv version --bump patch # or minor / major
Review and commit the version change:
git commit -am "release vX.Y.Z"
Create and push a git tag for that version:
git tag vX.Y.Z git push origin HEAD --tags
When the tag appears on GitHub, the release workflow builds and smoke-tests the package, then publishes it to PyPI automatically (for the honzajavorek/fiobank repository only).
The changelog is maintained in GitHub Releases.
© 2026 Honza Javorek <mail@honzajavorek.cz>
This work is licensed under the ISC license.
