massive 2.4.0__tar.gz → 2.6.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.
Files changed (50) hide show
  1. {massive-2.4.0 → massive-2.6.0}/PKG-INFO +1 -1
  2. {massive-2.4.0 → massive-2.6.0}/massive/rest/economy.py +102 -0
  3. massive-2.6.0/massive/rest/models/economy.py +229 -0
  4. {massive-2.4.0 → massive-2.6.0}/massive/rest/models/financials.py +254 -0
  5. {massive-2.4.0 → massive-2.6.0}/massive/rest/reference.py +131 -0
  6. {massive-2.4.0 → massive-2.6.0}/pyproject.toml +1 -1
  7. massive-2.4.0/massive/rest/models/economy.py +0 -106
  8. {massive-2.4.0 → massive-2.6.0}/LICENSE +0 -0
  9. {massive-2.4.0 → massive-2.6.0}/massive/__init__.py +0 -0
  10. {massive-2.4.0 → massive-2.6.0}/massive/exceptions.py +0 -0
  11. {massive-2.4.0 → massive-2.6.0}/massive/logging.py +0 -0
  12. {massive-2.4.0 → massive-2.6.0}/massive/modelclass.py +0 -0
  13. {massive-2.4.0 → massive-2.6.0}/massive/rest/__init__.py +0 -0
  14. {massive-2.4.0 → massive-2.6.0}/massive/rest/aggs.py +0 -0
  15. {massive-2.4.0 → massive-2.6.0}/massive/rest/base.py +0 -0
  16. {massive-2.4.0 → massive-2.6.0}/massive/rest/benzinga.py +0 -0
  17. {massive-2.4.0 → massive-2.6.0}/massive/rest/etf_global.py +0 -0
  18. {massive-2.4.0 → massive-2.6.0}/massive/rest/financials.py +0 -0
  19. {massive-2.4.0 → massive-2.6.0}/massive/rest/futures.py +0 -0
  20. {massive-2.4.0 → massive-2.6.0}/massive/rest/indicators.py +0 -0
  21. {massive-2.4.0 → massive-2.6.0}/massive/rest/models/__init__.py +0 -0
  22. {massive-2.4.0 → massive-2.6.0}/massive/rest/models/aggs.py +0 -0
  23. {massive-2.4.0 → massive-2.6.0}/massive/rest/models/benzinga.py +0 -0
  24. {massive-2.4.0 → massive-2.6.0}/massive/rest/models/common.py +0 -0
  25. {massive-2.4.0 → massive-2.6.0}/massive/rest/models/conditions.py +0 -0
  26. {massive-2.4.0 → massive-2.6.0}/massive/rest/models/contracts.py +0 -0
  27. {massive-2.4.0 → massive-2.6.0}/massive/rest/models/dividends.py +0 -0
  28. {massive-2.4.0 → massive-2.6.0}/massive/rest/models/etf_global.py +0 -0
  29. {massive-2.4.0 → massive-2.6.0}/massive/rest/models/exchanges.py +0 -0
  30. {massive-2.4.0 → massive-2.6.0}/massive/rest/models/futures.py +0 -0
  31. {massive-2.4.0 → massive-2.6.0}/massive/rest/models/indicators.py +0 -0
  32. {massive-2.4.0 → massive-2.6.0}/massive/rest/models/markets.py +0 -0
  33. {massive-2.4.0 → massive-2.6.0}/massive/rest/models/quotes.py +0 -0
  34. {massive-2.4.0 → massive-2.6.0}/massive/rest/models/request.py +0 -0
  35. {massive-2.4.0 → massive-2.6.0}/massive/rest/models/snapshot.py +0 -0
  36. {massive-2.4.0 → massive-2.6.0}/massive/rest/models/splits.py +0 -0
  37. {massive-2.4.0 → massive-2.6.0}/massive/rest/models/summaries.py +0 -0
  38. {massive-2.4.0 → massive-2.6.0}/massive/rest/models/tickers.py +0 -0
  39. {massive-2.4.0 → massive-2.6.0}/massive/rest/models/tmx.py +0 -0
  40. {massive-2.4.0 → massive-2.6.0}/massive/rest/models/trades.py +0 -0
  41. {massive-2.4.0 → massive-2.6.0}/massive/rest/quotes.py +0 -0
  42. {massive-2.4.0 → massive-2.6.0}/massive/rest/snapshot.py +0 -0
  43. {massive-2.4.0 → massive-2.6.0}/massive/rest/summaries.py +0 -0
  44. {massive-2.4.0 → massive-2.6.0}/massive/rest/tmx.py +0 -0
  45. {massive-2.4.0 → massive-2.6.0}/massive/rest/trades.py +0 -0
  46. {massive-2.4.0 → massive-2.6.0}/massive/rest/vX.py +0 -0
  47. {massive-2.4.0 → massive-2.6.0}/massive/websocket/__init__.py +0 -0
  48. {massive-2.4.0 → massive-2.6.0}/massive/websocket/models/__init__.py +0 -0
  49. {massive-2.4.0 → massive-2.6.0}/massive/websocket/models/common.py +0 -0
  50. {massive-2.4.0 → massive-2.6.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.4.0
3
+ Version: 2.6.0
4
4
  Summary: Official Massive (formerly Polygon.io) REST and Websocket client.
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -8,6 +8,8 @@ from .models.economy import (
8
8
  TreasuryYield,
9
9
  FedInflationExpectations,
10
10
  FedLaborMarket,
11
+ EUMerchantAggregate,
12
+ EUMerchantHierarchy,
11
13
  )
12
14
  from .models.common import Sort, Order
13
15
  from .models.request import RequestOptionBuilder
@@ -168,3 +170,103 @@ class EconomyClient(BaseClient):
168
170
  raw=raw,
169
171
  options=options,
170
172
  )
