tradx 0.7.2__tar.gz → 0.7.4__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.
Files changed (58) hide show
  1. {tradx-0.7.2 → tradx-0.7.4}/PKG-INFO +1 -1
  2. {tradx-0.7.2 → tradx-0.7.4}/pyproject.toml +1 -1
  3. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/constants/holidays.py +6 -10
  4. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/marketDataEngine.py +16 -5
  5. {tradx-0.7.2 → tradx-0.7.4}/.gitignore +0 -0
  6. {tradx-0.7.2 → tradx-0.7.4}/.vscode/settings.json +0 -0
  7. {tradx-0.7.2 → tradx-0.7.4}/README.md +0 -0
  8. {tradx-0.7.2 → tradx-0.7.4}/examples/example1.log +0 -0
  9. {tradx-0.7.2 → tradx-0.7.4}/examples/example1.py +0 -0
  10. {tradx-0.7.2 → tradx-0.7.4}/examples/example2.log +0 -0
  11. {tradx-0.7.2 → tradx-0.7.4}/examples/example2.py +0 -0
  12. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/__init__.py +0 -0
  13. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/algoContainer.py +0 -0
  14. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/baseClass/baseAlgo.py +0 -0
  15. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/baseClass/candleData.py +0 -0
  16. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/baseClass/cmInstrument.py +0 -0
  17. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/baseClass/futureInstrument.py +0 -0
  18. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/baseClass/index.py +0 -0
  19. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/baseClass/instrumentPropertyChangeData.py +0 -0
  20. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/baseClass/ltpData.py +0 -0
  21. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/baseClass/ltpPartialData.py +0 -0
  22. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/baseClass/marketDepthData.py +0 -0
  23. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/baseClass/marketStatusData.py +0 -0
  24. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/baseClass/openInterestData.py +0 -0
  25. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/baseClass/openInterestPartialData.py +0 -0
  26. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/baseClass/optionsInstrument.py +0 -0
  27. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/baseClass/order.py +0 -0
  28. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/baseClass/orderEvent.py +0 -0
  29. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/baseClass/position.py +0 -0
  30. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/baseClass/positionEvent.py +0 -0
  31. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/baseClass/touchLineData.py +0 -0
  32. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/baseClass/touchLinePartialData.py +0 -0
  33. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/baseClass/tradeConversionEvent.py +0 -0
  34. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/baseClass/tradeEvent.py +0 -0
  35. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/dualHashMap.py +0 -0
  36. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/interactiveEngine.py +0 -0
  37. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/logger/logger.py +0 -0
  38. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/logger/logger2.py +0 -0
  39. {tradx-0.7.2 → tradx-0.7.4}/src/tradx/py.typed +0 -0
  40. {tradx-0.7.2 → tradx-0.7.4}/test/test_candleData.py +0 -0
  41. {tradx-0.7.2 → tradx-0.7.4}/test/test_interactiveEngine.log +0 -0
  42. {tradx-0.7.2 → tradx-0.7.4}/test/test_interactiveEngine.py +0 -0
  43. {tradx-0.7.2 → tradx-0.7.4}/test/test_logger.log +0 -0
  44. {tradx-0.7.2 → tradx-0.7.4}/test/test_logger.py +0 -0
  45. {tradx-0.7.2 → tradx-0.7.4}/test/test_ltpData.py +0 -0
  46. {tradx-0.7.2 → tradx-0.7.4}/test/test_ltpPartailData.py +0 -0
  47. {tradx-0.7.2 → tradx-0.7.4}/test/test_marketDataEngine.log +0 -0
  48. {tradx-0.7.2 → tradx-0.7.4}/test/test_marketDataEngine.py +0 -0
  49. {tradx-0.7.2 → tradx-0.7.4}/test/test_marketDepthData.py +0 -0
  50. {tradx-0.7.2 → tradx-0.7.4}/test/test_marketStatusData.py +0 -0
  51. {tradx-0.7.2 → tradx-0.7.4}/test/test_openInterestData.py +0 -0
  52. {tradx-0.7.2 → tradx-0.7.4}/test/test_openInterestPartialData.py +0 -0
  53. {tradx-0.7.2 → tradx-0.7.4}/test/test_option.py +0 -0
  54. {tradx-0.7.2 → tradx-0.7.4}/test/test_orderEvent.py +0 -0
  55. {tradx-0.7.2 → tradx-0.7.4}/test/test_positionEvent.py +0 -0
  56. {tradx-0.7.2 → tradx-0.7.4}/test/test_touchLineData.py +0 -0
  57. {tradx-0.7.2 → tradx-0.7.4}/test/test_tradeConversionEvent.py +0 -0
  58. {tradx-0.7.2 → tradx-0.7.4}/test/test_tradeEvent.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tradx
3
- Version: 0.7.2
3
+ Version: 0.7.4
4
4
  Summary: A Package Designed to simplify strategy development on package xts-api-client
5
5
  Author-email: "jatin.kumawat" <jatin.kumawat@rmoneyindia.com>
6
6
  Requires-Python: >=3.12
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "tradx"
3
- version = "0.7.2"
3
+ version = "0.7.4"
4
4
  description = "A Package Designed to simplify strategy development on package xts-api-client"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -1,15 +1,8 @@
1
1
  """
2
- This module defines a list of holidays for the years 2024 and 2025.
2
+ This module defines a list of holidays and special trading days for 2024 and 2025.
3
3
 
4
- The holidays are represented as `datetime.date` objects and include major
5
- festivals and public holidays such as Christmas, Mahashivratri, Holi,
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
+ ]
@@ -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
- _ = data
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.error(
377
- f"Error in Subscribing Quantities: {Instruments} on request from {algo.name} as {response}",
378
- caller="marketDataEngine.subscribe",
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(
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