RobinTTY.NordigenApiClient
10.1.0
dotnet add package RobinTTY.NordigenApiClient --version 10.1.0
NuGet\Install-Package RobinTTY.NordigenApiClient -Version 10.1.0
<PackageReference Include="RobinTTY.NordigenApiClient" Version="10.1.0" />
paket add RobinTTY.NordigenApiClient --version 10.1.0
#r "nuget: RobinTTY.NordigenApiClient, 10.1.0"
// Install RobinTTY.NordigenApiClient as a Cake Addin #addin nuget:?package=RobinTTY.NordigenApiClient&version=10.1.0 // Install RobinTTY.NordigenApiClient as a Cake Tool #tool nuget:?package=RobinTTY.NordigenApiClient&version=10.1.0
<p align="center"> <img src="https://raw.githubusercontent.com/RobinTTY/NordigenApiClient/main/docs/static/img/nordigen-api-client-logo.png" width="30%"> </p>
NordigenApiClient
This library provides a .NET client for the GoCardless Bank Account Data API (formerly Nordigen API). The following API endpoints are supported:
- Token
- Institutions
- Agreements
- Requisitions
- Accounts
You can get started with the Quickstart Guide below or take a look at the full documentation. You can find the nuget package here.
Quickstart Guide
To get started install the package via the package manager:
Install-Package RobinTTY.NordigenApiClient
Next you need to create a new instance of the client:
using var httpClient = new HttpClient(); var credentials = new NordigenClientCredentials("my-secret-id", "my-secret-key"); var client = new NordigenClient(httpClient, credentials);
Then we need the list of banking institutions in your country (e.g. United Kingdom)
var institutionsResponse = await client.InstitutionsEndpoint.GetInstitutions(SupportedCountry.UnitedKingdom); if (institutionsResponse.IsSuccess) institutionsResponse.Result.ForEach(institution => { Console.WriteLine($"Institution: {institution.Name}, Id: {institution.Id}"); }); else Console.WriteLine($"Couldn't retrieve institutions, error: {institutionsResponse.Error.Summary}");
Choose the institution your bank account is registered with and create a requisition for it:
// Use the id of the bank you want to connect to here (we acquired it in the last step) var institution = "BANK_OF_SCOTLAND_BOFSGBS1"; var redirect = new Uri("https://where-nordigen-will-redirect-after-authentication.com"); var requisitionResponse = await client.RequisitionsEndpoint.CreateRequisition(institution, redirect); if (requisitionResponse.IsSuccess) { Console.WriteLine($"Requisition id: {requisitionResponse.Result.Id}"); Console.WriteLine($"Start authentication: {requisitionResponse.Result.AuthenticationLink}"); } else Console.WriteLine($"Requisition couldn't be created: {requisitionResponse.Error.Summary}");
You will now need to accept the end user agreement by following the authentication link you got in the last step. The authentication flow will roughly look like this:
Now that you have accepted the agreement we once again need to retrieve the requisition we created in step 4. This time the response will include the accounts you are now able to access.
var requisitionId = "your-requisition-id"; var accountsResponse = await client.RequisitionsEndpoint.GetRequisition(requisitionId); if (accountsResponse.IsSuccess) accountsResponse.Result.Accounts.ForEach(accountId => { Console.WriteLine($"Account id: {accountId}"); }); else Console.WriteLine($"Accounts couldn't be retrieved: {accountsResponse.Error.Summary}");
Now you can retrieve details about your bank account and the balances/transactions using the account ID(s) we just acquired:
var accountId = "your-account-id"; var bankAccountDetailsResponse = await client.AccountsEndpoint.GetAccountDetails(accountId); if (bankAccountDetailsResponse.IsSuccess) { Console.WriteLine($"IBAN: {bankAccountDetailsResponse.Result.Iban}"); Console.WriteLine($"Account name: {bankAccountDetailsResponse.Result.Name}"); } var balancesResponse = await client.AccountsEndpoint.GetBalances(accountId); if (balancesResponse.IsSuccess) balancesResponse.Result.ForEach(balance => { var balanceAmount = balance.BalanceAmount; Console.WriteLine($"Type: {balance.BalanceType}"); Console.WriteLine($"Balance: {balanceAmount.Amount} {balanceAmount.Currency}"); }); var transactionsResponse = await client.AccountsEndpoint.GetTransactions(accountId); if (transactionsResponse.IsSuccess) transactionsResponse.Result.BookedTransactions.ForEach(transaction => { var transactionAmount = transaction.TransactionAmount; Console.WriteLine($"Remittance: {transaction.RemittanceInformationUnstructured}"); Console.WriteLine($"Booking date:{transaction.ValueDate}"); Console.WriteLine($"Amount: {transactionAmount.Amount} {transactionAmount.Currency}"); });
That's it! You are now able to retrieve the account details, balances and transactions of your bank account. If you wanna learn more about this library please refer to the full documentation.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.IdentityModel.JsonWebTokens (>= 7.5.1)
- PolySharp (>= 1.14.1)
- System.Net.Http.Json (>= 8.0.0)
-
net6.0
- Microsoft.IdentityModel.JsonWebTokens (>= 7.5.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
10.1.0 | 98 | 8/19/2024 |
10.0.0 | 70 | 8/17/2024 |
9.0.0 | 191 | 5/16/2024 |
8.0.1 | 89 | 5/4/2024 |
8.0.0 | 99 | 4/27/2024 |
7.1.0 | 145 | 3/25/2024 |
7.0.0 | 439 | 2/22/2024 |
6.2.0 | 106 | 2/21/2024 |
6.1.3 | 91 | 2/21/2024 |
6.1.2 | 244 | 12/30/2023 |
6.1.1 | 247 | 11/9/2023 |
6.1.0 | 84 | 11/8/2023 |
6.0.6 | 377 | 9/27/2023 |
6.0.5 | 228 | 9/8/2023 |
6.0.4 | 219 | 7/31/2023 |
6.0.3 | 127 | 7/15/2023 |
6.0.2 | 219 | 5/27/2023 |
6.0.1 | 162 | 5/24/2023 |
6.0.0 | 124 | 5/22/2023 |
5.2.1 | 133 | 5/21/2023 |
5.2.0 | 104 | 5/13/2023 |
5.1.0 | 200 | 4/25/2023 |
5.0.1 | 136 | 4/24/2023 |
5.0.0 | 433 | 1/18/2023 |
4.0.2 | 280 | 12/23/2022 |
3.0.0 | 307 | 12/16/2022 |
2.0.3 | 298 | 12/9/2022 |
2.0.2 | 272 | 12/9/2022 |
2.0.1 | 268 | 12/9/2022 |
2.0.0 | 272 | 12/8/2022 |
1.0.0 | 336 | 8/10/2022 |
Added the ability to check newly introduced rate limits in the GoCardless API.
Also see: https://bankaccountdata.zendesk.com/hc/en-gb/articles/11529584398236-Bank-API-Rate-Limits-and-Rate-Limit-Headers