btgsolutions-dataservices-python-client 2.12.0__tar.gz → 2.13.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 (34) hide show
  1. {btgsolutions-dataservices-python-client-2.12.0/btgsolutions_dataservices_python_client.egg-info → btgsolutions_dataservices_python_client-2.13.1}/PKG-INFO +16 -7
  2. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/README.md +1 -1
  3. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices/websocket/market_data_feed.py +11 -3
  4. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices/websocket/market_data_websocket_client.py +12 -5
  5. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1/btgsolutions_dataservices_python_client.egg-info}/PKG-INFO +16 -7
  6. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/setup.py +1 -1
  7. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/LICENSE +0 -0
  8. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/MANIFEST.in +0 -0
  9. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices/__init__.py +0 -0
  10. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices/config.py +0 -0
  11. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices/exceptions.py +0 -0
  12. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices/rest/__init__.py +0 -0
  13. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices/rest/authenticator.py +0 -0
  14. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices/rest/bulk_data.py +0 -0
  15. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices/rest/company_data.py +0 -0
  16. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices/rest/corporate_events.py +0 -0
  17. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices/rest/hfn.py +0 -0
  18. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices/rest/historical_candles.py +0 -0
  19. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices/rest/intraday_candles.py +0 -0
  20. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices/rest/intraday_tick_data.py +0 -0
  21. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices/rest/public_sources.py +0 -0
  22. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices/rest/quotes.py +0 -0
  23. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices/rest/reference_data.py +0 -0
  24. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices/rest/ticker_last_event.py +0 -0
  25. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices/websocket/__init__.py +0 -0
  26. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices/websocket/hfn_websocket_client.py +0 -0
  27. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices/websocket/websocket_default_functions.py +0 -0
  28. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices_python_client.egg-info/SOURCES.txt +0 -0
  29. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices_python_client.egg-info/dependency_links.txt +0 -0
  30. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices_python_client.egg-info/requires.txt +3 -3
  31. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/btgsolutions_dataservices_python_client.egg-info/top_level.txt +0 -0
  32. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/pyproject.toml +0 -0
  33. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/requirements.txt +0 -0
  34. {btgsolutions-dataservices-python-client-2.12.0 → btgsolutions_dataservices_python_client-2.13.1}/setup.cfg +0 -0
@@ -1,14 +1,25 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: btgsolutions-dataservices-python-client
3
- Version: 2.12.0
3
+ Version: 2.13.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
9
7
  Requires-Python: >=3.9,<3.13
10
8
  Description-Content-Type: text/markdown
11
9
  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
12
23
 
13
24
  # BTG Solutions - Data Services
14
25
 
@@ -154,7 +165,7 @@ ws.run(on_message=lambda message: print(message))
154
165
 
155
166
  ```python
156
167
  import btgsolutions_dataservices as btg
157
- ws = btg.MarketDataWebSocketClient(api_key='YOUR_API_KEY', data_type='books')
168
+ ws = btg.MarketDataWebSocketClient(api_key='YOUR_API_KEY', data_type='instrument_status', data_subtype='stocks')
158
169
  ws.run(on_message=lambda message: print(message))
159
170
  ws.instrument_status('PETR4')
160
171
  ws.instrument_status_history('PETR4')
@@ -425,5 +436,3 @@ import btgsolutions_dataservices as btg
425
436
  ref = btg.ReferenceData(api_key='YOUR_API_KEY')
426
437
  ref.ticker_reference(tickers=['VALE3','PETR4'])
427
438
  ```
428
-
429
-
@@ -142,7 +142,7 @@ ws.run(on_message=lambda message: print(message))
142
142
 
