btgsolutions-dataservices-python-client 2.18.1__tar.gz → 2.18.2__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 (36) hide show
  1. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/PKG-INFO +9 -5
  2. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/README.md +4 -4
  3. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices/rest/bulk_data.py +14 -12
  4. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices_python_client.egg-info/PKG-INFO +9 -5
  5. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/setup.py +1 -1
  6. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/LICENSE +0 -0
  7. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/MANIFEST.in +0 -0
  8. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices/__init__.py +0 -0
  9. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices/config.py +0 -0
  10. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices/exceptions.py +0 -0
  11. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices/rest/__init__.py +0 -0
  12. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices/rest/authenticator.py +0 -0
  13. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices/rest/company_data.py +0 -0
  14. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices/rest/corporate_events.py +0 -0
  15. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices/rest/hfn.py +0 -0
  16. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices/rest/historical_candles.py +0 -0
  17. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices/rest/intraday_candles.py +0 -0
  18. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices/rest/intraday_tick_data.py +0 -0
  19. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices/rest/public_sources.py +0 -0
  20. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices/rest/quotes.py +0 -0
  21. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices/rest/reference_data.py +0 -0
  22. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices/rest/stock_loan.py +0 -0
  23. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices/rest/ticker_last_event.py +0 -0
  24. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices/rest/ticker_last_event_polling.py +0 -0
  25. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices/websocket/__init__.py +0 -0
  26. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices/websocket/hfn_websocket_client.py +0 -0
  27. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices/websocket/market_data_feed.py +0 -0
  28. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices/websocket/market_data_websocket_client.py +0 -0
  29. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices/websocket/websocket_default_functions.py +0 -0
  30. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices_python_client.egg-info/SOURCES.txt +0 -0
  31. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices_python_client.egg-info/dependency_links.txt +0 -0
  32. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices_python_client.egg-info/requires.txt +0 -0
  33. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/btgsolutions_dataservices_python_client.egg-info/top_level.txt +0 -0
  34. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/pyproject.toml +0 -0
  35. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/requirements.txt +0 -0
  36. {btgsolutions_dataservices_python_client-2.18.1 → btgsolutions_dataservices_python_client-2.18.2}/setup.cfg +0 -0
@@ -1,9 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: btgsolutions_dataservices_python_client
3
- Version: 2.18.1
3
+ Version: 2.18.2
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.14
8
10
  Description-Content-Type: text/markdown
9
11
  License-File: LICENSE
@@ -320,7 +322,7 @@ bulk_data.get_security_list(date='2025-05-07')
320
322
  ```python
321
323
  import btgsolutions_dataservices as btg
322
324
  bulk_data = btg.BulkData(api_key='YOUR_API_KEY')
323
- bulk_data.get_market_data_channels(date='2024-01-03')
325
+ bulk_data.get_market_data_channels(date='2026-01-30')
324
326
  ```
325
327
 
326
328
  ##### Compressed Data (PCAP files)
@@ -328,9 +330,9 @@ bulk_data.get_market_data_channels(date='2024-01-03')
328
330
  ```python
329
331
  import btgsolutions_dataservices as btg
330
332
  bulk_data = btg.BulkData(api_key='YOUR_API_KEY')
331
- bulk_data.get_compressed_data(channel='001', date='2024-01-03', data_type='instruments')
332
- # bulk_data.get_compressed_data(channel='053', date='2024-01-03', data_type='incremental')
333
- # bulk_data.get_compressed_data(channel='051', date='2024-01-03', data_type='snapshot')
333
+ bulk_data.get_compressed_data(channel='98', date='2026-01-30', data_type='instruments')
334
+ # bulk_data.get_compressed_data(channel='98', date='2026-01-30', data_type='incremental', feed='feedA')
335
+ # bulk_data.get_compressed_data(channel='98', date='2026-01-30', data_type='snapshot')
334
336
  ```
335
337
 
336
338
  ### Alternative Data
@@ -467,3 +469,5 @@ ref = btg.ReferenceData(api_key='YOUR_API_KEY')
467
469
  ref.ticker_reference(tickers=['VALE3','PETR4'])
468
470
  ```
469
471
 
472
+
473
+
@@ -310,7 +310,7 @@ bulk_data.get_security_list(date='2025-05-07')
310
310
  ```python
311
311
  import btgsolutions_dataservices as btg
312
312
  bulk_data = btg.BulkData(api_key='YOUR_API_KEY')
313
- bulk_data.get_market_data_channels(date='2024-01-03')
313
+ bulk_data.get_market_data_channels(date='2026-01-30')
314
314
  ```
315
315
 
316
316
  ##### Compressed Data (PCAP files)
@@ -318,9 +318,9 @@ bulk_data.get_market_data_channels(date='2024-01-03')
318
318
  ```python
319
319
  import btgsolutions_dataservices as btg
320
320
  bulk_data = btg.BulkData(api_key='YOUR_API_KEY')
