Download the PHP package polygon-io/api without Composer

On this page you can find all versions of the php package polygon-io/api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package api

Polygon PHP Client - RESTful APIs

Welcome to the official PHP client library for the Polygon REST and WebSocket API. To get started, please see the Getting Started section in our documentation, view the Model documentation to learn more about the data structures.

This version is an experimental release and is under active development. We are working to add more features and improve its stability and performance. Please be aware that this version might undergo significant changes, and some functionality may be incomplete or subject to modification.

Roadmap Features

Installation & Usage

Prerequisites

Before installing the Polygon PHP client, ensure your environment has PHP 7.4 or higher, compatible with PHP 8.0.

Composer

To install the bindings via Composer, add the following to composer.json:

Then run composer install

Manual Installation

Download the files and include autoload.php:

Getting Started

To get started, please follow the Model documentation to learn more about the data structures.

The free tier of our API comes with usage limitations, which might lead to rate limit errors if these limits are exceeded. For uninterrupted access and to support larger data requirements, we recommend reviewing our subscription plans, which are tailored for a wide range of needs from development to high-demand enterprise applications. Visit our pricing page for detailed information on limits and features to ensure a seamless experience, especially for real-time data processing.

REST API Client

Import and configure the OpenAPI Client.

Using the Client

Request data using client methods.

API Endpoints

All URIs are relative to api.polygon.io:

