btgsolutions-dataservices-python-client 3.2.1__tar.gz → 3.2.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.
- {btgsolutions_dataservices_python_client-3.2.1/btgsolutions_dataservices_python_client.egg-info → btgsolutions_dataservices_python_client-3.2.2}/PKG-INFO +7 -16
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/README.md +1 -1
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices/rest/intraday_candles.py +8 -3
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2/btgsolutions_dataservices_python_client.egg-info}/PKG-INFO +8 -17
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/setup.py +1 -1
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/LICENSE +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/MANIFEST.in +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices/__init__.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices/config.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices/exceptions.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices/rest/__init__.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices/rest/authenticator.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices/rest/bulk_data.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices/rest/company_data.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices/rest/corporate_events.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices/rest/hfn.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices/rest/historical_candles.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices/rest/intraday_tick_data.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices/rest/public_sources.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices/rest/quotes.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices/rest/reference_data.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices/rest/stock_loan.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices/rest/ticker_last_event.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices/rest/ticker_last_event_polling.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices/websocket/__init__.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices/websocket/hfn_websocket_client.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices/websocket/market_data_feed.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices/websocket/market_data_websocket_client.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices/websocket/websocket_default_functions.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices_python_client.egg-info/SOURCES.txt +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices_python_client.egg-info/dependency_links.txt +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices_python_client.egg-info/requires.txt +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/btgsolutions_dataservices_python_client.egg-info/top_level.txt +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/pyproject.toml +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/requirements.txt +0 -0
- {btgsolutions_dataservices_python_client-3.2.1 → btgsolutions_dataservices_python_client-3.2.2}/setup.cfg +0 -0
|
@@ -1,25 +1,14 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: btgsolutions_dataservices_python_client
|
|
3
|
-
Version: 3.2.
|
|
3
|
+
Version: 3.2.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
|
|
10
|
-
Requires-Dist: pandas>=2.2.2
|
|
11
|
-
Requires-Dist: websocket-client>=1.8.0
|
|
12
|
-
Requires-Dist: PyJWT>=2.8.0
|
|
13
|
-
Requires-Dist: requests>=2.32.3
|
|
14
|
-
Requires-Dist: pyarrow>=17.0.0
|
|
15
|
-
Dynamic: author
|
|
16
|
-
Dynamic: description
|
|
17
|
-
Dynamic: description-content-type
|
|
18
|
-
Dynamic: home-page
|
|
19
|
-
Dynamic: license-file
|
|
20
|
-
Dynamic: requires-dist
|
|
21
|
-
Dynamic: requires-python
|
|
22
|
-
Dynamic: summary
|
|
23
12
|
|
|
24
13
|
# BTG Solutions - Data Services
|
|
25
14
|
|
|
@@ -184,7 +173,7 @@ ws.run(on_message=lambda message: print(message))
|
|
|
184
173
|
```python
|
|
185
174
|
import btgsolutions_dataservices as btg
|
|
186
175
|
int_candles = btg.IntradayCandles(api_key='YOUR_API_KEY')
|
|
187
|
-
int_candles.get_intraday_candles(market_type='stocks', tickers=['PETR4', 'VALE3'], candle_period='1m', delay='delayed', mode='relative', timezone='UTC', raw_data=True)
|
|
176
|
+
int_candles.get_intraday_candles(market_type='stocks', tickers=['PETR4', 'VALE3'], candle_period='1m', delay='delayed', mode='relative', timezone='UTC', market_status='regular', raw_data=True)
|
|
188
177
|
```
|
|
189
178
|
|
|
190
179
|
#### Intraday Tick Data
|
|
@@ -453,3 +442,5 @@ ref = btg.ReferenceData(api_key='YOUR_API_KEY')
|
|
|
453
442
|
ref.ticker_reference(tickers=['VALE3','PETR4'])
|
|
454
443
|
```
|
|
455
444
|
|
|
445
|
+
|
|
446
|
+
|
|
@@ -161,7 +161,7 @@ ws.run(on_message=lambda message: print(message))
|
|
|
161
161
|
```python
|
|
162
162
|
import btgsolutions_dataservices as btg
|
|
163
163
|
int_candles = btg.IntradayCandles(api_key='YOUR_API_KEY')
|
|
164
|
-
int_candles.get_intraday_candles(market_type='stocks', tickers=['PETR4', 'VALE3'], candle_period='1m', delay='delayed', mode='relative', timezone='UTC', raw_data=True)
|
|
164
|
+
int_candles.get_intraday_candles(market_type='stocks', tickers=['PETR4', 'VALE3'], candle_period='1m', delay='delayed', mode='relative', timezone='UTC', market_status='regular', raw_data=True)
|
|
165
165
|
```
|
|
166
166
|
|
|
167
167
|
#### Intraday Tick Data
|
|
@@ -60,6 +60,7 @@ class IntradayCandles:
|
|
|
60
60
|
mode:str='absolute',
|
|
61
61
|
raw_data:bool=False,
|
|
62
62
|
cross_filter:str='',
|
|
63
|
+
market_status:str='',
|
|
63
64
|
):
|
|
64
65
|
"""
|
|
65
66
|
This method provides realtime intraday candles for a given ticker.
|
|
@@ -95,9 +96,13 @@ class IntradayCandles:
|
|
|
95
96
|
Example: 'absolute', 'relative' or 'spark'.
|
|
96
97
|
Default: absolute.
|
|
97
98
|
cross_filter: str
|
|
98
|
-
Filter trades by cross status.
|
|
99
|
+
Filter trades by cross status.
|
|
99
100
|
Options: 'all', 'only_cross' or 'without_cross'.
|
|
100
101
|
Default: 'all'.
|
|
102
|
+
market_status: str
|
|
103
|
+
Filter trades by market status. Not available for 'Indices'.
|
|
104
|
+
Options: 'all' or 'regular'.
|
|
105
|
+
Default: 'all'.
|
|
101
106
|
raw_data: bool
|
|
102
107
|
If false, returns data in a dict of dataframes. If true, returns raw data.
|
|
103
108
|
Default: False.
|
|
@@ -107,8 +112,6 @@ class IntradayCandles:
|
|
|
107
112
|
|
|
108
113
|
if delay not in ['delayed', 'realtime']: raise DelayError(f"Must provide a valid 'delay' parameter. Input: '{delay}'. Accepted values: 'delayed' or 'realtime'.")
|
|
109
114
|
|
|
110
|
-
if cross_filter and market_type != 'derivatives': raise DelayError(f"The 'cross_filter' flag is only valid for market_type 'derivatives'.")
|
|
111
|
-
|
|
112
115
|
tickers = ','.join(tickers) if type(tickers) is list else tickers
|
|
113
116
|
|
|
114
117
|
url = f"{base_url}/api/v1/marketdata/br/b3/{delay}/intraday-candles/{market_type}?tickers={tickers}&candle_period={candle_period}&mode={mode}&timezone={timezone}"
|
|
@@ -119,6 +122,8 @@ class IntradayCandles:
|
|
|
119
122
|
|
|
120
123
|
if cross_filter: url += f'&cross_filter={cross_filter}'
|
|
121
124
|
|
|
125
|
+
if market_status: url += f'&market_status={market_status}'
|
|
126
|
+
|
|
122
127
|
response = requests.request("GET", url, headers=self.headers)
|
|
123
128
|
if response.status_code == 200:
|
|
124
129
|
response_data = json.loads(response.text)
|
|
@@ -1,25 +1,14 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
2
|
-
Name:
|
|
3
|
-
Version: 3.2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: btgsolutions-dataservices-python-client
|
|
3
|
+
Version: 3.2.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
|
|
10
|
-
Requires-Dist: pandas>=2.2.2
|
|
11
|
-
Requires-Dist: websocket-client>=1.8.0
|
|
12
|
-
Requires-Dist: PyJWT>=2.8.0
|
|
13
|
-
Requires-Dist: requests>=2.32.3
|
|
14
|
-
Requires-Dist: pyarrow>=17.0.0
|
|
15
|
-
Dynamic: author
|
|
16
|
-
Dynamic: description
|
|
17
|
-
Dynamic: description-content-type
|
|
18
|
-
Dynamic: home-page
|
|
19
|
-
Dynamic: license-file
|
|
20
|
-
Dynamic: requires-dist
|
|
21
|
-
Dynamic: requires-python
|
|
22
|
-
Dynamic: summary
|
|
23
12
|
|
|
24
13
|
# BTG Solutions - Data Services
|
|
25
14
|
|
|
@@ -184,7 +173,7 @@ ws.run(on_message=lambda message: print(message))
|
|
|
184
173
|
```python
|
|
185
174
|
import btgsolutions_dataservices as btg
|
|
186
175
|
int_candles = btg.IntradayCandles(api_key='YOUR_API_KEY')
|
|
187
|
-
int_candles.get_intraday_candles(market_type='stocks', tickers=['PETR4', 'VALE3'], candle_period='1m', delay='delayed', mode='relative', timezone='UTC', raw_data=True)
|
|
176
|
+
int_candles.get_intraday_candles(market_type='stocks', tickers=['PETR4', 'VALE3'], candle_period='1m', delay='delayed', mode='relative', timezone='UTC', market_status='regular', raw_data=True)
|
|
188
177
|
```
|
|
189
178
|
|
|
190
179
|
#### Intraday Tick Data
|
|
@@ -453,3 +442,5 @@ ref = btg.ReferenceData(api_key='YOUR_API_KEY')
|
|
|
453
442
|
ref.ticker_reference(tickers=['VALE3','PETR4'])
|
|
454
443
|
```
|
|
455
444
|
|
|
445
|
+
|
|
446
|
+
|
|
@@ -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='3.2.
|
|
25
|
+
version='3.2.2',
|
|
26
26
|
description=description,
|
|
27
27
|
long_description=long_description,
|
|
28
28
|
long_description_content_type='text/markdown',
|
|
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
|