iexjs
    TypeScript icon, indicating that this package has built-in type declarations

    0.4.0 • Public • Published

    JavaScript interface to IEX Cloud

    Build Status License npm

    Referral

    Please subscribe to IEX Cloud using this referral code.

    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 and 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

    const {chart} = require("iexjs");
    chart("AAPL", "1m", token, version).then((res) => {
        console.log(res);
    });

    Since the token rarely changes, we have a Client object for convenience:

    const {Client} = require("iexjs");
    const client = new Client({api_token: "YOUR_TOKEN_HERE", version: "v1"});
    client.chart("AAPL", "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.

    License

    This software is licensed under the Apache 2.0 license. See the LICENSE and AUTHORS files for details.

    Keywords

    none

    Install

    npm i iexjs

    DownloadsWeekly Downloads

    337

    Version

    0.4.0

    License

    Apache-2.0

    Unpacked Size

    2.76 MB

    Total Files

    7

    Last publish

    Collaborators

    • timkpaine