173
+
174
+ def list_eu_merchant_aggregates(
175
+ self,
176
+ transaction_date: Optional[Union[str, date]] = None,
177
+ transaction_date_gt: Optional[Union[str, date]] = None,
178
+ transaction_date_gte: Optional[Union[str, date]] = None,
179
+ transaction_date_lt: Optional[Union[str, date]] = None,
180
+ transaction_date_lte: Optional[Union[str, date]] = None,
181
+ name: Optional[str] = None,
182
+ name_any_of: Optional[str] = None,
183
+ name_gt: Optional[str] = None,
184
+ name_gte: Optional[str] = None,
185
+ name_lt: Optional[str] = None,
186
+ name_lte: Optional[str] = None,
187
+ user_country: Optional[str] = None,
188
+ user_country_any_of: Optional[str] = None,
189
+ channel: Optional[str] = None,
190
+ channel_any_of: Optional[str] = None,
191
+ consumer_type: Optional[str] = None,
192
+ consumer_type_any_of: Optional[str] = None,
193
+ parent_name: Optional[str] = None,
194
+ parent_name_any_of: Optional[str] = None,
195
+ parent_name_gt: Optional[str] = None,
196
+ parent_name_gte: Optional[str] = None,
197
+ parent_name_lt: Optional[str] = None,
198
+ parent_name_lte: Optional[str] = None,
199
+ limit: Optional[int] = None,
200
+ sort: Optional[Union[str, Sort]] = None,
201
+ params: Optional[Dict[str, Any]] = None,
202
+ raw: bool = False,
203
+ options: Optional[RequestOptionBuilder] = None,
204
+ ) -> Union[Iterator[EUMerchantAggregate], HTTPResponse]:
205
+ """
206
+ Aggregated consumer transactions from European credit card panels (UK, DE, FR, IT, ES, AT).
207
+ Each row represents daily credit card, debit card, or open banking transactions
208
+ (7-day lag from transaction date) at a tagged merchant or payment processor.
209
+
210
+ Includes ticker (Bloomberg) and industry mapping for ~250 US public companies.
211
+ User counts provided across 8- and 28-day windows for normalization.
212
+ """
213
+ url = "/consumer-spending/eu/v1/merchant-aggregates"
214
+
215
+ return self._paginate(
216
+ path=url,
217
+ params=self._get_params(self.list_eu_merchant_aggregates, locals()),
218
+ deserializer=EUMerchantAggregate.from_dict,
219
+ raw=raw,
220
+ result_key="results",
221
+ options=options,
222
+ )
223
+
224
+ def list_eu_merchant_hierarchy(
225
+ self,
226
+ lookup_name: Optional[str] = None,
227
+ lookup_name_any_of: Optional[str] = None,
228
+ lookup_name_gt: Optional[str] = None,
229
+ lookup_name_gte: Optional[str] = None,
230
+ lookup_name_lt: Optional[str] = None,
231
+ lookup_name_lte: Optional[str] = None,
232
+ ticker: Optional[str] = None,
233
+ ticker_any_of: Optional[str] = None,
234
+ ticker_gt: Optional[str] = None,
235
+ ticker_gte: Optional[str] = None,
236
+ ticker_lt: Optional[str] = None,
237
+ ticker_lte: Optional[str] = None,
238
+ listing_status: Optional[str] = None,
239
+ listing_status_any_of: Optional[str] = None,
240
+ active_from: Optional[Union[str, date]] = None,
241
+ active_from_gt: Optional[Union[str, date]] = None,
242
+ active_from_gte: Optional[Union[str, date]] = None,
243
+ active_from_lt: Optional[Union[str, date]] = None,
244
+ active_from_lte: Optional[Union[str, date]] = None,
245
+ active_to: Optional[Union[str, date]] = None,
246
+ active_to_gt: Optional[Union[str, date]] = None,
247
+ active_to_gte: Optional[Union[str, date]] = None,
248
+ active_to_lt: Optional[Union[str, date]] = None,
249
+ active_to_lte: Optional[Union[str, date]] = None,
250
+ limit: Optional[int] = None,
251
+ sort: Optional[Union[str, Sort]] = None,
252
+ params: Optional[Dict[str, Any]] = None,
253
+ raw: bool = False,
254
+ options: Optional[RequestOptionBuilder] = None,
255
+ ) -> Union[Iterator[EUMerchantHierarchy], HTTPResponse]:
256
+ """
257
+ Reference data mapping merchants to parent companies, tickers, sectors,
258
+ and industries across Fable's European consumer transaction panel.
259
+
260
+ Use lookup_name + active_from/active_to to join with merchant-aggregates
261
+ for point-in-time queries.
262
+ """
263
+ url = "/consumer-spending/eu/v1/merchant-hierarchy"
264
+
265
+ return self._paginate(
266
+ path=url,
267
+ params=self._get_params(self.list_eu_merchant_hierarchy, locals()),
268
+ deserializer=EUMerchantHierarchy.from_dict,
269
+ raw=raw,
270
+ result_key="results",
271
+ options=options,
272
+ )
@@ -0,0 +1,229 @@
1
+ from typing import Optional
2
+ from ...modelclass import modelclass
3
+
4
+
5
+ @modelclass
6
+ class TreasuryYield:
7
+ """
8
+ Treasury yield data for a specific date.
9
+ """
10
+
11
+ date: Optional[str] = None
12
+ yield_1_month: Optional[float] = None
13
+ yield_3_month: Optional[float] = None
14
+ yield_6_month: Optional[float] = None
15
+ yield_1_year: Optional[float] = None
16
+ yield_2_year: Optional[float] = None
17
+ yield_3_year: Optional[float] = None
18
+ yield_5_year: Optional[float] = None
19
+ yield_7_year: Optional[float] = None
20
+ yield_10_year: Optional[float] = None
21
+ yield_20_year: Optional[float] = None
22
+ yield_30_year: Optional[float] = None
23
+
24
+ @staticmethod
25
+ def from_dict(d):
26
+ return TreasuryYield(
27
+ date=d.get("date"),
28
+ yield_1_month=d.get("yield_1_month"),
29
+ yield_3_month=d.get("yield_3_month"),
30
+ yield_6_month=d.get("yield_6_month"),
31
+ yield_1_year=d.get("yield_1_year"),
32
+ yield_2_year=d.get("yield_2_year"),
33
+ yield_3_year=d.get("yield_3_year"),
34
+ yield_5_year=d.get("yield_5_year"),
35
+ yield_7_year=d.get("yield_7_year"),
36
+ yield_10_year=d.get("yield_10_year"),
37
+ yield_20_year=d.get("yield_20_year"),
38
+ yield_30_year=d.get("yield_30_year"),
39
+ )
40
+
41
+
42
+ @modelclass
43
+ class FedInflation:
44
+ cpi: Optional[float] = None
45
+ cpi_core: Optional[float] = None
46
+ cpi_year_over_year: Optional[float] = None
47
+ date: Optional[str] = None
48
+ pce: Optional[float] = None
49
+ pce_core: Optional[float] = None
50
+ pce_spending: Optional[float] = None
51
+
52
+ @staticmethod
53
+ def from_dict(d):
54
+ return FedInflation(
55
+ cpi=d.get("cpi"),
56
+ cpi_core=d.get("cpi_core"),
57
+ cpi_year_over_year=d.get("cpi_year_over_year"),
58
+ date=d.get("date"),
59
+ pce=d.get("pce"),
60
+ pce_core=d.get("pce_core"),
61
+ pce_spending=d.get("pce_spending"),
62
+ )
63
+
64
+
65
+ @modelclass
66
+ class FedInflationExpectations:
67
+ date: Optional[str] = None
68
+ forward_years_5_to_10: Optional[float] = None
69
+ market_10_year: Optional[float] = None
70
+ market_5_year: Optional[float] = None
71
+ model_10_year: Optional[float] = None
72
+ model_1_year: Optional[float] = None
73
+ model_30_year: Optional[float] = None
74
+ model_5_year: Optional[float] = None
75
+
76
+ @staticmethod
77
+ def from_dict(d):
78
+ return FedInflationExpectations(
79
+ date=d.get("date"),
80
+ forward_years_5_to_10=d.get("forward_years_5_to_10"),
81
+ market_10_year=d.get("market_10_year"),
82
+ market_5_year=d.get("market_5_year"),
83
+ model_10_year=d.get("model_10_year"),
84
+ model_1_year=d.get("model_1_year"),
85
+ model_30_year=d.get("model_30_year"),
86
+ model_5_year=d.get("model_5_year"),
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
+ )
107
+
108
+
109
+ @modelclass
110
+ class EUMerchantAggregate:
111
+ """
112
+ Aggregated consumer transactions from European credit card panels.
113
+ Each row represents daily credit card, debit card, or open banking transactions
114
+ (7-day lag) at a tagged merchant or payment processor.
115
+ """
116
+
117
+ channel: Optional[str] = None
118
+ consumer_type: Optional[str] = None
119
+ eight_day_rolling_category_accounts: Optional[int] = None
120
+ eight_day_rolling_total_accounts: Optional[int] = None
121
+ mcc_group: Optional[str] = None
122
+ merchant_industry: Optional[str] = None
123
+ merchant_ticker: Optional[str] = None
124
+ name: Optional[str] = None
125
+ parent_name: Optional[str] = None
126
+ published_date: Optional[str] = None
127
+ spend_in_distinct_account_key_count: Optional[int] = None
128
+ spend_in_spend: Optional[float] = None
129
+ spend_in_transaction_count: Optional[int] = None
130
+ spend_out_distinct_account_key_count: Optional[int] = None
131
+ spend_out_spend: Optional[float] = None
132
+ spend_out_transaction_count: Optional[int] = None
133
+ total_accounts: Optional[int] = None
134
+ total_spend: Optional[float] = None
135
+ total_transactions: Optional[int] = None
136
+ transaction_currency: Optional[str] = None
137
+ transaction_date: Optional[str] = None
138
+ twenty_eight_day_rolling_category_accounts: Optional[int] = None
139
+ twenty_eight_day_rolling_total_accounts: Optional[int] = None
140
+ type: Optional[str] = None
141
+ user_country: Optional[str] = None
142
+
143
+ @staticmethod
144
+ def from_dict(d):
145
+ return EUMerchantAggregate(
146
+ channel=d.get("channel"),
147
+ consumer_type=d.get("consumer_type"),
148
+ eight_day_rolling_category_accounts=d.get(
149
+ "eight_day_rolling_category_accounts"
150
+ ),
151
+ eight_day_rolling_total_accounts=d.get("eight_day_rolling_total_accounts"),
152
+ mcc_group=d.get("mcc_group"),
153
+ merchant_industry=d.get("merchant_industry"),
154
+ merchant_ticker=d.get("merchant_ticker"),
155
+ name=d.get("name"),
156
+ parent_name=d.get("parent_name"),
157
+ published_date=d.get("published_date"),
158
+ spend_in_distinct_account_key_count=d.get(
159
+ "spend_in_distinct_account_key_count"
160
+ ),
161
+ spend_in_spend=d.get("spend_in_spend"),
162
+ spend_in_transaction_count=d.get("spend_in_transaction_count"),
163
+ spend_out_distinct_account_key_count=d.get(
164
+ "spend_out_distinct_account_key_count"
165
+ ),
166
+ spend_out_spend=d.get("spend_out_spend"),
167
+ spend_out_transaction_count=d.get("spend_out_transaction_count"),
168
+ total_accounts=d.get("total_accounts"),
169
+ total_spend=d.get("total_spend"),
170
+ total_transactions=d.get("total_transactions"),
171
+ transaction_currency=d.get("transaction_currency"),
172
+ transaction_date=d.get("transaction_date"),
173
+ twenty_eight_day_rolling_category_accounts=d.get(
174
+ "twenty_eight_day_rolling_category_accounts"
175
+ ),
176
+ twenty_eight_day_rolling_total_accounts=d.get(
177
+ "twenty_eight_day_rolling_total_accounts"
178
+ ),
179
+ type=d.get("type"),
180
+ user_country=d.get("user_country"),
181
+ )
182
+
183
+
184
+ @modelclass
185
+ class EUMerchantHierarchy:
186
+ """
187
+ Reference data mapping merchants to parent companies, tickers, sectors,
188
+ and industries across Fable's European consumer transaction panel.
189
+ """
190
+
191
+ active_from: Optional[str] = None
192
+ active_to: Optional[str] = None
193
+ category: Optional[str] = None
194
+ grandparent_name: Optional[str] = None
195
+ grandparent_ticker: Optional[str] = None
196
+ great_grandparent_name: Optional[str] = None
197
+ great_grandparent_ticker: Optional[str] = None
198
+ industry: Optional[str] = None
199
+ industry_group: Optional[str] = None
200
+ listing_status: Optional[str] = None
201
+ lookup_name: Optional[str] = None
202
+ normalized_name: Optional[str] = None
203
+ parent_name: Optional[str] = None
204
+ parent_ticker: Optional[str] = None
205
+ sector: Optional[str] = None
206
+ sub_industry: Optional[str] = None
207
+ ticker: Optional[str] = None
208
+
209
+ @staticmethod
210
+ def from_dict(d):
211
+ return EUMerchantHierarchy(
212
+ active_from=d.get("active_from"),
213
+ active_to=d.get("active_to"),
214
+ category=d.get("category"),
215
+ grandparent_name=d.get("grandparent_name"),
216
+ grandparent_ticker=d.get("grandparent_ticker"),
217
+ great_grandparent_name=d.get("great_grandparent_name"),
218
+ great_grandparent_ticker=d.get("great_grandparent_ticker"),
219
+ industry=d.get("industry"),
220
+ industry_group=d.get("industry_group"),
221
+ listing_status=d.get("listing_status"),
222
+ lookup_name=d.get("lookup_name"),
223
+ normalized_name=d.get("normalized_name"),
224
+ parent_name=d.get("parent_name"),
225
+ parent_ticker=d.get("parent_ticker"),
226
+ sector=d.get("sector"),
227
+ sub_industry=d.get("sub_industry"),
228
+ ticker=d.get("ticker"),
229
+ )
@@ -922,6 +922,60 @@ class RiskFactorTaxonomy:
922
922
  )
