npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@datafire/polygon

v5.0.0

Published

DataFire integration for Polygon

Readme

@datafire/polygon

Client library for Polygon

Installation and Usage

npm install --save @datafire/polygon
let polygon = require('@datafire/polygon').create({
  apiKey: ""
});

.then(data => {
  console.log(data);
});

Description

The future of fintech.

Actions

v1.companies.get

Get a list of the traded companies that polygon.io streams. Company includes some details about the company which we hope to add more to soon.

polygon.v1.companies.get({}, context)

Input

  • input object
    • sort string: Which field to sort by. For desc place a - in front of the field name. eg ?sort=-marketcap
    • perpage number: How many items to be on each page during pagination
    • page number: Which page of results to return

Output

v1.currencies.get

Get a list of the currencies that polygon.io streams.

polygon.v1.currencies.get(null, context)

Input

This action has no parameters

Output

  • output array
    • items string

v1.historic.agg.size.symbol.date.get

Get historic aggregations for a symbol.

polygon.v1.historic.agg.size.symbol.date.get({
  "size": "",
  "symbol": "",
  "date": ""
}, context)

Input

  • input object
    • size required string (values: second, minute): Size of the aggregation. second or minute
    • symbol required string: Symbol of the company to retrieve
    • date required string: Date/Day of the historic ticks to retreive
    • offset integer: Timestamp offset, used for pagination
    • limit integer: Limit the size of response, max: 10000

Output

  • output object
    • day string: Date that was evaluated from the request
    • msLatency integer: Milliseconds of latency for the query results
    • status string: Status of this requests response
    • symbol string: Symbol that was evaluated from the request
    • ticks array

v1.historic.forex.from.to.date.get

Get historic ticks for a currency pair. Example for USD/JPY the from would be USD and to would be JPY. The date formatted like 2017-6-22

polygon.v1.historic.forex.from.to.date.get({
  "from": "",
  "to": "",
  "date": ""
}, context)

Input

  • input object
    • from required string: From Symbol of the currency pair
    • to required string: To Symbol of the currency pair
    • date required string: Date/Day of the historic ticks to retreive
    • offset integer: Timestamp offset, used for pagination
    • limit integer: Limit the size of response, max: 10000

Output

  • output object
    • day string: Date that was evaluated from the request
    • msLatency integer: Milliseconds of latency for the query results
    • status string: Status of this requests response
    • symbol string: Symbol that was evaluated from the request
    • ticks array

v1.historic.quotes.symbol.date.get

Get historic quotes for a symbol.

polygon.v1.historic.quotes.symbol.date.get({
  "symbol": "",
  "date": ""
}, context)

Input

  • input object
    • symbol required string: Symbol of the company to retrieve
    • date required string: Date/Day of the historic ticks to retreive
    • offset integer: Timestamp offset, used for pagination
    • limit integer: Limit the size of response, max: 10000

Output

  • output object
    • day string: Date that was evaluated from the request
    • msLatency integer: Milliseconds of latency for the query results
    • status string: Status of this requests response
    • symbol string: Symbol that was evaluated from the request
    • ticks array

v1.historic.trades.symbol.date.get

Get historic trades for a symbol.

polygon.v1.historic.trades.symbol.date.get({
  "symbol": "",
  "date": ""
}, context)

Input

  • input object
    • symbol required string: Symbol of the company to retrieve
    • date required string: Date/Day of the historic ticks to retreive
    • offset integer: Timestamp offset, used for pagination
    • limit integer: Limit the size of response, max: 10000

Output

  • output object
    • day string: Date that was evaluated from the request
    • msLatency integer: Milliseconds of latency for the query results
    • status string: Status of this requests response
    • symbol string: Symbol that was evaluated from the request
    • ticks array

v1.last.currencies.from.to.get

Get Last Trade Tick for a Currency Pair.

polygon.v1.last.currencies.from.to.get({
  "from": "",
  "to": ""
}, context)

Input

  • input object
    • from required string: From Symbol of the pair
    • to required string: To Symbol of the pair

