Skip to content
A command line interface for OBP API
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
obp_python Issue 97 import foreign exchange rates (#98) Aug 28, 2019
LICENSE added LICENSE May 15, 2019 added command `obp sandboximport --example` which will auto import a … Apr 16, 2019 updated install_requires Aug 28, 2019
accounts-import-template-v1.ods Issue 50 check permissions importaccounts before import (#51) Jun 19, 2019
build-notes.txt version bump 0.187 May 3, 2019
cards-import-template-v1.ods Issue 43 create card template (#67) Jun 20, 2019
customers-import-template-v1.ods updated customers-import-template-v1.ods with sane default template (#53 Jun 19, 2019
example_import.json version bump to 0.194 (#14) Jun 11, 2019
requirements.txt added click to requirements (#19) Jun 12, 2019 updated install_requires Aug 28, 2019
transactions-import-template-v1.ods Issue 72 import historical transactions date (#73) Jun 21, 2019
users-import-template-v1.ods Import users from standard import template. `obp importusers /path/to… Jun 11, 2019

Open Bank Project CLI

A command line utility (CLI) to work with the Open Bank Project sandbox called obp.

With the obp cli you can:

  • Initiate an api connection to the sandbox
    • note you still need to sign-up from the sandbox homepage first to create your username & password
  • Get your DirectLogin token
  • Get your user information
  • Get your user id
  • Get banks
  • Get (your) accounts held at the bank

Also, depending on your account access you may:

  • Create a bank account
  • Add roles to a user
  • Import/Delete branches
  • Import dummy bank data


pip install --user obp-python # Requires at least python 3

Warning: If your operating system defaults to python 2, your pip command might be:

pip3 install --user obp-python
pip3.6 install --user obp-python


Usage: obp [OPTIONS] COMMAND [ARGS]...

  --help  Show this message and exit.

  addaccount              📁 Add a bank account
  addbank                 🏦 Add a bank
  addcustomer             🧙 Add a customer
  addfx                   📉 Add exchange rate (FX)
  addrole                 🚧 Add a role for current user
  adduser                 📝 Add a user
  addview                 🧐 Add a view
  answerconsent           🚧 Answer consent
  createconsent           🚧 Add a consent
  deletebranches          ⚠️ 🏦 Delete all branches
  deletecardbyid          ⚠️ 💳 Delete card by id
  getaccountbyid          📁 Get account by id (includes balance)
  getaccountsheld         📁 Get list of accounts held
  getaccounttransactions  📁 Get transactions for an account
  getauth                 🔑 Get your DirectLogin token
  getbanks                🏦 Get list of banks
  getcardbyid             💳 Get card by id
  getcardbynumber         💳 Get card by card number
  getcards                💳 Get list of cards at bank
  getconsents             🚧 Get consents
  getconsentstatus        🚧 Get consent status- with certificate
  getcustomers            👥 Get list of customers
  getuser                 😃 Get your user info
  getuserid               📋 Get your user id
  getuseridbyusername     📋 Get user id by username
  getusers                😃 Get all users
  importaccounts          🚜 Import accounts from spreadsheet template
  importbranches          🚜 Import branches from spreadsheet template
  importcardattribues     🚜 Import card attributes from spreadsheet template
  importcards             🚜 Import cards from spreadsheet template
  importcustomers         🚜 Import customers from spreadsheet template
  importfx                🚜 📉 Load all foreign exchange rates (FX) to all...
  importtransactions      🚜 Import transactions from spreadsheet template
  importusers             🚜 Import users from spreadsheet template
  init                    💡 Initalize connection to your Open Bank Project...
  linkusertocustomer      🔗 Link user to a customer
  revokeconsent           🚧 Revoke consent
  sandboximport           🚜 Bulk import sandbox data from json input


You must initalize the obp cli once, by doing:

obp init

Generate Direct Login Token

obp init 
Please enter your API_HOST:
Please enter your username:
Please enter your password: : 
Repeat for confirmation: 
... generating direct login token
Please enter your OBP_CONSUMER_KEY: # Go to, then "Get API Key" to generate consumer key.
obp getauth # Displays your DirectLogin token


Note You can ignore this is your just using the utlity. This is just for developing the utlity.

To work on this utility as a developer:

# Setup python3 environment
virtualenv -p python3 venv
. venv/bin/activate
git clone <this-repo>
# Building wheels etc
python sdist bdist_wheel
# Installing your edits locally:
pip install -e <path-to-this-repo> # -e means Install  a  project  in editable mode (i.e.  setuptools "developmode")
# Work on utility..submit pull request 

Update history
  • 0.19 Added sandboximport utility obp sandboximport --example
  • 0.0.9 Switch to use OBP_API_HOST instead of OBP_ENDPOINT
You can’t perform that action at this time.