pyalgotrading 2025.1.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/strategy/utils.py +29 -0
- {pyalgotrading-2025.1.1.dist-info → pyalgotrading-2025.9.1.dist-info}/METADATA +1 -1
- {pyalgotrading-2025.1.1.dist-info → pyalgotrading-2025.9.1.dist-info}/RECORD +8 -7
- {pyalgotrading-2025.1.1.dist-info → pyalgotrading-2025.9.1.dist-info}/LICENSE +0 -0
- {pyalgotrading-2025.1.1.dist-info → pyalgotrading-2025.9.1.dist-info}/WHEEL +0 -0
- {pyalgotrading-2025.1.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
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from constants import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def check_order_placed_successfully(self, _order):
|
|
5
|
+
"""
|
|
6
|
+
Dummy Function.
|
|
7
|
+
|
|
8
|
+
This method checks whether --
|
|
9
|
+
-- order is not None
|
|
10
|
+
-- broker_order_id exists for this order
|
|
11
|
+
-- order status is not REJECTED
|
|
12
|
+
|
|
13
|
+
Returns True if all of the above are True, else False.
|
|
14
|
+
"""
|
|
15
|
+
pass
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def check_order_complete_status(self, _order):
|
|
19
|
+
"""
|
|
20
|
+
Dummy Function.
|
|
21
|
+
|
|
22
|
+
This method checks whether --
|
|
23
|
+
-- order is not None
|
|
24
|
+
-- broker_order_id exists for this order
|
|
25
|
+
-- order status is COMPLETE
|
|
26
|
+
|
|
27
|
+
Returns True if all of the above are True, else False
|
|
28
|
+
"""
|
|
29
|
+
pass
|
|
@@ -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
|
|
@@ -19,6 +19,7 @@ pyalgotrading/order/order_regular_base.py,sha256=wOFmv7QnxJvNKtqdoZn0a-cbTotik4c
|
|
|
19
19
|
pyalgotrading/strategy/__init__.py,sha256=V58WuYIWpsmbs5pat5Z1FLxOR3nHwjaIhnJTQ8tzAUA,126
|
|
20
20
|
pyalgotrading/strategy/strategy_base.py,sha256=9I6ZdZT1IimO9g03QURrFo2Pxvs4Dsk8Ybdtij8ZIUQ,4717
|
|
21
21
|
pyalgotrading/strategy/strategy_options_base_v2.py,sha256=3SfCvWjz8eGXtlB2hIXREAODV0PbrtXIYgXRFB08UjQ,2765
|
|
22
|
+
pyalgotrading/strategy/utils.py,sha256=fEQw5jndBSIMDfSdWPHz1xjfskuN5uyiytOoeyiVPFU,627
|
|
22
23
|
pyalgotrading/strategy/validate_strategy.py,sha256=Ot2kvROtG-tpcbK_Fv-OdapG8oNdgvSNV2hTWtfTCQI,482
|
|
23
24
|
pyalgotrading/talib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
25
|
pyalgotrading/talib/talib.py,sha256=6ErzVsVhGOTUvGl5QffR6OAoswQP7Yn0VrQ3cc5rWCQ,308
|
|
@@ -28,8 +29,8 @@ pyalgotrading/utils/candlesticks/__init__.py,sha256=maIn__tvTvJDjldPhU9agBcNNuRO
|
|
|
28
29
|
pyalgotrading/utils/candlesticks/heikinashi.py,sha256=SpcuK7AYV0sgzcw-DMfLNtTDn2RfWqGvWBt4no7yKD4,2003
|
|
29
30
|
pyalgotrading/utils/candlesticks/linebreak.py,sha256=cYwoETMrenWOa06d03xASZoiou-qRz7n2mZYCi5ilEs,1434
|
|
30
31
|
pyalgotrading/utils/candlesticks/renko.py,sha256=zovQ6D658pBLas86FuTu9fU3-Kkv2hM-4h7OQJjdxng,2089
|
|
31
|
-
pyalgotrading-2025.
|
|
32
|
-
pyalgotrading-2025.
|
|
33
|
-
pyalgotrading-2025.
|
|
34
|
-
pyalgotrading-2025.
|
|
35
|
-
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
|