tradx 0.7.2__py3-none-any.whl → 0.7.4__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.
tradx/constants/holidays.py
CHANGED
@@ -1,15 +1,8 @@
|
|
1
1
|
"""
|
2
|
-
This module defines a list of holidays
|
2
|
+
This module defines a list of holidays and special trading days for 2024 and 2025.
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
Id-Ul-Fitr, Shri Mahavir Jayanti, Dr. Baba Saheb Ambedkar Jayanti,
|
7
|
-
Good Friday, Maharashtra Day, Independence Day, Ganesh Chaturthi,
|
8
|
-
Mahatma Gandhi Jayanti/Dussehra, Diwali Laxmi Pujan, Diwali-Balipratipada,
|
9
|
-
and Prakash Gurpurb Sri Guru Nanak Dev.
|
10
|
-
|
11
|
-
The holidays list can be used for various purposes such as checking if a
|
12
|
-
given date is a holiday, scheduling events, or generating holiday calendars.
|
4
|
+
These lists can be used for applications like holiday validation, event scheduling,
|
5
|
+
and financial market operations.
|
13
6
|
"""
|
14
7
|
from datetime import datetime
|
15
8
|
|
@@ -30,3 +23,6 @@ holidays = [
|
|
30
23
|
datetime(2025, 11, 5).date(), # Prakash Gurpurb Sri Guru Nanak Dev
|
31
24
|
datetime(2025, 12, 25).date(), # Christmas
|
32
25
|
]
|
26
|
+
special_trading_days = [
|
27
|
+
datetime(2025, 2, 1).date(), # Budget Day
|
28
|
+
]
|
tradx/marketDataEngine.py
CHANGED
@@ -123,7 +123,7 @@ class marketDataEngine(MarketDataSocketClient):
|
|
123
123
|
async def on_event_market_status_full(self, data):
|
124
124
|
"""On receiving message code 1507:Market Status full"""
|
125
125
|
# __ = MarketStatusData(data)
|
126
|
-
|
126
|
+
__ = data
|
127
127
|
if self.user_logger:
|
128
128
|
self.user_logger.info(
|
129
129
|
f"1507:Market Status full;{__}",
|
@@ -372,11 +372,22 @@ class marketDataEngine(MarketDataSocketClient):
|
|
372
372
|
response = await self.xt.send_subscription(
|
373
373
|
Instruments=Instruments, xtsMessageCode=xtsMessageCode
|
374
374
|
)
|
375
|
+
if (
|
376
|
+
response["type"] == "error"
|
377
|
+
and response["description"] == "Instrument Already Subscribed !"
|
378
|
+
):
|
379
|
+
if self.user_logger:
|
380
|
+
self.user_logger.error(
|
381
|
+
f"Error in Subscribing Quantities: {Instruments} on request from {algo.name} as {response}",
|
382
|
+
caller="marketDataEngine.subscribe",
|
383
|
+
)
|
384
|
+
# Avoid raising this error
|
375
385
|
if response["type"] != "success":
|
376
|
-
self.user_logger
|
377
|
-
|
378
|
-
|
379
|
-
|
386
|
+
if self.user_logger:
|
387
|
+
self.user_logger.error(
|
388
|
+
f"Error in Subscribing Quantities: {Instruments} on request from {algo.name} as {response}",
|
389
|
+
caller="marketDataEngine.subscribe",
|
390
|
+
)
|
380
391
|
raise (response)
|
381
392
|
if self.user_logger:
|
382
393
|
self.user_logger.info(
|
@@ -2,7 +2,7 @@ tradx/__init__.py,sha256=MlWuula4lJZLPYPi4d5ZE9yoJnYWtgbZ0QsgWdWPwU0,53
|
|
2
2
|
tradx/algoContainer.py,sha256=1IkVCIF_gXIby8z3pDdlVeUablh-PZVZ1EawyCB7oUs,3807
|
3
3
|
tradx/dualHashMap.py,sha256=XsidIc3aMvpVGOvdfV7lOeZaLCWAD5i180BGyAfdYXE,1737
|
4
4
|
tradx/interactiveEngine.py,sha256=DCuEEYJcTn6DEG9pbaZsmGyHeyWGNG2q46Iljel6Drc,34584
|
5
|
-
tradx/marketDataEngine.py,sha256=
|
5
|
+
tradx/marketDataEngine.py,sha256=QwMWI0kZe5OsFPUcG_J2Kk7-Q_WODmkUM8BBRgIvkTw,35163
|
6
6
|
tradx/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
7
|
tradx/baseClass/baseAlgo.py,sha256=LE4ZYb-gLpPMU45ETMg58kRQdGN-Q9wgDhKEasovL-k,20922
|
8
8
|
tradx/baseClass/candleData.py,sha256=tS-iAoRGwK2xVSvrqmNZPYeB63qD53oPPHaUDfJBWkk,2947
|
@@ -25,9 +25,9 @@ tradx/baseClass/touchLineData.py,sha256=sVODRdT97Xefnpzzddcza_N5KD6teh2tBhME4dRA
|
|
25
25
|
tradx/baseClass/touchLinePartialData.py,sha256=mdLVrD_4O74NRamTrrlH9ge69xVXv2w_XZXpAQOIMYI,4069
|
26
26
|
tradx/baseClass/tradeConversionEvent.py,sha256=WyRBu02EeUFrcYd9zkahAPYoP1rCoTQDB09IzNa3Zno,3246
|
27
27
|
tradx/baseClass/tradeEvent.py,sha256=djunJW5AzjeMfJZVMlrFprplB7vrYBi-mmaR1TA0MK4,6699
|
28
|
-
tradx/constants/holidays.py,sha256=
|
28
|
+
tradx/constants/holidays.py,sha256=B4ee4bPFy-gBTKN6-G68Idf1n6HxoRcx72O92zSobcE,1200
|
29
29
|
tradx/logger/logger.py,sha256=DfrjzwYkujTq7arksNTPcQeioXnwT1xgN659blhreog,3232
|
30
30
|
tradx/logger/logger2.py,sha256=ebJ-qqnpnCqvyx1Cz1-kGGULtkH-hfrK6UNfa0bSlH8,2654
|
31
|
-
tradx-0.7.
|
32
|
-
tradx-0.7.
|
33
|
-
tradx-0.7.
|
31
|
+
tradx-0.7.4.dist-info/METADATA,sha256=bKREWxDVUVvg9QNU8MMNJ9HJ1ANPJAXqH7YbAUETVP4,2627
|
32
|
+
tradx-0.7.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
33
|
+
tradx-0.7.4.dist-info/RECORD,,
|
File without changes
|