Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

A common interface for personal financial data

Notifications You must be signed in to change notification settings

normative-io/openbankdata-jvm

 
 

Repository files navigation

#OpenBankData Java API This project aims to provide a common interface for personal financial data. The library is ideal for services that want to make use of the financial data available at multiple banks without the need to handle the actual data scraping by themselves. The library will strictly provide read-only data such as account information and transactional data and will not by any means implement functinality for transferring money between accounts.

##Contact Gitter chat

###Status Build Status

Packages

Core (org.openbankdata.core)

This package contains all model classes representing the bank resources available, such as accounts and transactions. Each domain model contains getters and setters for each property available.

BankClient (org.openbankdata.client)

This package contains classes for communication with a bank´s API or website. The client package is also responsible for handling the authentication to the specific provider.

Service (org.openbankdata.service)

This package contains the classes that invoke the API or website and map the response into domain object. Service classes are defined for the resources they interact with such as AccountService and TransactionService.

Banking (org.openbankdata.banking)

This package contains a facade for all available services. Each bank has its own facade class and it is these classes that should be used by other applications when integrating with the api. This package is also responsible for caching responses that need to be shared among the services.

##Examples

###Authenticating

//Basic authentication
BankClient client = new HandelsbankenBankClient();
client.setCredentials("user", "password");

###Get a user's bank accounts

The following example prints the account name for each account associated the given user.

AccountService service = new HandelsbankenAccountService();
service.getClient().setCredentials("user", "password");
for(Account account : service.getAccounts()) {
    System.out.println(account.getName());
}

###Get an account's transactions The following example prints all transactions associated with the given account.

HandelsbankenBankClient client = new HandelsbankenBankClient("username","password");
AccountService accountService = new HandelsBankenAccountService(client);
TransactionService transactionService = new HandelsbankenTransactionService(client);

List<Account> accounts = accountService.getAccounts();
if(!accounts.isEmpty()) {
    Account account = accounts.get(0);
    for(Transaction transaction : transactionService.getTransactions(account)) {
      System.out.println(transaction.getDescription() +" : "+ transaction.getAmount());
    }
}

About

A common interface for personal financial data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 75.4%
  • Java 24.6%