923
923
 
924
924
 
925
+ @modelclass
926
+ @dataclass
927
+ class Filing13F:
928
+ """SEC Form 13F filings data showing institutional investment manager holdings."""
929
+
930
+ accession_number: Optional[str] = None
931
+ cusip: Optional[str] = None
932
+ file_number: Optional[str] = None
933
+ filer_cik: Optional[str] = None
934
+ filing_date: Optional[str] = None
935
+ filing_url: Optional[str] = None
936
+ film_number: Optional[str] = None
937
+ form_type: Optional[str] = None
938
+ investment_discretion: Optional[str] = None
939
+ issuer_name: Optional[str] = None
940
+ market_value: Optional[int] = None
941
+ other_managers: Optional[List[str]] = None
942
+ period: Optional[str] = None
943
+ put_call: Optional[str] = None
944
+ shares_or_principal_amount: Optional[int] = None
945
+ shares_or_principal_type: Optional[str] = None
946
+ title_of_class: Optional[str] = None
947
+ voting_authority_none: Optional[int] = None
948
+ voting_authority_shared: Optional[int] = None
949
+ voting_authority_sole: Optional[int] = None
950
+
951
+ @staticmethod
952
+ def from_dict(d: Optional[Dict[str, Any]]) -> "Filing13F":
953
+ if not d:
954
+ return Filing13F()
955
+ return Filing13F(
956
+ accession_number=d.get("accession_number"),
957
+ cusip=d.get("cusip"),
958
+ file_number=d.get("file_number"),
959
+ filer_cik=d.get("filer_cik"),
960
+ filing_date=d.get("filing_date"),
961
+ filing_url=d.get("filing_url"),
962
+ film_number=d.get("film_number"),
963
+ form_type=d.get("form_type"),
964
+ investment_discretion=d.get("investment_discretion"),
965
+ issuer_name=d.get("issuer_name"),
966
+ market_value=d.get("market_value"),
967
+ other_managers=d.get("other_managers"),
968
+ period=d.get("period"),
969
+ put_call=d.get("put_call"),
970
+ shares_or_principal_amount=d.get("shares_or_principal_amount"),
971
+ shares_or_principal_type=d.get("shares_or_principal_type"),
972
+ title_of_class=d.get("title_of_class"),
973
+ voting_authority_none=d.get("voting_authority_none"),
974
+ voting_authority_shared=d.get("voting_authority_shared"),
975
+ voting_authority_sole=d.get("voting_authority_sole"),
976
+ )
977
+
978
+
925
979
  @modelclass