321
- bulk_data.get_compressed_data(channel='001', date='2024-01-03', data_type='instruments')
322
- # bulk_data.get_compressed_data(channel='053', date='2024-01-03', data_type='incremental')
323
- # bulk_data.get_compressed_data(channel='051', date='2024-01-03', data_type='snapshot')
321
+ bulk_data.get_compressed_data(channel='98', date='2026-01-30', data_type='instruments')
322
+ # bulk_data.get_compressed_data(channel='98', date='2026-01-30', data_type='incremental', feed='feedA')
323
+ # bulk_data.get_compressed_data(channel='98', date='2026-01-30', data_type='snapshot')
324
324
  ```
325
325
 
326
326
  ### Alternative Data
@@ -2,7 +2,7 @@ import os
2
2
  from typing import Optional
3
3
  from ..exceptions import BadResponse
4
4
  import requests
5
- from ..config import url_api_v1, url_apis
5
+ from ..config import url_api_v1, url_apis, url_apis_v3
6
6
  from .authenticator import Authenticator
7
7
  import json
8
8
  import pandas as pd
@@ -12,7 +12,9 @@ import pyarrow.parquet as pq
12
12
  def download_compressed_file(url, headers):
13
13
 
14
14
  with requests.get(url, headers=headers, stream=True) as response:
15
- response.raise_for_status()
15
+ if response.status_code != 200:
16
+ response = json.loads(response.text)
17
+ raise BadResponse(f'Error: {response.get("ApiClientError", "")}.\n{response.get("SuggestedAction", "")}')
16
18
 
17
19
  try:
18
20
  file_name = response.headers.get('content-disposition').split('filename=')[1]
@@ -110,9 +112,9 @@ class BulkData:
110
112
  date: str
111
113
  Date period.
112
114
  Field is required.
113
- Format: 'YYYY-MM-DD'. Example: '2023-07-03', '2023-07-28'.
115
+ Format: 'YYYY-MM-DD'. Example: '2026-01-30'.
114
116
  """
115
- url = f"{url_api_v1}/marketdata/bulkdata/channels?date={date}"
117
+ url = f"{url_apis_v3}/marketdata/bulkdata/compressed/available-channels?date={date}"
116
118
 
117
119
  response = requests.request("GET", url, headers=self.headers)
118
120
  if response.status_code == 200:
@@ -126,7 +128,7 @@ class BulkData:
126
128
  channel:str,
127
129
  date:str,
128
130
  data_type:str='instruments',
129
- binary:bool=False
131
+ feed:str='',
130
132
  ):
131
133
  """
132
134
  This method provides market data via compressed files (instruments, snapshot, incremental) for a given market data channel and date. Function get_market_data_channels provides all the available channels for a given date.
@@ -135,19 +137,19 @@ class BulkData:
135
137
  ----------------
136
138
  channel: str
137
139
  Market Data channel.
138
- Field is required. Example: '001'.
140
+ Field is required. Example: '72'.
139
141
  date: str
140
142
  Date period.
141
143
  Field is required.
142
- Format: 'YYYY-MM-DD'. Example: '2023-07-03', '2023-07-28'.
144
+ Format: 'YYYY-MM-DD'. Example: '2026-01-30'.
143
145
  data_type: str
144
146
  Market data type.
145
- Field is required. Example: 'instruments', 'snapshot', 'incremental', 'instrument-status'.
146
- binary: bool
147
- If true, returns binary data. If false, returns FIX/FAST data.
148
- Field is not required. Default: false.
147
+ Field is required. Example: 'instruments', 'snapshot', 'incremental'.
148
+ feed: str
149
+ Available only for 'incremental' data type. Allowed values: 'feedA' or 'feedB'
150
+ Field is not required.
149
151
  """
150
- url = f"{url_api_v1}/marketdata/bulkdata/compressed/{data_type}?channel={channel}&date={date}&binary={binary}"
152
+ url = f"{url_apis_v3}/marketdata/bulkdata/compressed/{data_type}?channel={channel}&date={date}&feed={feed}"
151
153
  download_compressed_file(url, headers=self.headers)
152
154
 
153
155
  def get_data(
@@ -1,9 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: btgsolutions-dataservices-python-client
3
- Version: 2.18.1
3
+ Version: 2.18.2
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.14
8
10
  Description-Content-Type: text/markdown
9
11
  License-File: LICENSE
@@ -320,7 +322,7 @@ bulk_data.get_security_list(date='2025-05-07')
320
322
  ```python
321
323
  import btgsolutions_dataservices as btg
322
324
  bulk_data = btg.BulkData(api_key='YOUR_API_KEY')
323
- bulk_data.get_market_data_channels(date='2024-01-03')
325
+ bulk_data.get_market_data_channels(date='2026-01-30')
324
326
  ```
325
327
 
326
328
  ##### Compressed Data (PCAP files)
@@ -328,9 +330,9 @@ bulk_data.get_market_data_channels(date='2024-01-03')
328
330
  ```python
329
331
  import btgsolutions_dataservices as btg
330
332
  bulk_data = btg.BulkData(api_key='YOUR_API_KEY')
331
- bulk_data.get_compressed_data(channel='001', date='2024-01-03', data_type='instruments')
332
- # bulk_data.get_compressed_data(channel='053', date='2024-01-03', data_type='incremental')
333
- # bulk_data.get_compressed_data(channel='051', date='2024-01-03', data_type='snapshot')
333
+ bulk_data.get_compressed_data(channel='98', date='2026-01-30', data_type='instruments')
334
+ # bulk_data.get_compressed_data(channel='98', date='2026-01-30', data_type='incremental', feed='feedA')
335
+ # bulk_data.get_compressed_data(channel='98', date='2026-01-30', data_type='snapshot')
334
336
  ```
335
337
 
336
338
  ### Alternative Data
@@ -467,3 +469,5 @@ ref = btg.ReferenceData(api_key='YOUR_API_KEY')
467
469
  ref.ticker_reference(tickers=['VALE3','PETR4'])
468
470
  ```
469
471
 
472
+
473
+
@@ -22,7 +22,7 @@ description = "Python package containing several classes and data for extracting
22
22
 
23
23
  setup(
24
24
  name='btgsolutions_dataservices_python_client',
25
- version='2.18.1',
25
+ version='2.18.2',
26
26
  description=description,
27
27
  long_description=long_description,
28
28
  long_description_content_type='text/markdown',