Output

  • output object
    • last LastForexTrade
    • status string: Status of this requests response
    • symbol string: Symbol Pair that was evaluated from the request

v1.last.stocks.symbol.get

Get the last trade for a given stock.

polygon.v1.last.stocks.symbol.get({
  "symbol": ""
}, context)

Input

  • input object
    • symbol required string: Symbol of the stock to get

Output

  • output object
    • last LastTrade
    • status string: Status of this requests response
    • symbol string: Symbol that was evaluated from the request

v1.last_quote.currencies.from.to.get

Get Last Quote Tick for a Currency Pair.

polygon.v1.last_quote.currencies.from.to.get({
  "from": "",
  "to": ""
}, context)

Input

  • input object
    • from required string: From Symbol of the pair
    • to required string: To Symbol of the pair

Output

  • output object
    • last LastForexQuote
    • status string: Status of this requests response
    • symbol string: Symbol Pair that was evaluated from the request

v1.last_quote.stocks.symbol.get

Get the last quote tick for a given stock.

polygon.v1.last_quote.stocks.symbol.get({
  "symbol": ""
}, context)

Input

  • input object
    • symbol required string: Symbol of the stock to get

Output

  • output object
    • last LastQuote
    • status string: Status of this requests response
    • symbol string: Symbol that was evaluated from the request

Definitions

Aggregate

  • Aggregate object
    • c integer: Close price
    • h integer: High price
    • k integer: Transactions ( 1 transaction contains X shares exchanged )
    • l integer: Low price
    • o integer: Open price
    • t integer: Timestamp of this aggregation
    • v integer: Total Volume of all trades ( total shares exchanged )

Company

  • Company object
    • country string: Country in which this country is based.
    • exchange string: Exchange this company is traded on.
    • industry string: Industry this country operated/produces in.
    • marketcap number: Market cap as of the last updated timestamp.
    • name string: Name of the company.
    • sector string: Sector that this company is traded in.
    • symbol string: The actual exchange symbol this company is traded under.
    • updated string: Last time this company record was updated.

Error

  • Error object
    • code integer
    • fields string
    • message string

Forex

  • Forex object
    • a integer: Ask price
    • b integer: Bid price
    • t integer: Timestamp of this trade

LastForexQuote

  • LastForexQuote object
    • askprice number: Ask Price
    • bidprice number: Bid Price
    • timestamp integer: Timestamp of this trade

LastForexTrade

  • LastForexTrade object
    • exchange integer: Exchange this trade happened on
    • price number: Price of the trade
    • timestamp integer: Timestamp of this trade

LastQuote

  • LastQuote object
    • askexchange integer: Exchange the ask happened on
    • askprice number: Ask Price
    • asksize integer: Ask Size
    • bidexchange integer: Exchange the bid happened on
    • bidprice number: Bid Price
    • bidsize integer: Bid Size
    • cond integer: Condition of the quote
    • timestamp integer: Timestamp of this trade

LastTrade

  • LastTrade object
    • cond1 integer: Condition 1 of the trade
    • cond2 integer: Condition 2 of the trade
    • cond3 integer: Condition 3 of the trade
    • cond4 integer: Condition 4 of the trade
    • exchange integer: Exchange this trade happened on
    • price number: Price of the trade
    • size integer: Size of this trade
    • timestamp integer: Timestamp of this trade

Quote

  • Quote object
    • aE string: Ask Exchange
    • aP number: Ask Price
    • aS integer: Ask Size
    • bE string: Bid Exchange
    • bP number: Bid Price
    • bS integer: Bid Size
    • c integer: Condition of this quote
    • t integer: Timestamp of this trade

Trade

  • Trade object
    • c1 integer: Condition 1 of this trade
    • c2 integer: Condition 2 of this trade
    • c3 integer: Condition 3 of this trade
    • c4 integer: Condition 4 of this trade
    • e string: The exchange this trade happened on
    • p number: Price of this trade
    • s integer: Size of the trade
    • t integer: Timestamp of this trade