PHPackages                             tmarois/polygon-php-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. tmarois/polygon-php-sdk

AbandonedArchivedPackage[API Development](/categories/api)

tmarois/polygon-php-sdk
=======================

PHP SDK for the Polygon Market API

v1.3.1(5y ago)150[1 issues](https://github.com/tmarois/polygon-php-sdk/issues)PHPPHP &gt;=7

Since Oct 12Pushed 5y ago1 watchersCompare

[ Source](https://github.com/tmarois/polygon-php-sdk)[ Packagist](https://packagist.org/packages/tmarois/polygon-php-sdk)[ Docs](https://github.com/tmarois/polygon-php-sdk)[ RSS](/packages/tmarois-polygon-php-sdk/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (3)Versions (6)Used By (0)

Polygon Market PHP SDK
======================

[](#polygon-market-php-sdk)

This package acts as the PHP SDK for the [Polygon RESTful API](https://polygon.io/docs/#getting-started).

Installation
------------

[](#installation)

Use [Composer](http://getcomposer.org/) to install package.

Run `composer require tmarois/polygon-php-sdk:^1.0`

Getting Started
---------------

[](#getting-started)

First you need to instantiate the `Polygon` object.

```
use Polygon\Polygon;

$polygon = new Polygon("YOUR_API_KEY");
```

Example Usage
-------------

[](#example-usage)

**[Stock Snapshot](https://polygon.io/docs/#!/Stocks--Equities/get_v2_snapshot_locale_us_markets_stocks_tickers_ticker)**: Get the snapshot of a stock for the given day.

This includes the last trade, last quote, previous day and current day of data.

```
$response = $polygon->stocks()->getSnapshot('AAPL');
```

**[Stock Details](https://polygon.io/docs/#!/Reference/get_v1_meta_symbols_symbol_company)**: Get the details of the symbol company/entity.

```
$response = $polygon->stocks()->getDetails('AAPL');
```

**[Stock News](https://polygon.io/docs/#!/Reference/get_v1_meta_symbols_symbol_company)**: Get the details of the symbol company/entity.

```
$response = $polygon->stocks()->getNews('AAPL', 1, 20);
```

**[Last Trade](https://polygon.io/docs/#!/Stocks--Equities/get_v1_last_stocks_symbol)**: Get the last trade for a given stock.

```
$response = $polygon->stocks()->getLastTrade('AAPL');
```

**[Last Quote](https://polygon.io/docs/#!/Stocks--Equities/get_v1_last_quote_stocks_symbol)**: Get the last quote for a given stock.

```
$response = $polygon->stocks()->getLastQuote('AAPL');
```

**[Trade History](https://polygon.io/docs/#!/Stocks--Equities/get_v2_ticks_stocks_trades_ticker_date)**: Get historic trades for a ticker.

```
$response = $polygon->stocks()->getTradeHistory('AAPL','2019-09-25',$limit = 100, $timestampOffset = 0);
```

**[Quote History](https://polygon.io/docs/#!/Stocks--Equities/get_v2_ticks_stocks_nbbo_ticker_date)**: Get historic NBBO quotes for a ticker.

```
$response = $polygon->stocks()->getQuoteHistory('AAPL','2019-09-25',$limit = 100, $timestampOffset = 0);
```

There are more in the [Polygon Documentation](https://polygon.io/docs/#getting-started) than what is presented above, if you want to extend this, please send in a pull request or request features you'd like to see added. Thanks!

Contributions
-------------

[](#contributions)

Anyone can contribute to **polygon-php-sdk**. Please do so by posting issues when you've found something that is unexpected or sending a pull request for improvements.

License
-------

[](#license)

**polygon-php-sdk** (This Repository) is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

This SDK has no affiliation with Polygon.io, Inc and acts as an unofficial SDK designed to be a simple solution with using PHP applications. Use at your own risk. If you have any issues with the SDK please submit an issue or pull request.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~57 days

Total

5

Last Release

2172d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fb2a1c2cd3f429541c1151da87ffedea46ff881b554626520b4e090b270bf5fc?d=identicon)[timothymarois](/maintainers/timothymarois)

---

Top Contributors

[![timothymarois](https://avatars.githubusercontent.com/u/2489333?v=4)](https://github.com/timothymarois "timothymarois (13 commits)")

---

Tags

marketdatapolygonpolygon-php-sdkpolygonioquotesdkstockapiPolygonmarketstocksstock-marketmarket api

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tmarois-polygon-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/tmarois-polygon-php-sdk/health.svg)](https://phpackages.com/packages/tmarois-polygon-php-sdk)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[get-stream/stream-chat

A PHP client for Stream Chat (https://getstream.io/chat/)

301.8M2](/packages/get-stream-stream-chat)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[asil/vkmarket

The PHP library for work with VK Market API

235.1k](/packages/asil-vkmarket)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
