WIP
To Do:
- CSV support
- WebSocket support
- Better documentation
- environment variable support for apikey
First initialize
const tiingo = new Tiingo(apiKey);
Tiingo documentation for End-of-Day
Latest end of day price request.
const nvda = await tiingo.eod({
ticker: "NVDA",
});
console.log(await nvda.json());
A more complex request with historical data
// get the ticker NVDA, with weekly prices from July 30th thru August 14th
// only returning high and low columns (date is alwaays returned)
// see the Tiingo documentation for more detail about frequency
const nvda = await tiingo.eod({
ticker: "NVDA",
freq: "weekly",
startDate: "2021-07-30",
endDate: "2021-08-13",
columns: ["high", "low"],
});
console.log(await nvda.json());
Tiingo documentation for Meta Information
Get information about a ticker Tiingo supports
const nvda = await tiingo.ticker_meta('NVDA');
console.log(await nvda.json());