questrade-api-client
v1.0.5
Published
A simple Node.js client for interacting with the Questrade REST API
Downloads
3
Readme
questrade-api-client
A simple Node.js client for interacting with the Questrade REST API.
Installation
npm install --save questrade-api-client
Usage
You must pass in a Questrade API refresh token to the QuestradeClient
constructor.
This example prints out the user's account numbers and types.
import QuestradeClient from 'questrade-api-client';
(async () => {
const client = new QuestradeClient('<REFRESH_TOKEN>');
const response = client.getAccounts();
for (const account of response.accounts) {
console.log(`Account ${account.number}: ${account.type}`);
}
})();
Example output:
Account 412321: RRSP
Account 424700: TFSA
Supported Functions
Currently, only a part of the Questrade REST API is supported by this client.
| Function | API Method | | --- | --- | | getAccounts() | /v1/accounts | | getAccountBalances(id) | /v1/accounts/:id/balances |
Check the official API docs to see exactly what fields are returned by each function.