926
980
  class FilingSection:
927
981
  """SEC document text section from a 10-K/10-Q (raw text content)."""
@@ -947,6 +1001,206 @@ class FilingSection:
947
1001
  )
948
1002
 
949
1003
 
1004
+ @modelclass
1005
+ @dataclass
1006
+ class FilingFootnote:
1007
+ """Footnote from SEC Form 3/4 filings."""
1008
+
1009
+ id: Optional[str] = None
1010
+ description: Optional[str] = None
1011
+
1012
+ @staticmethod
1013
+ def from_dict(d: Optional[Dict[str, Any]]) -> "FilingFootnote":
1014
+ if not d:
1015
+ return FilingFootnote()
1016
+ return FilingFootnote(
1017
+ id=d.get("id"),
1018
+ description=d.get("description"),
1019
+ )
1020
+
1021
+
1022
+ @modelclass
1023
+ @dataclass
1024
+ class FilingForm3:
1025
+ """SEC Form 3 filings reporting initial statements of beneficial ownership of securities.
1026
+ Filed by corporate insiders (directors, officers, and 10%+ shareholders) when they first acquire a position.
1027
+ """
1028
+
1029
+ accession_number: Optional[str] = None
1030
+ aff_10b5_one: Optional[bool] = None
1031
+ date_of_original_submission: Optional[str] = None
1032
+ direct_or_indirect: Optional[str] = None
1033
+ exercise_date: Optional[str] = None
1034
+ exercise_price: Optional[float] = None
1035
+ filing_date: Optional[str] = None
1036
+ filing_url: Optional[str] = None
1037
+ footnotes: Optional[List[FilingFootnote]] = None
1038
+ form_type: Optional[str] = None
1039
+ is_director: Optional[bool] = None
1040
+ is_officer: Optional[bool] = None
1041
+ is_other: Optional[bool] = None
1042
+ is_ten_percent_owner: Optional[bool] = None
1043
+ issuer_cik: Optional[str] = None
1044
+ issuer_name: Optional[str] = None
1045
+ nature_of_ownership: Optional[str] = None
1046
+ not_subject_to_section_16: Optional[bool] = None
1047
+ officer_title: Optional[str] = None
1048
+ owner_cik: Optional[str] = None
1049
+ owner_name: Optional[str] = None
1050
+ period_of_report: Optional[str] = None
1051
+ remarks: Optional[str] = None
1052
+ security_title: Optional[str] = None
1053
+ security_type: Optional[str] = None
1054
+ shares_owned: Optional[float] = None
1055
+ tickers: Optional[List[str]] = None
1056
+ underlying_security_shares: Optional[float] = None
1057
+ underlying_security_title: Optional[str] = None
1058
+
1059
+ @staticmethod
1060
+ def from_dict(d: Optional[Dict[str, Any]]) -> "FilingForm3":
1061
+ if not d:
1062
+ return FilingForm3()
1063
+ footnotes = d.get("footnotes")
1064
+ return FilingForm3(
1065
+ accession_number=d.get("accession_number"),
1066
+ aff_10b5_one=d.get("aff_10b5_one"),
1067
+ date_of_original_submission=d.get("date_of_original_submission"),
1068
+ direct_or_indirect=d.get("direct_or_indirect"),
1069
+ exercise_date=d.get("exercise_date"),
1070
+ exercise_price=d.get("exercise_price"),
1071
+ filing_date=d.get("filing_date"),
1072
+ filing_url=d.get("filing_url"),
1073
+ footnotes=(
1074
+ [FilingFootnote.from_dict(f) for f in footnotes]
1075
+ if footnotes is not None
1076
+ else None
1077
+ ),
1078
+ form_type=d.get("form_type"),
1079
+ is_director=d.get("is_director"),
1080
+ is_officer=d.get("is_officer"),
1081
+ is_other=d.get("is_other"),
1082
+ is_ten_percent_owner=d.get("is_ten_percent_owner"),
1083
+ issuer_cik=d.get("issuer_cik"),
1084
+ issuer_name=d.get("issuer_name"),
1085
+ nature_of_ownership=d.get("nature_of_ownership"),
1086
+ not_subject_to_section_16=d.get("not_subject_to_section_16"),
1087
+ officer_title=d.get("officer_title"),
1088
+ owner_cik=d.get("owner_cik"),
1089
+ owner_name=d.get("owner_name"),
1090
+ period_of_report=d.get("period_of_report"),
1091
+ remarks=d.get("remarks"),
1092
+ security_title=d.get("security_title"),
1093
+ security_type=d.get("security_type"),
1094
+ shares_owned=d.get("shares_owned"),
1095
+ tickers=d.get("tickers"),
1096
+ underlying_security_shares=d.get("underlying_security_shares"),
1097
+ underlying_security_title=d.get("underlying_security_title"),
1098
+ )
1099
+
1100
+
1101
+ @modelclass
1102
+ @dataclass
1103
+ class FilingForm4:
1104
+ """SEC Form 4 filings reporting changes in beneficial ownership of securities.
1105
+ Filed by corporate insiders (directors, officers, and 10%+ shareholders) within two business days of a transaction.
1106
+ """
1107
+
1108
+ accession_number: Optional[str] = None
1109
+ aff_10b5_one: Optional[bool] = None
1110
+ date_of_original_submission: Optional[str] = None
1111
+ deemed_execution_date: Optional[str] = None
1112
+ direct_or_indirect: Optional[str] = None
1113
+ equity_swap_involved: Optional[bool] = None
1114
+ exercise_date: Optional[str] = None
1115
+ exercise_price: Optional[float] = None
1116
+ expiration_date: Optional[str] = None
1117
+ filing_date: Optional[str] = None
1118
+ filing_url: Optional[str] = None
1119
+ footnotes: Optional[List[FilingFootnote]] = None
1120
+ form_type: Optional[str] = None
1121
+ is_director: Optional[bool] = None
1122
+ is_officer: Optional[bool] = None
1123
+ is_other: Optional[bool] = None
1124
+ is_ten_percent_owner: Optional[bool] = None
1125
+ issuer_cik: Optional[str] = None
1126
+ issuer_name: Optional[str] = None
1127
+ nature_of_ownership: Optional[str] = None
1128
+ not_subject_to_section_16: Optional[bool] = None
1129
+ officer_title: Optional[str] = None
1130
+ owner_cik: Optional[str] = None
1131
+ owner_name: Optional[str] = None
1132
+ period_of_report: Optional[str] = None
1133
+ record_type: Optional[str] = None
1134
+ remarks: Optional[str] = None
1135
+ security_title: Optional[str] = None
1136
+ security_type: Optional[str] = None
1137
+ shares_owned_following_transaction: Optional[float] = None
1138
+ tickers: Optional[List[str]] = None
1139
+ transaction_acquired_disposed: Optional[str] = None
1140
+ transaction_code: Optional[str] = None
1141
+ transaction_date: Optional[str] = None
1142
+ transaction_price_per_share: Optional[float] = None
1143
+ transaction_shares: Optional[float] = None
1144
+ transaction_timeliness: Optional[str] = None
1145
+ transaction_value: Optional[float] = None
1146
+ underlying_security_shares: Optional[float] = None
1147
+ underlying_security_title: Optional[str] = None
1148
+
1149
+ @staticmethod
1150
+ def from_dict(d: Optional[Dict[str, Any]]) -> "FilingForm4":
1151
+ if not d:
1152
+ return FilingForm4()
1153
+ footnotes = d.get("footnotes")
1154
+ return FilingForm4(
1155
+ accession_number=d.get("accession_number"),
1156
+ aff_10b5_one=d.get("aff_10b5_one"),
1157
+ date_of_original_submission=d.get("date_of_original_submission"),
1158
+ deemed_execution_date=d.get("deemed_execution_date"),
1159
+ direct_or_indirect=d.get("direct_or_indirect"),
1160
+ equity_swap_involved=d.get("equity_swap_involved"),
1161
+ exercise_date=d.get("exercise_date"),
1162
+ exercise_price=d.get("exercise_price"),
1163
+ expiration_date=d.get("expiration_date"),
1164
+ filing_date=d.get("filing_date"),
1165
+ filing_url=d.get("filing_url"),
1166
+ footnotes=(
1167
+ [FilingFootnote.from_dict(f) for f in footnotes]
1168
+ if footnotes is not None
1169
+ else None
1170
+ ),
1171
+ form_type=d.get("form_type"),
1172
+ is_director=d.get("is_director"),
1173
+ is_officer=d.get("is_officer"),
1174
+ is_other=d.get("is_other"),
1175
+ is_ten_percent_owner=d.get("is_ten_percent_owner"),
1176
+ issuer_cik=d.get("issuer_cik"),
1177
+ issuer_name=d.get("issuer_name"),
1178
+ nature_of_ownership=d.get("nature_of_ownership"),
1179
+ not_subject_to_section_16=d.get("not_subject_to_section_16"),
1180
+ officer_title=d.get("officer_title"),
1181
+ owner_cik=d.get("owner_cik"),
1182
+ owner_name=d.get("owner_name"),
1183
+ period_of_report=d.get("period_of_report"),
1184
+ record_type=d.get("record_type"),
1185
+ remarks=d.get("remarks"),
1186
+ security_title=d.get("security_title"),
1187
+ security_type=d.get("security_type"),
1188
+ shares_owned_following_transaction=d.get(
1189
+ "shares_owned_following_transaction"
1190
+ ),
1191
+ tickers=d.get("tickers"),
1192
+ transaction_acquired_disposed=d.get("transaction_acquired_disposed"),
1193
+ transaction_code=d.get("transaction_code"),
1194
+ transaction_date=d.get("transaction_date"),
1195
+ transaction_price_per_share=d.get("transaction_price_per_share"),
1196
+ transaction_shares=d.get("transaction_shares"),
1197
+ transaction_timeliness=d.get("transaction_timeliness"),
1198
+ transaction_value=d.get("transaction_value"),
1199
+ underlying_security_shares=d.get("underlying_security_shares"),
1200
+ underlying_security_title=d.get("underlying_security_title"),
1201
+ )
1202
+
1203
+
950
1204
  @modelclass
