Apr 17, 2023
npm install --save @polygon.io/client-js
Additionally, be sure to check out the polygon-io/client-js GitHub repository, which contains 100+ pre-canned example code snippets to help you get started and explore various API functionalities.
Accessing Market Data
Using the Polygon.io APIs, you can access various types of market data, including aggregated bar data, quotes, trades data, snapshots, and technical indicators for selected ticker symbols.
To authenticate your requests, you'll need to use your API key. Here's an example of initializing the REST client with your API key:
Exploring Reference Data Endpoints
Polygon.io's reference data endpoints offer a range of information such as ticker symbols, exchanges, and historical events like stock splits and dividends. Use these endpoints to enrich your existing data and answer questions about market trends.
Retrieve details about a specific ticker and the company behind it:
Streaming Real-Time Data
The Polygon.io Stocks WebSocket API provides real-time and 15-minute delayed data streaming access to stock market data from all US stock exchanges. Streaming data types include aggregates, trades, and quotes for individual stock tickers and across the entire market.
package for handling WebSocket connections. Install the package using the following command:
npm install ws
Next, the following example subscribes to all Aggregate Bars prints them to the console:
Discover the newly launched Universal Snapshots API, a powerful tool providing streamlined and consistent market data across Stocks, Options, Indices, Forex, and Crypto assets, all in one API call - enhancing your market analysis and decision-making process.
Introducing the Polygon plugin for ChatGPT, a powerful tool that simplifies financial research by providing easy access to real-time and historical market data for Stocks, Options, Indices, Forex, and Crypto.
We are excited to announce the launch of the Indices API
endpoints, offering real-time
and historical market data for over 11,400+ Indices, including the S&P 500, Dow
Jones Industrial Average, Nasdaq-100, and the VIX. With access to comprehensive
market data, businesses and individual investors can make informed decisions in
today's rapidly evolving financial markets.
We have brought the same low-latency and developer-centric API design of our