https://github.com/0xced/six.bankmaster
A Refit-based client to access SIX Bank Master data
https://github.com/0xced/six.bankmaster
bank six-group swiss
Last synced: 5 months ago
JSON representation
A Refit-based client to access SIX Bank Master data
- Host: GitHub
- URL: https://github.com/0xced/six.bankmaster
- Owner: 0xced
- Created: 2020-11-08T15:03:20.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2020-11-15T09:30:08.000Z (almost 5 years ago)
- Last Synced: 2025-04-20T09:56:26.117Z (6 months ago)
- Topics: bank, six-group, swiss
- Language: C#
- Homepage:
- Size: 215 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
[](https://www.nuget.org/packages/Six.BankMaster/) [](https://ci.appveyor.com/project/0xced/six-bankmaster/branch/main)
# About
**Six.BankMaster** is a Refit-based C# client to access [SIX Bank Master data](https://www.six-group.com/en/products-services/banking-services/interbank-clearing/online-services/download-bank-master.html). It targets .NET Standard 2.0 and is thus usable from both .NET Framework and .NET Core.
# Usage
Here is some sample code that demonstates how to list all banks retrieved from the Bank Master service.
```csharp
using System;
using System.Linq;
using System.Threading.Tasks;
using Six.BankMaster;namespace SampleCode
{
class Program
{
private static async Task Main()
{
try
{
var client = BankMasterClientFactory.CreateSystemTextJsonClient();
var masterData = await client.GetMasterDataAsync();Console.WriteLine($"Valid for {masterData.MetaData.ValidForClearingDay}");
foreach (var bank in masterData.Entries.Where(b => b.IidType == IidType.Headquarters))
{
Console.WriteLine($"{bank.Iid} {bank.BankOrInstitutionName} / {bank.CountryCode}-{bank.ZipCode} {bank.PostalAddress ?? bank.DomicileAddress}");
}
return 0;
}
catch (Exception exception)
{
Console.Error.WriteLine(exception);
return 1;
}
}
}
}
```