951
1205
  class Filing8K:
952
1206
  """Parsed 8-K filing with item-level text content."""
@@ -30,6 +30,9 @@ from .models import (
30
30
  RiskFactorTaxonomy,
31
31
  FilingSection,
32
32
  Filing8K,
33
+ Filing13F,
34
+ FilingForm3,
35
+ FilingForm4,
33
36
  FilingIndex,
34
37
  )
35
38
  from urllib3 import HTTPResponse
@@ -991,3 +994,131 @@ class ContractsClient(BaseClient):
991
994
  raw=raw,
992
995
  options=options,
993
996
  )
997
+
998
+ def list_stocks_filings_13f(
999
+ self,
1000
+ filer_cik: Optional[str] = None,
1001
+ filer_cik_any_of: Optional[str] = None,
1002
+ filing_date: Optional[Union[str, date]] = None,
1003
+ filing_date_gt: Optional[Union[str, date]] = None,
1004
+ filing_date_gte: Optional[Union[str, date]] = None,
1005
+ filing_date_lt: Optional[Union[str, date]] = None,
1006
+ filing_date_lte: Optional[Union[str, date]] = None,
1007
+ limit: Optional[int] = 100,
1008
+ sort: Optional[Union[str, Sort]] = "filing_date.desc",
1009
+ params: Optional[Dict[str, Any]] = None,
1010
+ raw: bool = False,
1011
+ options: Optional[RequestOptionBuilder] = None,
1012
+ ) -> Union[Iterator[Filing13F], HTTPResponse]:
1013
+ """
1014
+ SEC Form 13F filings data showing institutional investment manager holdings.
1015
+ Form 13F is required to be filed quarterly by institutional investment managers
1016
+ with at least $100 million in qualifying assets under management.
1017
+ """
1018
+ url = "/stocks/filings/vX/13-F"
1019
+
1020
+ return self._paginate(
1021
+ path=url,
1022
+ params=self._get_params(self.list_stocks_filings_13f, locals()),
1023
+ result_key="results",
1024
+ deserializer=Filing13F.from_dict,
1025
+ raw=raw,
1026
+ options=options,
1027
+ )
1028
+
1029
+ def list_stocks_filings_form_3(
1030
+ self,
1031
+ issuer_cik: Optional[str] = None,
1032
+ issuer_cik_any_of: Optional[str] = None,
1033
+ owner_cik: Optional[str] = None,
1034
+ owner_cik_any_of: Optional[str] = None,
1035
+ tickers: Optional[str] = None,
1036
+ tickers_all_of: Optional[str] = None,
1037
+ tickers_any_of: Optional[str] = None,
1038
+ form_type: Optional[str] = None,
1039
+ filing_date: Optional[Union[str, date]] = None,
1040
+ filing_date_gt: Optional[Union[str, date]] = None,
1041
+ filing_date_gte: Optional[Union[str, date]] = None,
1042
+ filing_date_lt: Optional[Union[str, date]] = None,
1043
+ filing_date_lte: Optional[Union[str, date]] = None,
1044
+ max_ticker: Optional[str] = None,
1045
+ max_ticker_any_of: Optional[str] = None,
1046
+ max_ticker_gt: Optional[str] = None,
1047
+ max_ticker_gte: Optional[str] = None,
1048
+ max_ticker_lt: Optional[str] = None,
1049
+ max_ticker_lte: Optional[str] = None,
1050
+ min_ticker: Optional[str] = None,
1051
+ min_ticker_any_of: Optional[str] = None,
1052
+ min_ticker_gt: Optional[str] = None,
1053
+ min_ticker_gte: Optional[str] = None,
1054
+ min_ticker_lt: Optional[str] = None,
1055
+ min_ticker_lte: Optional[str] = None,
1056
+ limit: Optional[int] = 100,
1057
+ sort: Optional[Union[str, Sort]] = "filing_date.desc",
1058
+ params: Optional[Dict[str, Any]] = None,
1059
+ raw: bool = False,
1060
+ options: Optional[RequestOptionBuilder] = None,
1061
+ ) -> Union[Iterator[FilingForm3], HTTPResponse]:
1062
+ """
1063
+ SEC Form 3 filings reporting initial statements of beneficial ownership of securities.
1064
+ Filed by corporate insiders (directors, officers, and 10%+ shareholders) when they first acquire a position.
1065
+ """
1066
+ url = "/stocks/filings/vX/form-3"
1067
+
1068
+ return self._paginate(
1069
+ path=url,
1070
+ params=self._get_params(self.list_stocks_filings_form_3, locals()),
1071
+ result_key="results",
1072
+ deserializer=FilingForm3.from_dict,
1073
+ raw=raw,
1074
+ options=options,
1075
+ )
1076
+
1077
+ def list_stocks_filings_form_4(
1078
+ self,
1079
+ issuer_cik: Optional[str] = None,
1080
+ issuer_cik_any_of: Optional[str] = None,
1081
+ owner_cik: Optional[str] = None,
1082
+ owner_cik_any_of: Optional[str] = None,
1083
+ tickers: Optional[str] = None,
1084
+ tickers_all_of: Optional[str] = None,
1085
+ tickers_any_of: Optional[str] = None,
1086
+ form_type: Optional[str] = None,
1087
+ transaction_code: Optional[str] = None,
1088
+ filing_date: Optional[Union[str, date]] = None,
1089
+ filing_date_gt: Optional[Union[str, date]] = None,
1090
+ filing_date_gte: Optional[Union[str, date]] = None,
1091
+ filing_date_lt: Optional[Union[str, date]] = None,
1092
+ filing_date_lte: Optional[Union[str, date]] = None,
1093
+ max_ticker: Optional[str] = None,
1094
+ max_ticker_any_of: Optional[str] = None,
1095
+ max_ticker_gt: Optional[str] = None,
1096
+ max_ticker_gte: Optional[str] = None,
1097
+ max_ticker_lt: Optional[str] = None,
1098
+ max_ticker_lte: Optional[str] = None,
1099
+ min_ticker: Optional[str] = None,
1100
+ min_ticker_any_of: Optional[str] = None,
1101
+ min_ticker_gt: Optional[str] = None,
1102
+ min_ticker_gte: Optional[str] = None,
1103
+ min_ticker_lt: Optional[str] = None,
1104
+ min_ticker_lte: Optional[str] = None,
1105
+ limit: Optional[int] = 100,
1106
+ sort: Optional[Union[str, Sort]] = "filing_date.desc",
1107
+ params: Optional[Dict[str, Any]] = None,
1108
+ raw: bool = False,
1109
+ options: Optional[RequestOptionBuilder] = None,
1110
+ ) -> Union[Iterator[FilingForm4], HTTPResponse]:
1111
+ """
1112
+ SEC Form 4 filings reporting changes in beneficial ownership of securities.
1113
+ Filed by corporate insiders (directors, officers, and 10%+ shareholders) within two business days of a transaction.
1114
+ """
1115
+ url = "/stocks/filings/vX/form-4"
1116
+
1117
+ return self._paginate(
1118
+ path=url,
1119
+ params=self._get_params(self.list_stocks_filings_form_4, locals()),
1120
+ result_key="results",
1121
+ deserializer=FilingForm4.from_dict,
1122
+ raw=raw,
1123
+ options=options,
1124
+ )
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "massive"
3
- version = "2.4.0"
3
+ version = "2.6.0"
4
4
  description = "Official Massive (formerly Polygon.io) REST and Websocket client."
