Skip to main content

Fio Bank API in Python.

Installation

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

Usage

First, get your API token.

token.png

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 2013

This 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 transactions

Getting 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>
)

Conflict Error

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.

Notes

  • Use decimal=True for money-safe Decimal values. Without it,

    amounts are parsed as float.

  • Date arguments accept date, datetime, or ISO-like strings

    (e.g. YYYY-MM-DD and YYYY-MM-DDTHH:MM:SS).

Development

Install using uv:

git clone git@github.com:honzajavorek/fiobank.git
cd fiobank
uv sync

Then run tests:

uv run pytest

Releasing

Release flow is automated by GitHub Actions in .github/workflows/release.yml.

  1. Make sure you have the latest commits:

    git pull
  2. Bump the version in pyproject.toml using uv:

    uv version --bump patch  # or minor / major
  3. Review and commit the version change:

    git commit -am "release vX.Y.Z"
  4. 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.

License: ISC

© 2026 Honza Javorek <mail@honzajavorek.cz>

This work is licensed under the ISC license.

Metadata

Release files for fiobank 5.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fiobank 5.0.0
File Size Uploaded
fiobank-5.0.0.tar.gz 393.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fiobank 5.0.0
File Interpreter ABI Platform
fiobank-5.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 402.1 kB

Release files / fiobank-5.0.0.tar.gz

Download URL fiobank-5.0.0.tar.gz
Size 393.6 kB
Tags Source
SHA-256 checksum
How to use checksums
54f5e5f582a4df6723a7224e51df10cb2d98aa306ea3323b4d8e3587cce6560b
BLAKE2b-256 checksum
How to use checksums
a3cb1dd5352f3ccb2b11f52c8a47349a15178bad3e03fb087e29784bd6b6aca9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fiobank-5.0.0-py3-none-any.whl

Download URL fiobank-5.0.0-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5cc482a950a26005a57caddadbfcf8d3951ef55b90379f239e61f0a937754986
BLAKE2b-256 checksum
How to use checksums
8d8dab4155ace6940e2475d9291d8b6c4d90a3a5f2c5ebcab18d1f1b79144cac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

5.0.0 This release

2 release files

4.1.1

2 release files

4.1.0

2 release files

4.0.0

2 release files

3.1.0

2 release files

3.0.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page