FioBankApiClient is C# library to download your account activity from FIO Bank.
- .NET 6, .NET 7 or.NET 8 installed
- Token from FIO internetbanking
PM> Install-Package FioBankApiClient
You'll need an API token to access the FIO Bank API.
Instructions for obtaining a token can be found in the "ZÍSKÁNÍ TOKENU" section of the FIO Bank API documentation: https://www.fio.cz/docs/cz/API_Bankovnictvi.pdf
Add FioBankApiClient services to your project's IServiceCollection and provide your API token:
// Your Fio API token
string yourApiToken = "rdso4JIBS...";
// Add Fio Bank Api client
applicationBuilder.Services.AddFioBankApiClient(yourApiToken);
Important note: There's a 30-second limit between api calls. If you try to call it too quickly, you'll get a 409 Conflict error."
string[] formats = { "dd/MM/yyyy" };
Result<DateTimeRange> rangeOrFailure = DateTimeRange.Create("01/06/2024", "01/07/2024", formats);
if (rangeOrFailure.IsSuccess)
{
Result<AccountStatement> transactions = await apiClientCaller.GetTransactionsInDateRangeAsync(rangeOrFailure.Value);
Result<string> xmlTransactions = await apiClientCaller.GetTransactionsInDateRangeAsync(rangeOrFailure.Value, FioDataFormat.Xml);
}
Result<AccountStatement> lastTransactions = await apiClientService.GetTransactionsSinceLastDownloadAsync();
Result<string> csvLastTransactions = await apiClientService.GetTransactionsSinceLastDownloadAsync(FioDataFormat.Csv);
Result<AccountStatement> transactionsByIdYear = await apiClientService.GetTransactionsByStatementIdAndYearAsync(1, 2024);
Result<string> xmlTransactionsByIdYear = await apiClientService.GetTransactionsByStatementIdAndYearAsync(1, 2024, FioDataFormat.Xml);
Result<string> lastStatement = await apiClientService.GetLastStatementAsync(2024);
DateTimeOffset unsuccessfulDateTime = new DateTimeOffset(2024, 5, 1, 8, 6, 32, new TimeSpan(1, 0, 0));
await apiClientService.SetCursorToLastDateAsync(unsuccessfulDateTime);
await apiClientService.SetCursorToLastIdAsync(1);
Bugs and feature request are tracked on GitHub