tradx 0.1.1.2__tar.gz → 0.1.1.3__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.1.1.2 → tradx-0.1.1.3}/PKG-INFO +1 -1
  2. {tradx-0.1.1.2 → tradx-0.1.1.3}/pyproject.toml +1 -1
  3. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/marketDataEngine.py +11 -14
  4. {tradx-0.1.1.2 → tradx-0.1.1.3}/.gitignore +0 -0
  5. {tradx-0.1.1.2 → tradx-0.1.1.3}/.vscode/settings.json +0 -0
  6. {tradx-0.1.1.2 → tradx-0.1.1.3}/README.md +0 -0
  7. {tradx-0.1.1.2 → tradx-0.1.1.3}/examples/example1.log +0 -0
  8. {tradx-0.1.1.2 → tradx-0.1.1.3}/examples/example1.py +0 -0
  9. {tradx-0.1.1.2 → tradx-0.1.1.3}/examples/example2.log +0 -0
  10. {tradx-0.1.1.2 → tradx-0.1.1.3}/examples/example2.py +0 -0
  11. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/__init__.py +0 -0
  12. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/algoContainer.py +0 -0
  13. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/baseClass/baseAlgo.py +0 -0
  14. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/baseClass/candleData.py +0 -0
  15. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/baseClass/cmInstrument.py +0 -0
  16. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/baseClass/futureInstrument.py +0 -0
  17. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/baseClass/index.py +0 -0
  18. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/baseClass/instrumentPropertyChangeData.py +0 -0
  19. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/baseClass/ltpData.py +0 -0
  20. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/baseClass/ltpPartialData.py +0 -0
  21. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/baseClass/marketDepthData.py +0 -0
  22. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/baseClass/marketStatusData.py +0 -0
  23. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/baseClass/openInterestData.py +0 -0
  24. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/baseClass/openInterestPartialData.py +0 -0
  25. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/baseClass/optionsInstrument.py +0 -0
  26. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/baseClass/order.py +0 -0
  27. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/baseClass/orderEvent.py +0 -0
  28. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/baseClass/position.py +0 -0
  29. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/baseClass/positionEvent.py +0 -0
  30. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/baseClass/touchLineData.py +0 -0
  31. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/baseClass/touchLinePartialData.py +0 -0
  32. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/baseClass/tradeConversionEvent.py +0 -0
  33. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/baseClass/tradeEvent.py +0 -0
  34. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/constants/holidays.py +0 -0
  35. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/dualHashMap.py +0 -0
  36. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/interactiveEngine.py +0 -0
  37. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/logger/logger.py +0 -0
  38. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/logger/logger2.py +0 -0
  39. {tradx-0.1.1.2 → tradx-0.1.1.3}/src/tradx/py.typed +0 -0
  40. {tradx-0.1.1.2 → tradx-0.1.1.3}/test/test_candleData.py +0 -0
  41. {tradx-0.1.1.2 → tradx-0.1.1.3}/test/test_interactiveEngine.log +0 -0
  42. {tradx-0.1.1.2 → tradx-0.1.1.3}/test/test_interactiveEngine.py +0 -0
  43. {tradx-0.1.1.2 → tradx-0.1.1.3}/test/test_logger.log +0 -0
  44. {tradx-0.1.1.2 → tradx-0.1.1.3}/test/test_logger.py +0 -0
  45. {tradx-0.1.1.2 → tradx-0.1.1.3}/test/test_ltpData.py +0 -0
  46. {tradx-0.1.1.2 → tradx-0.1.1.3}/test/test_ltpPartailData.py +0 -0
  47. {tradx-0.1.1.2 → tradx-0.1.1.3}/test/test_marketDataEngine.log +0 -0
  48. {tradx-0.1.1.2 → tradx-0.1.1.3}/test/test_marketDataEngine.py +0 -0
  49. {tradx-0.1.1.2 → tradx-0.1.1.3}/test/test_marketDepthData.py +0 -0
  50. {tradx-0.1.1.2 → tradx-0.1.1.3}/test/test_marketStatusData.py +0 -0
  51. {tradx-0.1.1.2 → tradx-0.1.1.3}/test/test_openInterestData.py +0 -0
  52. {tradx-0.1.1.2 → tradx-0.1.1.3}/test/test_openInterestPartialData.py +0 -0
  53. {tradx-0.1.1.2 → tradx-0.1.1.3}/test/test_option.py +0 -0
  54. {tradx-0.1.1.2 → tradx-0.1.1.3}/test/test_orderEvent.py +0 -0
  55. {tradx-0.1.1.2 → tradx-0.1.1.3}/test/test_positionEvent.py +0 -0
  56. {tradx-0.1.1.2 → tradx-0.1.1.3}/test/test_touchLineData.py +0 -0
  57. {tradx-0.1.1.2 → tradx-0.1.1.3}/test/test_tradeConversionEvent.py +0 -0
  58. {tradx-0.1.1.2 → tradx-0.1.1.3}/test/test_tradeEvent.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tradx
