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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for investec_open_api-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b3e8afd3e27b6a64df395d3cb3d58fdf11f48d397a87c8f00d528e7d8fb1b63 |
|
MD5 | a7587d7f2cf66b41bb7835145818b076 |
|
BLAKE2b-256 | 5a12a28ef37a1bab43d3c2817e52794cf5deec20e3052eff2c1e96ebc8327735 |