btgsolutions-dataservices-python-client 4.3.2__tar.gz → 4.4.1__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.
- {btgsolutions_dataservices_python_client-4.3.2/btgsolutions_dataservices_python_client.egg-info → btgsolutions_dataservices_python_client-4.4.1}/PKG-INFO +9 -16
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/README.md +7 -5
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/__init__.py +1 -1
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/alternative_data_catalog.py +90 -26
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/alternative_data_companies.py +126 -3
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/alternative_data_funds.py +30 -8
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/alternative_data_macro_markets.py +13 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/alternative_data_metadata.py +10 -1
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/alternative_data_ownership.py +4 -3
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/public_sources.py +2 -1
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1/btgsolutions_dataservices_python_client.egg-info}/PKG-INFO +10 -17
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/LICENSE +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/MANIFEST.in +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/config.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/exceptions.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/__init__.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/alternative_data_people.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/authenticator.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/book_scope.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/broker_analytics.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/broker_reference.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/bulk_data.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/company_data.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/corporate_events.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/dataservices_catalog.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/hfn.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/historical_candles.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/historical_candles_crypto.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/intraday_candles.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/intraday_tick_data.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/quotes.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/reference_data.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/stock_loan.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/ticker_last_event.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/rest/ticker_last_event_polling.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/websocket/__init__.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/websocket/broker_analytics.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/websocket/hfn_websocket_client.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/websocket/market_data_feed.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/websocket/market_data_websocket_client.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices/websocket/websocket_default_functions.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices_python_client.egg-info/SOURCES.txt +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices_python_client.egg-info/dependency_links.txt +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices_python_client.egg-info/requires.txt +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/btgsolutions_dataservices_python_client.egg-info/top_level.txt +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/pyproject.toml +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/requirements.txt +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/setup.cfg +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.1}/setup.py +0 -0
|
@@ -1,25 +1,14 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: btgsolutions_dataservices_python_client
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.4.1
|
|
4
4
|
Summary: Python package containing several classes and data for extracting and manipulating market and trading data.
|
|
5
5
|
Home-page: https://github.com/BTG-Pactual-Solutions/btgsolutions-dataservices-python-client
|
|
6
6
|
Author: BTG Solutions Data Services powered by BTG Pactual Solutions
|
|
7
|
+
License: UNKNOWN
|
|
8
|
+
Platform: UNKNOWN
|
|
7
9
|
Requires-Python: >=3.9,<3.15
|
|
8
10
|
Description-Content-Type: text/markdown
|
|
9
11
|
License-File: LICENSE
|
|
10
|
-
Requires-Dist: pandas>=2.2.2
|
|
11
|
-
Requires-Dist: websocket-client>=1.8.0
|
|
12
|
-
Requires-Dist: PyJWT>=2.8.0
|
|
13
|
-
Requires-Dist: requests>=2.32.3
|
|
14
|
-
Requires-Dist: pyarrow>=17.0.0
|
|
15
|
-
Dynamic: author
|
|
16
|
-
Dynamic: description
|
|
17
|
-
Dynamic: description-content-type
|
|
18
|
-
Dynamic: home-page
|
|
19
|
-
Dynamic: license-file
|
|
20
|
-
Dynamic: requires-dist
|
|
21
|
-
Dynamic: requires-python
|
|
22
|
-
Dynamic: summary
|
|
23
12
|
|
|
24
13
|
# BTG Solutions - Data Services
|
|
25
14
|
|
|
@@ -612,7 +601,7 @@ companies.get_governance_beneficial_ownership(company_id='AAPL') # UK PSC / US
|
|
|
612
601
|
companies.get_corporate_registry(company_id='PETR4', direction='partners')
|
|
613
602
|
companies.get_corporate_registry(company_id='PETR4', direction='investees')
|
|
614
603
|
companies.get_insider_trades(company_id='AAPL', start_date='2024-01-01', end_date='2024-12-31')
|
|
615
|
-
companies.get_board_changes(company_id='VALE3', event='
|
|
604
|
+
companies.get_board_changes(company_id='VALE3', event='elected')
|
|
616
605
|
companies.get_assemblies(company_id='PINE4')
|
|
617
606
|
companies.get_financial_statements(company_id='PETR4', statement='income_statement', quarter='4T24')
|
|
618
607
|
companies.get_financial_notes(company_id='VALE3', quarter='4T24')
|
|
@@ -670,6 +659,8 @@ macro.get_macro_indicators(indicator='selic')
|
|
|
670
659
|
macro.get_macro_indicators(indicator='ipca_contributions', start_date='2024-01', end_date='2024-12')
|
|
671
660
|
macro.get_macro_indicators(indicator='gdp', type='yoy')
|
|
672
661
|
macro.get_macro_indicators(indicator='comexstat', year='2024', state='SP')
|
|
662
|
+
macro.get_macro_indicators(indicator='comexstat', aggregate='states', start_date='2024-01', end_date='2024-12')
|
|
663
|
+
macro.get_macro_indicators(indicator='comexstat', aggregate='timeline', group_by='country', state='SP')
|
|
673
664
|
macro.get_macro_indicators(indicator='rreo', year='2024', period='6')
|
|
674
665
|
macro.get_maximum_theoretical_margin(asset='PETR4', report_date='2024-12-31')
|
|
675
666
|
macro.get_dpmfi(start_date='2024-01', end_date='2024-12', status='dados_oficiais')
|
|
@@ -740,3 +731,5 @@ ref = btg.ReferenceData(api_key='YOUR_API_KEY')
|
|
|
740
731
|
ref.ticker_reference(tickers=['VALE3','PETR4'])
|
|
741
732
|
```
|
|
742
733
|
|
|
734
|
+
|
|
735
|
+
|
|
@@ -589,7 +589,7 @@ companies.get_governance_beneficial_ownership(company_id='AAPL') # UK PSC / US
|
|
|
589
589
|
companies.get_corporate_registry(company_id='PETR4', direction='partners')
|
|
590
590
|
companies.get_corporate_registry(company_id='PETR4', direction='investees')
|
|
591
591
|
companies.get_insider_trades(company_id='AAPL', start_date='2024-01-01', end_date='2024-12-31')
|
|
592
|
-
companies.get_board_changes(company_id='VALE3', event='
|
|
592
|
+
companies.get_board_changes(company_id='VALE3', event='elected')
|
|
593
593
|
companies.get_assemblies(company_id='PINE4')
|
|
594
594
|
companies.get_financial_statements(company_id='PETR4', statement='income_statement', quarter='4T24')
|
|
595
595
|
companies.get_financial_notes(company_id='VALE3', quarter='4T24')
|
|
@@ -644,10 +644,12 @@ ownership.get_fund_holders(identifier='PETR4', identifier_type='b3_ticker')
|
|
|
644
644
|
import btgsolutions_dataservices as btg
|
|
645
645
|
macro = btg.AlternativeDataMacroMarkets(api_key='YOUR_API_KEY')
|
|
646
646
|
macro.get_macro_indicators(indicator='selic')
|
|
647
|
-
macro.get_macro_indicators(indicator='ipca_contributions', start_date='2024-01', end_date='2024-12')
|
|
648
|
-
macro.get_macro_indicators(indicator='gdp', type='yoy')
|
|
649
|
-
macro.get_macro_indicators(indicator='comexstat', year='2024', state='SP')
|
|
650
|
-
macro.get_macro_indicators(indicator='
|
|
647
|
+
macro.get_macro_indicators(indicator='ipca_contributions', start_date='2024-01', end_date='2024-12')
|
|
648
|
+
macro.get_macro_indicators(indicator='gdp', type='yoy')
|
|
649
|
+
macro.get_macro_indicators(indicator='comexstat', year='2024', state='SP')
|
|
650
|
+
macro.get_macro_indicators(indicator='comexstat', aggregate='states', start_date='2024-01', end_date='2024-12')
|
|
651
|
+
macro.get_macro_indicators(indicator='comexstat', aggregate='timeline', group_by='country', state='SP')
|
|
652
|
+
macro.get_macro_indicators(indicator='rreo', year='2024', period='6')
|
|
651
653
|
macro.get_maximum_theoretical_margin(asset='PETR4', report_date='2024-12-31')
|
|
652
654
|
macro.get_dpmfi(start_date='2024-01', end_date='2024-12', status='dados_oficiais')
|
|
653
655
|
macro.get_dpmfi(snapshot_date='2026-06-24', limit=10) # reproducible scoped snapshot
|
|
@@ -57,6 +57,17 @@ PUBLIC_SOURCES_DATA_GAPS: dict[str, str] = {
|
|
|
57
57
|
"can include broad aggregates such as Outros Comites; do not infer "
|
|
58
58
|
"granular committee names unless they are present in returned fields."
|
|
59
59
|
),
|
|
60
|
+
"get_board_changes": (
|
|
61
|
+
"Brazilian board-change rows can be materialized from FRE snapshot "
|
|
62
|
+
"comparisons. Use event_date as the timeline date when present; "
|
|
63
|
+
"reference_date and previous_reference_date describe the snapshots "
|
|
64
|
+
"used to detect the change. BR events commonly include elected, "
|
|
65
|
+
"replaced and resigned. A replaced row is a join event for the new "
|
|
66
|
+
"member/seat and suppresses a duplicate FRE-inferred elected row for "
|
|
67
|
+
"that same person, body, role and nearby date. Brazilian rows derived "
|
|
68
|
+
"from FRE snapshots use source='fre' unless a more specific source is "
|
|
69
|
+
"stored with the event."
|
|
70
|
+
),
|
|
60
71
|
"get_financial_statements": (
|
|
61
72
|
"company_id may be omitted only for universe-level screens or rankings. "
|
|
62
73
|
"There is no dedicated latest-quarter discovery field; when a requested "
|
|
@@ -138,13 +149,15 @@ PUBLIC_SOURCES_DATA_GAPS: dict[str, str] = {
|
|
|
138
149
|
"and free-float endpoints for Brazilian ownership context."
|
|
139
150
|
),
|
|
140
151
|
"get_asset_institutional_holders": (
|
|
141
|
-
"Institutional-holder coverage
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
152
|
+
"Institutional-holder coverage comes from the precomputed asset-holder "
|
|
153
|
+
"layer. For B3 tickers, the service can resolve the ticker to the "
|
|
154
|
+
"listed share-class ISIN from the B3 sector-classification staging "
|
|
155
|
+
"data when a direct b3_ticker snapshot is not present. Responses can "
|
|
156
|
+
"include lookup_identifier, lookup_identifier_type and lookup_note when "
|
|
157
|
+
"that ticker-to-ISIN fallback was used. This endpoint still does not run "
|
|
158
|
+
"the live fund-portfolio/ETF holding lookup used by "
|
|
159
|
+
"get_asset_fund_holders; use get_asset_fund_holders when this endpoint "
|
|
160
|
+
"is empty or when ETF/fund-holder coverage is needed."
|
|
148
161
|
),
|
|
149
162
|
"get_disclosure_documents_repurchase": (
|
|
150
163
|
"Share-repurchase disclosure coverage can be thin for many companies. "
|
|
@@ -373,14 +386,16 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
373
386
|
"description": (
|
|
374
387
|
"List ETFs available in the public-sources ETF registry. Use this "
|
|
375
388
|
"for ETF discovery because ETFs are not returned by listed-company "
|
|
376
|
-
"search endpoints."
|
|
389
|
+
"search endpoints. Use include_metrics=False for lightweight "
|
|
390
|
+
"autocomplete/search responses."
|
|
377
391
|
),
|
|
378
392
|
"parameters": {
|
|
379
393
|
"query": "Free-text filter over ticker, fund name, CNPJ or issuer.",
|
|
380
394
|
"issuer": "Optional issuer key/name filter.",
|
|
381
395
|
"source": "Holdings source used for reference date and totals: official, approximate or index.",
|
|
382
|
-
"sort_by": "Sort mode: name, ticker, positions_count_desc, total_value_desc or
|
|
396
|
+
"sort_by": "Sort mode: name, ticker, positions_count_desc, total_value_desc, total_value_asc, fund_nav_desc, fund_nav_asc, nav_desc, nav_asc, shareholders_count_desc, shareholders_count_asc, holders_desc or holders_asc.",
|
|
383
397
|
"min_positions": "Minimum number of positions required.",
|
|
398
|
+
"include_metrics": "When false, skip latest holdings/AUM/NAV/holder metric enrichment.",
|
|
384
399
|
"limit": "Maximum number of ETFs.",
|
|
385
400
|
"offset": "Pagination offset.",
|
|
386
401
|
},
|
|
@@ -506,6 +521,14 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
506
521
|
"country": "Partner country filter for Comexstat.",
|
|
507
522
|
"source": "Optional data-source filter.",
|
|
508
523
|
"type": "Subseries/type filter for PIM, PMC, PMS or GDP, such as industria_geral.",
|
|
524
|
+
"aggregate": (
|
|
525
|
+
"Optional compact aggregation mode. RREO supports timeline and states; "
|
|
526
|
+
"Comexstat supports states, countries, timeline and top_partners_by_state."
|
|
527
|
+
),
|
|
528
|
+
"group_by": (
|
|
529
|
+
"Optional Comexstat aggregation dimension for compact outputs, such as "
|
|
530
|
+
"state, country or state_country."
|
|
531
|
+
),
|
|
509
532
|
"limit": "Maximum number of observations.",
|
|
510
533
|
"offset": "Pagination offset.",
|
|
511
534
|
},
|
|
@@ -628,7 +651,8 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
628
651
|
"description": (
|
|
629
652
|
"Get historical governance snapshots for a company over a date "
|
|
630
653
|
"range. Use this for composition changes over time; use "
|
|
631
|
-
"get_board_changes for event-style
|
|
654
|
+
"get_board_changes for event-style election, replacement and "
|
|
655
|
+
"departure changes."
|
|
632
656
|
),
|
|
633
657
|
"parameters": {
|
|
634
658
|
"company_id": PUBLIC_SOURCES_CONVENTIONS["company_id"],
|
|
@@ -671,11 +695,16 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
671
695
|
"client": "AlternativeDataCompanies",
|
|
672
696
|
"description": (
|
|
673
697
|
"Get governance compensation or remuneration records for a company, "
|
|
674
|
-
"optionally filtered by fiscal_year."
|
|
698
|
+
"optionally filtered by fiscal_year, reference_date or governance_body. "
|
|
699
|
+
"Use summary=True for one compact record per fiscal year and governance body."
|
|
675
700
|
),
|
|
676
701
|
"parameters": {
|
|
677
702
|
"company_id": PUBLIC_SOURCES_CONVENTIONS["company_id"],
|
|
678
703
|
"fiscal_year": "Optional four-digit fiscal year.",
|
|
704
|
+
"reference_date": "Optional exact filing/reference date (YYYY-MM-DD).",
|
|
705
|
+
"governance_body": "Optional governance body filter.",
|
|
706
|
+
"summary": "When true, returns compact chart-ready records.",
|
|
707
|
+
"latest_only": "When true, restricts records to the latest matching reference date.",
|
|
679
708
|
"limit": "Maximum number of records.",
|
|
680
709
|
"offset": "Pagination offset.",
|
|
681
710
|
},
|
|
@@ -771,17 +800,18 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
771
800
|
"client": "AlternativeDataCompanies",
|
|
772
801
|
"description": (
|
|
773
802
|
"Get board or executive change events for a company, such as "
|
|
774
|
-
"
|
|
775
|
-
"get_board for composition at a date."
|
|
803
|
+
"elections, replacements and departures. Use this for event "
|
|
804
|
+
"timelines; use get_board for composition at a date."
|
|
776
805
|
),
|
|
777
806
|
"parameters": {
|
|
778
807
|
"company_id": PUBLIC_SOURCES_CONVENTIONS["company_id"],
|
|
779
|
-
"start_date": "Start date in YYYY-MM-DD.",
|
|
780
|
-
"end_date": "End date in YYYY-MM-DD.",
|
|
781
|
-
"event": "Optional event type filter.",
|
|
808
|
+
"start_date": "Start date in YYYY-MM-DD; filters event_date when present, otherwise reference_date.",
|
|
809
|
+
"end_date": "End date in YYYY-MM-DD; filters event_date when present, otherwise reference_date.",
|
|
810
|
+
"event": "Optional event type filter, for example elected, replaced, resigned or appointed depending on jurisdiction.",
|
|
782
811
|
"limit": "Maximum number of events.",
|
|
783
812
|
},
|
|
784
813
|
"relationships": ["company_resolution", "company_trading_bridge"],
|
|
814
|
+
"caveats": [PUBLIC_SOURCES_DATA_GAPS["get_board_changes"]],
|
|
785
815
|
},
|
|
786
816
|
"AlternativeDataCompanies.get_financial_statements": {
|
|
787
817
|
"category": "companies",
|
|
@@ -791,8 +821,11 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
791
821
|
"description": (
|
|
792
822
|
"Get company financial-statement line items from CVM filings. "
|
|
793
823
|
"statement can be income_statement, balance_sheet or cash_flow; "
|
|
794
|
-
"use account_code to retrieve
|
|
795
|
-
"
|
|
824
|
+
"use account_code/account_codes to retrieve specific accounts. "
|
|
825
|
+
"The optional summary mode returns direct CVM account-line metrics; "
|
|
826
|
+
"EBITDA is intentionally not returned because it is not a "
|
|
827
|
+
"standardized CVM account line. Omit company_id only for "
|
|
828
|
+
"universe-level screens or rankings."
|
|
796
829
|
),
|
|
797
830
|
"parameters": {
|
|
798
831
|
"company_id": (
|
|
@@ -800,10 +833,15 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
800
833
|
+ " Omit only for universe-level screens or rankings."
|
|
801
834
|
),
|
|
802
835
|
"statement": "Statement type or alias, for example income_statement, balance_sheet or cash_flow.",
|
|
836
|
+
"statements": "Optional comma-separated list of statement types/aliases to query in one call.",
|
|
803
837
|
"quarter": "Brazilian quarter code such as 1T24 or 4T24.",
|
|
804
838
|
"reference_date": "Reference date in YYYY-MM-DD.",
|
|
805
839
|
"statement_type": "Optional presentation/filter such as consolidated or individual when supported.",
|
|
806
840
|
"account_code": "Optional account code filter.",
|
|
841
|
+
"account_codes": "Optional comma-separated list of CVM account code filters.",
|
|
842
|
+
"summary": "When true, include direct-account summary metrics.",
|
|
843
|
+
"metrics": "Optional comma-separated summary metrics. ebitda is ignored because it is not a direct CVM account-line metric.",
|
|
844
|
+
"include_raw": "When false, suppress raw line items and return only metadata plus summary.",
|
|
807
845
|
"limit": "Maximum number of line items.",
|
|
808
846
|
"offset": "Pagination offset.",
|
|
809
847
|
},
|
|
@@ -822,11 +860,17 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
822
860
|
"description": (
|
|
823
861
|
"Get structured explanatory notes, notas explicativas, from CVM "
|
|
824
862
|
"DFP/ITR filings. Use this for note text and parsed note details, "
|
|
825
|
-
"not accounting line-item tables."
|
|
863
|
+
"not accounting line-item tables. Use sections, summary and "
|
|
864
|
+
"include_raw=False to reduce dashboard payloads."
|
|
826
865
|
),
|
|
827
866
|
"parameters": {
|
|
828
867
|
"company_id": PUBLIC_SOURCES_CONVENTIONS["company_id"],
|
|
829
868
|
"quarter": "Brazilian quarter code such as 1T24 or 4T24.",
|
|
869
|
+
"sections": "Optional comma-separated note sections: geographic_segments, fx_exposure, supplier_concentration.",
|
|
870
|
+
"summary": "When true, include compact counts by selected note section.",
|
|
871
|
+
"include_raw": "When false, suppress raw note documents and return only metadata plus summary.",
|
|
872
|
+
"only_with_data": "When true, return only periods where at least one selected section has parsed rows.",
|
|
873
|
+
"latest_only": "When true and quarter is omitted, restrict results to the latest matching quarter.",
|
|
830
874
|
"limit": "Maximum number of notes.",
|
|
831
875
|
"offset": "Pagination offset.",
|
|
832
876
|
},
|
|
@@ -844,7 +888,9 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
844
888
|
"Get CVM disclosure documents for Brazilian companies. "
|
|
845
889
|
"document_type='repurchase' returns share-buyback documents; "
|
|
846
890
|
"document_type='insiders' returns Brazilian insider-trading "
|
|
847
|
-
"disclosures; the upstream alias 'insider' is also accepted."
|
|
891
|
+
"disclosures; the upstream alias 'insider' is also accepted. "
|
|
892
|
+
"Use group_by to return compact aggregations such as month, "
|
|
893
|
+
"participant_group and side without downloading raw documents."
|
|
848
894
|
),
|
|
849
895
|
"parameters": {
|
|
850
896
|
"company_id": PUBLIC_SOURCES_CONVENTIONS["company_id"],
|
|
@@ -856,7 +902,11 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
856
902
|
"end_date": "End date in YYYY-MM-DD.",
|
|
857
903
|
"transaction": "Optional transaction description filter.",
|
|
858
904
|
"transaction_type": "Optional transaction type filter.",
|
|
905
|
+
"transaction_types": "Optional comma-separated list of normalized transaction type filters.",
|
|
859
906
|
"participant_group": "Optional participant group filter.",
|
|
907
|
+
"group_by": "Optional comma-separated aggregation dimensions: month, participant_group, side, asset, company, transaction_type, security, characteristics.",
|
|
908
|
+
"include_raw": "When false, suppress raw disclosure documents and return only metadata plus aggregations.",
|
|
909
|
+
"operation_type": "Optional operation class; spot narrows insiders to cash buy/sell operations.",
|
|
860
910
|
"limit": "Maximum number of documents.",
|
|
861
911
|
"offset": "Pagination offset.",
|
|
862
912
|
},
|
|
@@ -931,13 +981,20 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
931
981
|
"client": "AlternativeDataFunds",
|
|
932
982
|
"description": (
|
|
933
983
|
"Get a fund or ETF portfolio holdings/positions for a reference date. "
|
|
934
|
-
"Use this for constituent assets and weights or values, not NAV history."
|
|
984
|
+
"Use this for constituent assets and weights or values, not NAV history. "
|
|
985
|
+
"Use summary=True and include_raw=False for a compact payload. "
|
|
986
|
+
"For CVM/CDA rows without same-day daily NAV, position_weight may be "
|
|
987
|
+
"computed from the latest prior daily report within seven days; "
|
|
988
|
+
"company_nav_reference_date and company_nav_source identify that "
|
|
989
|
+
"NAV source when present."
|
|
935
990
|
),
|
|
936
991
|
"parameters": {
|
|
937
992
|
"fund_id": PUBLIC_SOURCES_CONVENTIONS["fund_id"],
|
|
938
993
|
"reference_date": "Reference date in YYYY-MM-DD; omitted means latest snapshot.",
|
|
939
994
|
"asset_class": "Optional asset class filter.",
|
|
940
995
|
"source": "Holdings source: official, approximate or index.",
|
|
996
|
+
"summary": "When true, include compact holdings totals and asset-class buckets.",
|
|
997
|
+
"include_raw": "When false, suppress raw holding rows from holdings.",
|
|
941
998
|
"limit": "Maximum number of holdings.",
|
|
942
999
|
"offset": "Pagination offset.",
|
|
943
1000
|
},
|
|
@@ -971,9 +1028,10 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
971
1028
|
"method": "GET",
|
|
972
1029
|
"client": "AlternativeDataFunds",
|
|
973
1030
|
"description": (
|
|
974
|
-
"Get a fund's NAV/AUM
|
|
975
|
-
"
|
|
976
|
-
"
|
|
1031
|
+
"Get a fund's daily NAV/AUM, quota and holder-count history over "
|
|
1032
|
+
"time when CVM daily reports are available. If no daily report "
|
|
1033
|
+
"exists for the fund, the endpoint falls back to holdings-derived "
|
|
1034
|
+
"portfolio total_value and positions_count."
|
|
977
1035
|
),
|
|
978
1036
|
"parameters": {
|
|
979
1037
|
"fund_id": PUBLIC_SOURCES_CONVENTIONS["fund_id"],
|
|
@@ -983,7 +1041,7 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
983
1041
|
},
|
|
984
1042
|
"relationships": ["fund_company_bridge", "fund_market_exposure_bridge"],
|
|
985
1043
|
"caveats": [
|
|
986
|
-
"
|
|
1044
|
+
"Inspect returned columns before comparing series: daily-report rows include net_assets_value, quota_value and shareholders_count, while holdings fallback rows only expose portfolio total_value and positions_count.",
|
|
987
1045
|
],
|
|
988
1046
|
},
|
|
989
1047
|
"AlternativeDataFunds.get_lookthrough": {
|
|
@@ -1223,7 +1281,8 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
1223
1281
|
"description": (
|
|
1224
1282
|
"Get institutional holders of an asset from the precomputed "
|
|
1225
1283
|
"asset-holder layer. identifier defaults to a B3 ticker when "
|
|
1226
|
-
"identifier_type='b3_ticker'
|
|
1284
|
+
"identifier_type='b3_ticker'; B3 tickers may be resolved to their "
|
|
1285
|
+
"share-class ISIN when no direct ticker snapshot exists."
|
|
1227
1286
|
),
|
|
1228
1287
|
"parameters": {
|
|
1229
1288
|
"identifier": PUBLIC_SOURCES_CONVENTIONS["asset_identifier"],
|
|
@@ -1265,6 +1324,11 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
1265
1324
|
"start_date": "Required start date in YYYY-MM-DD.",
|
|
1266
1325
|
"end_date": "Required end date in YYYY-MM-DD.",
|
|
1267
1326
|
"asset": "Optional asset ticker filter.",
|
|
1327
|
+
"date_field": (
|
|
1328
|
+
"Optional date field used by the API to apply the start/end "
|
|
1329
|
+
"range filter. Accepted values are reference_date or "
|
|
1330
|
+
"delivery_date."
|
|
1331
|
+
),
|
|
1268
1332
|
"raw_data": "If true, return upstream raw data; otherwise return a DataFrame.",
|
|
1269
1333
|
},
|
|
1270
1334
|
"relationships": [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Optional
|
|
1
|
+
from typing import Optional, Sequence, Union
|
|
2
2
|
import requests
|
|
3
3
|
from ..exceptions import BadResponse
|
|
4
4
|
from ..config import url_api_v1
|
|
@@ -44,6 +44,12 @@ class AlternativeDataCompanies:
|
|
|
44
44
|
self._raise_error(response)
|
|
45
45
|
return response.json()
|
|
46
46
|
|
|
47
|
+
@staticmethod
|
|
48
|
+
def _csv_param(value: Optional[Union[str, Sequence[str]]]) -> Optional[str]:
|
|
49
|
+
if value is None or isinstance(value, str):
|
|
50
|
+
return value
|
|
51
|
+
return ",".join(str(item) for item in value if item is not None and str(item) != "")
|
|
52
|
+
|
|
47
53
|
@staticmethod
|
|
48
54
|
def _raise_error(response):
|
|
49
55
|
try:
|
|
@@ -258,6 +264,10 @@ class AlternativeDataCompanies:
|
|
|
258
264
|
self,
|
|
259
265
|
company_id: str,
|
|
260
266
|
fiscal_year: Optional[str] = None,
|
|
267
|
+
reference_date: Optional[str] = None,
|
|
268
|
+
governance_body: Optional[str] = None,
|
|
269
|
+
summary: bool = False,
|
|
270
|
+
latest_only: bool = False,
|
|
261
271
|
limit: int = 100,
|
|
262
272
|
offset: int = 0,
|
|
263
273
|
) -> dict:
|
|
@@ -272,6 +282,18 @@ class AlternativeDataCompanies:
|
|
|
272
282
|
fiscal_year: str
|
|
273
283
|
Four-digit fiscal year filter.
|
|
274
284
|
Field is not required. Example: '2024'.
|
|
285
|
+
reference_date: str
|
|
286
|
+
Exact filing/reference date filter (YYYY-MM-DD).
|
|
287
|
+
Field is not required.
|
|
288
|
+
governance_body: str
|
|
289
|
+
Governance body filter. Example: 'Conselho de Administração'.
|
|
290
|
+
Field is not required.
|
|
291
|
+
summary: bool
|
|
292
|
+
When true, returns one compact record per fiscal year and governance body.
|
|
293
|
+
Field is not required. Default: False.
|
|
294
|
+
latest_only: bool
|
|
295
|
+
When true, restricts records to the latest matching reference date.
|
|
296
|
+
Field is not required. Default: False.
|
|
275
297
|
limit: int
|
|
276
298
|
Maximum number of results to return.
|
|
277
299
|
Field is not required. Default: 100.
|
|
@@ -282,6 +304,10 @@ class AlternativeDataCompanies:
|
|
|
282
304
|
return self._get("companies/governance-compensation", {
|
|
283
305
|
"company_id": company_id,
|
|
284
306
|
"fiscal_year": fiscal_year,
|
|
307
|
+
"reference_date": reference_date,
|
|
308
|
+
"governance_body": governance_body,
|
|
309
|
+
"summary": summary,
|
|
310
|
+
"latest_only": latest_only,
|
|
285
311
|
"limit": limit,
|
|
286
312
|
"offset": offset,
|
|
287
313
|
})
|
|
@@ -452,7 +478,14 @@ class AlternativeDataCompanies:
|
|
|
452
478
|
limit: int = 100,
|
|
453
479
|
) -> dict:
|
|
454
480
|
"""
|
|
455
|
-
Board
|
|
481
|
+
Board and executive change events.
|
|
482
|
+
|
|
483
|
+
Brazilian listed-company events can include FRE-derived ``elected``,
|
|
484
|
+
``replaced`` and ``resigned`` rows. Inspect ``event_date`` as the
|
|
485
|
+
effective timeline date when present; ``reference_date`` and
|
|
486
|
+
``previous_reference_date`` describe the source snapshots used to
|
|
487
|
+
detect the change. Brazilian rows derived from FRE snapshots use
|
|
488
|
+
``source='fre'`` unless a more specific source is stored.
|
|
456
489
|
|
|
457
490
|
Parameters
|
|
458
491
|
----------------
|
|
@@ -466,7 +499,8 @@ class AlternativeDataCompanies:
|
|
|
466
499
|
End date in YYYY-MM-DD format.
|
|
467
500
|
Field is not required.
|
|
468
501
|
event: str
|
|
469
|
-
Event type filter
|
|
502
|
+
Event type filter, for example 'elected', 'replaced',
|
|
503
|
+
'resigned' or 'appointed' depending on jurisdiction.
|
|
470
504
|
Field is not required.
|
|
471
505
|
limit: int
|
|
472
506
|
Maximum number of results to return.
|
|
@@ -484,10 +518,15 @@ class AlternativeDataCompanies:
|
|
|
484
518
|
self,
|
|
485
519
|
company_id: Optional[str] = None,
|
|
486
520
|
statement: str = "income_statement",
|
|
521
|
+
statements: Optional[Union[str, Sequence[str]]] = None,
|
|
487
522
|
quarter: Optional[str] = None,
|
|
488
523
|
reference_date: Optional[str] = None,
|
|
489
524
|
statement_type: Optional[str] = None,
|
|
490
525
|
account_code: Optional[str] = None,
|
|
526
|
+
account_codes: Optional[Union[str, Sequence[str]]] = None,
|
|
527
|
+
summary: Optional[bool] = None,
|
|
528
|
+
metrics: Optional[Union[str, Sequence[str]]] = None,
|
|
529
|
+
include_raw: Optional[bool] = None,
|
|
491
530
|
limit: int = 100,
|
|
492
531
|
offset: int = 0,
|
|
493
532
|
) -> dict:
|
|
@@ -509,6 +548,11 @@ class AlternativeDataCompanies:
|
|
|
509
548
|
statement: str
|
|
510
549
|
Statement type (e.g. 'income_statement', 'balance_sheet', 'cash_flow').
|
|
511
550
|
Field is not required. Default: 'income_statement'.
|
|
551
|
+
statements: str | list[str]
|
|
552
|
+
Optional comma-separated list (or Python sequence) of statement types
|
|
553
|
+
to query in a single call. When omitted, ``statement`` preserves the
|
|
554
|
+
historical single-statement behavior.
|
|
555
|
+
Field is not required.
|
|
512
556
|
quarter: str
|
|
513
557
|
Brazilian quarter code filter (e.g. '1T24' or '4T24').
|
|
514
558
|
Field is not required.
|
|
@@ -523,6 +567,26 @@ class AlternativeDataCompanies:
|
|
|
523
567
|
account_code: str
|
|
524
568
|
Specific account code filter.
|
|
525
569
|
Field is not required.
|
|
570
|
+
account_codes: str | list[str]
|
|
571
|
+
Optional comma-separated list (or Python sequence) of account codes.
|
|
572
|
+
This is useful for dashboard summaries that need only a few CVM
|
|
573
|
+
account lines instead of the full statement.
|
|
574
|
+
Field is not required.
|
|
575
|
+
summary: bool
|
|
576
|
+
When true, include a ``summary`` block with direct CVM account-line
|
|
577
|
+
metrics such as revenue, EBIT, net income, assets, equity and
|
|
578
|
+
operating cash flow. EBITDA is not returned because it is not a
|
|
579
|
+
standardized direct CVM account line.
|
|
580
|
+
Field is not required. Default: False.
|
|
581
|
+
metrics: str | list[str]
|
|
582
|
+
Optional summary metrics to return, for example
|
|
583
|
+
``['revenue', 'ebit', 'net_income']``. ``ebitda`` is not returned
|
|
584
|
+
because it is not a standardized direct CVM account line.
|
|
585
|
+
Field is not required.
|
|
586
|
+
include_raw: bool
|
|
587
|
+
When false and ``summary=True``, suppress raw line items and return
|
|
588
|
+
only metadata plus the summary block.
|
|
589
|
+
Field is not required. Default: True.
|
|
526
590
|
limit: int
|
|
527
591
|
Maximum number of results to return.
|
|
528
592
|
Field is not required. Default: 100.
|
|
@@ -533,10 +597,15 @@ class AlternativeDataCompanies:
|
|
|
533
597
|
return self._get("companies/financial-statements", {
|
|
534
598
|
"company_id": company_id,
|
|
535
599
|
"statement": statement,
|
|
600
|
+
"statements": self._csv_param(statements),
|
|
536
601
|
"quarter": quarter,
|
|
537
602
|
"reference_date": reference_date,
|
|
538
603
|
"statement_type": statement_type,
|
|
539
604
|
"account_code": account_code,
|
|
605
|
+
"account_codes": self._csv_param(account_codes),
|
|
606
|
+
"summary": summary,
|
|
607
|
+
"metrics": self._csv_param(metrics),
|
|
608
|
+
"include_raw": include_raw,
|
|
540
609
|
"limit": limit,
|
|
541
610
|
"offset": offset,
|
|
542
611
|
})
|
|
@@ -545,6 +614,11 @@ class AlternativeDataCompanies:
|
|
|
545
614
|
self,
|
|
546
615
|
company_id: str,
|
|
547
616
|
quarter: Optional[str] = None,
|
|
617
|
+
sections: Optional[Union[str, Sequence[str]]] = None,
|
|
618
|
+
summary: Optional[bool] = None,
|
|
619
|
+
include_raw: Optional[bool] = None,
|
|
620
|
+
only_with_data: Optional[bool] = None,
|
|
621
|
+
latest_only: Optional[bool] = None,
|
|
548
622
|
limit: int = 10,
|
|
549
623
|
offset: int = 0,
|
|
550
624
|
) -> dict:
|
|
@@ -561,6 +635,24 @@ class AlternativeDataCompanies:
|
|
|
561
635
|
quarter: str
|
|
562
636
|
Brazilian quarter code filter (e.g. '1T24' or '4T24').
|
|
563
637
|
Field is not required.
|
|
638
|
+
sections: str | list[str]
|
|
639
|
+
Optional note sections to return. Supported values are
|
|
640
|
+
geographic_segments, fx_exposure and supplier_concentration.
|
|
641
|
+
Field is not required.
|
|
642
|
+
summary: bool
|
|
643
|
+
When true, includes compact per-document counts by selected section.
|
|
644
|
+
Field is not required. Default: False.
|
|
645
|
+
include_raw: bool
|
|
646
|
+
When false, suppresses raw note documents from ``results``.
|
|
647
|
+
Field is not required. Default: True.
|
|
648
|
+
only_with_data: bool
|
|
649
|
+
When true, returns only periods where at least one selected section
|
|
650
|
+
has parsed rows.
|
|
651
|
+
Field is not required. Default: False.
|
|
652
|
+
latest_only: bool
|
|
653
|
+
When true and quarter is omitted, restricts the response to the
|
|
654
|
+
latest matching quarter.
|
|
655
|
+
Field is not required. Default: False.
|
|
564
656
|
limit: int
|
|
565
657
|
Maximum number of results to return.
|
|
566
658
|
Field is not required. Default: 10.
|
|
@@ -571,6 +663,11 @@ class AlternativeDataCompanies:
|
|
|
571
663
|
return self._get("companies/financial-notes", {
|
|
572
664
|
"company_id": company_id,
|
|
573
665
|
"quarter": quarter,
|
|
666
|
+
"sections": self._csv_param(sections),
|
|
667
|
+
"summary": summary,
|
|
668
|
+
"include_raw": include_raw,
|
|
669
|
+
"only_with_data": only_with_data,
|
|
670
|
+
"latest_only": latest_only,
|
|
574
671
|
"limit": limit,
|
|
575
672
|
"offset": offset,
|
|
576
673
|
})
|
|
@@ -586,7 +683,11 @@ class AlternativeDataCompanies:
|
|
|
586
683
|
end_date: Optional[str] = None,
|
|
587
684
|
transaction: Optional[str] = None,
|
|
588
685
|
transaction_type: Optional[str] = None,
|
|
686
|
+
transaction_types: Optional[Union[str, Sequence[str]]] = None,
|
|
589
687
|
participant_group: Optional[str] = None,
|
|
688
|
+
group_by: Optional[Union[str, Sequence[str]]] = None,
|
|
689
|
+
include_raw: Optional[bool] = None,
|
|
690
|
+
operation_type: Optional[str] = None,
|
|
590
691
|
limit: int = 100,
|
|
591
692
|
offset: int = 0,
|
|
592
693
|
) -> dict:
|
|
@@ -627,9 +728,27 @@ class AlternativeDataCompanies:
|
|
|
627
728
|
transaction_type: str
|
|
628
729
|
Transaction type filter.
|
|
629
730
|
Field is not required.
|
|
731
|
+
transaction_types: str | list[str]
|
|
732
|
+
Optional comma-separated list (or Python sequence) of normalized
|
|
733
|
+
transaction types.
|
|
734
|
+
Field is not required.
|
|
630
735
|
participant_group: str
|
|
631
736
|
Participant group filter.
|
|
632
737
|
Field is not required.
|
|
738
|
+
group_by: str | list[str]
|
|
739
|
+
Optional aggregation dimensions. Supported values include month,
|
|
740
|
+
participant_group, side, asset, company, transaction_type, security
|
|
741
|
+
and characteristics. For dashboard insider charts, use
|
|
742
|
+
``['month', 'participant_group', 'side']``.
|
|
743
|
+
Field is not required.
|
|
744
|
+
include_raw: bool
|
|
745
|
+
When false, suppress raw disclosure documents and return only
|
|
746
|
+
metadata plus aggregations.
|
|
747
|
+
Field is not required. Default: True.
|
|
748
|
+
operation_type: str
|
|
749
|
+
Optional operation class. ``spot`` narrows insider aggregations to
|
|
750
|
+
cash buy/sell operations and excludes transfers/conversions.
|
|
751
|
+
Field is not required.
|
|
633
752
|
limit: int
|
|
634
753
|
Maximum number of results to return.
|
|
635
754
|
Field is not required. Default: 100.
|
|
@@ -647,7 +766,11 @@ class AlternativeDataCompanies:
|
|
|
647
766
|
"end_date": end_date,
|
|
648
767
|
"transaction": transaction,
|
|
649
768
|
"transaction_type": transaction_type,
|
|
769
|
+
"transaction_types": self._csv_param(transaction_types),
|
|
650
770
|
"participant_group": participant_group,
|
|
771
|
+
"group_by": self._csv_param(group_by),
|
|
772
|
+
"include_raw": include_raw,
|
|
773
|
+
"operation_type": operation_type,
|
|
651
774
|
"limit": limit,
|
|
652
775
|
"offset": offset,
|
|
653
776
|
})
|
|
@@ -59,6 +59,7 @@ class AlternativeDataFunds:
|
|
|
59
59
|
source: str = "official",
|
|
60
60
|
sort_by: str = "name",
|
|
61
61
|
min_positions: int = 1,
|
|
62
|
+
include_metrics: bool = True,
|
|
62
63
|
limit: int = 100,
|
|
63
64
|
offset: int = 0,
|
|
64
65
|
) -> dict:
|
|
@@ -81,11 +82,18 @@ class AlternativeDataFunds:
|
|
|
81
82
|
Field is not required. Default: 'official'.
|
|
82
83
|
sort_by: str
|
|
83
84
|
Sort mode: 'name', 'ticker', 'positions_count_desc',
|
|
84
|
-
'total_value_desc',
|
|
85
|
+
'total_value_desc', 'total_value_asc', 'fund_nav_desc',
|
|
86
|
+
'fund_nav_asc', 'nav_desc', 'nav_asc',
|
|
87
|
+
'shareholders_count_desc', 'shareholders_count_asc',
|
|
88
|
+
'holders_desc', or 'holders_asc'.
|
|
85
89
|
Field is not required. Default: 'name'.
|
|
86
90
|
min_positions: int
|
|
87
91
|
Minimum number of positions required for an ETF to be returned.
|
|
88
92
|
Field is not required. Default: 1.
|
|
93
|
+
include_metrics: bool
|
|
94
|
+
When false, returns ETF identity fields without computing latest
|
|
95
|
+
positions, AUM/NAV or holder metrics. Use this for autocomplete.
|
|
96
|
+
Field is not required. Default: True.
|
|
89
97
|
limit: int
|
|
90
98
|
Maximum number of ETFs to return.
|
|
91
99
|
Field is not required. Default: 100.
|
|
@@ -99,6 +107,7 @@ class AlternativeDataFunds:
|
|
|
99
107
|
"source": source,
|
|
100
108
|
"sort_by": sort_by,
|
|
101
109
|
"min_positions": min_positions,
|
|
110
|
+
"include_metrics": include_metrics,
|
|
102
111
|
"limit": limit,
|
|
103
112
|
"offset": offset,
|
|
104
113
|
})
|
|
@@ -109,6 +118,8 @@ class AlternativeDataFunds:
|
|
|
109
118
|
reference_date: Optional[str] = None,
|
|
110
119
|
asset_class: Optional[str] = None,
|
|
111
120
|
source: str = "official",
|
|
121
|
+
summary: Optional[bool] = None,
|
|
122
|
+
include_raw: Optional[bool] = None,
|
|
112
123
|
limit: int = 200,
|
|
113
124
|
offset: int = 0,
|
|
114
125
|
) -> dict:
|
|
@@ -116,7 +127,10 @@ class AlternativeDataFunds:
|
|
|
116
127
|
Holdings snapshot for a Brazilian CVM fund, ETF, or US fund.
|
|
117
128
|
Use this to connect funds or ETFs to underlying assets. For the inverse
|
|
118
129
|
relationship, use AlternativeDataOwnership.get_fund_holders() with a B3
|
|
119
|
-
asset ticker.
|
|
130
|
+
asset ticker. For CVM/CDA rows without same-day daily NAV, the API may
|
|
131
|
+
compute position_weight from the latest prior daily report within seven
|
|
132
|
+
days; company_nav_reference_date and company_nav_source identify that
|
|
133
|
+
NAV source when it differs from the holdings reference date.
|
|
120
134
|
|
|
121
135
|
Parameters
|
|
122
136
|
----------------
|
|
@@ -133,6 +147,13 @@ class AlternativeDataFunds:
|
|
|
133
147
|
source: str
|
|
134
148
|
Data source: 'official', 'approximate', or 'index'.
|
|
135
149
|
Field is not required. Default: 'official'.
|
|
150
|
+
summary: bool
|
|
151
|
+
When true, includes compact positions_count, total_value,
|
|
152
|
+
total_weight and asset-class buckets.
|
|
153
|
+
Field is not required. Default: False.
|
|
154
|
+
include_raw: bool
|
|
155
|
+
When false, suppresses raw holding rows from ``holdings``.
|
|
156
|
+
Field is not required. Default: True.
|
|
136
157
|
limit: int
|
|
137
158
|
Maximum number of holdings to return (max 5000).
|
|
138
159
|
Field is not required. Default: 200.
|
|
@@ -145,6 +166,8 @@ class AlternativeDataFunds:
|
|
|
145
166
|
"reference_date": reference_date,
|
|
146
167
|
"asset_class": asset_class,
|
|
147
168
|
"source": source,
|
|
169
|
+
"summary": summary,
|
|
170
|
+
"include_raw": include_raw,
|
|
148
171
|
"limit": limit,
|
|
149
172
|
"offset": offset,
|
|
150
173
|
})
|
|
@@ -192,12 +215,11 @@ class AlternativeDataFunds:
|
|
|
192
215
|
limit: int = 12,
|
|
193
216
|
) -> dict:
|
|
194
217
|
"""
|
|
195
|
-
History time-series for a Brazilian CVM fund or ETF.
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
NAV filing schema.
|
|
218
|
+
History time-series for a Brazilian CVM fund or ETF. When CVM daily
|
|
219
|
+
reports are available, rows include net_assets_value/total_value,
|
|
220
|
+
quota_value/fund_nav and shareholders_count. If no daily report exists
|
|
221
|
+
for the fund, the endpoint falls back to holdings-derived portfolio
|
|
222
|
+
value and positions_count.
|
|
201
223
|
|
|
202
224
|
Parameters
|
|
203
225
|
----------------
|
|
@@ -64,6 +64,8 @@ class AlternativeDataMacroMarkets:
|
|
|
64
64
|
country: Optional[str] = None,
|
|
65
65
|
source: Optional[str] = None,
|
|
66
66
|
type: Optional[str] = None,
|
|
67
|
+
aggregate: Optional[str] = None,
|
|
68
|
+
group_by: Optional[str] = None,
|
|
67
69
|
limit: int = 100,
|
|
68
70
|
offset: int = 0,
|
|
69
71
|
) -> dict:
|
|
@@ -116,6 +118,15 @@ class AlternativeDataMacroMarkets:
|
|
|
116
118
|
type: str
|
|
117
119
|
Variation type for PIM/PMC/PMS/GDP: 'yoy' or 'mom'.
|
|
118
120
|
Field is not required.
|
|
121
|
+
aggregate: str
|
|
122
|
+
Optional compact aggregation mode. RREO supports 'timeline' and
|
|
123
|
+
'states'. ComexStat supports 'states', 'countries', 'timeline',
|
|
124
|
+
and 'top_partners_by_state'.
|
|
125
|
+
Field is not required.
|
|
126
|
+
group_by: str
|
|
127
|
+
Optional aggregation dimension for ComexStat. Use 'state',
|
|
128
|
+
'country', or 'state_country' where supported.
|
|
129
|
+
Field is not required.
|
|
119
130
|
limit: int
|
|
120
131
|
Maximum number of observations to return.
|
|
121
132
|
Field is not required. Default: 100.
|
|
@@ -134,6 +145,8 @@ class AlternativeDataMacroMarkets:
|
|
|
134
145
|
"country": country,
|
|
135
146
|
"source": source,
|
|
136
147
|
"type": type,
|
|
148
|
+
"aggregate": aggregate,
|
|
149
|
+
"group_by": group_by,
|
|
137
150
|
"limit": limit,
|
|
138
151
|
"offset": offset,
|
|
139
152
|
})
|
|
@@ -183,6 +183,7 @@ class AlternativeDataMetadata:
|
|
|
183
183
|
source: str = "official",
|
|
184
184
|
sort_by: str = "name",
|
|
185
185
|
min_positions: int = 1,
|
|
186
|
+
include_metrics: bool = True,
|
|
186
187
|
limit: int = 100,
|
|
187
188
|
offset: int = 0,
|
|
188
189
|
) -> dict:
|
|
@@ -205,11 +206,18 @@ class AlternativeDataMetadata:
|
|
|
205
206
|
Field is not required. Default: 'official'.
|
|
206
207
|
sort_by: str
|
|
207
208
|
Sort mode: 'name', 'ticker', 'positions_count_desc',
|
|
208
|
-
'total_value_desc',
|
|
209
|
+
'total_value_desc', 'total_value_asc', 'fund_nav_desc',
|
|
210
|
+
'fund_nav_asc', 'nav_desc', 'nav_asc',
|
|
211
|
+
'shareholders_count_desc', 'shareholders_count_asc',
|
|
212
|
+
'holders_desc', or 'holders_asc'.
|
|
209
213
|
Field is not required. Default: 'name'.
|
|
210
214
|
min_positions: int
|
|
211
215
|
Minimum number of positions required for an ETF to be returned.
|
|
212
216
|
Field is not required. Default: 1.
|
|
217
|
+
include_metrics: bool
|
|
218
|
+
When false, returns ETF identity fields without computing latest
|
|
219
|
+
positions, AUM/NAV or holder metrics. Use this for autocomplete.
|
|
220
|
+
Field is not required. Default: True.
|
|
213
221
|
limit: int
|
|
214
222
|
Maximum number of ETFs to return.
|
|
215
223
|
Field is not required. Default: 100.
|
|
@@ -223,6 +231,7 @@ class AlternativeDataMetadata:
|
|
|
223
231
|
"source": source,
|
|
224
232
|
"sort_by": sort_by,
|
|
225
233
|
"min_positions": min_positions,
|
|
234
|
+
"include_metrics": include_metrics,
|
|
226
235
|
"limit": limit,
|
|
227
236
|
"offset": offset,
|
|
228
237
|
})
|
|
@@ -373,9 +373,10 @@ class AlternativeDataOwnership:
|
|
|
373
373
|
) -> dict:
|
|
374
374
|
"""
|
|
375
375
|
Institutional holders of a specific asset from the precomputed
|
|
376
|
-
asset-holder layer.
|
|
377
|
-
|
|
378
|
-
|
|
376
|
+
asset-holder layer. For B3 tickers, the service can resolve the ticker
|
|
377
|
+
to the listed share-class ISIN when no direct ticker snapshot exists.
|
|
378
|
+
This endpoint does not run the live fund-portfolio/ETF holding lookup
|
|
379
|
+
used by get_fund_holders(); when this endpoint returns no holders,
|
|
379
380
|
get_fund_holders() is often the richer inverse relationship for
|
|
380
381
|
Brazilian assets because it uses fund portfolio and ETF holding
|
|
381
382
|
snapshots.
|
|
@@ -100,7 +100,8 @@ class PublicSources:
|
|
|
100
100
|
If false, returns data in a dataframe. If true, returns raw data.
|
|
101
101
|
Field is not required. Default: False.
|
|
102
102
|
date_field: str
|
|
103
|
-
Specific
|
|
103
|
+
Specific date field used to apply the period filter.
|
|
104
|
+
Accepted values: "reference_date" or "delivery_date".
|
|
104
105
|
Field is not required. Example: "delivery_date". Default: None.
|
|
105
106
|
"""
|
|
106
107
|
|
|
@@ -1,25 +1,14 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
2
|
-
Name:
|
|
3
|
-
Version: 4.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: btgsolutions-dataservices-python-client
|
|
3
|
+
Version: 4.4.1
|
|
4
4
|
Summary: Python package containing several classes and data for extracting and manipulating market and trading data.
|
|
5
5
|
Home-page: https://github.com/BTG-Pactual-Solutions/btgsolutions-dataservices-python-client
|
|
6
6
|
Author: BTG Solutions Data Services powered by BTG Pactual Solutions
|
|
7
|
+
License: UNKNOWN
|
|
8
|
+
Platform: UNKNOWN
|
|
7
9
|
Requires-Python: >=3.9,<3.15
|
|
8
10
|
Description-Content-Type: text/markdown
|
|
9
11
|
License-File: LICENSE
|
|
10
|
-
Requires-Dist: pandas>=2.2.2
|
|
11
|
-
Requires-Dist: websocket-client>=1.8.0
|
|
12
|
-
Requires-Dist: PyJWT>=2.8.0
|
|
13
|
-
Requires-Dist: requests>=2.32.3
|
|
14
|
-
Requires-Dist: pyarrow>=17.0.0
|
|
15
|
-
Dynamic: author
|
|
16
|
-
Dynamic: description
|
|
17
|
-
Dynamic: description-content-type
|
|
18
|
-
Dynamic: home-page
|
|
19
|
-
Dynamic: license-file
|
|
20
|
-
Dynamic: requires-dist
|
|
21
|
-
Dynamic: requires-python
|
|
22
|
-
Dynamic: summary
|
|
23
12
|
|
|
24
13
|
# BTG Solutions - Data Services
|
|
25
14
|
|
|
@@ -612,7 +601,7 @@ companies.get_governance_beneficial_ownership(company_id='AAPL') # UK PSC / US
|
|
|
612
601
|
companies.get_corporate_registry(company_id='PETR4', direction='partners')
|
|
613
602
|
companies.get_corporate_registry(company_id='PETR4', direction='investees')
|
|
614
603
|
companies.get_insider_trades(company_id='AAPL', start_date='2024-01-01', end_date='2024-12-31')
|
|
615
|
-
companies.get_board_changes(company_id='VALE3', event='
|
|
604
|
+
companies.get_board_changes(company_id='VALE3', event='elected')
|
|
616
605
|
companies.get_assemblies(company_id='PINE4')
|
|
617
606
|
companies.get_financial_statements(company_id='PETR4', statement='income_statement', quarter='4T24')
|
|
618
607
|
companies.get_financial_notes(company_id='VALE3', quarter='4T24')
|
|
@@ -670,6 +659,8 @@ macro.get_macro_indicators(indicator='selic')
|
|
|
670
659
|
macro.get_macro_indicators(indicator='ipca_contributions', start_date='2024-01', end_date='2024-12')
|
|
671
660
|
macro.get_macro_indicators(indicator='gdp', type='yoy')
|
|
672
661
|
macro.get_macro_indicators(indicator='comexstat', year='2024', state='SP')
|
|
662
|
+
macro.get_macro_indicators(indicator='comexstat', aggregate='states', start_date='2024-01', end_date='2024-12')
|
|
663
|
+
macro.get_macro_indicators(indicator='comexstat', aggregate='timeline', group_by='country', state='SP')
|
|
673
664
|
macro.get_macro_indicators(indicator='rreo', year='2024', period='6')
|
|
674
665
|
macro.get_maximum_theoretical_margin(asset='PETR4', report_date='2024-12-31')
|
|
675
666
|
macro.get_dpmfi(start_date='2024-01', end_date='2024-12', status='dados_oficiais')
|
|
@@ -740,3 +731,5 @@ ref = btg.ReferenceData(api_key='YOUR_API_KEY')
|
|
|
740
731
|
ref.ticker_reference(tickers=['VALE3','PETR4'])
|
|
741
732
|
```
|
|
742
733
|
|
|
734
|
+
|
|
735
|
+
|
|
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
|