Skip to content

Commit 03e97a2

Browse files
committed
Rebrand client to massive.com
1 parent 082cd98 commit 03e97a2

File tree

242 files changed

+1958
-1963
lines changed

Some content is hidden

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

242 files changed

+1958
-1963
lines changed
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)
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: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,30 @@
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
5-
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.
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.
74

85
## Prerequisites
96

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

129
## Install
1310

1411
Please use pip to install or update to the latest stable version.
1512
```
16-
pip install -U polygon-api-client
13+
pip install -U massive
1714
```
1815

1916
## Getting started
2017

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.
18+
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.
2219

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.
20+
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.
2421

2522
## REST API Client
2623
Import the RESTClient.
2724
```python
28-
from polygon import RESTClient
25+
from massive import RESTClient
2926
```
30-
Create a new client with your [API key](https://polygon.io/dashboard/api-keys)
27+
Create a new client with your [API key](https://massive.io/dashboard/api-keys)
3128
```python
3229
client = RESTClient(api_key="<API_KEY>")
3330
```
@@ -147,8 +144,8 @@ When debug mode is enabled, the client will print out useful debugging informati
147144
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:
148145

149146
```
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'}
147+
Request URL: https://api.massive.io/v2/aggs/ticker/TSLA/range/1/minute/2023-08-01/2023-08-01?limit=50000
148+
Request Headers: {'Authorization': 'Bearer REDACTED', 'Accept-Encoding': 'gzip', 'User-Agent': 'Massive.com PythonClient/1.12.4'}
152149
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'}
153150
```
154151

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

159156
Import classes
160157
```python
161-
from polygon import WebSocketClient
162-
from polygon.websocket.models import WebSocketMessage
158+
from massive import WebSocketClient
159+
from massive.websocket.models import WebSocketMessage
163160
from typing import List
164161
```
165162
### Using the client
166-
Create a new client with your [API key](https://polygon.io/dashboard/api-keys) and subscription options.
163+
Create a new client with your [API key](https://massive.io/dashboard/api-keys) and subscription options.
167164
```python
168165
# Note: Multiple subscriptions can be added to the array
169166
# For example, if you want to subscribe to AAPL and META,
@@ -179,18 +176,16 @@ def handle_msg(msg: List[WebSocketMessage]):
179176

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

184181
## Contributing
185182

186183
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).
184+
[submitting a new issue](https://github.com/massive-com/client-python/issues/new/choose).
188185
We will respond to issues within at most 3 weeks.
189186
We're also open to volunteers if you want to submit a PR for any open issues but
190187
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).
188+
discussed with us ahead of time will generally be declined.
194189

195190
### Development
196191

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:

docs/source/Exceptions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ Exceptions
66
==============================================================
77
AuthError
88
==============================================================
9-
.. autoclass:: polygon.exceptions.AuthError
9+
.. autoclass:: massive.exceptions.AuthError
1010
:members:
1111
:undoc-members:
1212

1313
==============================================================
1414
BadResponse
1515
==============================================================
16-
.. autoclass:: polygon.exceptions.BadResponse
16+
.. autoclass:: massive.exceptions.BadResponse
1717
:members:
1818
:undoc-members:
1919

0 commit comments

Comments
 (0)