massive 2.0.3__tar.gz → 2.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {massive-2.0.3 → massive-2.2.0}/PKG-INFO +2 -2
- {massive-2.0.3 → massive-2.2.0}/massive/rest/benzinga.py +40 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/economy.py +41 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/futures.py +79 -91
- {massive-2.0.3 → massive-2.2.0}/massive/rest/models/benzinga.py +19 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/models/economy.py +19 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/models/futures.py +38 -38
- {massive-2.0.3 → massive-2.2.0}/pyproject.toml +3 -3
- {massive-2.0.3 → massive-2.2.0}/LICENSE +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/__init__.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/exceptions.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/logging.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/modelclass.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/__init__.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/aggs.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/base.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/etf_global.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/financials.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/indicators.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/models/__init__.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/models/aggs.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/models/common.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/models/conditions.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/models/contracts.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/models/dividends.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/models/etf_global.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/models/exchanges.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/models/financials.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/models/indicators.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/models/markets.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/models/quotes.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/models/request.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/models/snapshot.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/models/splits.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/models/summaries.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/models/tickers.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/models/tmx.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/models/trades.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/quotes.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/reference.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/snapshot.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/summaries.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/tmx.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/trades.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/rest/vX.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/websocket/__init__.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/websocket/models/__init__.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/websocket/models/common.py +0 -0
- {massive-2.0.3 → massive-2.2.0}/massive/websocket/models/models.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: massive
|
|
3
|
-
Version: 2.0
|
|
3
|
+
Version: 2.2.0
|
|
4
4
|
Summary: Official Massive (formerly Polygon.io) REST and Websocket client.
|
|
5
5
|
License: MIT
|
|
6
6
|
License-File: LICENSE
|
|
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
-
Requires-Dist: certifi (>=2022.5.18,<
|
|
18
|
+
Requires-Dist: certifi (>=2022.5.18,<2027.0.0)
|
|
19
19
|
Requires-Dist: urllib3 (>=1.26.9)
|
|
20
20
|
Requires-Dist: websockets (>=14.0)
|
|
21
21
|
Project-URL: Documentation, https://massive.com/docs
|
|
@@ -12,6 +12,7 @@ from .models.benzinga import (
|
|
|
12
12
|
BenzingaGuidance,
|
|
13
13
|
BenzingaNews,
|
|
14
14
|
BenzingaRating,
|
|
15
|
+
BenzingaBullsBearsSay,
|
|
15
16
|
)
|
|
16
17
|
from .models.common import Sort
|
|
17
18
|
from .models.request import RequestOptionBuilder
|
|
@@ -479,3 +480,42 @@ class BenzingaClient(BaseClient):
|
|
|
479
480
|
deserializer=BenzingaRating.from_dict,
|
|
480
481
|
options=options,
|
|
481
482
|
)
|
|
483
|
+
|
|
484
|
+
def list_benzinga_bulls_bears_say(
|
|
485
|
+
self,
|
|
486
|
+
ticker: Optional[str] = None,
|
|
487
|
+
ticker_any_of: Optional[str] = None,
|
|
488
|
+
ticker_gt: Optional[str] = None,
|
|
489
|
+
ticker_gte: Optional[str] = None,
|
|
490
|
+
ticker_lt: Optional[str] = None,
|
|
491
|
+
ticker_lte: Optional[str] = None,
|
|
492
|
+
benzinga_id: Optional[str] = None,
|
|
493
|
+
benzinga_id_any_of: Optional[str] = None,
|
|
494
|
+
benzinga_id_gt: Optional[str] = None,
|
|
495
|
+
benzinga_id_gte: Optional[str] = None,
|
|
496
|
+
benzinga_id_lt: Optional[str] = None,
|
|
497
|
+
benzinga_id_lte: Optional[str] = None,
|
|
498
|
+
last_updated: Optional[str] = None,
|
|
499
|
+
last_updated_gt: Optional[str] = None,
|
|
500
|
+
last_updated_gte: Optional[str] = None,
|
|
501
|
+
last_updated_lt: Optional[str] = None,
|
|
502
|
+
last_updated_lte: Optional[str] = None,
|
|
503
|
+
limit: Optional[int] = None,
|
|
504
|
+
sort: Optional[str] = None,
|
|
505
|
+
params: Optional[Dict[str, Any]] = None,
|
|
506
|
+
raw: bool = False,
|
|
507
|
+
options: Optional[RequestOptionBuilder] = None,
|
|
508
|
+
) -> Union[Iterator[BenzingaBullsBearsSay], HTTPResponse]:
|
|
509
|
+
"""
|
|
510
|
+
Endpoint: GET /benzinga/v1/bulls-bears-say
|
|
511
|
+
|
|
512
|
+
A comprehensive database of analyst bull and bear case summaries for publicly traded companies, providing concise summaries of both bullish and bearish investment arguments to help investors see both sides of the story before making investment decisions.
|
|
513
|
+
"""
|
|
514
|
+
url = "/benzinga/v1/bulls-bears-say"
|
|
515
|
+
return self._paginate(
|
|
516
|
+
path=url,
|
|
517
|
+
params=self._get_params(self.list_benzinga_bulls_bears_say, locals()),
|
|
518
|
+
raw=raw,
|
|
519
|
+
deserializer=BenzingaBullsBearsSay.from_dict,
|
|
520
|
+
options=options,
|
|
521
|
+
)
|
|
@@ -7,6 +7,7 @@ from .models.economy import (
|
|
|
7
7
|
FedInflation,
|
|
8
8
|
TreasuryYield,
|
|
9
9
|
FedInflationExpectations,
|
|
10
|
+
FedLaborMarket,
|
|
10
11
|
)
|
|
11
12
|
from .models.common import Sort, Order
|
|
12
13
|
from .models.request import RequestOptionBuilder
|
|
@@ -127,3 +128,43 @@ class EconomyClient(BaseClient):
|
|
|
127
128
|
result_key="results",
|
|
128
129
|
options=options,
|
|
129
130
|
)
|
|
131
|
+
|
|
132
|
+
def list_labor_market_indicators(
|
|
133
|
+
self,
|
|
134
|
+
date: Optional[str] = None,
|
|
135
|
+
date_any_of: Optional[str] = None,
|
|
136
|
+
date_gt: Optional[str] = None,
|
|
137
|
+
date_gte: Optional[str] = None,
|
|
138
|
+
date_lt: Optional[str] = None,
|
|
139
|
+
date_lte: Optional[str] = None,
|
|
140
|
+
limit: Optional[int] = None,
|
|
141
|
+
sort: Optional[str] = None,
|
|
142
|
+
params: Optional[Dict[str, Any]] = None,
|
|
143
|
+
raw: bool = False,
|
|
144
|
+
options: Optional[RequestOptionBuilder] = None,
|
|
145
|
+
) -> Union[Iterator[FedLaborMarket], HTTPResponse]:
|
|
146
|
+
"""
|
|
147
|
+
Labor market indicators from the Federal Reserve, including unemployment rate, labor force participation, average hourly earnings, and job openings data.
|
|
148
|
+
|
|
149
|
+
:param date: Calendar date of the observation (YYYY-MM-DD).
|
|
150
|
+
:param date_any_of: Filter equal to any of the values. Multiple values can be specified by using a comma separated list.
|
|
151
|
+
:param date_gt: Filter greater than the value.
|
|
152
|
+
:param date_gte: Filter greater than or equal to the value.
|
|
153
|
+
:param date_lt: Filter less than the value.
|
|
154
|
+
:param date_lte: Filter less than or equal to the value.
|
|
155
|
+
:param limit: Limit the maximum number of results returned. Defaults to '100' if not specified. The maximum allowed limit is '50000'.
|
|
156
|
+
:param sort: A comma separated list of sort columns. For each column, append '.asc' or '.desc' to specify the sort direction. The sort column defaults to 'date' if not specified. The sort order defaults to 'asc' if not specified.
|
|
157
|
+
:param params: Additional query parameters.
|
|
158
|
+
:param raw: Return raw HTTPResponse object if True, else return Iterator[FedLaborMarket].
|
|
159
|
+
:param options: RequestOptionBuilder for additional headers or params.
|
|
160
|
+
:return: An iterator of FedLaborMarket objects or HTTPResponse if raw=True.
|
|
161
|
+
"""
|
|
162
|
+
url = "/fed/v1/labor-market"
|
|
163
|
+
|
|
164
|
+
return self._paginate(
|
|
165
|
+
path=url,
|
|
166
|
+
params=self._get_params(self.list_labor_market_indicators, locals()),
|
|
167
|
+
deserializer=FedLaborMarket.from_dict,
|
|
168
|
+
raw=raw,
|
|
169
|
+
options=options,
|
|
170
|
+
)
|
|
@@ -59,14 +59,38 @@ class FuturesClient(BaseClient):
|
|
|
59
59
|
|
|
60
60
|
def list_futures_contracts(
|
|
61
61
|
self,
|
|
62
|
+
date: Optional[str] = None,
|
|
63
|
+
date_gt: Optional[str] = None,
|
|
64
|
+
date_gte: Optional[str] = None,
|
|
65
|
+
date_lt: Optional[str] = None,
|
|
66
|
+
date_lte: Optional[str] = None,
|
|
62
67
|
product_code: Optional[str] = None,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
68
|
+
product_code_any_of: Optional[str] = None,
|
|
69
|
+
product_code_gt: Optional[str] = None,
|
|
70
|
+
product_code_gte: Optional[str] = None,
|
|
71
|
+
product_code_lt: Optional[str] = None,
|
|
72
|
+
product_code_lte: Optional[str] = None,
|
|
73
|
+
ticker: Optional[str] = None,
|
|
74
|
+
ticker_any_of: Optional[str] = None,
|
|
75
|
+
ticker_gt: Optional[str] = None,
|
|
76
|
+
ticker_gte: Optional[str] = None,
|
|
77
|
+
ticker_lt: Optional[str] = None,
|
|
78
|
+
ticker_lte: Optional[str] = None,
|
|
79
|
+
active: Optional[bool] = None,
|
|
67
80
|
type: Optional[str] = None,
|
|
81
|
+
type_any_of: Optional[str] = None,
|
|
82
|
+
first_trade_date: Optional[str] = None,
|
|
83
|
+
first_trade_date_gt: Optional[str] = None,
|
|
84
|
+
first_trade_date_gte: Optional[str] = None,
|
|
85
|
+
first_trade_date_lt: Optional[str] = None,
|
|
86
|
+
first_trade_date_lte: Optional[str] = None,
|
|
87
|
+
last_trade_date: Optional[str] = None,
|
|
88
|
+
last_trade_date_gt: Optional[str] = None,
|
|
89
|
+
last_trade_date_gte: Optional[str] = None,
|
|
90
|
+
last_trade_date_lt: Optional[str] = None,
|
|
91
|
+
last_trade_date_lte: Optional[str] = None,
|
|
68
92
|
limit: Optional[int] = None,
|
|
69
|
-
sort: Optional[
|
|
93
|
+
sort: Optional[str] = None,
|
|
70
94
|
params: Optional[Dict[str, Any]] = None,
|
|
71
95
|
raw: bool = False,
|
|
72
96
|
options: Optional[RequestOptionBuilder] = None,
|
|
@@ -85,43 +109,43 @@ class FuturesClient(BaseClient):
|
|
|
85
109
|
options=options,
|
|
86
110
|
)
|
|
87
111
|
|
|
88
|
-
def get_futures_contract_details(
|
|
89
|
-
self,
|
|
90
|
-
ticker: str,
|
|
91
|
-
as_of: Optional[Union[str, date]] = None,
|
|
92
|
-
params: Optional[Dict[str, Any]] = None,
|
|
93
|
-
raw: bool = False,
|
|
94
|
-
options: Optional[RequestOptionBuilder] = None,
|
|
95
|
-
) -> Union[FuturesContract, HTTPResponse]:
|
|
96
|
-
"""
|
|
97
|
-
Endpoint: GET /futures/vX/contracts/{ticker}
|
|
98
|
-
|
|
99
|
-
Returns details for a single contract at a specified point in time.
|
|
100
|
-
(No next_url in the response -> just a single get).
|
|
101
|
-
"""
|
|
102
|
-
url = f"/futures/vX/contracts/{ticker}"
|
|
103
|
-
return self._get(
|
|
104
|
-
path=url,
|
|
105
|
-
params=self._get_params(self.get_futures_contract_details, locals()),
|
|
106
|
-
deserializer=FuturesContract.from_dict,
|
|
107
|
-
raw=raw,
|
|
108
|
-
result_key="results",
|
|
109
|
-
options=options,
|
|
110
|
-
)
|
|
111
|
-
|
|
112
112
|
def list_futures_products(
|
|
113
113
|
self,
|
|
114
114
|
name: Optional[str] = None,
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
name_any_of: Optional[str] = None,
|
|
116
|
+
name_gt: Optional[str] = None,
|
|
117
|
+
name_gte: Optional[str] = None,
|
|
118
|
+
name_lt: Optional[str] = None,
|
|
119
|
+
name_lte: Optional[str] = None,
|
|
120
|
+
product_code: Optional[str] = None,
|
|
121
|
+
product_code_any_of: Optional[str] = None,
|
|
122
|
+
product_code_gt: Optional[str] = None,
|
|
123
|
+
product_code_gte: Optional[str] = None,
|
|
124
|
+
product_code_lt: Optional[str] = None,
|
|
125
|
+
product_code_lte: Optional[str] = None,
|
|
126
|
+
date: Optional[str] = None,
|
|
127
|
+
date_gt: Optional[str] = None,
|
|
128
|
+
date_gte: Optional[str] = None,
|
|
129
|
+
date_lt: Optional[str] = None,
|
|
130
|
+
date_lte: Optional[str] = None,
|
|
117
131
|
trading_venue: Optional[str] = None,
|
|
132
|
+
trading_venue_any_of: Optional[str] = None,
|
|
133
|
+
trading_venue_gt: Optional[str] = None,
|
|
134
|
+
trading_venue_gte: Optional[str] = None,
|
|
135
|
+
trading_venue_lt: Optional[str] = None,
|
|
136
|
+
trading_venue_lte: Optional[str] = None,
|
|
118
137
|
sector: Optional[str] = None,
|
|
138
|
+
sector_any_of: Optional[str] = None,
|
|
119
139
|
sub_sector: Optional[str] = None,
|
|
140
|
+
sub_sector_any_of: Optional[str] = None,
|
|
120
141
|
asset_class: Optional[str] = None,
|
|
142
|
+
asset_class_any_of: Optional[str] = None,
|
|
121
143
|
asset_sub_class: Optional[str] = None,
|
|
144
|
+
asset_sub_class_any_of: Optional[str] = None,
|
|
122
145
|
type: Optional[str] = None,
|
|
146
|
+
type_any_of: Optional[str] = None,
|
|
123
147
|
limit: Optional[int] = None,
|
|
124
|
-
sort: Optional[
|
|
148
|
+
sort: Optional[str] = None,
|
|
125
149
|
params: Optional[Dict[str, Any]] = None,
|
|
126
150
|
raw: bool = False,
|
|
127
151
|
options: Optional[RequestOptionBuilder] = None,
|
|
@@ -140,31 +164,6 @@ class FuturesClient(BaseClient):
|
|
|
140
164
|
options=options,
|
|
141
165
|
)
|
|
142
166
|
|
|
143
|
-
def get_futures_product_details(
|
|
144
|
-
self,
|
|
145
|
-
product_code: str,
|
|
146
|
-
type: Optional[str] = None,
|
|
147
|
-
as_of: Optional[Union[str, date]] = None,
|
|
148
|
-
params: Optional[Dict[str, Any]] = None,
|
|
149
|
-
raw: bool = False,
|
|
150
|
-
options: Optional[RequestOptionBuilder] = None,
|
|
151
|
-
) -> Union[FuturesProduct, HTTPResponse]:
|
|
152
|
-
"""
|
|
153
|
-
Endpoint: GET /futures/vX/products/{product_code}
|
|
154
|
-
|
|
155
|
-
Returns the details for a single product as it was at a specific day.
|
|
156
|
-
(No next_url -> single get).
|
|
157
|
-
"""
|
|
158
|
-
url = f"/futures/vX/products/{product_code}"
|
|
159
|
-
return self._get(
|
|
160
|
-
path=url,
|
|
161
|
-
params=self._get_params(self.get_futures_product_details, locals()),
|
|
162
|
-
deserializer=FuturesProduct.from_dict,
|
|
163
|
-
raw=raw,
|
|
164
|
-
result_key="results",
|
|
165
|
-
options=options,
|
|
166
|
-
)
|
|
167
|
-
|
|
168
167
|
def list_futures_quotes(
|
|
169
168
|
self,
|
|
170
169
|
ticker: str,
|
|
@@ -233,10 +232,26 @@ class FuturesClient(BaseClient):
|
|
|
233
232
|
|
|
234
233
|
def list_futures_schedules(
|
|
235
234
|
self,
|
|
235
|
+
product_code: Optional[str] = None,
|
|
236
|
+
product_code_any_of: Optional[str] = None,
|
|
237
|
+
product_code_gt: Optional[str] = None,
|
|
238
|
+
product_code_gte: Optional[str] = None,
|
|
239
|
+
product_code_lt: Optional[str] = None,
|
|
240
|
+
product_code_lte: Optional[str] = None,
|
|
236
241
|
session_end_date: Optional[str] = None,
|
|
242
|
+
session_end_date_any_of: Optional[str] = None,
|
|
243
|
+
session_end_date_gt: Optional[str] = None,
|
|
244
|
+
session_end_date_gte: Optional[str] = None,
|
|
245
|
+
session_end_date_lt: Optional[str] = None,
|
|
246
|
+
session_end_date_lte: Optional[str] = None,
|
|
237
247
|
trading_venue: Optional[str] = None,
|
|
248
|
+
trading_venue_any_of: Optional[str] = None,
|
|
249
|
+
trading_venue_gt: Optional[str] = None,
|
|
250
|
+
trading_venue_gte: Optional[str] = None,
|
|
251
|
+
trading_venue_lt: Optional[str] = None,
|
|
252
|
+
trading_venue_lte: Optional[str] = None,
|
|
238
253
|
limit: Optional[int] = None,
|
|
239
|
-
sort: Optional[
|
|
254
|
+
sort: Optional[str] = None,
|
|
240
255
|
params: Optional[Dict[str, Any]] = None,
|
|
241
256
|
raw: bool = False,
|
|
242
257
|
options: Optional[RequestOptionBuilder] = None,
|
|
@@ -256,42 +271,15 @@ class FuturesClient(BaseClient):
|
|
|
256
271
|
options=options,
|
|
257
272
|
)
|
|
258
273
|
|
|
259
|
-
def list_futures_schedules_by_product_code(
|
|
260
|
-
self,
|
|
261
|
-
product_code: str,
|
|
262
|
-
session_end_date: Optional[str] = None,
|
|
263
|
-
session_end_date_lt: Optional[str] = None,
|
|
264
|
-
session_end_date_lte: Optional[str] = None,
|
|
265
|
-
session_end_date_gt: Optional[str] = None,
|
|
266
|
-
session_end_date_gte: Optional[str] = None,
|
|
267
|
-
limit: Optional[int] = None,
|
|
268
|
-
sort: Optional[Union[str, Sort]] = None,
|
|
269
|
-
params: Optional[Dict[str, Any]] = None,
|
|
270
|
-
raw: bool = False,
|
|
271
|
-
options: Optional[RequestOptionBuilder] = None,
|
|
272
|
-
) -> Union[Iterator[FuturesSchedule], HTTPResponse]:
|
|
273
|
-
"""
|
|
274
|
-
Endpoint: GET /futures/vX/products/{product_code}/schedules
|
|
275
|
-
|
|
276
|
-
Returns schedule data for a single product across (potentially) many trading dates.
|
|
277
|
-
"""
|
|
278
|
-
url = f"/futures/vX/products/{product_code}/schedules"
|
|
279
|
-
return self._paginate(
|
|
280
|
-
path=url,
|
|
281
|
-
params=self._get_params(
|
|
282
|
-
self.list_futures_schedules_by_product_code, locals()
|
|
283
|
-
),
|
|
284
|
-
raw=raw,
|
|
285
|
-
deserializer=FuturesSchedule.from_dict,
|
|
286
|
-
options=options,
|
|
287
|
-
)
|
|
288
|
-
|
|
289
274
|
def list_futures_market_statuses(
|
|
290
275
|
self,
|
|
291
|
-
product_code_any_of: Optional[str] = None,
|
|
292
276
|
product_code: Optional[str] = None,
|
|
277
|
+
product_code_any_of: Optional[str] = None,
|
|
278
|
+
product_code_gt: Optional[str] = None,
|
|
279
|
+
product_code_gte: Optional[str] = None,
|
|
280
|
+
product_code_lt: Optional[str] = None,
|
|
281
|
+
product_code_lte: Optional[str] = None,
|
|
293
282
|
limit: Optional[int] = None,
|
|
294
|
-
sort: Optional[Union[str, Sort]] = None,
|
|
295
283
|
params: Optional[Dict[str, Any]] = None,
|
|
296
284
|
raw: bool = False,
|
|
297
285
|
options: Optional[RequestOptionBuilder] = None,
|
|
@@ -320,7 +308,7 @@ class FuturesClient(BaseClient):
|
|
|
320
308
|
product_code_lt: Optional[str] = None,
|
|
321
309
|
product_code_lte: Optional[str] = None,
|
|
322
310
|
limit: Optional[int] = None,
|
|
323
|
-
sort: Optional[
|
|
311
|
+
sort: Optional[str] = None,
|
|
324
312
|
params: Optional[Dict[str, Any]] = None,
|
|
325
313
|
raw: bool = False,
|
|
326
314
|
options: Optional[RequestOptionBuilder] = None,
|
|
@@ -322,3 +322,22 @@ class BenzingaRating:
|
|
|
322
322
|
ticker=d.get("ticker"),
|
|
323
323
|
time=d.get("time"),
|
|
324
324
|
)
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
@modelclass
|
|
328
|
+
class BenzingaBullsBearsSay:
|
|
329
|
+
bear_case: Optional[str] = None
|
|
330
|
+
benzinga_id: Optional[str] = None
|
|
331
|
+
bull_case: Optional[str] = None
|
|
332
|
+
last_updated: Optional[str] = None
|
|
333
|
+
ticker: Optional[str] = None
|
|
334
|
+
|
|
335
|
+
@staticmethod
|
|
336
|
+
def from_dict(d):
|
|
337
|
+
return BenzingaBullsBearsSay(
|
|
338
|
+
bear_case=d.get("bear_case"),
|
|
339
|
+
benzinga_id=d.get("benzinga_id"),
|
|
340
|
+
bull_case=d.get("bull_case"),
|
|
341
|
+
last_updated=d.get("last_updated"),
|
|
342
|
+
ticker=d.get("ticker"),
|
|
343
|
+
)
|
|
@@ -85,3 +85,22 @@ class FedInflationExpectations:
|
|
|
85
85
|
model_30_year=d.get("model_30_year"),
|
|
86
86
|
model_5_year=d.get("model_5_year"),
|
|
87
87
|
)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
@modelclass
|
|
91
|
+
class FedLaborMarket:
|
|
92
|
+
avg_hourly_earnings: Optional[float] = None
|
|
93
|
+
date: Optional[str] = None
|
|
94
|
+
job_openings: Optional[float] = None
|
|
95
|
+
labor_force_participation_rate: Optional[float] = None
|
|
96
|
+
unemployment_rate: Optional[float] = None
|
|
97
|
+
|
|
98
|
+
@staticmethod
|
|
99
|
+
def from_dict(d):
|
|
100
|
+
return FedLaborMarket(
|
|
101
|
+
avg_hourly_earnings=d.get("avg_hourly_earnings"),
|
|
102
|
+
date=d.get("date"),
|
|
103
|
+
job_openings=d.get("job_openings"),
|
|
104
|
+
labor_force_participation_rate=d.get("labor_force_participation_rate"),
|
|
105
|
+
unemployment_rate=d.get("unemployment_rate"),
|
|
106
|
+
)
|
|
@@ -50,7 +50,7 @@ class FuturesContract:
|
|
|
50
50
|
trading_venue: Optional[str] = None
|
|
51
51
|
name: Optional[str] = None
|
|
52
52
|
type: Optional[str] = None
|
|
53
|
-
|
|
53
|
+
date: Optional[str] = None
|
|
54
54
|
active: Optional[bool] = None
|
|
55
55
|
first_trade_date: Optional[str] = None
|
|
56
56
|
last_trade_date: Optional[str] = None
|
|
@@ -61,7 +61,7 @@ class FuturesContract:
|
|
|
61
61
|
settlement_tick_size: Optional[float] = None
|
|
62
62
|
spread_tick_size: Optional[float] = None
|
|
63
63
|
trade_tick_size: Optional[float] = None
|
|
64
|
-
|
|
64
|
+
group_code: Optional[str] = None
|
|
65
65
|
|
|
66
66
|
@staticmethod
|
|
67
67
|
def from_dict(d):
|
|
@@ -71,7 +71,7 @@ class FuturesContract:
|
|
|
71
71
|
trading_venue=d.get("trading_venue"),
|
|
72
72
|
name=d.get("name"),
|
|
73
73
|
type=d.get("type"),
|
|
74
|
-
|
|
74
|
+
date=d.get("date"),
|
|
75
75
|
active=d.get("active"),
|
|
76
76
|
first_trade_date=d.get("first_trade_date"),
|
|
77
77
|
last_trade_date=d.get("last_trade_date"),
|
|
@@ -82,7 +82,7 @@ class FuturesContract:
|
|
|
82
82
|
settlement_tick_size=d.get("settlement_tick_size"),
|
|
83
83
|
spread_tick_size=d.get("spread_tick_size"),
|
|
84
84
|
trade_tick_size=d.get("trade_tick_size"),
|
|
85
|
-
|
|
85
|
+
group_code=d.get("group_code"),
|
|
86
86
|
)
|
|
87
87
|
|
|
88
88
|
|
|
@@ -95,11 +95,10 @@ class FuturesProduct:
|
|
|
95
95
|
|
|
96
96
|
product_code: Optional[str] = None
|
|
97
97
|
name: Optional[str] = None
|
|
98
|
-
|
|
98
|
+
date: Optional[str] = None
|
|
99
99
|
trading_venue: Optional[str] = None
|
|
100
100
|
asset_class: Optional[str] = None
|
|
101
101
|
asset_sub_class: Optional[str] = None
|
|
102
|
-
clearing_channel: Optional[str] = None
|
|
103
102
|
sector: Optional[str] = None
|
|
104
103
|
sub_sector: Optional[str] = None
|
|
105
104
|
type: Optional[str] = None
|
|
@@ -110,17 +109,16 @@ class FuturesProduct:
|
|
|
110
109
|
settlement_type: Optional[str] = None
|
|
111
110
|
trade_currency_code: Optional[str] = None
|
|
112
111
|
unit_of_measure: Optional[str] = None
|
|
113
|
-
|
|
112
|
+
unit_of_measure_qty: Optional[float] = None
|
|
114
113
|
|
|
115
114
|
@staticmethod
|
|
116
115
|
def from_dict(d):
|
|
117
116
|
return FuturesProduct(
|
|
118
117
|
product_code=d.get("product_code"),
|
|
119
118
|
name=d.get("name"),
|
|
120
|
-
|
|
119
|
+
date=d.get("date"),
|
|
121
120
|
trading_venue=d.get("trading_venue"),
|
|
122
121
|
asset_class=d.get("asset_class"),
|
|
123
|
-
clearing_channel=d.get("clearing_channel"),
|
|
124
122
|
asset_sub_class=d.get("asset_sub_class"),
|
|
125
123
|
sector=d.get("sector"),
|
|
126
124
|
sub_sector=d.get("sub_sector"),
|
|
@@ -132,7 +130,7 @@ class FuturesProduct:
|
|
|
132
130
|
settlement_type=d.get("settlement_type"),
|
|
133
131
|
trade_currency_code=d.get("trade_currency_code"),
|
|
134
132
|
unit_of_measure=d.get("unit_of_measure"),
|
|
135
|
-
|
|
133
|
+
unit_of_measure_qty=d.get("unit_of_measure_qty"),
|
|
136
134
|
)
|
|
137
135
|
|
|
138
136
|
|
|
@@ -152,6 +150,8 @@ class FuturesQuote:
|
|
|
152
150
|
bid_price: Optional[float] = None
|
|
153
151
|
bid_size: Optional[float] = None
|
|
154
152
|
bid_timestamp: Optional[int] = None
|
|
153
|
+
report_sequence: Optional[int] = None
|
|
154
|
+
sequence_number: Optional[int] = None
|
|
155
155
|
|
|
156
156
|
@staticmethod
|
|
157
157
|
def from_dict(d):
|
|
@@ -165,6 +165,8 @@ class FuturesQuote:
|
|
|
165
165
|
bid_price=d.get("bid_price"),
|
|
166
166
|
bid_size=d.get("bid_size"),
|
|
167
167
|
bid_timestamp=d.get("bid_timestamp"),
|
|
168
|
+
report_sequence=d.get("report_sequence"),
|
|
169
|
+
sequence_number=d.get("sequence_number"),
|
|
168
170
|
)
|
|
169
171
|
|
|
170
172
|
|
|
@@ -180,6 +182,8 @@ class FuturesTrade:
|
|
|
180
182
|
session_end_date: Optional[str] = None
|
|
181
183
|
price: Optional[float] = None
|
|
182
184
|
size: Optional[float] = None
|
|
185
|
+
report_sequence: Optional[int] = None
|
|
186
|
+
sequence_number: Optional[int] = None
|
|
183
187
|
|
|
184
188
|
@staticmethod
|
|
185
189
|
def from_dict(d):
|
|
@@ -189,66 +193,55 @@ class FuturesTrade:
|
|
|
189
193
|
session_end_date=d.get("session_end_date"),
|
|
190
194
|
price=d.get("price"),
|
|
191
195
|
size=d.get("size"),
|
|
196
|
+
report_sequence=d.get("report_sequence"),
|
|
197
|
+
sequence_number=d.get("sequence_number"),
|
|
192
198
|
)
|
|
193
199
|
|
|
194
200
|
|
|
195
201
|
@modelclass
|
|
196
|
-
class
|
|
202
|
+
class FuturesSchedule:
|
|
197
203
|
"""
|
|
198
|
-
Represents a single
|
|
204
|
+
Represents a single schedule event for a given session_end_date and product.
|
|
205
|
+
Corresponds to /futures/vX/schedules
|
|
199
206
|
"""
|
|
200
207
|
|
|
201
208
|
event: Optional[str] = None
|
|
202
209
|
timestamp: Optional[str] = None
|
|
203
|
-
|
|
204
|
-
@staticmethod
|
|
205
|
-
def from_dict(d):
|
|
206
|
-
return FuturesScheduleEvent(
|
|
207
|
-
event=d.get("event"),
|
|
208
|
-
timestamp=d.get("timestamp"),
|
|
209
|
-
)
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
@modelclass
|
|
213
|
-
class FuturesSchedule:
|
|
214
|
-
"""
|
|
215
|
-
Represents a single schedule for a given session_end_date, with events.
|
|
216
|
-
Corresponds to /futures/vX/schedules, /futures/vX/schedules/{product_code}
|
|
217
|
-
"""
|
|
218
|
-
|
|
219
210
|
session_end_date: Optional[str] = None
|
|
220
211
|
product_code: Optional[str] = None
|
|
221
212
|
trading_venue: Optional[str] = None
|
|
222
213
|
product_name: Optional[str] = None
|
|
223
|
-
schedule: Optional[List[FuturesScheduleEvent]] = None
|
|
224
214
|
|
|
225
215
|
@staticmethod
|
|
226
216
|
def from_dict(d):
|
|
227
217
|
return FuturesSchedule(
|
|
218
|
+
event=d.get("event"),
|
|
219
|
+
timestamp=d.get("timestamp"),
|
|
228
220
|
session_end_date=d.get("session_end_date"),
|
|
229
221
|
product_code=d.get("product_code"),
|
|
230
222
|
trading_venue=d.get("trading_venue"),
|
|
231
223
|
product_name=d.get("product_name"),
|
|
232
|
-
schedule=[
|
|
233
|
-
FuturesScheduleEvent.from_dict(ev) for ev in d.get("schedule", [])
|
|
234
|
-
],
|
|
235
224
|
)
|
|
236
225
|
|
|
237
226
|
|
|
238
227
|
@modelclass
|
|
239
228
|
class FuturesMarketStatus:
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
None # Enum: pre_open, open, close, pause, post_close_pre_open
|
|
243
|
-
)
|
|
229
|
+
market_event: Optional[str] = None
|
|
230
|
+
name: Optional[str] = None
|
|
244
231
|
product_code: Optional[str] = None
|
|
232
|
+
session_end_date: Optional[str] = None
|
|
233
|
+
timestamp: Optional[str] = None
|
|
234
|
+
trading_venue: Optional[str] = None
|
|
245
235
|
|
|
246
236
|
@staticmethod
|
|
247
237
|
def from_dict(d):
|
|
248
238
|
return FuturesMarketStatus(
|
|
249
|
-
|
|
250
|
-
|
|
239
|
+
market_event=d.get("market_event"),
|
|
240
|
+
name=d.get("name"),
|
|
251
241
|
product_code=d.get("product_code"),
|
|
242
|
+
session_end_date=d.get("session_end_date"),
|
|
243
|
+
timestamp=d.get("timestamp"),
|
|
244
|
+
trading_venue=d.get("trading_venue"),
|
|
252
245
|
)
|
|
253
246
|
|
|
254
247
|
|
|
@@ -257,6 +250,13 @@ class FuturesSnapshotDetails:
|
|
|
257
250
|
open_interest: Optional[int] = None
|
|
258
251
|
settlement_date: Optional[int] = None
|
|
259
252
|
|
|
253
|
+
@staticmethod
|
|
254
|
+
def from_dict(d):
|
|
255
|
+
return FuturesSnapshotDetails(
|
|
256
|
+
open_interest=d.get("open_interest"),
|
|
257
|
+
settlement_date=d.get("settlement_date"),
|
|
258
|
+
)
|
|
259
|
+
|
|
260
260
|
|
|
261
261
|
@modelclass
|
|
262
262
|
class FuturesSnapshotMinute:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "massive"
|
|
3
|
-
version = "
|
|
3
|
+
version = "2.2.0"
|
|
4
4
|
description = "Official Massive (formerly Polygon.io) REST and Websocket client."
|
|
5
5
|
authors = ["massive.com"]
|
|
6
6
|
license = "MIT"
|
|
@@ -27,14 +27,14 @@ packages = [
|
|
|
27
27
|
python = "^3.9"
|
|
28
28
|
urllib3 = ">=1.26.9"
|
|
29
29
|
websockets = ">=14.0"
|
|
30
|
-
certifi = ">=2022.5.18,<
|
|
30
|
+
certifi = ">=2022.5.18,<2027.0.0"
|
|
31
31
|
|
|
32
32
|
[tool.poetry.dev-dependencies]
|
|
33
33
|
black = "^24.8.0"
|
|
34
34
|
mypy = "^1.19"
|
|
35
35
|
types-urllib3 = "^1.26.25"
|
|
36
36
|
Sphinx = "^7.4.7"
|
|
37
|
-
sphinx-rtd-theme = "^3.0
|
|
37
|
+
sphinx-rtd-theme = "^3.1.0"
|
|
38
38
|
# keep this in sync with docs/requirements.txt for readthedocs.org
|
|
39
39
|
sphinx-autodoc-typehints = "^2.3.0"
|
|
40
40
|
types-certifi = "^2021.10.8"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|