btgsolutions-dataservices-python-client 3.3.0__tar.gz → 4.1.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.
Files changed (49) hide show
  1. {btgsolutions_dataservices_python_client-3.3.0/btgsolutions_dataservices_python_client.egg-info → btgsolutions_dataservices_python_client-4.1.1}/PKG-INFO +24 -32
  2. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/README.md +24 -32
  3. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/__init__.py +1 -1
  4. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/__init__.py +0 -1
  5. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/alternative_data_companies.py +73 -7
  6. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/alternative_data_funds.py +71 -19
  7. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/alternative_data_macro_markets.py +3 -3
  8. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/alternative_data_metadata.py +91 -7
  9. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/alternative_data_ownership.py +34 -3
  10. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/alternative_data_people.py +3 -3
  11. btgsolutions_dataservices_python_client-3.3.0/btgsolutions_dataservices/rest/hfn_v3.py → btgsolutions_dataservices_python_client-4.1.1/btgsolutions_dataservices/rest/hfn.py +4 -4
  12. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/public_sources.py +11 -8
  13. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/websocket/__init__.py +0 -1
  14. btgsolutions_dataservices_python_client-3.3.0/btgsolutions_dataservices/websocket/hfn_v3_websocket_client.py → btgsolutions_dataservices_python_client-4.1.1/btgsolutions_dataservices/websocket/hfn_websocket_client.py +6 -6
  15. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1/btgsolutions_dataservices_python_client.egg-info}/PKG-INFO +24 -32
  16. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices_python_client.egg-info/SOURCES.txt +0 -2
  17. btgsolutions_dataservices_python_client-3.3.0/btgsolutions_dataservices/rest/hfn.py +0 -323
  18. btgsolutions_dataservices_python_client-3.3.0/btgsolutions_dataservices/websocket/hfn_websocket_client.py +0 -191
  19. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/LICENSE +0 -0
  20. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/MANIFEST.in +0 -0
  21. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/config.py +0 -0
  22. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/exceptions.py +0 -0
  23. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/authenticator.py +0 -0
  24. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/book_scope.py +0 -0
  25. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/broker_analytics.py +0 -0
  26. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/broker_reference.py +0 -0
  27. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/bulk_data.py +0 -0
  28. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/company_data.py +0 -0
  29. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/corporate_events.py +0 -0
  30. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/historical_candles.py +0 -0
  31. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/historical_candles_crypto.py +0 -0
  32. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/intraday_candles.py +0 -0
  33. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/intraday_tick_data.py +0 -0
  34. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/quotes.py +0 -0
  35. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/reference_data.py +0 -0
  36. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/stock_loan.py +0 -0
  37. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/ticker_last_event.py +0 -0
  38. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/rest/ticker_last_event_polling.py +0 -0
  39. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/websocket/broker_analytics.py +0 -0
  40. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/websocket/market_data_feed.py +0 -0
  41. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/websocket/market_data_websocket_client.py +0 -0
  42. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices/websocket/websocket_default_functions.py +0 -0
  43. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices_python_client.egg-info/dependency_links.txt +0 -0
  44. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices_python_client.egg-info/requires.txt +0 -0
  45. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/btgsolutions_dataservices_python_client.egg-info/top_level.txt +0 -0
  46. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/pyproject.toml +0 -0
  47. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/requirements.txt +0 -0
  48. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/setup.cfg +0 -0
  49. {btgsolutions_dataservices_python_client-3.3.0 → btgsolutions_dataservices_python_client-4.1.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: btgsolutions_dataservices_python_client
3
- Version: 3.3.0
3
+ Version: 4.1.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
@@ -383,28 +383,7 @@ bulk_data.get_compressed_data(channel='98', date='2026-01-30', data_type='instru
383
383
 
384
384
  ```python
385
385
  import btgsolutions_dataservices as btg
386
- ws = btg.HFNWebSocketClient(api_key='YOUR_API_KEY', country='brazil')
387
- ws.run(on_message=lambda message: print(message))
388
-
389
- ## The following is optional to keep the program running in a .py file:
390
- # from time import sleep
391
- # while True:
392
- # sleep(1)
393
- ```
394
-
395
- #### High Frequency News
396
-
397
- ```python
398
- import btgsolutions_dataservices as btg
399
- hfn = btg.HighFrequencyNews(api_key='YOUR_API_KEY')
400
- hfn.latest_news()
401
- ```
402
-
403
- #### High Frequency News V3 Stream
404
-
405
- ```python
406
- import btgsolutions_dataservices as btg
407
- ws = btg.HFNV3WebSocketClient(api_key='YOUR_API_KEY')
386
+ ws = btg.HFNWebSocketClient(api_key='YOUR_API_KEY')
408
387
  ws.run(on_message=lambda message: print(message))
409
388
 
410
389
  # Subscribe to live economy news in Portuguese
@@ -420,13 +399,18 @@ ws.available_filters(settings={})
420
399
  ws.unsubscribe()
421
400
 
422
401
  ws.close()
402
+
403
+ ## The following is optional to keep the program running in a .py file:
404
+ # from time import sleep
405
+ # while True:
406
+ # sleep(1)
423
407
  ```
424
408
 
425
- #### High Frequency News V3
409
+ #### High Frequency News
426
410
 
427
411
  ```python
428
412
  import btgsolutions_dataservices as btg
429
- hfn = btg.HighFrequencyNewsV3(api_key='YOUR_API_KEY')
413
+ hfn = btg.HighFrequencyNews(api_key='YOUR_API_KEY')
430
414
 
431
415
  # Latest news with filters
432
416
  hfn.get_latest_news(feed='economy', text_language='portuguese', limit=10)
@@ -437,7 +421,7 @@ hfn.get_latest_news(tags=['PETR4', 'VALE3'])
437
421
  # Historical news for a date range
438
422
  hfn.get_historical_news(
439
423
  start_date='2026-05-01T00:00:00.000Z',
440
- end_date='2026-05-01T23:59:59.999Z',
424
+ end_date='2026-05-08T23:59:59.999Z',
441
425
  feed='economy',
442
426
  )
443
427
 
@@ -543,6 +527,8 @@ company_data.all_financial_tables(ticker='PETR4')
543
527
  import btgsolutions_dataservices as btg
544
528
  meta = btg.AlternativeDataMetadata(api_key='YOUR_API_KEY')
545
529
  meta.get_company_directory(query='PETROBRAS', jurisdiction='BR')
530
+ meta.list_companies(query='PETROBRAS', jurisdiction='BR')
531
+ meta.list_etfs(query='BOVA')
546
532
  meta.get_company_sector(identifier='PETR4')
547
533
  meta.get_taxonomy(system='b3')
548
534
  meta.get_cnae(code='6422100')
@@ -559,6 +545,7 @@ meta.get_available_indicators()
559
545
  ```python
560
546
  import btgsolutions_dataservices as btg
561
547
  companies = btg.AlternativeDataCompanies(api_key='YOUR_API_KEY')
548
+ companies.list_companies(query='PETROBRAS', jurisdiction='BR')
562
549
  companies.get_board(company_id='VALE3', body='board')
563
550
  companies.get_governance_summary(company_id='ITUB4')
564
551
  companies.get_governance_history(company_id='PETR4', start_date='2023-01-01', end_date='2024-12-31')
@@ -570,8 +557,9 @@ companies.get_corporate_registry(company_id='PETR4', direction='partners')
570
557
  companies.get_corporate_registry(company_id='PETR4', direction='investees')
571
558
  companies.get_insider_trades(company_id='AAPL', start_date='2024-01-01', end_date='2024-12-31')
572
559
  companies.get_board_changes(company_id='VALE3', event='appointed')
573
- companies.get_financial_statements(company_id='PETR4', statement='income_statement', quarter='Q42024')
574
- companies.get_financial_notes(company_id='VALE3', quarter='Q42024')
560
+ companies.get_assemblies(company_id='PINE4')
561
+ companies.get_financial_statements(company_id='PETR4', statement='income_statement', quarter='4T24')
562
+ companies.get_financial_notes(company_id='VALE3', quarter='4T24')
575
563
  companies.get_disclosures(company_id='PETR4', document_type='repurchase')
576
564
  companies.get_disclosures(company_id='PETR4', document_type='insider')
577
565
  ```
@@ -590,10 +578,11 @@ people.get_appointments(person_id='slug:Jean Paul Lemann', group_by='company')
590
578
  ```python
591
579
  import btgsolutions_dataservices as btg
592
580
  funds = btg.AlternativeDataFunds(api_key='YOUR_API_KEY')
593
- funds.get_holdings(fund_id='73.232.530/0001-46', reference_date='2024-12-31')
594
- funds.get_exposures(fund_id='73.232.530/0001-46', exposure_type='asset_class')
595
- funds.get_history(fund_id='73.232.530/0001-46', start_date='2024-01-01', end_date='2024-12-31')
596
- funds.get_lookthrough(fund_id='73.232.530/0001-46')
581
+ funds.list_etfs(query='BOVA')
582
+ funds.get_holdings(fund_id='BOVA11', reference_date='2024-12-31')
583
+ funds.get_exposures(fund_id='BOVA11', exposure_type='asset_class')
584
+ funds.get_history(fund_id='BOVA11', start_date='2024-01-01', end_date='2024-12-31')
585
+ funds.get_lookthrough(fund_id='BOVA11')
597
586
  funds.get_manager_aggregate_holdings(manager_id='ITAÚ ASSET MANAGEMENT')
598
587
  ```
599
588
 
@@ -607,6 +596,7 @@ ownership.get_ownership_current(company_id='ITUB4')
607
596
  ownership.get_ownership_history(company_id='PETR4', start_date='2023-01-01', end_date='2024-12-31')
608
597
  ownership.get_ownership_change_events(company_id='VALE3', start_date='2024-01-01', end_date='2024-12-31')
609
598
  ownership.get_ownership_official_notices(company_id='PETR4')
599
+ ownership.get_notice_summary(url='https://www.rad.cvm.gov.br/ENETWEB/frmGerenciaPastaDeArquivos.aspx?numProtocolo=1234567')
610
600
  ownership.get_ownership_control_group(company_id='VALE3')
611
601
  ownership.get_ownership_free_float(company_id='PETR4')
612
602
  ownership.get_shareholder_holdings(shareholder_id='00.000.000/0001-91')
@@ -629,6 +619,8 @@ macro.get_dpmfi(start_date='2024-01', end_date='2024-12', status='dados_oficiais
629
619
  macro.get_dpmfi_composition(bond_type='IPCA')
630
620
  ```
631
621
 
622
+ `AlternativeDataMacroMarkets` exposes the public-sources market-data endpoint for B3 maximum theoretical margin. The direct market-data `investor-categories` endpoint is intentionally not exposed in this package.
623
+
632
624
  ### Reference Data
633
625
 
634
626
  #### Corporate Events
@@ -360,28 +360,7 @@ bulk_data.get_compressed_data(channel='98', date='2026-01-30', data_type='instru
360
360
 
361
361
  ```python
362
362
  import btgsolutions_dataservices as btg
363
- ws = btg.HFNWebSocketClient(api_key='YOUR_API_KEY', country='brazil')
364
- ws.run(on_message=lambda message: print(message))
365
-
366
- ## The following is optional to keep the program running in a .py file:
367
- # from time import sleep
368
- # while True:
369
- # sleep(1)
370
- ```
371
-
372
- #### High Frequency News
373
-
374
- ```python
375
- import btgsolutions_dataservices as btg
376
- hfn = btg.HighFrequencyNews(api_key='YOUR_API_KEY')
377
- hfn.latest_news()
378
- ```
379
-
380
- #### High Frequency News V3 Stream
381
-
382
- ```python
383
- import btgsolutions_dataservices as btg
384
- ws = btg.HFNV3WebSocketClient(api_key='YOUR_API_KEY')
363
+ ws = btg.HFNWebSocketClient(api_key='YOUR_API_KEY')
385
364
  ws.run(on_message=lambda message: print(message))
386
365
 
387
366
  # Subscribe to live economy news in Portuguese
@@ -397,13 +376,18 @@ ws.available_filters(settings={})
397
376
  ws.unsubscribe()
398
377
 
399
378
  ws.close()
379
+
380
+ ## The following is optional to keep the program running in a .py file:
381
+ # from time import sleep
382
+ # while True:
383
+ # sleep(1)
400
384
  ```
401
385
 
402
- #### High Frequency News V3
386
+ #### High Frequency News
403
387
 
404
388
  ```python
405
389
  import btgsolutions_dataservices as btg
406
- hfn = btg.HighFrequencyNewsV3(api_key='YOUR_API_KEY')
390
+ hfn = btg.HighFrequencyNews(api_key='YOUR_API_KEY')
407
391
 
408
392
  # Latest news with filters
409
393
  hfn.get_latest_news(feed='economy', text_language='portuguese', limit=10)
@@ -414,7 +398,7 @@ hfn.get_latest_news(tags=['PETR4', 'VALE3'])
414
398
  # Historical news for a date range
415
399
  hfn.get_historical_news(
416
400
  start_date='2026-05-01T00:00:00.000Z',
417
- end_date='2026-05-01T23:59:59.999Z',
401
+ end_date='2026-05-08T23:59:59.999Z',
418
402
  feed='economy',
419
403
  )
420
404
 
@@ -520,6 +504,8 @@ company_data.all_financial_tables(ticker='PETR4')
520
504
  import btgsolutions_dataservices as btg
521
505
  meta = btg.AlternativeDataMetadata(api_key='YOUR_API_KEY')
522
506
  meta.get_company_directory(query='PETROBRAS', jurisdiction='BR')
507
+ meta.list_companies(query='PETROBRAS', jurisdiction='BR')
508
+ meta.list_etfs(query='BOVA')
523
509
  meta.get_company_sector(identifier='PETR4')
524
510
  meta.get_taxonomy(system='b3')
525
511
  meta.get_cnae(code='6422100')
@@ -536,6 +522,7 @@ meta.get_available_indicators()
536
522
  ```python
537
523
  import btgsolutions_dataservices as btg
538
524
  companies = btg.AlternativeDataCompanies(api_key='YOUR_API_KEY')
525
+ companies.list_companies(query='PETROBRAS', jurisdiction='BR')
539
526
  companies.get_board(company_id='VALE3', body='board')
540
527
  companies.get_governance_summary(company_id='ITUB4')
541
528
  companies.get_governance_history(company_id='PETR4', start_date='2023-01-01', end_date='2024-12-31')
@@ -547,8 +534,9 @@ companies.get_corporate_registry(company_id='PETR4', direction='partners')
547
534
  companies.get_corporate_registry(company_id='PETR4', direction='investees')
548
535
  companies.get_insider_trades(company_id='AAPL', start_date='2024-01-01', end_date='2024-12-31')
549
536
  companies.get_board_changes(company_id='VALE3', event='appointed')
550
- companies.get_financial_statements(company_id='PETR4', statement='income_statement', quarter='Q42024')
551
- companies.get_financial_notes(company_id='VALE3', quarter='Q42024')
537
+ companies.get_assemblies(company_id='PINE4')
538
+ companies.get_financial_statements(company_id='PETR4', statement='income_statement', quarter='4T24')
539
+ companies.get_financial_notes(company_id='VALE3', quarter='4T24')
552
540
  companies.get_disclosures(company_id='PETR4', document_type='repurchase')
553
541
  companies.get_disclosures(company_id='PETR4', document_type='insider')
554
542
  ```
@@ -566,11 +554,12 @@ people.get_appointments(person_id='slug:Jean Paul Lemann', group_by='company')
566
554
 
567
555
  ```python
568
556
  import btgsolutions_dataservices as btg
569
- funds = btg.AlternativeDataFunds(api_key='YOUR_API_KEY')
570
- funds.get_holdings(fund_id='73.232.530/0001-46', reference_date='2024-12-31')
571
- funds.get_exposures(fund_id='73.232.530/0001-46', exposure_type='asset_class')
572
- funds.get_history(fund_id='73.232.530/0001-46', start_date='2024-01-01', end_date='2024-12-31')
573
- funds.get_lookthrough(fund_id='73.232.530/0001-46')
557
+ funds = btg.AlternativeDataFunds(api_key='YOUR_API_KEY')
558
+ funds.list_etfs(query='BOVA')
559
+ funds.get_holdings(fund_id='BOVA11', reference_date='2024-12-31')
560
+ funds.get_exposures(fund_id='BOVA11', exposure_type='asset_class')
561
+ funds.get_history(fund_id='BOVA11', start_date='2024-01-01', end_date='2024-12-31')
562
+ funds.get_lookthrough(fund_id='BOVA11')
574
563
  funds.get_manager_aggregate_holdings(manager_id='ITAÚ ASSET MANAGEMENT')
575
564
  ```
576
565
 
@@ -584,6 +573,7 @@ ownership.get_ownership_current(company_id='ITUB4')
584
573
  ownership.get_ownership_history(company_id='PETR4', start_date='2023-01-01', end_date='2024-12-31')
585
574
  ownership.get_ownership_change_events(company_id='VALE3', start_date='2024-01-01', end_date='2024-12-31')
586
575
  ownership.get_ownership_official_notices(company_id='PETR4')
576
+ ownership.get_notice_summary(url='https://www.rad.cvm.gov.br/ENETWEB/frmGerenciaPastaDeArquivos.aspx?numProtocolo=1234567')
587
577
  ownership.get_ownership_control_group(company_id='VALE3')
588
578
  ownership.get_ownership_free_float(company_id='PETR4')
589
579
  ownership.get_shareholder_holdings(shareholder_id='00.000.000/0001-91')
@@ -606,6 +596,8 @@ macro.get_dpmfi(start_date='2024-01', end_date='2024-12', status='dados_oficiais
606
596
  macro.get_dpmfi_composition(bond_type='IPCA')
607
597
  ```
608
598
 
599
+ `AlternativeDataMacroMarkets` exposes the public-sources market-data endpoint for B3 maximum theoretical margin. The direct market-data `investor-categories` endpoint is intentionally not exposed in this package.
600
+
609
601
  ### Reference Data
610
602
 
611
603
  #### Corporate Events
@@ -1,4 +1,4 @@
1
- __version__ = "3.3.0"
1
+ __version__ = "4.1.1"
2
2
 
3
3
  from .websocket import *
4
4
  from .rest import *
@@ -4,7 +4,6 @@ from .historical_candles_crypto import HistoricalCandlesCrypto
4
4
  from .authenticator import Authenticator
5
5
  from .bulk_data import BulkData
6
6
  from .hfn import HighFrequencyNews
7
- from .hfn_v3 import HighFrequencyNewsV3
8
7
  from .quotes import Quotes
9
8
  from .intraday_tick_data import IntradayTickData
10
9
  from .ticker_last_event import TickerLastEvent
@@ -14,6 +14,7 @@ class AlternativeDataCompanies:
14
14
 
15
15
  >>> from btgsolutions_dataservices import AlternativeDataCompanies
16
16
  >>> companies = AlternativeDataCompanies(api_key='YOUR_API_KEY')
17
+ >>> companies.list_companies(query='PETROBRAS', jurisdiction='BR')
17
18
  >>> companies.get_board(company_id='PETR4')
18
19
  >>> companies.get_governance_summary(company_id='VALE3')
19
20
  >>> companies.get_financial_statements(company_id='ITUB4')
@@ -28,13 +29,13 @@ class AlternativeDataCompanies:
28
29
 
29
30
  def __init__(self, api_key: str):
30
31
  self.api_key = api_key
31
- self.token = Authenticator(self.api_key).token
32
- self.headers = {"authorization": f"Bearer {self.token}"}
32
+ self.__authenticator = Authenticator(self.api_key)
33
33
 
34
34
  def _get(self, path: str, params: dict) -> dict:
35
35
  url = f"{url_api_v1}/public-sources/{path}"
36
36
  params = {k: v for k, v in params.items() if v is not None and v != ""}
37
- response = requests.get(url, params=params, headers=self.headers, timeout=30)
37
+ headers = {"authorization": f"Bearer {self.__authenticator.token}"}
38
+ response = requests.get(url, params=params, headers=headers, timeout=30)
38
39
  if response.status_code != 200:
39
40
  self._raise_error(response)
40
41
  return response.json()
@@ -48,6 +49,38 @@ class AlternativeDataCompanies:
48
49
  detail = response.text
49
50
  raise BadResponse(f"Error {response.status_code}: {detail}")
50
51
 
52
+ def list_companies(
53
+ self,
54
+ query: Optional[str] = None,
55
+ jurisdiction: Optional[str] = None,
56
+ limit: int = 50,
57
+ offset: int = 0,
58
+ ) -> dict:
59
+ """
60
+ List or search companies available in the public-sources company directory.
61
+
62
+ Parameters
63
+ ----------------
64
+ query: str
65
+ Free-text search over company name, ticker, CNPJ, or CIK.
66
+ Field is not required. Example: 'PETROBRAS'.
67
+ jurisdiction: str
68
+ Filter by jurisdiction: 'BR' or 'US'.
69
+ Field is not required.
70
+ limit: int
71
+ Maximum number of results to return.
72
+ Field is not required. Default: 50.
73
+ offset: int
74
+ Number of results to skip for pagination.
75
+ Field is not required. Default: 0.
76
+ """
77
+ return self._get("companies/list", {
78
+ "query": query,
79
+ "jurisdiction": jurisdiction,
80
+ "limit": limit,
81
+ "offset": offset,
82
+ })
83
+
51
84
  def get_board(
52
85
  self,
53
86
  company_id: str,
@@ -439,7 +472,7 @@ class AlternativeDataCompanies:
439
472
  Statement type (e.g. 'income_statement', 'balance_sheet', 'cash_flow').
440
473
  Field is not required. Default: 'income_statement'.
441
474
  quarter: str
442
- Quarter filter in QTyy format (e.g. 'Q12024').
475
+ Brazilian quarter code filter (e.g. '1T24' or '4T24').
443
476
  Field is not required.
444
477
  reference_date: str
445
478
  Reference date in YYYY-MM-DD format.
@@ -486,7 +519,7 @@ class AlternativeDataCompanies:
486
519
  Company identifier (CNPJ, CVM code, or B3 ticker).
487
520
  Field is required. Example: 'VALE3'.
488
521
  quarter: str
489
- Quarter filter in QTyy format (e.g. 'Q42024').
522
+ Brazilian quarter code filter (e.g. '1T24' or '4T24').
490
523
  Field is not required.
491
524
  limit: int
492
525
  Maximum number of results to return.
@@ -527,8 +560,9 @@ class AlternativeDataCompanies:
527
560
  Company identifier.
528
561
  Field is not required. Example: 'PETR4'.
529
562
  document_type: str
530
- Document type: 'repurchase' (buyback programs) or 'insider'
531
- (insider trading notifications).
563
+ Document type: 'repurchase' (buyback programs) or 'insiders'
564
+ (Brazilian insider trading notifications). The 'insider' alias is
565
+ also accepted upstream.
532
566
  Field is not required. Default: 'repurchase'.
533
567
  asset: str
534
568
  Ticker asset filter.
@@ -575,3 +609,35 @@ class AlternativeDataCompanies:
575
609
  "limit": limit,
576
610
  "offset": offset,
577
611
  })
612
+
613
+ def get_assemblies(
614
+ self,
615
+ company_id: str,
616
+ start_date: Optional[str] = None,
617
+ end_date: Optional[str] = None,
618
+ limit: int = 50,
619
+ ) -> dict:
620
+ """
621
+ Shareholder assembly index (AGO/AGE) for a Brazilian company.
622
+
623
+ Parameters
624
+ ----------------
625
+ company_id: str
626
+ Company identifier (ticker, CNPJ or company name).
627
+ Field is required. Example: 'PINE4'.
628
+ start_date: str
629
+ Start date in YYYY-MM-DD format.
630
+ Field is not required.
631
+ end_date: str
632
+ End date in YYYY-MM-DD format.
633
+ Field is not required.
634
+ limit: int
635
+ Maximum number of results to return.
636
+ Field is not required. Default: 50.
637
+ """
638
+ return self._get("companies/assemblies", {
639
+ "company_id": company_id,
640
+ "start_date": start_date,
641
+ "end_date": end_date,
642
+ "limit": limit,
643
+ })
@@ -14,9 +14,10 @@ class AlternativeDataFunds:
14
14
 
15
15
  >>> from btgsolutions_dataservices import AlternativeDataFunds
16
16
  >>> funds = AlternativeDataFunds(api_key='YOUR_API_KEY')
17
- >>> funds.get_holdings(fund_id='73.232.530/0001-46')
18
- >>> funds.get_exposures(fund_id='73.232.530/0001-46')
19
- >>> funds.get_history(fund_id='73.232.530/0001-46')
17
+ >>> funds.list_etfs()
18
+ >>> funds.get_holdings(fund_id='BOVA11')
19
+ >>> funds.get_exposures(fund_id='BOVA11')
20
+ >>> funds.get_history(fund_id='BOVA11')
20
21
 
21
22
  Parameters
22
23
  ----------------
@@ -27,13 +28,13 @@ class AlternativeDataFunds:
27
28
 
28
29
  def __init__(self, api_key: str):
29
30
  self.api_key = api_key
30
- self.token = Authenticator(self.api_key).token
31
- self.headers = {"authorization": f"Bearer {self.token}"}
31
+ self.__authenticator = Authenticator(self.api_key)
32
32
 
33
33
  def _get(self, path: str, params: dict) -> dict:
34
34
  url = f"{url_api_v1}/public-sources/{path}"
35
35
  params = {k: v for k, v in params.items() if v is not None and v != ""}
36
- response = requests.get(url, params=params, headers=self.headers, timeout=30)
36
+ headers = {"authorization": f"Bearer {self.__authenticator.token}"}
37
+ response = requests.get(url, params=params, headers=headers, timeout=30)
37
38
  if response.status_code != 200:
38
39
  self._raise_error(response)
39
40
  return response.json()
@@ -47,6 +48,55 @@ class AlternativeDataFunds:
47
48
  detail = response.text
48
49
  raise BadResponse(f"Error {response.status_code}: {detail}")
49
50
 
51
+ def list_etfs(
52
+ self,
53
+ query: Optional[str] = None,
54
+ issuer: Optional[str] = None,
55
+ source: str = "official",
56
+ sort_by: str = "name",
57
+ min_positions: int = 1,
58
+ limit: int = 100,
59
+ offset: int = 0,
60
+ ) -> dict:
61
+ """
62
+ List ETFs available in the public-sources ETF registry.
63
+
64
+ Parameters
65
+ ----------------
66
+ query: str
67
+ Free-text filter over ticker, fund name, CNPJ, or issuer.
68
+ Field is not required. Example: 'BOVA'.
69
+ issuer: str
70
+ Issuer key/name filter (e.g. 'blackrock', 'btg_pactual').
71
+ Field is not required.
72
+ source: str
73
+ Holdings source used to compute reference_date, positions_count and
74
+ total_value: 'official', 'approximate', or 'index'.
75
+ Field is not required. Default: 'official'.
76
+ sort_by: str
77
+ Sort mode: 'name', 'ticker', 'positions_count_desc',
78
+ 'total_value_desc', or 'total_value_asc'.
79
+ Field is not required. Default: 'name'.
80
+ min_positions: int
81
+ Minimum number of positions required for an ETF to be returned.
82
+ Field is not required. Default: 1.
83
+ limit: int
84
+ Maximum number of ETFs to return.
85
+ Field is not required. Default: 100.
86
+ offset: int
87
+ Number of results to skip for pagination.
88
+ Field is not required. Default: 0.
89
+ """
90
+ return self._get("funds/etfs", {
91
+ "query": query,
92
+ "issuer": issuer,
93
+ "source": source,
94
+ "sort_by": sort_by,
95
+ "min_positions": min_positions,
96
+ "limit": limit,
97
+ "offset": offset,
98
+ })
99
+
50
100
  def get_holdings(
51
101
  self,
52
102
  fund_id: str,
@@ -62,7 +112,8 @@ class AlternativeDataFunds:
62
112
  Parameters
63
113
  ----------------
64
114
  fund_id: str
65
- Fund identifier. Accepts CNPJ (BR funds/ETFs) or US fund identifier.
115
+ Fund identifier. Accepts a CNPJ, a BR ETF ticker such as 'BOVA11',
116
+ or a US fund identifier.
66
117
  Field is required. Example: '73.232.530/0001-46'.
67
118
  reference_date: str
68
119
  Reference date in YYYY-MM-DD format. Defaults to the most recent snapshot.
@@ -96,14 +147,14 @@ class AlternativeDataFunds:
96
147
  exposure_type: str = "all",
97
148
  ) -> dict:
98
149
  """
99
- Portfolio exposures for a Brazilian CVM fund (asset class, issuer,
100
- sector, indexer, maturity, country).
150
+ Portfolio exposures for a Brazilian CVM fund or ETF (asset class,
151
+ issuer, sector, indexer, maturity, country).
101
152
 
102
153
  Parameters
103
154
  ----------------
104
155
  fund_id: str
105
- Fund CNPJ.
106
- Field is required. Example: '73.232.530/0001-46'.
156
+ Fund CNPJ or BR ETF ticker.
157
+ Field is required. Example: 'BOVA11'.
107
158
  reference_date: str
108
159
  Reference date in YYYY-MM-DD format. Defaults to the most recent snapshot.
109
160
  Field is not required.
@@ -126,14 +177,15 @@ class AlternativeDataFunds:
126
177
  limit: int = 12,
127
178
  ) -> dict:
128
179
  """
129
- Holdings history time-series for a Brazilian CVM fund (snapshot metadata
130
- per reference date: positions count, total value, NAV).
180
+ History time-series for a Brazilian CVM fund or ETF. Mutual funds
181
+ return NAV/quota fields; ETFs return portfolio total_value and
182
+ positions_count.
131
183
 
132
184
  Parameters
133
185
  ----------------
134
186
  fund_id: str
135
- Fund CNPJ.
136
- Field is required. Example: '73.232.530/0001-46'.
187
+ Fund CNPJ or BR ETF ticker.
188
+ Field is required. Example: 'BOVA11'.
137
189
  start_date: str
138
190
  Start date in YYYY-MM-DD format.
139
191
  Field is not required.
@@ -158,14 +210,14 @@ class AlternativeDataFunds:
158
210
  limit: int = 100,
159
211
  ) -> dict:
160
212
  """
161
- Look-through resolution for a fund-of-funds (resolves nested fund
162
- positions to underlying assets).
213
+ Look-through resolution for a fund or ETF (resolves nested fund
214
+ positions to underlying assets when available).
163
215
 
164
216
  Parameters
165
217
  ----------------
166
218
  fund_id: str
167
- Fund CNPJ.
168
- Field is required.
219
+ Fund CNPJ or BR ETF ticker.
220
+ Field is required. Example: 'BOVA11'.
169
221
  reference_date: str
170
222
  Reference date in YYYY-MM-DD format. Defaults to the most recent snapshot.
171
223
  Field is not required.
@@ -28,13 +28,13 @@ class AlternativeDataMacroMarkets:
28
28
 
29
29
  def __init__(self, api_key: str):
30
30
  self.api_key = api_key
31
- self.token = Authenticator(self.api_key).token
32
- self.headers = {"authorization": f"Bearer {self.token}"}
31
+ self.__authenticator = Authenticator(self.api_key)
33
32
 
34
33
  def _get(self, path: str, params: dict) -> dict:
35
34
  url = f"{url_api_v1}/public-sources/{path}"
36
35
  params = {k: v for k, v in params.items() if v is not None and v != ""}
37
- response = requests.get(url, params=params, headers=self.headers, timeout=30)
36
+ headers = {"authorization": f"Bearer {self.__authenticator.token}"}
37
+ response = requests.get(url, params=params, headers=headers, timeout=30)
38
38
  if response.status_code != 200:
39
39
  self._raise_error(response)
40
40
  return response.json()