An interactive CLI application for communicating with the Investec Open Banking APIs.
Built with Deno.
Assuming you already have deno installed.
deno install --allow-net=openapi.investec.com --allow-env https://raw.githubusercontent.com/adrianhopebailie/investec/master/investec.ts
To use the application you'll need your client id and client secret from Investec.
- Login to Investec Online.
- Navigate to the Programmable Banking landing page.
- Select the Open API tab.
- Select the Enroll button.
To run the application simply run:
$ investec
If that doesn't work it's possible that your Deno
bin
folder is not in your path (see the error that would have been logged when you did the install). Make sure you have something likeexport PATH=$HOME/.deno/bin:$PATH
in your shell config.
You can type help
to get a list of available commands or quit
to... quit.
The application will try to create an authenticated session when running any
command if one doesn't already exist. However you can explicitly login using the
login
command.
The provided credentials will be kept in memory as long as the application is running.
To skip typing in the login credentials these can be provided as environment
variables called INVESTEC_CLIENT_ID
and INVESTEC_CLIENT_SECRET
.
$ INVESTEC_CLIENT_ID=uytfqwed76r5quwdtfo86twef INVESTEC_CLIENT_SECRET=98uy978y23ry8 investec
Using the accounts
or accts
command will list your accounts and prompt you
to select an account that will be used for further operations such as
transaction and balance enquiries. You can skip setting a selected account by
simply hitting ⏎ (Enter).
The transactions
and txs
command will get a list of transactions for the
currently selected account and prompt to select an account if one hasn't already
been selected.
The balance
and bal
command will get the current balance for the currently
selected account and prompt to select an account if one hasn't already been
selected.
- Auto-fetch balances when getting account list
- Better management of credential state (secure storage?)
- Use currency from balance query for tx list