https://github.com/tkp-archive/iexjs
Javascript interface to IEX and IEX cloud APIs
https://github.com/tkp-archive/iexjs
algorithmic-trading finance financial-analysis iex javascript stock-data stock-market stocks
Last synced: 8 months ago
JSON representation
Javascript interface to IEX and IEX cloud APIs
- Host: GitHub
- URL: https://github.com/tkp-archive/iexjs
- Owner: tkp-archive
- License: apache-2.0
- Archived: true
- Created: 2021-02-05T05:40:57.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-10T22:44:24.000Z (over 1 year ago)
- Last Synced: 2024-10-02T19:58:50.176Z (about 1 year ago)
- Topics: algorithmic-trading, finance, financial-analysis, iex, javascript, stock-data, stock-market, stocks
- Language: JavaScript
- Homepage:
- Size: 1.67 MB
- Stars: 50
- Watchers: 3
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Authors: AUTHORS
Awesome Lists containing this project
README
# 🚨 This library is no longer actively maintained 🚨
#
JavaScript interface to [IEX Cloud](https://iexcloud.io/docs/api/)
[](https://github.com/timkpaine/iexjs/actions?query=workflow%3A%22Build+Status%22)
[](https://github.com/timkpaine/iexjs/)
[](https://www.npmjs.com/package/iexjs)## Install
Install from npm
`npm install --save iexjs`
`iexjs` can run in the browser via native `fetch` and `eventsource`, or from node via [cross-fetch](https://www.npmjs.com/package/cross-fetch) and [eventsource](https://github.com/EventSource/eventsource).
## Overview
`iexjs` supports the IEX Cloud api through 2 interfaces. The first is a simple function call, passing in the api version and token as arguments
```javascript
const {chart} = require("iexjs");
chart({symbol: "AAPL", range: "1m"}, {token, version}).then((res) => {
console.log(res);
});
```Since the token rarely changes, we have a `Client` object for convenience:
```javascript
const {Client} = require("iexjs");
const client = new Client({api_token: "YOUR_TOKEN_HERE", version: "v1"});
client.chart({symbol: "AAPL", range: "1m"}).then((res) => {
console.log(res);
});
```The client will automatically pick up the API key from the environment variable `IEX_TOKEN`, or it can be passed as an argument. To use the IEX Cloud test environment, simple set `version: 'sandbox'`.
### Full API
`iexjs` provides wrappers around both static and SSE streaming data. Implemented methods are provided in [CATALOG.md](CATALOG.md).## License
This software is licensed under the Apache 2.0 license. See the
[LICENSE](LICENSE) and [AUTHORS](AUTHORS) files for details.