• Stars
    star
    169
  • Rank 219,128 (Top 5 %)
  • Language
    Go
  • License
    MIT License
  • Created about 7 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

API and CLI to get information of your N26 account

Go Report Card

n26

Go API and CLI to get information of your N26 account

Installation

  • macOS: Available via Homebrew. Just run brew install guitmz/tools/n26
  • Linux: You can manually build this project or download a binary release.

You can also install with go get -u github.com/guitmz/n26/cmd/n26 (make sure you have your Go env setup correctly).

Docker

A Dockerfile is also provided and the prebuilt image is available for pulling: docker pull guitmz/n26 or docker pull guitmz/n26:DESIRED_TAG

You can run it like:

$ docker run -e N26_USERNAME="username" -e N26_PASSWORD="password" -e N26_DEVICE_TOKEN="device_token_uuid" guitmz/n26

or if you want to be asked for your credentials:

$ docker run -ti -e N26_DEVICE_TOKEN="device_token_uuid" guitmz/n26

Authentication

Since 14th of September 2019, N26 requires a login confirmation (2 factor authentication) from the paired phone N26 application to login on devices that are not paired (more details here). This means you will receive a notification on your phone when you start using this library to request data. This tool checks for your login confirmation every 5 seconds. If you fail to approve the login request within 60 seconds an exception is raised.

Device Token

Since 17th of June 2020, N26 requires a device_token to differentiate clients. This requires you to specify the N26_DEVICE_TOKEN environment variable with an UUID of your choice. Feel free to use any proper UUID generator like https://www.uuidgenerator.net to generate the token.

Usage

NAME:
   N26 - your N26 Bank financial information on the command line

USAGE:
   n26 command [json|csv|statement ID]

VERSION:
   1.5.0

AUTHOR:
   Guilherme Thomazi <[email protected]>

COMMANDS:
     addresses     addresses linked to your account
     balance       your balance information
     block         blocks a card
     cards         list your cards information
     contacts      your saved contacts
     info          personal information
     limits        your account limits
     spaces        your spaces
     statements    your statements. Passing the statement ID as argument, downloads the PDF to the current directory
     status        general status of your account
     transactions  list your past transactions. Supports CSV output
     unblock       unblocks a card
     help, h       Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help
   --version, -v  print the version

You can have the N26_USERNAME and N26_PASSWORD environment variables set to your N26 user email and password. If you don't, you will be prompt for this information, so it's not mandatory. Example of getting your account balance:

$ n26 balance
+------------------------+-------------+-------------------+----------------+
|          IBAN          |     BIC     | AVAILABLE BALANCE | USABLE BALANCE |
+------------------------+-------------+-------------------+----------------+
| DE74100XXXXXXXXXXXXXXX | NTSXXXXXXXX |              88.8 |           88.8 |
+------------------------+-------------+-------------------+----------------+

You can also use the json option to output it as JSON with more information:

$ n26 balance json
N26 password: ********
{
  "availableBalance": 107.5,
  "usableBalance": 107.5,
  "iban": "DEXXXXXXXXXXXXXX",
  "bic": "NTXXXXXXXXXXX",
  "bankName": "N26 Bank",
  "seized": false,
  "id": "11111-1scasda-1112312-adasdasdasdas"
}

And csv for transactions.

You can run n26 help for usage description.

Missing features

  • Improve MFA flow, for now it works but is not really informative
  • Make a transfer
  • Set card limit
  • API docs
  • Better error handling
  • A terminal UI could also be implemented
  • ?

References

More Repositories

1

virii

Collection of ancient computer virus source codes
Assembly
567
star
2

ezuri

A Simple Linux ELF Runtime Crypter
Go
206
star
3

memrun

Small tool to run ELF binaries from memory with a given process name
Assembly
145
star
4

Fe2O3

Simple prepender virus written in Rust
Rust
108
star
5

go-liora

Probably the first binary (PE/ELF) infector ever created in GoLang.
Go
48
star
6

midrashim

PT_NOTE to PT_LOAD x64 ELF infector written in Assembly
Assembly
40
star
7

go-weather-indicator

Minimalistic GTK weather indicator written in GoLang.
Go
28
star
8

nim-cephei

Probably the first ELF binary infector ever created in Nim.
Nim
27
star
9

gocave

Finding code caves in ELF files with GoLang
Go
25
star
10

nasty

Reverse text segment x64 ELF infector written in Assembly
Assembly
15
star
11

msil-cecil-injection

Injection of MSIL using Cecil
C#
12
star
12

ansi-escape

Using ANSI escape codes with x64 Linux Assembly
Assembly
10
star
13

transferwise

A command line tool to get quotes from TransferWise
Go
8
star
14

3-tier-app-aws-terraform

Simple 3-tier app example delpoyed to AWS using Terraform
HCL
6
star
15

vala-zariche

Linux.Zariche: a Vala virus
Vala
3
star
16

defjam

Assembly
2
star
17

dynamic-api-caller-dotnet

A class which can dynamically call a Windows API function at runtime using Reflection.Emit.
C#
2
star
18

bucket

A interactive shell to manage files in AWS S3.
Python
1
star
19

mbr-dumper

A .NET (C#) application that dumps the disk MBR onto a file.
C#
1
star
20

offsetter

Convert between file offsets and virtual addresses with Go
Go
1
star
21

nim-builder

Docker container to run and build Nim code
Shell
1
star
22

fasm-docker

Docker container to build FASM code
Dockerfile
1
star
23

rebar

A status line generator for Lemonbar, written in Rust.
Rust
1
star
24

Paper-Repo

Aggregated content from the vx-underground paper collection. Files may not be named correctly.
C
1
star
25

python-file-crypter

Encrypt any file using Python (RC4)
Python
1
star