A simple Node.js client for interacting with the Questrade REST API.
npm install --save questrade-api-client
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
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.