mikecao / tradier-api

Node.js library for the Tradier API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tradier-api

Node.js library for the Tradier API

API Documentation

The REST API documentation can be found at https://developer.tradier.com/documentation.

Usage

const Tradier = require('tradier-api');

// You will need to get an access token from https://developer.tradier.com/
// Possible endpoints are prod, beta, and sandbox
const tradier = new Tradier(ACCESS_TOKEN, ENDPOINT);

tradier.getQuote('SPY')
  .then(quote => {
    console.log(`
      symbol: ${quote.symbol}
      price: ${quote.last}
      bid: ${quote.bid}
      ask: ${quote.ask}     
      volume: ${quote.volume} 
    `);
  })
  .catch(error => {
    console.log(error);
  });

About

Node.js library for the Tradier API

License:MIT License


Languages

Language:JavaScript 95.4%Language:Shell 2.9%Language:Batchfile 1.7%