btgsolutions-dataservices-python-client 4.3.2__tar.gz → 4.4.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.
- {btgsolutions_dataservices_python_client-4.3.2/btgsolutions_dataservices_python_client.egg-info → btgsolutions_dataservices_python_client-4.4.0}/PKG-INFO +3 -1
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/README.md +6 -4
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/__init__.py +1 -1
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/alternative_data_catalog.py +56 -15
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/alternative_data_companies.py +116 -1
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/alternative_data_funds.py +17 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/alternative_data_macro_markets.py +13 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/alternative_data_metadata.py +6 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/alternative_data_ownership.py +4 -3
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0/btgsolutions_dataservices_python_client.egg-info}/PKG-INFO +3 -1
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/LICENSE +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/MANIFEST.in +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/config.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/exceptions.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/__init__.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/alternative_data_people.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/authenticator.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/book_scope.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/broker_analytics.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/broker_reference.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/bulk_data.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/company_data.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/corporate_events.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/dataservices_catalog.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/hfn.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/historical_candles.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/historical_candles_crypto.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/intraday_candles.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/intraday_tick_data.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/public_sources.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/quotes.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/reference_data.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/stock_loan.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/ticker_last_event.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/rest/ticker_last_event_polling.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/websocket/__init__.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/websocket/broker_analytics.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/websocket/hfn_websocket_client.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/websocket/market_data_feed.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/websocket/market_data_websocket_client.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices/websocket/websocket_default_functions.py +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices_python_client.egg-info/SOURCES.txt +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices_python_client.egg-info/dependency_links.txt +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices_python_client.egg-info/requires.txt +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/btgsolutions_dataservices_python_client.egg-info/top_level.txt +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/pyproject.toml +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/requirements.txt +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/setup.cfg +0 -0
- {btgsolutions_dataservices_python_client-4.3.2 → btgsolutions_dataservices_python_client-4.4.0}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: btgsolutions_dataservices_python_client
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.4.0
|
|
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
|
|
@@ -670,6 +670,8 @@ macro.get_macro_indicators(indicator='selic')
|
|
|
670
670
|
macro.get_macro_indicators(indicator='ipca_contributions', start_date='2024-01', end_date='2024-12')
|
|
671
671
|
macro.get_macro_indicators(indicator='gdp', type='yoy')
|
|
672
672
|
macro.get_macro_indicators(indicator='comexstat', year='2024', state='SP')
|
|
673
|
+
macro.get_macro_indicators(indicator='comexstat', aggregate='states', start_date='2024-01', end_date='2024-12')
|
|
674
|
+
macro.get_macro_indicators(indicator='comexstat', aggregate='timeline', group_by='country', state='SP')
|
|
673
675
|
macro.get_macro_indicators(indicator='rreo', year='2024', period='6')
|
|
674
676
|
macro.get_maximum_theoretical_margin(asset='PETR4', report_date='2024-12-31')
|
|
675
677
|
macro.get_dpmfi(start_date='2024-01', end_date='2024-12', status='dados_oficiais')
|
|
@@ -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
|
|
@@ -138,13 +138,15 @@ PUBLIC_SOURCES_DATA_GAPS: dict[str, str] = {
|
|
|
138
138
|
"and free-float endpoints for Brazilian ownership context."
|
|
139
139
|
),
|
|
140
140
|
"get_asset_institutional_holders": (
|
|
141
|
-
"Institutional-holder coverage
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
141
|
+
"Institutional-holder coverage comes from the precomputed asset-holder "
|
|
142
|
+
"layer. For B3 tickers, the service can resolve the ticker to the "
|
|
143
|
+
"listed share-class ISIN from the B3 sector-classification staging "
|
|
144
|
+
"data when a direct b3_ticker snapshot is not present. Responses can "
|
|
145
|
+
"include lookup_identifier, lookup_identifier_type and lookup_note when "
|
|
146
|
+
"that ticker-to-ISIN fallback was used. This endpoint still does not run "
|
|
147
|
+
"the live fund-portfolio/ETF holding lookup used by "
|
|
148
|
+
"get_asset_fund_holders; use get_asset_fund_holders when this endpoint "
|
|
149
|
+
"is empty or when ETF/fund-holder coverage is needed."
|
|
148
150
|
),
|
|
149
151
|
"get_disclosure_documents_repurchase": (
|
|
150
152
|
"Share-repurchase disclosure coverage can be thin for many companies. "
|
|
@@ -373,7 +375,8 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
373
375
|
"description": (
|
|
374
376
|
"List ETFs available in the public-sources ETF registry. Use this "
|
|
375
377
|
"for ETF discovery because ETFs are not returned by listed-company "
|
|
376
|
-
"search endpoints."
|
|
378
|
+
"search endpoints. Use include_metrics=False for lightweight "
|
|
379
|
+
"autocomplete/search responses."
|
|
377
380
|
),
|
|
378
381
|
"parameters": {
|
|
379
382
|
"query": "Free-text filter over ticker, fund name, CNPJ or issuer.",
|
|
@@ -381,6 +384,7 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
381
384
|
"source": "Holdings source used for reference date and totals: official, approximate or index.",
|
|
382
385
|
"sort_by": "Sort mode: name, ticker, positions_count_desc, total_value_desc or total_value_asc.",
|
|
383
386
|
"min_positions": "Minimum number of positions required.",
|
|
387
|
+
"include_metrics": "When false, skip latest holdings/AUM/NAV/holder metric enrichment.",
|
|
384
388
|
"limit": "Maximum number of ETFs.",
|
|
385
389
|
"offset": "Pagination offset.",
|
|
386
390
|
},
|
|
@@ -506,6 +510,14 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
506
510
|
"country": "Partner country filter for Comexstat.",
|
|
507
511
|
"source": "Optional data-source filter.",
|
|
508
512
|
"type": "Subseries/type filter for PIM, PMC, PMS or GDP, such as industria_geral.",
|
|
513
|
+
"aggregate": (
|
|
514
|
+
"Optional compact aggregation mode. RREO supports timeline and states; "
|
|
515
|
+
"Comexstat supports states, countries, timeline and top_partners_by_state."
|
|
516
|
+
),
|
|
517
|
+
"group_by": (
|
|
518
|
+
"Optional Comexstat aggregation dimension for compact outputs, such as "
|
|
519
|
+
"state, country or state_country."
|
|
520
|
+
),
|
|
509
521
|
"limit": "Maximum number of observations.",
|
|
510
522
|
"offset": "Pagination offset.",
|
|
511
523
|
},
|
|
@@ -671,11 +683,16 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
671
683
|
"client": "AlternativeDataCompanies",
|
|
672
684
|
"description": (
|
|
673
685
|
"Get governance compensation or remuneration records for a company, "
|
|
674
|
-
"optionally filtered by fiscal_year."
|
|
686
|
+
"optionally filtered by fiscal_year, reference_date or governance_body. "
|
|
687
|
+
"Use summary=True for one compact record per fiscal year and governance body."
|
|
675
688
|
),
|
|
676
689
|
"parameters": {
|
|
677
690
|
"company_id": PUBLIC_SOURCES_CONVENTIONS["company_id"],
|
|
678
691
|
"fiscal_year": "Optional four-digit fiscal year.",
|
|
692
|
+
"reference_date": "Optional exact filing/reference date (YYYY-MM-DD).",
|
|
693
|
+
"governance_body": "Optional governance body filter.",
|
|
694
|
+
"summary": "When true, returns compact chart-ready records.",
|
|
695
|
+
"latest_only": "When true, restricts records to the latest matching reference date.",
|
|
679
696
|
"limit": "Maximum number of records.",
|
|
680
697
|
"offset": "Pagination offset.",
|
|
681
698
|
},
|
|
@@ -791,8 +808,11 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
791
808
|
"description": (
|
|
792
809
|
"Get company financial-statement line items from CVM filings. "
|
|
793
810
|
"statement can be income_statement, balance_sheet or cash_flow; "
|
|
794
|
-
"use account_code to retrieve
|
|
795
|
-
"
|
|
811
|
+
"use account_code/account_codes to retrieve specific accounts. "
|
|
812
|
+
"The optional summary mode returns direct CVM account-line metrics; "
|
|
813
|
+
"EBITDA is intentionally not returned because it is not a "
|
|
814
|
+
"standardized CVM account line. Omit company_id only for "
|
|
815
|
+
"universe-level screens or rankings."
|
|
796
816
|
),
|
|
797
817
|
"parameters": {
|
|
798
818
|
"company_id": (
|
|
@@ -800,10 +820,15 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
800
820
|
+ " Omit only for universe-level screens or rankings."
|
|
801
821
|
),
|
|
802
822
|
"statement": "Statement type or alias, for example income_statement, balance_sheet or cash_flow.",
|
|
823
|
+
"statements": "Optional comma-separated list of statement types/aliases to query in one call.",
|
|
803
824
|
"quarter": "Brazilian quarter code such as 1T24 or 4T24.",
|
|
804
825
|
"reference_date": "Reference date in YYYY-MM-DD.",
|
|
805
826
|
"statement_type": "Optional presentation/filter such as consolidated or individual when supported.",
|
|
806
827
|
"account_code": "Optional account code filter.",
|
|
828
|
+
"account_codes": "Optional comma-separated list of CVM account code filters.",
|
|
829
|
+
"summary": "When true, include direct-account summary metrics.",
|
|
830
|
+
"metrics": "Optional comma-separated summary metrics. ebitda is ignored because it is not a direct CVM account-line metric.",
|
|
831
|
+
"include_raw": "When false, suppress raw line items and return only metadata plus summary.",
|
|
807
832
|
"limit": "Maximum number of line items.",
|
|
808
833
|
"offset": "Pagination offset.",
|
|
809
834
|
},
|
|
@@ -822,11 +847,17 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
822
847
|
"description": (
|
|
823
848
|
"Get structured explanatory notes, notas explicativas, from CVM "
|
|
824
849
|
"DFP/ITR filings. Use this for note text and parsed note details, "
|
|
825
|
-
"not accounting line-item tables."
|
|
850
|
+
"not accounting line-item tables. Use sections, summary and "
|
|
851
|
+
"include_raw=False to reduce dashboard payloads."
|
|
826
852
|
),
|
|
827
853
|
"parameters": {
|
|
828
854
|
"company_id": PUBLIC_SOURCES_CONVENTIONS["company_id"],
|
|
829
855
|
"quarter": "Brazilian quarter code such as 1T24 or 4T24.",
|
|
856
|
+
"sections": "Optional comma-separated note sections: geographic_segments, fx_exposure, supplier_concentration.",
|
|
857
|
+
"summary": "When true, include compact counts by selected note section.",
|
|
858
|
+
"include_raw": "When false, suppress raw note documents and return only metadata plus summary.",
|
|
859
|
+
"only_with_data": "When true, return only periods where at least one selected section has parsed rows.",
|
|
860
|
+
"latest_only": "When true and quarter is omitted, restrict results to the latest matching quarter.",
|
|
830
861
|
"limit": "Maximum number of notes.",
|
|
831
862
|
"offset": "Pagination offset.",
|
|
832
863
|
},
|
|
@@ -844,7 +875,9 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
844
875
|
"Get CVM disclosure documents for Brazilian companies. "
|
|
845
876
|
"document_type='repurchase' returns share-buyback documents; "
|
|
846
877
|
"document_type='insiders' returns Brazilian insider-trading "
|
|
847
|
-
"disclosures; the upstream alias 'insider' is also accepted."
|
|
878
|
+
"disclosures; the upstream alias 'insider' is also accepted. "
|
|
879
|
+
"Use group_by to return compact aggregations such as month, "
|
|
880
|
+
"participant_group and side without downloading raw documents."
|
|
848
881
|
),
|
|
849
882
|
"parameters": {
|
|
850
883
|
"company_id": PUBLIC_SOURCES_CONVENTIONS["company_id"],
|
|
@@ -856,7 +889,11 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
856
889
|
"end_date": "End date in YYYY-MM-DD.",
|
|
857
890
|
"transaction": "Optional transaction description filter.",
|
|
858
891
|
"transaction_type": "Optional transaction type filter.",
|
|
892
|
+
"transaction_types": "Optional comma-separated list of normalized transaction type filters.",
|
|
859
893
|
"participant_group": "Optional participant group filter.",
|
|
894
|
+
"group_by": "Optional comma-separated aggregation dimensions: month, participant_group, side, asset, company, transaction_type, security, characteristics.",
|
|
895
|
+
"include_raw": "When false, suppress raw disclosure documents and return only metadata plus aggregations.",
|
|
896
|
+
"operation_type": "Optional operation class; spot narrows insiders to cash buy/sell operations.",
|
|
860
897
|
"limit": "Maximum number of documents.",
|
|
861
898
|
"offset": "Pagination offset.",
|
|
862
899
|
},
|
|
@@ -931,13 +968,16 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
931
968
|
"client": "AlternativeDataFunds",
|
|
932
969
|
"description": (
|
|
933
970
|
"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."
|
|
971
|
+
"Use this for constituent assets and weights or values, not NAV history. "
|
|
972
|
+
"Use summary=True and include_raw=False for a compact payload."
|
|
935
973
|
),
|
|
936
974
|
"parameters": {
|
|
937
975
|
"fund_id": PUBLIC_SOURCES_CONVENTIONS["fund_id"],
|
|
938
976
|
"reference_date": "Reference date in YYYY-MM-DD; omitted means latest snapshot.",
|
|
939
977
|
"asset_class": "Optional asset class filter.",
|
|
940
978
|
"source": "Holdings source: official, approximate or index.",
|
|
979
|
+
"summary": "When true, include compact holdings totals and asset-class buckets.",
|
|
980
|
+
"include_raw": "When false, suppress raw holding rows from holdings.",
|
|
941
981
|
"limit": "Maximum number of holdings.",
|
|
942
982
|
"offset": "Pagination offset.",
|
|
943
983
|
},
|
|
@@ -1223,7 +1263,8 @@ PUBLIC_SOURCES_ENDPOINTS: dict[str, dict[str, Any]] = {
|
|
|
1223
1263
|
"description": (
|
|
1224
1264
|
"Get institutional holders of an asset from the precomputed "
|
|
1225
1265
|
"asset-holder layer. identifier defaults to a B3 ticker when "
|
|
1226
|
-
"identifier_type='b3_ticker'
|
|
1266
|
+
"identifier_type='b3_ticker'; B3 tickers may be resolved to their "
|
|
1267
|
+
"share-class ISIN when no direct ticker snapshot exists."
|
|
1227
1268
|
),
|
|
1228
1269
|
"parameters": {
|
|
1229
1270
|
"identifier": PUBLIC_SOURCES_CONVENTIONS["asset_identifier"],
|
|
@@ -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
|
})
|
|
@@ -484,10 +510,15 @@ class AlternativeDataCompanies:
|
|
|
484
510
|
self,
|
|
485
511
|
company_id: Optional[str] = None,
|
|
486
512
|
statement: str = "income_statement",
|
|
513
|
+
statements: Optional[Union[str, Sequence[str]]] = None,
|
|
487
514
|
quarter: Optional[str] = None,
|
|
488
515
|
reference_date: Optional[str] = None,
|
|
489
516
|
statement_type: Optional[str] = None,
|
|
490
517
|
account_code: Optional[str] = None,
|
|
518
|
+
account_codes: Optional[Union[str, Sequence[str]]] = None,
|
|
519
|
+
summary: Optional[bool] = None,
|
|
520
|
+
metrics: Optional[Union[str, Sequence[str]]] = None,
|
|
521
|
+
include_raw: Optional[bool] = None,
|
|
491
522
|
limit: int = 100,
|
|
492
523
|
offset: int = 0,
|
|
493
524
|
) -> dict:
|
|
@@ -509,6 +540,11 @@ class AlternativeDataCompanies:
|
|
|
509
540
|
statement: str
|
|
510
541
|
Statement type (e.g. 'income_statement', 'balance_sheet', 'cash_flow').
|
|
511
542
|
Field is not required. Default: 'income_statement'.
|
|
543
|
+
statements: str | list[str]
|
|
544
|
+
Optional comma-separated list (or Python sequence) of statement types
|
|
545
|
+
to query in a single call. When omitted, ``statement`` preserves the
|
|
546
|
+
historical single-statement behavior.
|
|
547
|
+
Field is not required.
|
|
512
548
|
quarter: str
|
|
513
549
|
Brazilian quarter code filter (e.g. '1T24' or '4T24').
|
|
514
550
|
Field is not required.
|
|
@@ -523,6 +559,26 @@ class AlternativeDataCompanies:
|
|
|
523
559
|
account_code: str
|
|
524
560
|
Specific account code filter.
|
|
525
561
|
Field is not required.
|
|
562
|
+
account_codes: str | list[str]
|
|
563
|
+
Optional comma-separated list (or Python sequence) of account codes.
|
|
564
|
+
This is useful for dashboard summaries that need only a few CVM
|
|
565
|
+
account lines instead of the full statement.
|
|
566
|
+
Field is not required.
|
|
567
|
+
summary: bool
|
|
568
|
+
When true, include a ``summary`` block with direct CVM account-line
|
|
569
|
+
metrics such as revenue, EBIT, net income, assets, equity and
|
|
570
|
+
operating cash flow. EBITDA is not returned because it is not a
|
|
571
|
+
standardized direct CVM account line.
|
|
572
|
+
Field is not required. Default: False.
|
|
573
|
+
metrics: str | list[str]
|
|
574
|
+
Optional summary metrics to return, for example
|
|
575
|
+
``['revenue', 'ebit', 'net_income']``. ``ebitda`` is not returned
|
|
576
|
+
because it is not a standardized direct CVM account line.
|
|
577
|
+
Field is not required.
|
|
578
|
+
include_raw: bool
|
|
579
|
+
When false and ``summary=True``, suppress raw line items and return
|
|
580
|
+
only metadata plus the summary block.
|
|
581
|
+
Field is not required. Default: True.
|
|
526
582
|
limit: int
|
|
527
583
|
Maximum number of results to return.
|
|
528
584
|
Field is not required. Default: 100.
|
|
@@ -533,10 +589,15 @@ class AlternativeDataCompanies:
|
|
|
533
589
|
return self._get("companies/financial-statements", {
|
|
534
590
|
"company_id": company_id,
|
|
535
591
|
"statement": statement,
|
|
592
|
+
"statements": self._csv_param(statements),
|
|
536
593
|
"quarter": quarter,
|
|
537
594
|
"reference_date": reference_date,
|
|
538
595
|
"statement_type": statement_type,
|
|
539
596
|
"account_code": account_code,
|
|
597
|
+
"account_codes": self._csv_param(account_codes),
|
|
598
|
+
"summary": summary,
|
|
599
|
+
"metrics": self._csv_param(metrics),
|
|
600
|
+
"include_raw": include_raw,
|
|
540
601
|
"limit": limit,
|
|
541
602
|
"offset": offset,
|
|
542
603
|
})
|
|
@@ -545,6 +606,11 @@ class AlternativeDataCompanies:
|
|
|
545
606
|
self,
|
|
546
607
|
company_id: str,
|
|
547
608
|
quarter: Optional[str] = None,
|
|
609
|
+
sections: Optional[Union[str, Sequence[str]]] = None,
|
|
610
|
+
summary: Optional[bool] = None,
|
|
611
|
+
include_raw: Optional[bool] = None,
|
|
612
|
+
only_with_data: Optional[bool] = None,
|
|
613
|
+
latest_only: Optional[bool] = None,
|
|
548
614
|
limit: int = 10,
|
|
549
615
|
offset: int = 0,
|
|
550
616
|
) -> dict:
|
|
@@ -561,6 +627,24 @@ class AlternativeDataCompanies:
|
|
|
561
627
|
quarter: str
|
|
562
628
|
Brazilian quarter code filter (e.g. '1T24' or '4T24').
|
|
563
629
|
Field is not required.
|
|
630
|
+
sections: str | list[str]
|
|
631
|
+
Optional note sections to return. Supported values are
|
|
632
|
+
geographic_segments, fx_exposure and supplier_concentration.
|
|
633
|
+
Field is not required.
|
|
634
|
+
summary: bool
|
|
635
|
+
When true, includes compact per-document counts by selected section.
|
|
636
|
+
Field is not required. Default: False.
|
|
637
|
+
include_raw: bool
|
|
638
|
+
When false, suppresses raw note documents from ``results``.
|
|
639
|
+
Field is not required. Default: True.
|
|
640
|
+
only_with_data: bool
|
|
641
|
+
When true, returns only periods where at least one selected section
|
|
642
|
+
has parsed rows.
|
|
643
|
+
Field is not required. Default: False.
|
|
644
|
+
latest_only: bool
|
|
645
|
+
When true and quarter is omitted, restricts the response to the
|
|
646
|
+
latest matching quarter.
|
|
647
|
+
Field is not required. Default: False.
|
|
564
648
|
limit: int
|
|
565
649
|
Maximum number of results to return.
|
|
566
650
|
Field is not required. Default: 10.
|
|
@@ -571,6 +655,11 @@ class AlternativeDataCompanies:
|
|
|
571
655
|
return self._get("companies/financial-notes", {
|
|
572
656
|
"company_id": company_id,
|
|
573
657
|
"quarter": quarter,
|
|
658
|
+
"sections": self._csv_param(sections),
|
|
659
|
+
"summary": summary,
|
|
660
|
+
"include_raw": include_raw,
|
|
661
|
+
"only_with_data": only_with_data,
|
|
662
|
+
"latest_only": latest_only,
|
|
574
663
|
"limit": limit,
|
|
575
664
|
"offset": offset,
|
|
576
665
|
})
|
|
@@ -586,7 +675,11 @@ class AlternativeDataCompanies:
|
|
|
586
675
|
end_date: Optional[str] = None,
|
|
587
676
|
transaction: Optional[str] = None,
|
|
588
677
|
transaction_type: Optional[str] = None,
|
|
678
|
+
transaction_types: Optional[Union[str, Sequence[str]]] = None,
|
|
589
679
|
participant_group: Optional[str] = None,
|
|
680
|
+
group_by: Optional[Union[str, Sequence[str]]] = None,
|
|
681
|
+
include_raw: Optional[bool] = None,
|
|
682
|
+
operation_type: Optional[str] = None,
|
|
590
683
|
limit: int = 100,
|
|
591
684
|
offset: int = 0,
|
|
592
685
|
) -> dict:
|
|
@@ -627,9 +720,27 @@ class AlternativeDataCompanies:
|
|
|
627
720
|
transaction_type: str
|
|
628
721
|
Transaction type filter.
|
|
629
722
|
Field is not required.
|
|
723
|
+
transaction_types: str | list[str]
|
|
724
|
+
Optional comma-separated list (or Python sequence) of normalized
|
|
725
|
+
transaction types.
|
|
726
|
+
Field is not required.
|
|
630
727
|
participant_group: str
|
|
631
728
|
Participant group filter.
|
|
632
729
|
Field is not required.
|
|
730
|
+
group_by: str | list[str]
|
|
731
|
+
Optional aggregation dimensions. Supported values include month,
|
|
732
|
+
participant_group, side, asset, company, transaction_type, security
|
|
733
|
+
and characteristics. For dashboard insider charts, use
|
|
734
|
+
``['month', 'participant_group', 'side']``.
|
|
735
|
+
Field is not required.
|
|
736
|
+
include_raw: bool
|
|
737
|
+
When false, suppress raw disclosure documents and return only
|
|
738
|
+
metadata plus aggregations.
|
|
739
|
+
Field is not required. Default: True.
|
|
740
|
+
operation_type: str
|
|
741
|
+
Optional operation class. ``spot`` narrows insider aggregations to
|
|
742
|
+
cash buy/sell operations and excludes transfers/conversions.
|
|
743
|
+
Field is not required.
|
|
633
744
|
limit: int
|
|
634
745
|
Maximum number of results to return.
|
|
635
746
|
Field is not required. Default: 100.
|
|
@@ -647,7 +758,11 @@ class AlternativeDataCompanies:
|
|
|
647
758
|
"end_date": end_date,
|
|
648
759
|
"transaction": transaction,
|
|
649
760
|
"transaction_type": transaction_type,
|
|
761
|
+
"transaction_types": self._csv_param(transaction_types),
|
|
650
762
|
"participant_group": participant_group,
|
|
763
|
+
"group_by": self._csv_param(group_by),
|
|
764
|
+
"include_raw": include_raw,
|
|
765
|
+
"operation_type": operation_type,
|
|
651
766
|
"limit": limit,
|
|
652
767
|
"offset": offset,
|
|
653
768
|
})
|
|
@@ -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:
|
|
@@ -86,6 +87,10 @@ class AlternativeDataFunds:
|
|
|
86
87
|
min_positions: int
|
|
87
88
|
Minimum number of positions required for an ETF to be returned.
|
|
88
89
|
Field is not required. Default: 1.
|
|
90
|
+
include_metrics: bool
|
|
91
|
+
When false, returns ETF identity fields without computing latest
|
|
92
|
+
positions, AUM/NAV or holder metrics. Use this for autocomplete.
|
|
93
|
+
Field is not required. Default: True.
|
|
89
94
|
limit: int
|
|
90
95
|
Maximum number of ETFs to return.
|
|
91
96
|
Field is not required. Default: 100.
|
|
@@ -99,6 +104,7 @@ class AlternativeDataFunds:
|
|
|
99
104
|
"source": source,
|
|
100
105
|
"sort_by": sort_by,
|
|
101
106
|
"min_positions": min_positions,
|
|
107
|
+
"include_metrics": include_metrics,
|
|
102
108
|
"limit": limit,
|
|
103
109
|
"offset": offset,
|
|
104
110
|
})
|
|
@@ -109,6 +115,8 @@ class AlternativeDataFunds:
|
|
|
109
115
|
reference_date: Optional[str] = None,
|
|
110
116
|
asset_class: Optional[str] = None,
|
|
111
117
|
source: str = "official",
|
|
118
|
+
summary: Optional[bool] = None,
|
|
119
|
+
include_raw: Optional[bool] = None,
|
|
112
120
|
limit: int = 200,
|
|
113
121
|
offset: int = 0,
|
|
114
122
|
) -> dict:
|
|
@@ -133,6 +141,13 @@ class AlternativeDataFunds:
|
|
|
133
141
|
source: str
|
|
134
142
|
Data source: 'official', 'approximate', or 'index'.
|
|
135
143
|
Field is not required. Default: 'official'.
|
|
144
|
+
summary: bool
|
|
145
|
+
When true, includes compact positions_count, total_value,
|
|
146
|
+
total_weight and asset-class buckets.
|
|
147
|
+
Field is not required. Default: False.
|
|
148
|
+
include_raw: bool
|
|
149
|
+
When false, suppresses raw holding rows from ``holdings``.
|
|
150
|
+
Field is not required. Default: True.
|
|
136
151
|
limit: int
|
|
137
152
|
Maximum number of holdings to return (max 5000).
|
|
138
153
|
Field is not required. Default: 200.
|
|
@@ -145,6 +160,8 @@ class AlternativeDataFunds:
|
|
|
145
160
|
"reference_date": reference_date,
|
|
146
161
|
"asset_class": asset_class,
|
|
147
162
|
"source": source,
|
|
163
|
+
"summary": summary,
|
|
164
|
+
"include_raw": include_raw,
|
|
148
165
|
"limit": limit,
|
|
149
166
|
"offset": offset,
|
|
150
167
|
})
|
|
@@ -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:
|
|
@@ -210,6 +211,10 @@ class AlternativeDataMetadata:
|
|
|
210
211
|
min_positions: int
|
|
211
212
|
Minimum number of positions required for an ETF to be returned.
|
|
212
213
|
Field is not required. Default: 1.
|
|
214
|
+
include_metrics: bool
|
|
215
|
+
When false, returns ETF identity fields without computing latest
|
|
216
|
+
positions, AUM/NAV or holder metrics. Use this for autocomplete.
|
|
217
|
+
Field is not required. Default: True.
|
|
213
218
|
limit: int
|
|
214
219
|
Maximum number of ETFs to return.
|
|
215
220
|
Field is not required. Default: 100.
|
|
@@ -223,6 +228,7 @@ class AlternativeDataMetadata:
|
|
|
223
228
|
"source": source,
|
|
224
229
|
"sort_by": sort_by,
|
|
225
230
|
"min_positions": min_positions,
|
|
231
|
+
"include_metrics": include_metrics,
|
|
226
232
|
"limit": limit,
|
|
227
233
|
"offset": offset,
|
|
228
234
|
})
|
|
@@ -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.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: btgsolutions_dataservices_python_client
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.4.0
|
|
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
|
|
@@ -670,6 +670,8 @@ macro.get_macro_indicators(indicator='selic')
|
|
|
670
670
|
macro.get_macro_indicators(indicator='ipca_contributions', start_date='2024-01', end_date='2024-12')
|
|
671
671
|
macro.get_macro_indicators(indicator='gdp', type='yoy')
|
|
672
672
|
macro.get_macro_indicators(indicator='comexstat', year='2024', state='SP')
|
|
673
|
+
macro.get_macro_indicators(indicator='comexstat', aggregate='states', start_date='2024-01', end_date='2024-12')
|
|
674
|
+
macro.get_macro_indicators(indicator='comexstat', aggregate='timeline', group_by='country', state='SP')
|
|
673
675
|
macro.get_macro_indicators(indicator='rreo', year='2024', period='6')
|
|
674
676
|
macro.get_maximum_theoretical_margin(asset='PETR4', report_date='2024-12-31')
|
|
675
677
|
macro.get_dpmfi(start_date='2024-01', end_date='2024-12', status='dados_oficiais')
|
|
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
|