![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@smurftheweb/tradier-client
Advanced tools
tradier-client is a promise-based Node.js wrapper for the Tradier API. It currently works with the Market Data and Fundamentals API.
You will receive your Tradier API Access Token after: creating an account
$ npm i -S tradier-client
Require or import the package.
const Tradier = require('tradier-client');
// ES2015
import Tradier from 'tradier-client';
When creating a new Tradier
instance, you must specify if you are in a sandbox account. See below for a description.
// If you are not in a sandbox account, you only need to pass in your access token and it takes care of the rest:
const tradier = new Tradier('TRADIER_ACCESS_TOKEN');
// If you are in a sandbox account, you must pass in 'sandbox' as a second argument in the new instance:
const tradier = new Tradier('TRADIER_ACCESS_TOKEN', 'sandbox');
// Get current stock quotes
tradier
.quote('AAPL') // For multiple quotes, separate tickers with a comma: .quote('AAPL,KO,S')
.then(quote => {
console.log(`
Symbol: ${quote.symbol}
Volume: ${quote.volume}
Open: ${quote.open}
High: ${quote.high}
Low: ${quote.low}
Close: ${quote.close}
Previous: ${quote.prevclose}
`);
})
.catch(error => {
console.log(error);
})
tradier
.quote('AAPL') // For multiple quotes: .quote('AAPL,KO,S')
.then(quote => {
console.log(quote)
})
.catch(error => {
console.log(error);
})
tradier
.timesales('AAPL')
.then(ts => {
console.log(ts)
})
.catch(error => {
console.log(error);
})
tradier
.optionchain('AAPL')
.then(oc => {
console.log(oc)
})
.catch(error => {
console.log(error);
})
tradier
.optionstrikes('AAPL')
.then(os => {
console.log(os)
})
.catch(error => {
console.log(error);
})
tradier
.optionexpirations('AAPL')
.then(oe => {
console.log(oe)
})
.catch(error => {
console.log(error);
})
tradier
.historical('AAPL')
.then(history => {
console.log(history)
})
.catch(error => {
console.log(error);
})
});
/* returns an array of objects
{ day:
[ { date: '2017-01-03',
open: 115.8,
high: 116.33,
low: 114.76,
close: 116.15,
volume: 28781865 }...
]
*/
tradier
.intradaystatus()
.then(intraday => {
console.log(intraday)
})
.catch(error => {
console.log(error);
})
tradier
.marketcalendar()
.then(mc => {
console.log(mc)
})
.catch(error => {
console.log(error);
})
tradier
.companysearch('AAPL')
.then(cs => {
console.log(cs)
})
.catch(error => {
console.log(error);
})
tradier
.getCompanyInfo('AAPL')
.then(ci => {
console.log(ci)
})
.catch(error => {
console.log(error);
})
tradier
.getCorporateCalendar('AAPL')
.then(cc => {
console.log(cc)
})
.catch(error => {
console.log(error);
})
tradier
.getDividendInfo('AAPL')
.then(di => {
console.log(di)
})
.catch(error => {
console.log(error);
})
tradier
.getCorporateActions('AAPL')
.then(ca => {
console.log(ca)
})
.catch(error => {
console.log(error);
})
tradier
.getRatios('AAPL')
.then(ratios => {
console.log(ratios)
})
.catch(error => {
console.log(error);
})
tradier
.getCorporateFinancials('AAPL')
.then(cf => {
console.log(cf)
})
.catch(error => {
console.log(error);
})
tradier
.getPriceStats('AAPL')
.then(ps => {
console.log(ps)
})
.catch(error => {
console.log(error);
})
Note: At least one of the following parameters is required: q, exchanges, types
const params = {
q: 'goo',
exchanges: ['Q', 'N'],
types: ['stock', 'etf'],
};
tradier
.lookup(params)
.then(symbols => {
console.log(symbols)
})
.catch(error => {
console.log(error);
})
API Endpoints used include:
Sandbox: https://sandbox.tradier.com/v1/
API: https://api.tradier.com/v1/
Beta: https://api.tradier.com/beta/
Feel free to suggest new features, open an issue or submit a pull request.
FAQs
Node API wrapper for the Tradier API
The npm package @smurftheweb/tradier-client receives a total of 1 weekly downloads. As such, @smurftheweb/tradier-client popularity was classified as not popular.
We found that @smurftheweb/tradier-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.