pyalgotrading 2025.3.1__py3-none-any.whl → 2025.9.1__py3-none-any.whl
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.
- pyalgotrading/algobulls/api.py +2 -3
- pyalgotrading/algobulls/connection.py +6 -4
- {pyalgotrading-2025.3.1.dist-info → pyalgotrading-2025.9.1.dist-info}/METADATA +1 -1
- {pyalgotrading-2025.3.1.dist-info → pyalgotrading-2025.9.1.dist-info}/RECORD +7 -7
- {pyalgotrading-2025.3.1.dist-info → pyalgotrading-2025.9.1.dist-info}/LICENSE +0 -0
- {pyalgotrading-2025.3.1.dist-info → pyalgotrading-2025.9.1.dist-info}/WHEEL +0 -0
- {pyalgotrading-2025.3.1.dist-info → pyalgotrading-2025.9.1.dist-info}/top_level.txt +0 -0
pyalgotrading/algobulls/api.py
CHANGED
|
@@ -240,9 +240,8 @@ class AlgoBullsAPI:
|
|
|
240
240
|
`GET` v3/build/python/user/strategy/code/{strategy_code}
|
|
241
241
|
"""
|
|
242
242
|
|
|
243
|
-
params = {}
|
|
244
243
|
endpoint = f'v3/build/python/user/strategy/code/{strategy_code}'
|
|
245
|
-
response = self._send_request(endpoint=endpoint, params=
|
|
244
|
+
response = self._send_request(endpoint=endpoint, params={'type': 'user'})
|
|
246
245
|
|
|
247
246
|
return response
|
|
248
247
|
|
|
@@ -304,7 +303,7 @@ class AlgoBullsAPI:
|
|
|
304
303
|
|
|
305
304
|
# Configure the params
|
|
306
305
|
key = self.__get_key(strategy_code=strategy_code, trading_type=trading_type)
|
|
307
|
-
endpoint = f'
|
|
306
|
+
endpoint = f'v2/portfolio/tweakconfig/{key}'
|
|
308
307
|
print('Setting Strategy Config...', end=' ')
|
|
309
308
|
response = self._send_request(method='post', endpoint=endpoint, json_data=strategy_config)
|
|
310
309
|
print('Success.')
|
|
@@ -66,7 +66,7 @@ class AlgoBullsConnection:
|
|
|
66
66
|
Returns:
|
|
67
67
|
Token URL
|
|
68
68
|
"""
|
|
69
|
-
url = '
|
|
69
|
+
url = f'{AlgoBullsAPI.SERVER_ENDPOINT}settings?section=developerOptions'
|
|
70
70
|
print(f'Please login to this URL to get your unique token: {url}')
|
|
71
71
|
|
|
72
72
|
def set_access_token(self, access_token, validate_token=True):
|
|
@@ -796,7 +796,7 @@ class AlgoBullsConnection:
|
|
|
796
796
|
if len(_) == 2 and EXCHANGE_LOCALE_MAP.get(_[0]) is not None:
|
|
797
797
|
location = EXCHANGE_LOCALE_MAP[_[0]]
|
|
798
798
|
else:
|
|
799
|
-
print('Warning: Valid exchange not given, assuming exchange as "NSE_EQ".\n Expected format for giving an instrument "<EXCHANGE>:<TRADING_SYMBOL>"\nPossible exchange values include: {EXCHANGE_LOCALE_MAP.keys()}')
|
|
799
|
+
print(f'Warning: Valid exchange not given, assuming exchange as "NSE_EQ".\n Expected format for giving an instrument "<EXCHANGE>:<TRADING_SYMBOL>"\nPossible exchange values include: {EXCHANGE_LOCALE_MAP.keys()}')
|
|
800
800
|
location = EXCHANGE_LOCALE_MAP[Locale.DEFAULT.value]
|
|
801
801
|
|
|
802
802
|
# generate instruments' id list
|
|
@@ -805,7 +805,10 @@ class AlgoBullsConnection:
|
|
|
805
805
|
exchange, tradingsymbol = _instrument.split(':')
|
|
806
806
|
instrument_results = self.search_instrument(instrument=tradingsymbol, exchange=exchange)
|
|
807
807
|
for _ in instrument_results:
|
|
808
|
-
|
|
808
|
+
_exchange, _tradingsymbol = _['value'].split(':')
|
|
809
|
+
|
|
810
|
+
# The function `search_instrument` returns `NSE_EQ` instead of `NSE`; The below like handles that scenario
|
|
811
|
+
if _tradingsymbol == tradingsymbol and (_exchange == exchange or _exchange.split('_')[0] == exchange):
|
|
809
812
|
instrument_list.append({'id': _["id"]})
|
|
810
813
|
break
|
|
811
814
|
|
|
@@ -834,7 +837,6 @@ class AlgoBullsConnection:
|
|
|
834
837
|
'instruments': {
|
|
835
838
|
'instruments': instrument_list
|
|
836
839
|
},
|
|
837
|
-
'lots': lots,
|
|
838
840
|
'userParams': restructured_strategy_parameters,
|
|
839
841
|
'candleDuration': candle_interval.value,
|
|
840
842
|
'strategyMode': strategy_mode.value
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
pyalgotrading/__init__.py,sha256=UzrsH5H2VlSxwdH8z0MnFqQoj_ggI6nEcVr4dLVFEeI,213
|
|
2
2
|
pyalgotrading/constants.py,sha256=bLSLD8oWMviPRXbytxjuNq7m6_VMJft5jvlxCTusGac,8054
|
|
3
3
|
pyalgotrading/algobulls/__init__.py,sha256=IRkbWtJfgQnPH7gikjqpa6QsYnmk_NQ1lwtx7LPIC6c,133
|
|
4
|
-
pyalgotrading/algobulls/api.py,sha256=
|
|
5
|
-
pyalgotrading/algobulls/connection.py,sha256=
|
|
4
|
+
pyalgotrading/algobulls/api.py,sha256=0xqmqbtGbWOhrDBhONUjmxEYtw1UW5o37kACC6YuHwQ,19727
|
|
5
|
+
pyalgotrading/algobulls/connection.py,sha256=1QtrlLriI1267PVZJrMGEhAMsL79Dq_2cshB_CigdCs,59996
|
|
6
6
|
pyalgotrading/algobulls/exceptions.py,sha256=B96On8cN8tgtX7i4shKOlYfvjSjvspIRPbOpyF-jn0I,2187
|
|
7
7
|
pyalgotrading/broker/__init__.py,sha256=jXVWBVRlqzevKxNDqrPANJz9WubROBes8gaKcxcYz58,66
|
|
8
8
|
pyalgotrading/broker/broker_connection_base.py,sha256=vAJN5EAQuVfL8Ngf03wsaI5TTGdziCHKCb0bczGgSJ0,7594
|
|
@@ -29,8 +29,8 @@ pyalgotrading/utils/candlesticks/__init__.py,sha256=maIn__tvTvJDjldPhU9agBcNNuRO
|
|
|
29
29
|
pyalgotrading/utils/candlesticks/heikinashi.py,sha256=SpcuK7AYV0sgzcw-DMfLNtTDn2RfWqGvWBt4no7yKD4,2003
|
|
30
30
|
pyalgotrading/utils/candlesticks/linebreak.py,sha256=cYwoETMrenWOa06d03xASZoiou-qRz7n2mZYCi5ilEs,1434
|
|
31
31
|
pyalgotrading/utils/candlesticks/renko.py,sha256=zovQ6D658pBLas86FuTu9fU3-Kkv2hM-4h7OQJjdxng,2089
|
|
32
|
-
pyalgotrading-2025.
|
|
33
|
-
pyalgotrading-2025.
|
|
34
|
-
pyalgotrading-2025.
|
|
35
|
-
pyalgotrading-2025.
|
|
36
|
-
pyalgotrading-2025.
|
|
32
|
+
pyalgotrading-2025.9.1.dist-info/LICENSE,sha256=-LLEprvixKS-LwHef99YQSOFon_tWeTwJRAWuUwwr1g,1066
|
|
33
|
+
pyalgotrading-2025.9.1.dist-info/METADATA,sha256=QOs_2aMeTBCjewe4mwSRQOPjQlrYRnQv5TwK_Pe_8T8,5829
|
|
34
|
+
pyalgotrading-2025.9.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
35
|
+
pyalgotrading-2025.9.1.dist-info/top_level.txt,sha256=A12PTnbXqO3gsZ0D0Gkyzf_OYRQxjJvtg3MqN-Ur2zY,14
|
|
36
|
+
pyalgotrading-2025.9.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|