# tradier-api

> Node.js library for the Tradier API

Latest version **0.1.0** (published 2019-03-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install tradier-api
pnpm add tradier-api
yarn add tradier-api
bun add tradier-api
```

Provides the command `tradier`.

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2019-03-24 |
| First published | 2019-03-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 64.1 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Mike Cao |
| Maintainers | mikecao |
| Keywords | tradier, api, trading, stocks |

## Links

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

## Dependencies (4)

- [axios](https://npm.io/package/axios.md) ^0.18.0
- [yargs](https://npm.io/package/yargs.md) ^13.2.2
- [dotenv](https://npm.io/package/dotenv.md) ^7.0.0
- [ensure-array](https://npm.io/package/ensure-array.md) ^1.0.0

## Recent versions

- 0.1.0 (latest) — 2019-03-24

## README

# 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
```javascript
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);
  });
```

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