3
- Version: 0.1.1.2
3
+ Version: 0.1.1.3
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.1.1.2"
3
+ version = "0.1.1.3"
4
4
  description = "A Package Designed to simplify strategy development on package xts-api-client"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -646,19 +646,16 @@ class marketDataEngine(MarketDataSocketClient):
646
646
  baseAlgo: BaseAlgo,
647
647
  ):
648
648
  """
649
- Simulates a market order and generates a trade event.
649
+ Simulates a market order for the given instrument.
650
650
  Args:
651
- exchangeSegment (str): The segment of the exchange where the order is placed.
652
- exchangeInstrumentID (int): The ID of the instrument being traded.
653
- productType (str): The type of product being traded.
651
+ exchangeSegment (str): The exchange segment of the instrument.
652
+ exchangeInstrumentID (int): The exchange instrument ID.
653
+ productType (str): The product type.
654
654
  orderQuantity (int): The quantity of the order. Positive for buy, negative for sell.
655
655
  orderUniqueIdentifier (str): A unique identifier for the order.
656
- baseAlgo (BaseAlgo): An instance of the BaseAlgo class to handle the trade event.
656
+ baseAlgo (BaseAlgo): An instance of a class derived from BaseAlgo, representing the algorithm to be used for processing the trade event.
657
657
  Returns:
658
658
  None
659
- This function fetches the last traded price (LTP) for the given instrument and creates a TradeEvent
660
- based on whether the order is a buy or sell. The TradeEvent is then passed to the baseAlgo's trade_
661
- method for further processing.
662
659
  """
663
660
  _list = await self.fetch_ltp(
664
661
  [
@@ -694,7 +691,7 @@ class marketDataEngine(MarketDataSocketClient):
694
691
  "OrderQuantity": abs(orderQuantity),
695
692
  "OrderStopPrice": 0,
696
693
  "OrderStatus": "Filled",
697
- "OrderAverageTradedPrice": _data.LastTradedPrice,
694
+ "OrderAverageTradedPrice": _data.BidInfo.Price,
698
695
  "LeavesQuantity": 0,
699
696
  "CumulativeQuantity": abs(orderQuantity),
700
697
  "OrderDisclosedQuantity": 0,
@@ -704,13 +701,13 @@ class marketDataEngine(MarketDataSocketClient):
704
701
  "CancelRejectReason": "",
705
702
  "OrderUniqueIdentifier": orderUniqueIdentifier,
706
703
  "OrderLegStatus": "SingleOrderLeg",
707
- "LastTradedPrice": _data.LastTradedPrice,
704
+ "LastTradedPrice": _data.BidInfo.Price,
708
705
  "LastTradedQuantity": 0,
709
706
  "LastExecutionTransactTime": "2025-01-06T10:14:40",
710
707
  "ExecutionID": "402597456",
711
708
  "ExecutionReportIndex": 4,
712
709
  "IsSpread": False,
713
- "OrderAverageTradedPriceAPI": _data.LastTradedPrice,
710
+ "OrderAverageTradedPriceAPI": _data.BidInfo.Price,
714
711
  "OrderSideAPI": "SELL",
715
712
  "OrderGeneratedDateTimeAPI": datetime.now(),
716
713
  "ExchangeTransactTimeAPI": datetime.now(),
@@ -746,7 +743,7 @@ class marketDataEngine(MarketDataSocketClient):
746
743
  "OrderQuantity": orderQuantity,
747
744
  "OrderStopPrice": 0,
748
745
  "OrderStatus": "Filled",
749
- "OrderAverageTradedPrice": _data.LastTradedPrice,
746
+ "OrderAverageTradedPrice": _data.AskInfo.Price,
750
747
  "LeavesQuantity": 0,
751
748
  "CumulativeQuantity": orderQuantity,
752
749
  "OrderDisclosedQuantity": 0,
@@ -756,13 +753,13 @@ class marketDataEngine(MarketDataSocketClient):
756
753
  "CancelRejectReason": "",
757
754
  "OrderUniqueIdentifier": orderUniqueIdentifier,
758
755
  "OrderLegStatus": "SingleOrderLeg",
759
- "LastTradedPrice": _data.LastTradedPrice,
756
+ "LastTradedPrice": _data.AskInfo.Price,
760
757
  "LastTradedQuantity": 0,
761
758
  "LastExecutionTransactTime": "2025-01-15T15:09:56",
762
759
  "ExecutionID": "409661490",
763
760
  "ExecutionReportIndex": 3,
764
761
  "IsSpread": False,
765
- "OrderAverageTradedPriceAPI": _data.LastTradedPrice,
762
+ "OrderAverageTradedPriceAPI": _data.AskInfo.Price,
766
763
  "OrderSideAPI": "BUY",
767
764
  "OrderGeneratedDateTimeAPI": "15-01-2025 15:10:00",
768
765
  "ExchangeTransactTimeAPI": "15-01-2025 15:09:56",
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