this post was submitted on 14 Oct 2023
13 points (88.2% liked)

Programming

17501 readers
23 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
 

I would like to write my own read-only client(s) to pull my transactions from the bank and keep track of my spending. It would be possible to then feed this into other software (either that I write myself or that I can find and trust).

In the future, the goal is to actually initiate transfers to European bank accounts. For example an automatic transfer between savings accounts when the interest rates increase for one bank, or transfer from a savings account to a stock exchange instead of letting it sit on a stock exchange waiting to be invested.

It's not entirely clear where to start as the banking system seems quite opaque and it feels like I'd have to get a job at the bank to understand how it works. Stock and crypto exchanges have APIs and sometimes even libraries, but banks?

Edit: no libs, but PSD2 is the keyword. Banks in the EU must(?) support open banking and provide APIs following that standard.

top 8 comments
sorted by: hot top controversial new old
[–] StackedTurtles 8 points 1 year ago (2 children)

Try and search for PSD2 API for your bank. Every European bank is required to have open banking support. I’m not too familiar with it myself but it’s a good place to start your search.

[–] atheken 6 points 1 year ago* (last edited 1 year ago)

Amazing what you can get done if you have a functioning government by and for the people.

[–] onlinepersona 3 points 1 year ago

Oh my, that's quite the rabbit hole. Thanks. I'll have to take a closer look at that.

It looks like there's even opensource accounting software (GnuCash) that supports PSD2 through AqBanking. Unfortunately, it seems very focused on Germany and is written in C, which means I can't contribute.

But from the features listed (if the translator works well), it seems like transactions are supported by PSD2. My impression however is that the space is not very active in the opensource world. Something to explore.

Cheers

[–] [email protected] 2 points 1 year ago (1 children)
[–] onlinepersona 1 points 1 year ago (1 children)

Thanks. Looks like I'll need to read up and understand PSD2. Every bank seems to have their own implementation of the "standard". At least some like DKB have a swagger.json that allows generating clients in many languages using https://openapi-generator.tech/

There doesn't seem to be an all-encompassing lib for all banks that support PSD2 though (at least not that I can find). For my usecase, just having my bank support it is good enough.

[–] mipli 1 points 1 year ago

I've done something similar to what you want to do. To avoid the issue with each bank having their own interpretation of PSD2 I ended up using an aggregation service. The few banks I looked at also had horrible APIs, which I didn't really want to work with.

I picked GoCardless for aggregration since it's free for simple transaction reading, but there are plenty of options available.

[–] silas 1 points 1 year ago* (last edited 1 year ago)

If you’re okay with a third-party, a common service used by a lot of apps and websites is Plaid. They support US, Canada, and European banks. I think you can connect up to 3 banks for free with the free plan/development mode (or whatever it’s called).

[–] [email protected] 1 points 1 year ago

There are lots of SaaS products out there which will let you do this.

Is it a good idea? No - there will be little if any recourse if your software deletes your money. It simply isn't worth the risk.

I recommend using yourself as the API. You can write a script which scrapes data about interest rates etc and notifies you when a transaction should be made.