tradx 0.7__py3-none-any.whl → 0.7.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.
@@ -351,7 +351,7 @@ class BaseAlgo(ABC):
351
351
  )
352
352
 
353
353
  async def safe_market_order(
354
- self, ExchangeSegment, ExchangeInstrumentID, ProductType, Quantity
354
+ self, ExchangeSegment, ExchangeInstrumentID, ProductType, Quantity, InitialBid, InitialAsk
355
355
  ):
356
356
  """
357
357
  Places a safe market order by continuously modifying the order until it is filled.
@@ -383,22 +383,18 @@ class BaseAlgo(ABC):
383
383
  ]
384
384
  )
385
385
  )[0]
386
-
386
+ price = (Data.AskInfo.Price + _adjust).to_eng_string() if Quantity > 0 else (Data.BidInfo.Price - _adjust).to_eng_string()
387
387
  await self.interactiveEngine.limit_order(
388
388
  ExchangeSegment,
389
389
  ExchangeInstrumentID,
390
390
  ProductType,
391
391
  Quantity,
392
- (
393
- (Data.AskInfo.Price + _adjust).to_eng_string()
394
- if Quantity > 0
395
- else (Data.BidInfo.Price - _adjust).to_eng_string()
396
- ),
392
+ price,
397
393
  OrderUniqueIdentifier,
398
394
  )
399
395
  if self.interactiveEngine.user_logger:
400
396
  self.interactiveEngine.user_logger.info(
401
- f"Placing Limit Order for {ExchangeInstrumentID} with Quantity {Quantity}",
397
+ f"Placing Limit Order for {ExchangeInstrumentID} with Quantity {Quantity} with Price {price} and Initial Bid {InitialBid} and Initial Ask {InitialAsk}",
402
398
  caller=f"{self.__class__.__name__}.safe_market_order",
403
399
  )
404
400
  await asyncio.sleep(0.1)
tradx/marketDataEngine.py CHANGED
@@ -122,7 +122,8 @@ class marketDataEngine(MarketDataSocketClient):
122
122
 
123
123
  async def on_event_market_status_full(self, data):
124
124
  """On receiving message code 1507:Market Status full"""
125
- __ = MarketStatusData(data)
125
+ # __ = MarketStatusData(data)
126
+ _ = data
126
127
  if self.user_logger:
127
128
  self.user_logger.info(
128
129
  f"1507:Market Status full;{__}",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tradx
3
- Version: 0.7
3
+ Version: 0.7.1
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
@@ -2,9 +2,9 @@ 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=pIY4dephqzykzPYJk0khYMVmD1QAr-17CtLN1WkcAWM,34597
5
+ tradx/marketDataEngine.py,sha256=ys31YvWRbm3MT5UpBqjWirYjjW4-I3Efp6NcduU_ATI,34617
6
6
  tradx/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- tradx/baseClass/baseAlgo.py,sha256=wTV4Ub8lLr1U8-rI_j7NXbUdxTpITHXf_TyqpsmhJ28,20705
7
+ tradx/baseClass/baseAlgo.py,sha256=2MkAuQMzzwzmRWRAIxhP4DUl7tAqPwxp8QUIoEpEUiQ,20759
8
8
  tradx/baseClass/candleData.py,sha256=tS-iAoRGwK2xVSvrqmNZPYeB63qD53oPPHaUDfJBWkk,2947
9
9
  tradx/baseClass/cmInstrument.py,sha256=WpibHdJyVGVs0B8o1COiXr4rNXB8bapzFLyRaIG0w9Q,2408
10
10
  tradx/baseClass/futureInstrument.py,sha256=ygsGfzUg337gSwoSaAb8DB31YhLOI-nOv3ApX3z5CWQ,2186
@@ -28,6 +28,6 @@ tradx/baseClass/tradeEvent.py,sha256=djunJW5AzjeMfJZVMlrFprplB7vrYBi-mmaR1TA0MK4
28
28
  tradx/constants/holidays.py,sha256=GCg0xGvXm1EM0n6YF1KYEnldSiC2sbsc09Iekjwn0ww,1547
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.dist-info/METADATA,sha256=kB7sJCuCs4-T03nnTi769t6lG-2F_O12UYtu6PhoKwY,2625
32
- tradx-0.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
33
- tradx-0.7.dist-info/RECORD,,
31
+ tradx-0.7.1.dist-info/METADATA,sha256=nzpT0su8yUSFjL3pvLXBMPHjKkwo9Zymw-Bmbyn6b0E,2627
32
+ tradx-0.7.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
33
+ tradx-0.7.1.dist-info/RECORD,,
File without changes