0.2.1 • Published 4 years ago

@gitchrisqueen/tdameritrade-api-js-client v0.2.1

Weekly downloads
21
License
MIT
Repository
github
Last release
4 years ago

TD Ameritrade API Workflow CI

TD Ameritrade API integration for Node.js

See - TD Ameritrade API

Installation

$ npm i @gitchrisqueen/tdameritrade-api-js-client --save

Getting Started

Please follow the installation instruction and execute the following JS code:

var GitChrisQueen_TDA_JS = require('@gitchrisqueen/tdameritrade-api-js-client');

var defaultClient = GitChrisQueen_TDA_JS.ApiClient.instance;

// Configure API key authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix['Authorization'] = "Token"

var api = new GitChrisQueen_TDA_JS.AccountsApi()

var accountId = 56; // {Number} 

var opts = { 
  'fields': "fields_example" // {String} Balances displayed by default, additional fields can be added here by adding positions or orders. Example: fields=positions,orders
};
api.accountsAccountIdGET(accountId, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

All URIs are relative to https://api.tdameritrade.com/v1

ClassMethodHTTP requestDescription
GitChrisQueen_TDA_JS.AccountsApiaccountsAccountIdGETGET /accounts/{accountId}Get Account
GitChrisQueen_TDA_JS.AccountsApiaccountsGETGET /accountsGet Accounts
GitChrisQueen_TDA_JS.AuthenticationApioauth2TokenPOSTPOST /oauth2/tokenPost Access Token
GitChrisQueen_TDA_JS.InstrumentsApiinstrumentsCusipGETGET /instruments/{cusip}Get Instrument
GitChrisQueen_TDA_JS.InstrumentsApiinstrumentsGETGET /instrumentsSearch Instruments
GitChrisQueen_TDA_JS.MarketHoursApimarketdataHoursGETGET /marketdata/hoursGet Hours for Multiple Markets
GitChrisQueen_TDA_JS.MarketHoursApimarketdataMarketHoursGETGET /marketdata/{market}/hoursGet Hours for Multiple Markets
GitChrisQueen_TDA_JS.MoversApimarketdataIndexMoversGETGET /marketdata/{index}/moversGet price history for a symbol
GitChrisQueen_TDA_JS.OptionChainsApimarketdataChainsGETGET /marketdata/chainsGet Option Chain
GitChrisQueen_TDA_JS.OrdersApiaccountsAccountIdOrdersGETGET /accounts/{accountId}/ordersGet Orders by Path
GitChrisQueen_TDA_JS.OrdersApiaccountsAccountIdOrdersOrderIdDELETEDELETE /accounts/{accountId}/orders/{orderId}Cancel Order
GitChrisQueen_TDA_JS.OrdersApiaccountsAccountIdOrdersOrderIdGETGET /accounts/{accountId}/orders/{orderId}Get Order
GitChrisQueen_TDA_JS.OrdersApiaccountsAccountIdOrdersOrderIdPUTPUT /accounts/{accountId}/orders/{orderId}Replace Order
GitChrisQueen_TDA_JS.OrdersApiordersGETGET /ordersGet Orders By Query
GitChrisQueen_TDA_JS.OrdersApiordersPOSTPOST /ordersPlace Order
GitChrisQueen_TDA_JS.PriceHistoryApimarketdataSymbolPricehistoryGETGET /marketdata/{symbol}/pricehistoryGet price history for a symbol
GitChrisQueen_TDA_JS.QuotesApimarketdataQuotesGETGET /marketdata/quotesGet Quotes
GitChrisQueen_TDA_JS.QuotesApimarketdataSymbolQuotesGETGET /marketdata/{symbol}/quotesGet Quote
GitChrisQueen_TDA_JS.SavedOrdersApiaccountsAccountIdSavedordersGETGET /accounts/{accountId}/savedordersGet Saved Orders by Path
GitChrisQueen_TDA_JS.SavedOrdersApiaccountsAccountIdSavedordersPOSTPOST /accounts/{accountId}/savedordersCreate Saved Orders
GitChrisQueen_TDA_JS.SavedOrdersApiaccountsAccountIdSavedordersSavedOrderIdDELETEDELETE /accounts/{accountId}/savedorders/{savedOrderId}Delete Saved Orders
GitChrisQueen_TDA_JS.SavedOrdersApiaccountsAccountIdSavedordersSavedOrderIdGETGET /accounts/{accountId}/savedorders/{savedOrderId}Get Saved Orders
GitChrisQueen_TDA_JS.SavedOrdersApiaccountsAccountIdSavedordersSavedOrderIdPUTPUT /accounts/{accountId}/savedorders/{savedOrderId}Replace Saved Orders
GitChrisQueen_TDA_JS.TransactionsApiaccountsAccountIdTransactionsGETGET /accounts/{accountId}/transactionsGet Transactions
GitChrisQueen_TDA_JS.TransactionsApiaccountsAccountIdTransactionsTransactionIdGETGET /accounts/{accountId}/transactions/{transactionId}Get Transaction
GitChrisQueen_TDA_JS.UserInfoPreferencesApiaccountsAccountIdPreferencesGETGET /accounts/{accountId}/preferencesGet Preferences
GitChrisQueen_TDA_JS.UserInfoPreferencesApiaccountsAccountIdPreferencesPUTPUT /accounts/{accountId}/preferencesUpdate Preferences
GitChrisQueen_TDA_JS.UserInfoPreferencesApiuserprincipalsGETGET /userprincipalsGet User Principals
GitChrisQueen_TDA_JS.UserInfoPreferencesApiuserprincipalsStreamersubscriptionkeysGETGET /userprincipals/streamersubscriptionkeysGet Streamer Subscription Keys
GitChrisQueen_TDA_JS.WatchlistApiaccountsAccountIdWatchlistsGETGET /accounts/{accountId}/watchlistsGet Watchlists for Single Account
GitChrisQueen_TDA_JS.WatchlistApiaccountsAccountIdWatchlistsPOSTPOST /accounts/{accountId}/watchlistsCreate Watchlist
GitChrisQueen_TDA_JS.WatchlistApiaccountsAccountIdWatchlistsWatchlistIdGETGET /accounts/{accountId}/watchlists/{watchlistId}Get Watchlists
GitChrisQueen_TDA_JS.WatchlistApiaccountsAccountIdWatchlistsWatchlistIdPATCHPATCH /accounts/{accountId}/watchlists/{watchlistId}Update Watchlist
GitChrisQueen_TDA_JS.WatchlistApiaccountsAccountIdWatchlistsWatchlistIdPUTPUT /accounts/{accountId}/watchlists/{watchlistId}Replace Watchlist
GitChrisQueen_TDA_JS.WatchlistApiaccountsWatchlistsGETGET /accounts/watchlistsGet Watchlists for Multiple Accounts

Documentation for Models

Documentation for Authorization

application

bearerAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header
0.2.1

4 years ago

0.2.0

4 years ago

0.1.17

4 years ago

0.1.16

4 years ago

0.1.15

4 years ago

0.1.14

4 years ago

0.1.13

4 years ago

0.1.12

4 years ago

0.1.10

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.4

4 years ago

0.1.5

4 years ago

0.1.2

4 years ago

0.1.3

4 years ago

0.1.1

4 years ago