Skip to main content

A connector for the Investec Open API

Project description

Investec Open API

Investecs open-banking API gives users and services the ability to automate banking processes otherwise left to requiring manual interaction. The Investec open banking API is under active development and users may experience bugs or service interruptions at times.

Installation

Requires python 3.7 or above. Available via pypi package manager

pip install investec-open-api

Usage

from investec_open_api import InvestecClient
client = InvestecClient('client_id', 'secret')

get_accounts

Lists the users accounts.

client.get_accounts()

Example Response

[
  {
    'accountId': 'xxxxxxxxxxxxxxxxxxxxx', 
    'accountNumber': '100xxxxxxxxxx', 
    'accountName': 'Mr J Smith', 
    'referenceName': 'Mr J Smith', 
    'productName': 'Private Bank Account'
  }, 
]

get_account_balance

Get the accounts current balance.

client.get_balance('account_id')

Example Response

{
  'accountId': 'xxxxxxxxxxxxxxxxxxxxx', 
  'currentBalance': -2269.8, 
  'availableBalance': 639.2, 
  'currency': 'ZAR'
}

get_account_transactions

Lists all transactions associated with the account in a given time period.

client.get_account_transactions('account_id')

Example Response

[
  {'accountId': 'xxxxxxxxxxxxxxxxxxxxx', 
  'type': 'DEBIT', 
  'transactionType': 'DebitOrders', 
  'status': 'POSTED', 
  'description': 'COMPANY XXXXXXXXX', 
  'cardNumber': '', 
  'postedOrder': 1116, 
  'postingDate': '2022-10-03', 
  'valueDate': '2022-10-03', 
  'actionDate': '2022-10-03', 
  'transactionDate': '2022-10-03', 
  'amount': 205.05, 
  'runningBalance': -2269.8
  },
]

transfer

Transfer funds between two internal accounts. The accounts can be retrieved using get_accounts.

client.transfer('account_id', 'beneficiary_account_id', 5)

get_countries

Gets a list of countries.

client.get_countries()

Example Response

[
  {
    'Code': 'ZA', 
    'Name': 'South Africa'
  }, 
  {
    'Code': 'GB', 
    'Name': 'United Kingdom of Great Britain and Northern Ireland (the)'
  }
]

get_currencies

Gets a list of currencies.

client.get_currencies()

Example Result

[
  {
    'Code': 'ZAR', 
    'Name': 'South African Rand'
  }, 
  {
    'Code': 'GBP', 
    'Name': 'British Pound'
  }
]

get_merchants

Fetches a list of mcc codes, these merchant codes can be used to determine what the transaction can be classified as.

client.get_merchants()

Example Result

[
  {
    'Code': '7623', 
    'Name': 'A/C, Refrigeration Repair'
  }, 
  {
    'Code': '8931', 
    'Name': 'Accounting/Bookkeeping Services'
  }
]

Project details


Download files

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

Source Distribution

investec_open_api-0.0.3.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

investec_open_api-0.0.3-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page