Skip to content

A simple Node.js client for interacting with the Questrade API

Notifications You must be signed in to change notification settings

vladmarica/questrade-api-client

Repository files navigation

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.

About

A simple Node.js client for interacting with the Questrade API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published