btgsolutions-dataservices-python-client 3.2.5__tar.gz → 3.2.7__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.5/btgsolutions_dataservices_python_client.egg-info → btgsolutions_dataservices_python_client-3.2.7}/PKG-INFO +9 -1
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/README.md +8 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices/__init__.py +1 -1
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices/rest/__init__.py +1 -0
- btgsolutions_dataservices_python_client-3.2.7/btgsolutions_dataservices/rest/broker_reference.py +63 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7/btgsolutions_dataservices_python_client.egg-info}/PKG-INFO +9 -1
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices_python_client.egg-info/SOURCES.txt +1 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/LICENSE +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/MANIFEST.in +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices/config.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices/exceptions.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices/rest/authenticator.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices/rest/bulk_data.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices/rest/company_data.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices/rest/corporate_events.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices/rest/hfn.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices/rest/historical_candles.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices/rest/intraday_candles.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices/rest/intraday_tick_data.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices/rest/public_sources.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices/rest/quotes.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices/rest/reference_data.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices/rest/stock_loan.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices/rest/ticker_last_event.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices/rest/ticker_last_event_polling.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices/websocket/__init__.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices/websocket/hfn_websocket_client.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices/websocket/market_data_feed.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices/websocket/market_data_websocket_client.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices/websocket/websocket_default_functions.py +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices_python_client.egg-info/dependency_links.txt +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices_python_client.egg-info/requires.txt +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/btgsolutions_dataservices_python_client.egg-info/top_level.txt +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/pyproject.toml +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/requirements.txt +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/setup.cfg +0 -0
- {btgsolutions_dataservices_python_client-3.2.5 → btgsolutions_dataservices_python_client-3.2.7}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: btgsolutions_dataservices_python_client
|
|
3
|
-
Version: 3.2.
|
|
3
|
+
Version: 3.2.7
|
|
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
|
|
@@ -445,6 +445,14 @@ corporate_events.get(start_date='2024-05-01', end_date='2024-05-31')
|
|
|
445
445
|
# corporate_events.get(start_date='2024-05-01', end_date='2024-05-31', tickers=['VALE3'])
|
|
446
446
|
```
|
|
447
447
|
|
|
448
|
+
#### Broker Reference
|
|
449
|
+
|
|
450
|
+
```python
|
|
451
|
+
import btgsolutions_dataservices as btg
|
|
452
|
+
broker_reference = btg.BrokerReference(api_key='YOUR_API_KEY')
|
|
453
|
+
broker_reference.get()
|
|
454
|
+
```
|
|
455
|
+
|
|
448
456
|
#### Ticker Reference Data
|
|
449
457
|
|
|
450
458
|
```python
|
|
@@ -422,6 +422,14 @@ corporate_events.get(start_date='2024-05-01', end_date='2024-05-31')
|
|
|
422
422
|
# corporate_events.get(start_date='2024-05-01', end_date='2024-05-31', tickers=['VALE3'])
|
|
423
423
|
```
|
|
424
424
|
|
|
425
|
+
#### Broker Reference
|
|
426
|
+
|
|
427
|
+
```python
|
|
428
|
+
import btgsolutions_dataservices as btg
|
|
429
|
+
broker_reference = btg.BrokerReference(api_key='YOUR_API_KEY')
|
|
430
|
+
broker_reference.get()
|
|
431
|
+
```
|
|
432
|
+
|
|
425
433
|
#### Ticker Reference Data
|
|
426
434
|
|
|
427
435
|
```python
|
btgsolutions_dataservices_python_client-3.2.7/btgsolutions_dataservices/rest/broker_reference.py
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
from ..exceptions import BadResponse
|
|
3
|
+
import requests
|
|
4
|
+
from ..config import url_api_v1
|
|
5
|
+
from .authenticator import Authenticator
|
|
6
|
+
import pandas as pd
|
|
7
|
+
import json
|
|
8
|
+
|
|
9
|
+
class BrokerReference:
|
|
10
|
+
"""
|
|
11
|
+
This class provides broker reference information.
|
|
12
|
+
|
|
13
|
+
* Main use case:
|
|
14
|
+
|
|
15
|
+
>>> from btgsolutions_dataservices import BrokerReference
|
|
16
|
+
>>> broker_reference = BrokerReference(
|
|
17
|
+
>>> api_key='YOUR_API_KEY',
|
|
18
|
+
>>> )
|
|
19
|
+
>>> broker_reference.get()
|
|
20
|
+
|
|
21
|
+
Parameters
|
|
22
|
+
----------------
|
|
23
|
+
api_key: str
|
|
24
|
+
User identification key.
|
|
25
|
+
Field is required.
|
|
26
|
+
"""
|
|
27
|
+
def __init__(
|
|
28
|
+
self,
|
|
29
|
+
api_key:Optional[str]
|
|
30
|
+
):
|
|
31
|
+
self.api_key = api_key
|
|
32
|
+
self.token = Authenticator(self.api_key).token
|
|
33
|
+
self.headers = {"authorization": f"authorization {self.token}"}
|
|
34
|
+
|
|
35
|
+
def get(self, raw_data:bool=False):
|
|
36
|
+
|
|
37
|
+
"""
|
|
38
|
+
Returns the full broker reference dataset from the API.
|
|
39
|
+
|
|
40
|
+
Parameters
|
|
41
|
+
----------------
|
|
42
|
+
raw_data: bool
|
|
43
|
+
If False, returns the response as a pandas DataFrame.
|
|
44
|
+
If True, returns the raw JSON payload.
|
|
45
|
+
Field is not required. Default: False.
|
|
46
|
+
|
|
47
|
+
Returns
|
|
48
|
+
----------------
|
|
49
|
+
pandas.DataFrame | dict | list
|
|
50
|
+
Broker reference data returned by the API.
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
url = f"{url_api_v1}/marketdata/broker/info/all-brokers"
|
|
54
|
+
|
|
55
|
+
response = requests.request("GET", url, headers=self.headers)
|
|
56
|
+
if response.status_code == 200:
|
|
57
|
+
if raw_data:
|
|
58
|
+
return response.json()
|
|
59
|
+
else:
|
|
60
|
+
return pd.DataFrame(response.json())
|
|
61
|
+
else:
|
|
62
|
+
response = json.loads(response.text)
|
|
63
|
+
raise BadResponse(f'Error: {response.get("error", "")}')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: btgsolutions_dataservices_python_client
|
|
3
|
-
Version: 3.2.
|
|
3
|
+
Version: 3.2.7
|
|
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
|
|
@@ -445,6 +445,14 @@ corporate_events.get(start_date='2024-05-01', end_date='2024-05-31')
|
|
|
445
445
|
# corporate_events.get(start_date='2024-05-01', end_date='2024-05-31', tickers=['VALE3'])
|
|
446
446
|
```
|
|
447
447
|
|
|
448
|
+
#### Broker Reference
|
|
449
|
+
|
|
450
|
+
```python
|
|
451
|
+
import btgsolutions_dataservices as btg
|
|
452
|
+
broker_reference = btg.BrokerReference(api_key='YOUR_API_KEY')
|
|
453
|
+
broker_reference.get()
|
|
454
|
+
```
|
|
455
|
+
|
|
448
456
|
#### Ticker Reference Data
|
|
449
457
|
|
|
450
458
|
```python
|
|
@@ -9,6 +9,7 @@ btgsolutions_dataservices/config.py
|
|
|
9
9
|
btgsolutions_dataservices/exceptions.py
|
|
10
10
|
btgsolutions_dataservices/rest/__init__.py
|
|
11
11
|
btgsolutions_dataservices/rest/authenticator.py
|
|
12
|
+
btgsolutions_dataservices/rest/broker_reference.py
|
|
12
13
|
btgsolutions_dataservices/rest/bulk_data.py
|
|
13
14
|
btgsolutions_dataservices/rest/company_data.py
|
|
14
15
|
btgsolutions_dataservices/rest/corporate_events.py
|
|
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
|