Class Method HTTP request Description
CrpytoaggregatesApi cryptoEMA GET /v1/indicators/ema/{cryptoTicker} Exponential Moving Average (EMA)
CrpytoaggregatesApi cryptoRSI GET /v1/indicators/rsi/{cryptoTicker} Relative Strength Index (RSI)
CrpytoaggregatesApi cryptoSMA GET /v1/indicators/sma/{cryptoTicker} Simple Moving Average (SMA)
CryptoaggregatesApi cryptoMACD GET /v1/indicators/macd/{cryptoTicker} Moving Average Convergence/Divergence (MACD)
CryptoaggregatesApi v2AggsGroupedLocaleGlobalMarketCryptoDateGet GET /v2/aggs/grouped/locale/global/market/crypto/{date} Grouped Daily (Bars)
CryptoaggregatesApi v2AggsTickerCryptoTickerPrevGet GET /v2/aggs/ticker/{cryptoTicker}/prev Previous Close
CryptoaggregatesApi v2AggsTickerCryptoTickerRangeMultiplierTimespanFromToGet GET /v2/aggs/ticker/{cryptoTicker}/range/{multiplier}/{timespan}/{from}/{to} Aggregates (Bars)
CryptolasttradeApi lastTradeCrypto GET /v1/last/crypto/{from}/{to} Last Trade for a Crypto Pair
CryptoopenCloseApi v1OpenCloseCryptoFromToDateGet GET /v1/open-close/crypto/{from}/{to}/{date} Daily Open/Close
CryptosnapshotApi v2SnapshotLocaleGlobalMarketsCryptoDirectionGet GET /v2/snapshot/locale/global/markets/crypto/{direction} Gainers/Losers
CryptosnapshotApi v2SnapshotLocaleGlobalMarketsCryptoTickersGet GET /v2/snapshot/locale/global/markets/crypto/tickers All Tickers
CryptosnapshotApi v2SnapshotLocaleGlobalMarketsCryptoTickersTickerBookGet GET /v2/snapshot/locale/global/markets/crypto/tickers/{ticker}/book Ticker Full Book (L2)
CryptosnapshotApi v2SnapshotLocaleGlobalMarketsCryptoTickersTickerGet GET /v2/snapshot/locale/global/markets/crypto/tickers/{ticker} Ticker
CryptotradesApi tradesCrypto GET /v3/trades/{cryptoTicker} Trades
CryptotradesApi v1HistoricCryptoFromToDateGet GET /v1/historic/crypto/{from}/{to}/{date} Historic Crypto Trades
DefaultApi snapshotSummary GET /v1/summaries Summaries
DefaultApi snapshots GET /v3/snapshot Universal Snapshot
FxaggregatesApi forexEMA GET /v1/indicators/ema/{fxTicker} Exponential Moving Average (EMA)
FxaggregatesApi forexMACD GET /v1/indicators/macd/{fxTicker} Moving Average Convergence/Divergence (MACD)
FxaggregatesApi forexRSI GET /v1/indicators/rsi/{fxTicker} Relative Strength Index (RSI)
FxaggregatesApi forexSMA GET /v1/indicators/sma/{fxTicker} Simple Moving Average (SMA)
FxaggregatesApi v2AggsGroupedLocaleGlobalMarketFxDateGet GET /v2/aggs/grouped/locale/global/market/fx/{date} Grouped Daily (Bars)
FxaggregatesApi v2AggsTickerForexTickerPrevGet GET /v2/aggs/ticker/{forexTicker}/prev Previous Close
FxaggregatesApi v2AggsTickerForexTickerRangeMultiplierTimespanFromToGet GET /v2/aggs/ticker/{forexTicker}/range/{multiplier}/{timespan}/{from}/{to} Aggregates (Bars)
FxconversionApi realTimeCurrencyConversion GET /v1/conversion/{from}/{to} Real-time Currency Conversion
FxlastquoteApi lastQuoteCurrencies GET /v1/last_quote/currencies/{from}/{to} Last Quote for a Currency Pair
FxquotesApi quotesFx GET /v3/quotes/{fxTicker} Quotes (BBO)
FxsnapshotApi v2SnapshotLocaleGlobalMarketsForexDirectionGet GET /v2/snapshot/locale/global/markets/forex/{direction} Gainers/Losers
FxsnapshotApi v2SnapshotLocaleGlobalMarketsForexTickersGet GET /v2/snapshot/locale/global/markets/forex/tickers All Tickers
FxsnapshotApi v2SnapshotLocaleGlobalMarketsForexTickersTickerGet GET /v2/snapshot/locale/global/markets/forex/tickers/{ticker} Ticker
FxtradesApi v1HistoricForexFromToDateGet GET /v1/historic/forex/{from}/{to}/{date} Historic Forex Ticks
IndicesaggregatesApi indicesEMA GET /v1/indicators/ema/{indicesTicker} Exponential Moving Average (EMA)
IndicesaggregatesApi indicesMACD GET /v1/indicators/macd/{indicesTicker} Moving Average Convergence/Divergence (MACD)
IndicesaggregatesApi indicesRSI GET /v1/indicators/rsi/{indicesTicker} Relative Strength Index (RSI)
IndicesaggregatesApi indicesSMA GET /v1/indicators/sma/{indicesTicker} Simple Moving Average (SMA)
IndicesaggregatesApi v2AggsTickerIndicesTickerPrevGet GET /v2/aggs/ticker/{indicesTicker}/prev Previous Close
IndicesaggregatesApi v2AggsTickerIndicesTickerRangeMultiplierTimespanFromToGet GET /v2/aggs/ticker/{indicesTicker}/range/{multiplier}/{timespan}/{from}/{to} Aggregates (Bars)
IndicessnapshotApi indicesSnapshot GET /v3/snapshot/indices Indices Snapshot
InternalApi listTickerTaxonomyClassifications GET /vX/reference/tickers/taxonomies Ticker Taxonomies
OptionsaggregatesApi optionsEMA GET /v1/indicators/ema/{optionsTicker} Exponential Moving Average (EMA)
OptionsaggregatesApi optionsMACD GET /v1/indicators/macd/{optionsTicker} Moving Average Convergence/Divergence (MACD)
OptionsaggregatesApi optionsRSI GET /v1/indicators/rsi/{optionsTicker} Relative Strength Index (RSI)
OptionsaggregatesApi optionsSMA GET /v1/indicators/sma/{optionsTicker} Simple Moving Average (SMA)
OptionsaggregatesApi v2AggsTickerOptionsTickerPrevGet GET /v2/aggs/ticker/{optionsTicker}/prev Previous Close
OptionsaggregatesApi v2AggsTickerOptionsTickerRangeMultiplierTimespanFromToGet GET /v2/aggs/ticker/{optionsTicker}/range/{multiplier}/{timespan}/{from}/{to} Aggregates (Bars)
OptionslasttradeApi lastTradeOptions GET /v2/last/trade/{optionsTicker} Last Trade
OptionsopenCloseApi v1OpenCloseOptionsTickerDateGet GET /v1/open-close/{optionsTicker}/{date} Daily Open/Close
OptionsquotesApi quotesOptions GET /v3/quotes/{optionsTicker} Quotes
OptionssnapshotApi optionContract GET /v3/snapshot/options/{underlyingAsset}/{optionContract} Option Contract
OptionssnapshotApi optionsChain GET /v3/snapshot/options/{underlyingAsset} Options Chain
OptionstradesApi tradesOptions GET /v3/trades/{optionsTicker} Trades
PublicApi listTickerTaxonomyClassifications GET /vX/reference/tickers/taxonomies Ticker Taxonomies
ReferenceconditionsApi listConditions GET /v3/reference/conditions Conditions
ReferencedividendsApi listDividends GET /v3/reference/dividends Dividends v3
ReferenceexchangesApi listExchanges GET /v3/reference/exchanges Exchanges
ReferencenewsApi listNews GET /v2/reference/news Ticker News
ReferenceoptionscontractApi getOptionsContract GET /v3/reference/options/contracts/{options_ticker} Options Contract
ReferenceoptionscontractslistApi listOptionsContracts GET /v3/reference/options/contracts Options Contracts
ReferencesecfilingApi getFiling GET /v1/reference/sec/filings/{filing_id} SEC Filing
ReferencesecfilingfileApi getFilingFile GET /v1/reference/sec/filings/{filing_id}/files/{file_id} SEC Filing File
ReferencesecfilingfilesApi listFilingFiles GET /v1/reference/sec/filings/{filing_id}/files SEC Filing Files
ReferencesecfilingsApi listFilings GET /v1/reference/sec/filings SEC Filings
ReferencestocksApi listFinancials GET /vX/reference/financials Stock Financials vX
ReferencestocksApi listStockSplits GET /v3/reference/splits Stock Splits v3
ReferencestocksmarketApi getMarketHolidays GET /v1/marketstatus/upcoming Market Holidays
ReferencestocksmarketApi getMarketStatus GET /v1/marketstatus/now Market Status
ReferencetickersgetApi getEvents GET /vX/reference/tickers/{id}/events Ticker Events
ReferencetickersgetApi getTicker GET /v3/reference/tickers/{ticker} Ticker Details v3
ReferencetickerslistApi listTickers GET /v3/reference/tickers Tickers
ReferencetickerstypesApi listTickerTypes GET /v3/reference/tickers/types Ticker Types
StocksaggregatesApi eMA GET /v1/indicators/ema/{stockTicker} Exponential Moving Average (EMA)
StocksaggregatesApi mACD GET /v1/indicators/macd/{stockTicker} Moving Average Convergence/Divergence (MACD)
StocksaggregatesApi rSI GET /v1/indicators/rsi/{stockTicker} Relative Strength Index (RSI)
StocksaggregatesApi sMA GET /v1/indicators/sma/{stockTicker} Simple Moving Average (SMA)
StocksaggregatesApi v2AggsGroupedLocaleUsMarketStocksDateGet GET /v2/aggs/grouped/locale/us/market/stocks/{date} Grouped Daily (Bars)
StocksaggregatesApi v2AggsTickerStocksTickerPrevGet GET /v2/aggs/ticker/{stocksTicker}/prev Previous Close
StocksaggregatesApi v2AggsTickerStocksTickerRangeMultiplierTimespanFromToGet GET /v2/aggs/ticker/{stocksTicker}/range/{multiplier}/{timespan}/{from}/{to} Aggregates (Bars)
StockslastquoteApi lastQuote GET /v2/last/nbbo/{stocksTicker} Last Quote
StockslasttradeApi lastTrade GET /v2/last/trade/{stocksTicker} Last Trade
StocksopenCloseApi v1OpenCloseIndicesTickerDateGet GET /v1/open-close/{indicesTicker}/{date} Daily Open/Close
StocksopenCloseApi v1OpenCloseStocksTickerDateGet GET /v1/open-close/{stocksTicker}/{date} Daily Open/Close
StocksquotesApi quotes GET /v3/quotes/{stockTicker} Quotes (NBBO)
StocksquotesApi v2TicksStocksNbboTickerDateGet GET /v2/ticks/stocks/nbbo/{ticker}/{date} Quotes (NBBO)
StockssnapshotApi v2SnapshotLocaleUsMarketsStocksDirectionGet GET /v2/snapshot/locale/us/markets/stocks/{direction} Gainers/Losers
StockssnapshotApi v2SnapshotLocaleUsMarketsStocksTickersGet GET /v2/snapshot/locale/us/markets/stocks/tickers All Tickers
StockssnapshotApi v2SnapshotLocaleUsMarketsStocksTickersStocksTickerGet GET /v2/snapshot/locale/us/markets/stocks/tickers/{stocksTicker} Ticker
StockstradesApi trades GET /v3/trades/{stockTicker} Trades
StockstradesApi v2TicksStocksTradesTickerDateGet GET /v2/ticks/stocks/trades/{ticker}/{date} Trades

Contributing

If you found a bug or have an idea for a new feature, please first discuss it with us by submitting a new issue. We are also open to volunteers willing to submit PRs for any open issues but please discuss it with us beforehand.

Development

For developing new features or fixing bugs, you will need to manage dependencies using Composer.

To run tests, use:

This PHP client follows the same release cadence as our API, ensuring it remains compatible with new and deprecated features.


All versions of api with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2.5
ext-json Version *
guzzlehttp/guzzle Version ^7.2.0
amphp/websocket-client Version ^0.2.4
psr/http-client Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package polygon-io/api contains the following files

Loading the files please wait ....