143
143
  ```python
144
144
  import btgsolutions_dataservices as btg
145
- ws = btg.MarketDataWebSocketClient(api_key='YOUR_API_KEY', data_type='books')
145
+ ws = btg.MarketDataWebSocketClient(api_key='YOUR_API_KEY', data_type='instrument_status', data_subtype='stocks')
146
146
  ws.run(on_message=lambda message: print(message))
147
147
  ws.instrument_status('PETR4')
148
148
  ws.instrument_status_history('PETR4')
@@ -351,7 +351,7 @@ class MarketDataFeed:
351
351
  message = json.dumps(message)
352
352
  self.client_message_queue.put(json.loads(message))
353
353
 
354
- def subscribe(self, list_instruments: List[str], n=None):
354
+ def subscribe(self, list_instruments: List[str], n=None, initial_snapshot: bool=False):
355
355
  """
356
356
  Subscribes a list of instruments.
357
357
 
@@ -363,9 +363,17 @@ class MarketDataFeed:
363
363
  Field is not required.
364
364
  **For books data_type only.**
365
365
  Maximum book level. It must be between 1 and 10.
366
+ initial_snapshot: float
367
+ If True, client receives ticker last event (snapshot) of the provided ticker.
368
+ Field is not required.
369
+ Default: False
366
370
  """
367
- if self.data_type == BOOKS and n is not None:
368
- self._send({'action': 'subscribe', 'params': {"tickers": list_instruments, "n": n}})
371
+
372
+ if initial_snapshot or n is not None:
373
+ message = {'action': 'subscribe', 'params': {"tickers": list_instruments, "initial_snapshot": initial_snapshot}}
374
+ if n is not None:
375
+ message['params']['n'] = n
376
+ self._send(message)
369
377
  else:
370
378
  self._send({'action': 'subscribe', 'params': list_instruments})
371
379
 
@@ -267,7 +267,7 @@ class MarketDataWebSocketClient:
267
267
  """
268
268
  self.ws.close()
269
269
 
270
- def subscribe(self, list_instruments, n=None):
270
+ def subscribe(self, list_instruments, n=None, initial_snapshot: bool=False):
271
271
  """
272
272
  Subscribes a list of instruments.
273
273
 
@@ -278,12 +278,19 @@ class MarketDataWebSocketClient:
278
278
  n: int
279
279
  Field is not required.
280
280
  **For books data_type only.**
281
- Maximum book level. It must be between 1 and 10.
281
+ Maximum book level. It must be between 1 and 10.
282
+ initial_snapshot: float
283
+ If True, client receives ticker last event (snapshot) of the provided ticker.
284
+ Field is not required.
285
+ Default: False
282
286
  """
283
287
 
284
- if self.data_type == BOOKS and n is not None:
285
- self.__send({'action': 'subscribe', 'params': {"tickers": list_instruments, "n": n}})
286
- self.__print(f'Socket subscribed the following instrument(s) with n = {n}: {list_instruments}')
288
+ if initial_snapshot or n is not None:
289
+ message = {'action': 'subscribe', 'params': {"tickers": list_instruments, "initial_snapshot": initial_snapshot}}
290
+ if n is not None:
291
+ message['params']['n'] = n
292
+ self.__send(message)
293
+ self.__print(f'Socket subscribed the following instrument(s) with n = {n}: {list_instruments} and initial_snapshot = {initial_snapshot}')
287
294
  else:
288
295
  self.__send({'action': 'subscribe', 'params': list_instruments})
289
296
  self.__print(f'Socket subscribed the following instrument(s): {list_instruments}')
@@ -1,14 +1,25 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: btgsolutions-dataservices-python-client
3
- Version: 2.12.0
3
+ Version: 2.13.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
9
7
  Requires-Python: >=3.9,<3.13
10
8
  Description-Content-Type: text/markdown
11
9
  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
12
23
 
13
24
  # BTG Solutions - Data Services
14
25
 
@@ -154,7 +165,7 @@ ws.run(on_message=lambda message: print(message))
154
165
 
155
166
  ```python
156
167
  import btgsolutions_dataservices as btg
157
- ws = btg.MarketDataWebSocketClient(api_key='YOUR_API_KEY', data_type='books')
168
+ ws = btg.MarketDataWebSocketClient(api_key='YOUR_API_KEY', data_type='instrument_status', data_subtype='stocks')
158
169
  ws.run(on_message=lambda message: print(message))
159
170
  ws.instrument_status('PETR4')
160
171
  ws.instrument_status_history('PETR4')
@@ -425,5 +436,3 @@ import btgsolutions_dataservices as btg
425
436
  ref = btg.ReferenceData(api_key='YOUR_API_KEY')
426
437
  ref.ticker_reference(tickers=['VALE3','PETR4'])
427
438
  ```
428
-
429
-
@@ -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.12.0',
25
+ version='2.13.1',
26
26
  description=description,
27
27
  long_description=long_description,
28
28
  long_description_content_type='text/markdown',
@@ -1,5 +1,5 @@
1
- PyJWT>=2.8.0
2
1
  pandas>=2.2.2
3
- pyarrow>=17.0.0
4
- requests>=2.32.3
5
2
  websocket-client>=1.8.0
3
+ PyJWT>=2.8.0
4
+ requests>=2.32.3
5
+ pyarrow>=17.0.0