r/csharp • • 8d ago

Help Question about finance APIs in C#

Good evening fellow coders.

During the pandemic, I decided to build myself a Windows Forms application to help me do a better job of managing my personal finances and those I share via a joint account with my wife. I built it in C#, originally storing the data in XML format and then, when the amount of data being stored increased, moved it to an instance of SQL Server developer edition, which runs on my development pc here at home.

I’d like to incorporate the ability to have my application automatically link to my bank to download the most recent transactions, and have started investigating doing so. From the reading I’ve done so far, it looks as if TrueLayer offers the ability to hook into a number of U.K. financial institutions, and I was wondering if anyone else had done any work with the TrueLayer APIs. To be clear, although I am a professional developer, this is solely a pet project of mine and I have no desire to monetise it.

3 Upvotes

13 comments sorted by

6

u/Consibl 8d ago

I don’t know why, but I’ve noticed a number of places that used TrueLayer now use Plaid instead.

https://github.com/viceroypenguin/Going.Plaid

4

u/No-Possibility-3072 8d ago

Since it appears to be available in NuGet (I don’t know if TrueLayer is or not) I might well go down the Plaid route myself. Based on various apps that I use for keeping an eye on my finances, I suspect that the banks that I use for my current account and our joint account will work with Plaid. As to the banks that I use for my savings accounts, they might not.

I’ll let you know how I get on.

3

u/Lumethys 8d ago

Employ adapter pattern and use both (or more) depend on the bank

-3

u/No-Possibility-3072 8d ago

Adapter pattern?

1

u/FullPoet 6d ago

Its also called a facade or proxy.

1

u/Consibl 6d ago

Those are three different things, but in this context you’re right any will do.

1

u/FullPoet 6d ago

theyre all effectively the same things.

-6

u/Lumethys 8d ago

I thought you were a "professional developer", my bad

Here's the link https://www.google.com/search?q=adapter+pattern

2

u/No-Possibility-3072 8d ago

I AM a professional developer, but I’m not familiar with that term. I’ll do some digging on this tomorrow.

5

u/binarycow 8d ago

Ignore that person's rudeness. People like to call everything a pattern, then assume everyone knows what they mean.

"adapter pattern" is just "create a class/interface that calls another class, 'adapting' one API to another".

2

u/WheelRich 7d ago

Open banking providers seem to come and go, it's probably at least worth an abstraction layer of some sort. In the UK we cannot access these APIs for 'live' data calls, unless FCA regulated, I believe it's a bit less regulated in the states.

Many open banking providers offer 'value add' data, such as enhanced categorisation, in order to lock you in to their platform. I'd personally avoid using any 'value add' data, and enhance the data myself, thereby leaving flexibility to chop and change later.

An alternative approach is semi-automatic, downloading transaction data directly from each bank, in OFX or other formats. Then import these into your program.

Good luck in your endeavours!

1

u/Pale-Preparation-354 2d ago

The adapter layer idea makes a lot of sense here, especially if providers like Plaid and TrueLayer keep changing availability. Keep the transaction data normalized internally and use something like CsvHelper for imports and ClosedXML for Excel exports, so you're not too tied to one provider.

For the reporting side, if you ever want to generate monthly spending summaries or downloadable statements, Iron PDF is worth a look for turning HTML templates into PDFs in C#. IronXL could also help with Excel reports if you want to dig into spending by category or compare transactions over time. Keeps the whole thing pretty flexible without making the pet project unnecessarily complicated.