Skip to main content

Unofficial asynchronous API interface to the N26 bank

Project description

# aioN26 Unofficial Asynchronous N26-bank API implementation

based on

I will document this better in the future, but here is a working example:

import asyncio
from aioN26.api import Api

from pprint import pprint
import logging

import os
from dotenv import load_dotenv    # pip install python-dotenv

# We load local environment variables from file MYSECRET.env
# The file format is as follows:

# ------------MYSECRET.env-------------
# PASSWORD=mysecretpassword
# DEVICE_TOKEN=yourgeneratedtoken
# -------------------------------------

# to generate the DEVICE_TOKEN, run this in a python3 console:
# >>> import uuid ; print(uuid.uuid4())
# and paste the result in the file

load_dotenv('MYSECRET.env')    # directory/file containing the environment variables


async def main():
    async with Api(username=os.getenv('USERNAME'), password=os.getenv('PASSWORD'),
                   device_token=os.getenv('DEVICE_TOKEN')) as api:


        print('\nget_me = \\')
        pprint(await api.get_me())

        print('\nget_me_statuses = \\')
        pprint(await api.get_me_statuses())

        print('\nget_addresses = \\')
        pprint(await api.get_addresses())

        print('\nget_barzahlen_check = \\')
        pprint(await api.get_barzahlen_check())

        print('\nget_spaces = \\')
        pprint(await api.get_spaces())

        print('\nget_accounts = \\')
        pprint(await api.get_accounts())

        print('\nget_settings_account_limits = \\')
        pprint(await api.get_settings_account_limits())

        print('\nset_settings_account_limits = \\')
        pprint(await api.set_settings_account_limits(500, 3000))

        print('\nget_smrt_categories = \\')
        pprint(await api.get_smrt_categories())

        print('\nget_smrt_transactions = \\')
        transactions = await api.get_smrt_transactions(from_time=1636030755256, to_time=1636030755256)
        print('TOTAL', len(transactions))

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

aioN26-0.0.6.tar.gz (16.4 kB view hashes)

Uploaded source

Built Distribution

aioN26-0.0.6-py3-none-any.whl (12.2 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page