5
5
  authors = ["massive.com"]
6
6
  license = "MIT"
@@ -1,106 +0,0 @@
1
- from typing import Optional
2
- from ...modelclass import modelclass
3
-
4
-
5
- @modelclass
6
- class TreasuryYield:
7
- """
8
- Treasury yield data for a specific date.
9
- """
10
-
11
- date: Optional[str] = None
12
- yield_1_month: Optional[float] = None
13
- yield_3_month: Optional[float] = None
14
- yield_6_month: Optional[float] = None
15
- yield_1_year: Optional[float] = None
16
- yield_2_year: Optional[float] = None
17
- yield_3_year: Optional[float] = None
18
- yield_5_year: Optional[float] = None
19
- yield_7_year: Optional[float] = None
20
- yield_10_year: Optional[float] = None
21
- yield_20_year: Optional[float] = None
22
- yield_30_year: Optional[float] = None
23
-
24
- @staticmethod
25
- def from_dict(d):
26
- return TreasuryYield(
27
- date=d.get("date"),
28
- yield_1_month=d.get("yield_1_month"),
29
- yield_3_month=d.get("yield_3_month"),
30
- yield_6_month=d.get("yield_6_month"),
31
- yield_1_year=d.get("yield_1_year"),
32
- yield_2_year=d.get("yield_2_year"),
33
- yield_3_year=d.get("yield_3_year"),
34
- yield_5_year=d.get("yield_5_year"),
35
- yield_7_year=d.get("yield_7_year"),
36
- yield_10_year=d.get("yield_10_year"),
37
- yield_20_year=d.get("yield_20_year"),
38
- yield_30_year=d.get("yield_30_year"),
39
- )
40
-
41
-
42
- @modelclass
43
- class FedInflation:
44
- cpi: Optional[float] = None
45
- cpi_core: Optional[float] = None
46
- cpi_year_over_year: Optional[float] = None
47
- date: Optional[str] = None
48
- pce: Optional[float] = None
49
- pce_core: Optional[float] = None
50
- pce_spending: Optional[float] = None
51
-
52
- @staticmethod
53
- def from_dict(d):
54
- return FedInflation(
55
- cpi=d.get("cpi"),
56
- cpi_core=d.get("cpi_core"),
57
- cpi_year_over_year=d.get("cpi_year_over_year"),
58
- date=d.get("date"),
59
- pce=d.get("pce"),
60
- pce_core=d.get("pce_core"),
61
- pce_spending=d.get("pce_spending"),
62
- )
63
-
64
-
65
- @modelclass
66
- class FedInflationExpectations:
67
- date: Optional[str] = None
68
- forward_years_5_to_10: Optional[float] = None
69
- market_10_year: Optional[float] = None
70
- market_5_year: Optional[float] = None
71
- model_10_year: Optional[float] = None
72
- model_1_year: Optional[float] = None
73
- model_30_year: Optional[float] = None
74
- model_5_year: Optional[float] = None
75
-
76
- @staticmethod
77
- def from_dict(d):
78
- return FedInflationExpectations(
79
- date=d.get("date"),
80
- forward_years_5_to_10=d.get("forward_years_5_to_10"),
81
- market_10_year=d.get("market_10_year"),
82
- market_5_year=d.get("market_5_year"),
83
- model_10_year=d.get("model_10_year"),
84
- model_1_year=d.get("model_1_year"),
85
- model_30_year=d.get("model_30_year"),
86
- model_5_year=d.get("model_5_year"),
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
- )
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