Skip to content

Latest commit

 

History

History
57 lines (42 loc) · 1.19 KB

README.md

File metadata and controls

57 lines (42 loc) · 1.19 KB

Tiingo API client for Deno

WIP

To Do:

  • CSV support
  • WebSocket support
  • Better documentation
  • environment variable support for apikey

Usage

First initialize

const tiingo = new Tiingo(apiKey);

End of Day Endpoint Examples

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());

Meta Information Endpoint Example

Tiingo documentation for Meta Information

Get information about a ticker Tiingo supports

const nvda = await tiingo.ticker_meta('NVDA');

console.log(await nvda.json());