# questrade-api-client

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

Latest version **1.0.5** (published 2020-04-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install questrade-api-client
pnpm add questrade-api-client
yarn add questrade-api-client
bun add questrade-api-client
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2020-04-15 |
| First published | 2020-02-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 19.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Vlad Marica |
| Maintainers | vladmarica |

## Links

- npm: https://www.npmjs.com/package/questrade-api-client
- Repository: https://github.com/Quintinity/questrade-api-client
- Homepage: https://github.com/Quintinity/questrade-api-client#readme
- Issues: https://github.com/Quintinity/questrade-api-client/issues
- npm.io page: https://npm.io/package/questrade-api-client

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.0

## Recent versions

- 1.0.5 (latest) — 2020-04-15
- 1.0.4 — 2020-03-05
- 1.0.3 — 2020-02-22
- 1.0.2 — 2020-02-22
- 1.0.1 — 2020-02-22
- 1.0.0 — 2020-02-22

## README

# questrade-api-client <a href="https://www.npmjs.com/package/questrade-api-client"><img src="https://img.shields.io/npm/v/questrade-api-client.svg" alt="" /></a>

A simple Node.js client for interacting with the [Questrade REST API](https://www.questrade.com/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.

```javascript
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](https://www.questrade.com/api/documentation/rest-operations/account-calls/accounts) |
| getAccountBalances(*id*) | [/v1/accounts/:id/balances](https://www.questrade.com/api/documentation/rest-operations/account-calls/accounts-id-balances) |

Check the official API docs to see exactly what fields are returned by each function.

---
_Source: https://npm.io/package/questrade-api-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
