Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@morpheusnephew/td-ameritrade

MorpheusNephew153MIT1.1.1TypeScript support: included

A client for TD Ameritrade

TdAmeritrade, TD, Ameritrade

readme

TD Ameritrade

This project is a typescript wrapper for TD Ameritrade's API

Usage

The default class of clients is the TdAmeritradeClient. It must be initialized with your client id and each client sub-client is a property of the TdAmeritradeClient for example the accounts client.

import TdAmeritradeClient from '@morpheusnephew/td-ameritrade/clients';

(async () => {
  // Initializing TD Ameritrade client with your client id and access token
  const client = new TdAmeritradeClient({
    accessToken: 'yourAccessToken',
  });

  // Makes request to get all accounts associated with your access token
  const { data: allAccounts } = await client.accounts.getAllAccounts();
})();

Responses

As you may notice from the return signatures of client methods and in regards to the unit tests, the response data nor the status code of some of the endpoints are known just from looking at the documentation. So what you see in the unit tests specifically for CUD operations is me taking my best guess as to what the status code should be.

changelog

1.1.1 (2022-07-23)

chore

docs

  • Updated contributing docs to state conventional commit convention (5e41809)

fix

  • Updated readme example to show client id isn't needed to get accounts (7ede33f)

1.1.0 (2022-07-23)

feat

  • Made client id optional for td client (81a577f)

Feat

  • made client id optional (ac5795b)

1.1.0 (2022-07-23)

feat

  • Made client id optional for td client (81a577f)

Feat

  • made client id optional (ac5795b)

1.0.4 (2022-06-16)

Fix

1.0.3 (2022-05-29)

fix

  • Updated async dependency (aeee410)

Fix

  • Updated td ameritrade models (0c8f859)

Upgrade

  • fixing security vulnerability in minimist (83ccc19)

1.0.2 (2022-03-24)

Docs

  • Added contributing file (baa7aea)
  • Added documentation for how to use this library (cb96748)

Fix

1.0.1 (2022-03-19)

Fix

  • Removed postinstall step for installing husky (47c46b2)

1.0.0 (2022-03-19)

Breaking

  • Updated how the package is consumed (ed2298e)

major

  • Updated how package is consumed (df8685f)

0.5.0 (2022-03-19)

Features

  • updated how package is consumed BREAKING CHANGE (0a03ad2)

0.4.14 (2022-03-19)

Bug Fixes

  • removed prepare step for semantic-release (fda7993)

0.4.13 (2022-03-19)

Bug Fixes

0.4.12 (2022-03-19)

Bug Fixes

0.4.11 (2022-03-19)

Bug Fixes

v0.4.10 (2022-02-03)

v0.4.9 (2021-12-07)

Bug Fixes

  • Added missing query param options for order path and query endpoints

v0.4.8 (2021-12-04)

Bug Fixes

  • Fixes account type response for account requests

v0.4.7 (2021-11-02)

Bug Fixes

  • Updated quote endpoint to return quote record
  • FUpdated quote endpoint to return quote record

v0.4.6 (2021-10-24)

Bug Fixes

  • Fixed price history client's get transactions date parameters to represent milliseconds since epoch

v0.4.5 (2021-10-09)

v0.4.4 (2021-10-09)

v0.4.3 (2021-10-09)

Bug Fixes

  • Fixed price history frequency type not being set
  • Fixed transaction history date range request params to take in strings
  • Fixed get quotes response
  • Fixed bug in get quote logic not calling function to get quote url
  • Updated ts-jest to fix TypeError when running tests
  • Updating es-lint to fix a potential security issue

v0.4.2 (2021-09-17)

Bug Fixes

  • Updated jest due to security update

v0.4.1 (2021-09-17)

Code Refactoring

  • Made redirect uri optional for client

v0.4.0 (2021-08-02)

Code Refactoring

  • ran prettier on test files

Features

  • added functionality to refresh access and refresh tokens

v0.3.2 (2021-08-02)

Bug Fixes

  • fixed issue which could cause husky to fail when installing this package

v0.3.1 (2021-08-02)

Code Refactoring

  • prettier

v0.3.0 (2021-07-10)

Features

  • Implemented saved orders client

v0.2.0 (2021-07-09)

Features

  • Implemented orders client

v0.1.7 (2021-07-05)

v0.1.6 (2020-11-28)

v0.1.5 (2020-11-27)

v0.1.4 (2020-11-27)

v0.1.3 (2020-11-27)

v0.1.2 (2020-11-27)

v0.1.1 (2020-11-27)

v0.1.0 (2020-11-27)