Skip to content

Commit a1a8cd0

Browse files
Rebrand massive (#953)
* Rebrand client to massive.com
1 parent 082cd98 commit a1a8cd0

File tree

243 files changed

+1985
-1965
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

243 files changed

+1985
-1965
lines changed

.github/workflows/release.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,41 @@ on:
66
permissions:
77
contents: read
88
jobs:
9-
test:
9+
release:
1010
runs-on: ubuntu-latest
1111
name: Release to PyPi
1212
steps:
1313
- uses: actions/checkout@v3
14+
- name: Fetch all branches
15+
run: git fetch --prune --unshallow
16+
- name: Check if commit is on allowed branch
17+
run: |
18+
if git branch -r --contains ${{ github.sha }} | grep -Eq 'origin/master|origin/polygon-lts'; then
19+
echo "Allowed branch"
20+
else
21+
echo "Commit not on master or polygon-lts; skipping"
22+
exit 1
23+
fi
1424
- name: Setup Python
1525
uses: actions/setup-python@v3
1626
with:
1727
python-version: "3.10"
1828
- name: Setup Poetry
1929
uses: abatilo/actions-poetry@v2
30+
- name: Get package name
31+
id: package
32+
run: echo "name=$(poetry run python -c 'import toml; print(toml.load(\"pyproject.toml\")[\"tool\"][\"poetry\"][\"name\"])')" >> $GITHUB_OUTPUT
2033
- name: Configure Poetry
21-
run: poetry config pypi-token.pypi ${{ secrets.POETRY_HTTP_BASIC_PYPI_PASSWORD }}
22-
- name: Install pypi deps
34+
run: |
35+
if [ "${{ steps.package.outputs.name }}" == "polygon-api-client" ]; then
36+
poetry config pypi-token.pypi ${{ secrets.POETRY_HTTP_BASIC_PYPI_PASSWORD }}
37+
elif [ "${{ steps.package.outputs.name }}" == "massive" ]; then
38+
poetry config pypi-token.pypi ${{ secrets.POETRY_HTTP_BASIC_PYPI_PASSWORD_MASSIVE }}
39+
else
40+
echo "Unknown package name: ${{ steps.package.outputs.name }}; skipping publish"
41+
exit 1
42+
fi
43+
- name: Install deps
2344
run: poetry install
2445
- name: Get tag
2546
id: tag

.polygon/rest.json renamed to .massive/rest.json

Lines changed: 834 additions & 834 deletions
Large diffs are not rendered by default.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import urllib.request
22
import json
33

4-
contents = urllib.request.urlopen("https://api.polygon.io/openapi").read()
4+
contents = urllib.request.urlopen("https://api.massive.com/openapi").read()
55
parsed = json.loads(contents)
66
formatted = json.dumps(parsed, indent=2)
7-
with open(".polygon/rest.json", "w") as f:
7+
with open(".massive/rest.json", "w") as f:
88
f.write(formatted)

.polygon/websocket.json renamed to .massive/websocket.json

Lines changed: 181 additions & 181 deletions
Large diffs are not rendered by default.

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,22 @@ help:
2222

2323
## Check code style
2424
style:
25-
poetry run black $(if $(CI),--check,) polygon test_* examples
25+
poetry run black $(if $(CI),--check,) massive test_* examples
2626

2727
## Check static types
2828
static:
29-
poetry run mypy polygon test_* examples
29+
poetry run mypy massive test_* examples
3030

3131
## Check code style and static types
3232
lint: style static
3333

3434
## Update the REST API spec
3535
rest-spec:
36-
poetry run python .polygon/rest.py
36+
poetry run python .massive/rest.py
3737

3838
## Update the WebSocket API spec
3939
ws-spec:
40-
curl https://api.polygon.io/specs/websocket.json > .polygon/websocket.json
40+
curl https://api.massive.io/specs/websocket.json > .massive/websocket.json
4141

4242
test_rest:
4343
poetry run python -m unittest discover -s test_rest

README.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
1-
[![PyPI version](https://badge.fury.io/py/polygon-api-client.svg)](https://badge.fury.io/py/polygon-api-client)
2-
[![Docs](https://readthedocs.org/projects/polygon-api-client/badge/?version=latest)](https://polygon-api-client.readthedocs.io/en/latest/)
1+
# Massive (formerly Polygon.io) Python Client - WebSocket & RESTful APIs
32

4-
# Polygon Python Client - WebSocket & RESTful APIs
3+
Welcome to the official Python client library for the [Massive](https://massive.io/) REST and WebSocket API. To get started, please see the [Getting Started](https://massive.io/docs/stocks/getting-started) section in our documentation, view the [examples](./examples/) directory for code snippets.
54

6-
Welcome to the official Python client library for the [Polygon](https://polygon.io/) REST and WebSocket API. To get started, please see the [Getting Started](https://polygon.io/docs/stocks/getting-started) section in our documentation, view the [examples](./examples/) directory for code snippets, or the [blog post](https://polygon.io/blog/polygon-io-with-python-for-stock-market-data/) with video tutorials to learn more.
5+
**Note:** Polygon.io has rebranded as [Massive.com](https://massive.com) on Oct 30, 2025. Existing API keys, accounts, and integrations continue to work exactly as before. The only change in this SDK is that it now defaults to the new API base at `api.massive.com`, while `api.polygon.io` remains supported for an extended period.
6+
7+
For details, see our [rebrand announcement blog post](https://massive.com/blog/polygon-is-now-massive/) or open an issue / contact [[email protected]](mailto:[email protected]) if you have questions.
78

89
## Prerequisites
910

10-
Before installing the Polygon Python client, ensure your environment has Python 3.9 or higher.
11+
Before installing the Massive Python client, ensure your environment has Python 3.9 or higher.
1112

1213
## Install
1314

1415
Please use pip to install or update to the latest stable version.
1516
```
16-
pip install -U polygon-api-client
17+
pip install -U massive
1718
```
1819

1920
## Getting started
2021

21-
To get started, please see the [Getting Started](https://polygon-api-client.readthedocs.io/en/latest/Getting-Started.html) section in our docs, view the [examples](./examples) directory for code snippets, or view the [blog post with videos](https://polygon.io/blog/polygon-io-with-python-for-stock-market-data/) to learn more.
22+
To get started, please see the [Getting Started](https://massive.io/docs/stocks/getting-started) section in our docs, view the [examples](./examples) directory for code snippets.
2223

23-
The free tier of our API comes with usage limitations, potentially leading to rate limit errors if these are exceeded. For uninterrupted access and to support larger data requirements, we recommend reviewing our [subscription plans](https://polygon.io/pricing), which are tailored for a wide range of needs from development to high-demand applications. Refer to our pricing page for detailed information on limits and features to ensure a seamless experience, especially for real-time data processing.
24+
The free tier of our API comes with usage limitations, potentially leading to rate limit errors if these are exceeded. For uninterrupted access and to support larger data requirements, we recommend reviewing our [subscription plans](https://massive.io/pricing), which are tailored for a wide range of needs from development to high-demand applications. Refer to our pricing page for detailed information on limits and features to ensure a seamless experience, especially for real-time data processing.
2425

2526
## REST API Client
2627
Import the RESTClient.
2728
```python
28-
from polygon import RESTClient
29+
from massive import RESTClient
2930
```
30-
Create a new client with your [API key](https://polygon.io/dashboard/api-keys)
31+
Create a new client with your [API key](https://massive.io/dashboard/api-keys)
3132
```python
3233
client = RESTClient(api_key="<API_KEY>")
3334
```
@@ -147,8 +148,8 @@ When debug mode is enabled, the client will print out useful debugging informati
147148
For instance, if you made a request for `TSLA` data for the date `2023-08-01`, you would see debug output similar to the following:
148149

149150
```
150-
Request URL: https://api.polygon.io/v2/aggs/ticker/TSLA/range/1/minute/2023-08-01/2023-08-01?limit=50000
151-
Request Headers: {'Authorization': 'Bearer REDACTED', 'Accept-Encoding': 'gzip', 'User-Agent': 'Polygon.io PythonClient/1.12.4'}
151+
Request URL: https://api.massive.io/v2/aggs/ticker/TSLA/range/1/minute/2023-08-01/2023-08-01?limit=50000
152+
Request Headers: {'Authorization': 'Bearer REDACTED', 'Accept-Encoding': 'gzip', 'User-Agent': 'Massive.com PythonClient/1.12.4'}
152153
Response Headers: {'Server': 'nginx/1.19.2', 'Date': 'Tue, 05 Sep 2023 23:07:02 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Content-Encoding': 'gzip', 'Vary': 'Accept-Encoding', 'X-Request-Id': '727c82feed3790b44084c3f4cae1d7d4', 'Strict-Transport-Security': 'max-age=15724800; includeSubDomains'}
153154
```
154155

@@ -158,12 +159,12 @@ This can be an invaluable tool for debugging issues or understanding how the cli
158159

159160
Import classes
160161
```python
161-
from polygon import WebSocketClient
162-
from polygon.websocket.models import WebSocketMessage
162+
from massive import WebSocketClient
163+
from massive.websocket.models import WebSocketMessage
163164
from typing import List
164165
```
165166
### Using the client
166-
Create a new client with your [API key](https://polygon.io/dashboard/api-keys) and subscription options.
167+
Create a new client with your [API key](https://massive.io/dashboard/api-keys) and subscription options.
167168
```python
168169
# Note: Multiple subscriptions can be added to the array
169170
# For example, if you want to subscribe to AAPL and META,
@@ -179,18 +180,16 @@ def handle_msg(msg: List[WebSocketMessage]):
179180

180181
ws.run(handle_msg=handle_msg)
181182
```
182-
Check out more detailed examples [here](https://github.com/polygon-io/client-python/tree/master/examples/websocket).
183+
Check out more detailed examples [here](https://github.com/massive-com/client-python/tree/master/examples/websocket).
183184

184185
## Contributing
185186

186187
If you found a bug or have an idea for a new feature, please first discuss it with us by
187-
[submitting a new issue](https://github.com/polygon-io/client-python/issues/new/choose).
188+
[submitting a new issue](https://github.com/massive-com/client-python/issues/new/choose).
188189
We will respond to issues within at most 3 weeks.
189190
We're also open to volunteers if you want to submit a PR for any open issues but
190191
please discuss it with us beforehand. PRs that aren't linked to an existing issue or
191-
discussed with us ahead of time will generally be declined. If you have more general
192-
feedback or want to discuss using this client with other users, feel free to reach out
193-
on our [Slack channel](https://polygon-io.slack.com/archives/C03FRFN7UF3).
192+
discussed with us ahead of time will generally be declined.
194193

195194
### Development
196195

docs/source/Aggs.rst

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ List aggs
1212
- `Forex aggs`_
1313
- `Crypto aggs`_
1414

15-
.. automethod:: polygon.RESTClient.list_aggs
15+
.. automethod:: massive.RESTClient.list_aggs
1616

1717
===========
1818
Get aggs
@@ -23,7 +23,7 @@ Get aggs
2323
- `Forex aggs`_
2424
- `Crypto aggs`_
2525

26-
.. automethod:: polygon.RESTClient.get_aggs
26+
.. automethod:: massive.RESTClient.get_aggs
2727

2828
============================
2929
Get grouped daily aggs
@@ -33,7 +33,7 @@ Get grouped daily aggs
3333
- `Forex grouped daily aggs`_
3434
- `Crypto grouped daily aggs`_
3535

36-
.. automethod:: polygon.RESTClient.get_grouped_daily_aggs
36+
.. automethod:: massive.RESTClient.get_grouped_daily_aggs
3737

3838
============================
3939
Get daily open close agg
@@ -43,7 +43,7 @@ Get daily open close agg
4343
- `Options daily open/close agg`_
4444
- `Crypto daily open/close agg`_
4545

46-
.. automethod:: polygon.RESTClient.get_daily_open_close_agg
46+
.. automethod:: massive.RESTClient.get_daily_open_close_agg
4747

4848
============================
4949
Get previous close agg
@@ -54,19 +54,19 @@ Get previous close agg
5454
- `Forex previous close agg`_
5555
- `Crypto previous close agg`_
5656

57-
.. automethod:: polygon.RESTClient.get_previous_close_agg
58-
59-
.. _Stocks aggs: https://polygon.io/docs/stocks/get_v2_aggs_ticker__stocksticker__range__multiplier___timespan___from___to
60-
.. _Options aggs: https://polygon.io/docs/options/get_v2_aggs_ticker__optionsticker__range__multiplier___timespan___from___to
61-
.. _Forex aggs: https://polygon.io/docs/forex/get_v2_aggs_ticker__forexticker__range__multiplier___timespan___from___to
62-
.. _Crypto aggs: https://polygon.io/docs/crypto/get_v2_aggs_ticker__cryptoticker__range__multiplier___timespan___from___to
63-
.. _Stocks grouped daily aggs: https://polygon.io/docs/stocks/get_v2_aggs_grouped_locale_us_market_stocks__date
64-
.. _Forex grouped daily aggs: https://polygon.io/docs/forex/get_v2_aggs_grouped_locale_global_market_fx__date
65-
.. _Crypto grouped daily aggs: https://polygon.io/docs/crypto/get_v2_aggs_grouped_locale_global_market_crypto__date
66-
.. _Stocks daily open/close agg: https://polygon.io/docs/stocks/get_v1_open-close__stocksticker___date
67-
.. _Options daily open/close agg: https://polygon.io/docs/options/get_v1_open-close__optionsticker___date
68-
.. _Crypto daily open/close agg: https://polygon.io/docs/crypto/get_v1_open-close_crypto__from___to___date
69-
.. _Stocks previous close agg: https://polygon.io/docs/stocks/get_v2_aggs_ticker__stocksticker__prev
70-
.. _Options previous close agg: https://polygon.io/docs/options/get_v2_aggs_ticker__optionsticker__prev
71-
.. _Forex previous close agg: https://polygon.io/docs/forex/get_v2_aggs_ticker__forexticker__prev
72-
.. _Crypto previous close agg: https://polygon.io/docs/crypto/get_v2_aggs_ticker__cryptoticker__prev
57+
.. automethod:: massive.RESTClient.get_previous_close_agg
58+
59+
.. _Stocks aggs: https://massive.com/docs/stocks/get_v2_aggs_ticker__stocksticker__range__multiplier___timespan___from___to
60+
.. _Options aggs: https://massive.com/docs/options/get_v2_aggs_ticker__optionsticker__range__multiplier___timespan___from___to
61+
.. _Forex aggs: https://massive.com/docs/forex/get_v2_aggs_ticker__forexticker__range__multiplier___timespan___from___to
62+
.. _Crypto aggs: https://massive.com/docs/crypto/get_v2_aggs_ticker__cryptoticker__range__multiplier___timespan___from___to
63+
.. _Stocks grouped daily aggs: https://massive.com/docs/stocks/get_v2_aggs_grouped_locale_us_market_stocks__date
64+
.. _Forex grouped daily aggs: https://massive.com/docs/forex/get_v2_aggs_grouped_locale_global_market_fx__date
65+
.. _Crypto grouped daily aggs: https://massive.com/docs/crypto/get_v2_aggs_grouped_locale_global_market_crypto__date
66+
.. _Stocks daily open/close agg: https://massive.com/docs/stocks/get_v1_open-close__stocksticker___date
67+
.. _Options daily open/close agg: https://massive.com/docs/options/get_v1_open-close__optionsticker___date
68+
.. _Crypto daily open/close agg: https://massive.com/docs/crypto/get_v1_open-close_crypto__from___to___date
69+
.. _Stocks previous close agg: https://massive.com/docs/stocks/get_v2_aggs_ticker__stocksticker__prev
70+
.. _Options previous close agg: https://massive.com/docs/options/get_v2_aggs_ticker__optionsticker__prev
71+
.. _Forex previous close agg: https://massive.com/docs/forex/get_v2_aggs_ticker__forexticker__prev
72+
.. _Crypto previous close agg: https://massive.com/docs/crypto/get_v2_aggs_ticker__cryptoticker__prev

docs/source/Contracts.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ Get option contract
99

1010
- `Options Contract`_
1111

12-
.. automethod:: polygon.RESTClient.get_options_contract
12+
.. automethod:: massive.RESTClient.get_options_contract
1313

1414
=================================
1515
List Options Contracts
1616
=================================
1717

1818
- `Options Contracts`_
1919

20-
.. automethod:: polygon.RESTClient.list_options_contracts
20+
.. automethod:: massive.RESTClient.list_options_contracts
2121

2222

23-
.. _Options Contract: https://polygon.io/docs/options/get_v3_reference_options_contracts__options_ticker
24-
.. _Options Contracts: https://polygon.io/docs/options/get_v3_reference_options_contracts
23+
.. _Options Contract: https://massive.com/docs/options/get_v3_reference_options_contracts__options_ticker
24+
.. _Options Contracts: https://massive.com/docs/options/get_v3_reference_options_contracts

docs/source/Enums.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,97 +6,97 @@ Enums
66
==============================================================
77
Sort
88
==============================================================
9-
.. autoclass:: polygon.rest.models.Sort
9+
.. autoclass:: massive.rest.models.Sort
1010
:members:
1111
:undoc-members:
1212

1313
==============================================================
1414
Order
1515
==============================================================
16-
.. autoclass:: polygon.rest.models.Order
16+
.. autoclass:: massive.rest.models.Order
1717
:members:
1818
:undoc-members:
1919

2020
==============================================================
2121
Locale
2222
==============================================================
23-
.. autoclass:: polygon.rest.models.Locale
23+
.. autoclass:: massive.rest.models.Locale
2424
:members:
2525
:undoc-members:
2626

2727
==============================================================
2828
Market
2929
==============================================================
30-
.. autoclass:: polygon.rest.models.Market
30+
.. autoclass:: massive.rest.models.Market
3131
:members:
3232
:undoc-members:
3333

3434
==============================================================
3535
AssetClass
3636
==============================================================
37-
.. autoclass:: polygon.rest.models.AssetClass
37+
.. autoclass:: massive.rest.models.AssetClass
3838
:members:
3939
:undoc-members:
4040

4141
==============================================================
4242
DividendType
4343
==============================================================
44-
.. autoclass:: polygon.rest.models.DividendType
44+
.. autoclass:: massive.rest.models.DividendType
4545
:members:
4646
:undoc-members:
4747

4848
==============================================================
4949
Frequency
5050
==============================================================
51-
.. autoclass:: polygon.rest.models.Frequency
51+
.. autoclass:: massive.rest.models.Frequency
5252
:members:
5353
:undoc-members:
5454

5555
==============================================================
5656
DataType
5757
==============================================================
58-
.. autoclass:: polygon.rest.models.DataType
58+
.. autoclass:: massive.rest.models.DataType
5959
:members:
6060
:undoc-members:
6161

6262
==============================================================
6363
SIP
6464
==============================================================
65-
.. autoclass:: polygon.rest.models.SIP
65+
.. autoclass:: massive.rest.models.SIP
6666
:members:
6767
:undoc-members:
6868

6969
==============================================================
7070
ExchangeType
7171
==============================================================
72-
.. autoclass:: polygon.rest.models.ExchangeType
72+
.. autoclass:: massive.rest.models.ExchangeType
7373
:members:
7474
:undoc-members:
7575

7676
==============================================================
7777
Direction
7878
==============================================================
79-
.. autoclass:: polygon.rest.models.Direction
79+
.. autoclass:: massive.rest.models.Direction
8080
:members:
8181
:undoc-members:
8282

8383
==============================================================
8484
SnapshotMarketType
8585
==============================================================
86-
.. autoclass:: polygon.rest.models.SnapshotMarketType
86+
.. autoclass:: massive.rest.models.SnapshotMarketType
8787
:members:
8888
:undoc-members:
8989

9090
==============================================================
9191
Timeframe
9292
==============================================================
93-
.. autoclass:: polygon.rest.models.Timeframe
93+
.. autoclass:: massive.rest.models.Timeframe
9494
:members:
9595
:undoc-members:
9696

9797
==============================================================
9898
Precision
9999
==============================================================
100-
.. autoclass:: polygon.rest.models.Precision
100+
.. autoclass:: massive.rest.models.Precision
101101
:members:
102102
:undoc-members:

0 commit comments

Comments
 (0)