Skip to main content

Client library to support the Canadian Imperial Bank of Canadas API

Project description

CIBC API Client Wrapper

This package provides a client wrapper around CIBC's API. CIBC uses one API to handle requests from their web platform and app, specifically the API passes information about accounts, and transactions in those accounts. This Wrapper makes it easy to gather that data in python, given the primary account card number and password. Essentially, online banking through python.

Getting Started


built for python 3.0 +, any operating system

pip install cibc

Basic Usage

Start with logging into a CIBC account by calling the cibc.CIBC method using your username and login

import cibc
c = cibc.CIBC('username (usually card number)', 'password')

Next, grab the accounts associated with this username and password (this is required, for any account specific information)

accounts = c.accounts

The accounts, which is a list of account class', is now storing all the account specific information. I'm no entirely sure what all of it is, but the account class variables are listed below. To get the transactions:

c.gTransactions(dateFrom=datetime.datetime(year=2018, month=9,day=1),dateUntil= datetime.datetime(year=2018, month=9, day=17))	

the gTransactions method gets all the transactions for all the accounts in the instance. It is also easy to get them one by one using the aquireTransactions method as follows:

for account in accounts:

which will return a list of transactions, each transaction being a dictionary of details.

Finally, there's an easy built in way to send the account transaction details to a csv file, or simply get a list of dictionaries without re-acquiring every transaction using the .tocsv() and .tolist() methods:

for account in accounts:

Summing and Subtracting Accounts

For your convenience, there's an easy way to combine accounts for looking at all transactions at once. The addition and subtraction methods are well defined for account classes and can be used like this:

omniAccount = sum(c.accounts) # all the account transactions in one account.  Account specific variables are lost
nomniAccount = c.accounts[0] - c.accounts[1]

Account subtraction returns an account instance with a balance of the first account balance minus the other account balance. It also holds the list of transactions excluding ones in account 1 that are also in account 2.


thanks CIBC, for the API as well as being big enough for this to be relevant.


We use ( for versioning. For the versions available, see the (


  • Louis Millette


This project is licensed under the MIT License


  • CIBC. It's a good bank.


I have been informed that useing this repository is a violation of the terms of service for CIBC's online banking agreement.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for cibc, version 0.3.5
Filename, size File type Python version Upload date Hashes
Filename, size cibc-0.3.5-py3-none-any.whl (12.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size cibc-0.3.5.tar.gz (9.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page