tradx 0.7__py3-none-any.whl → 0.7.2__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,13 @@ class BaseAlgo(ABC):
351
351
  )
352
352
 
353
353
  async def safe_market_order(
354
- self, ExchangeSegment, ExchangeInstrumentID, ProductType, Quantity
354
+ self,
355
+ ExchangeSegment,
356
+ ExchangeInstrumentID,
357
+ ProductType,
358
+ Quantity,
359
+ InitialBid,
360
+ InitialAsk,
355
361
  ):
356
362
  """
357
363
  Places a safe market order by continuously modifying the order until it is filled.
@@ -383,22 +389,22 @@ class BaseAlgo(ABC):
383
389
  ]
384
390
  )
385
391
  )[0]
386
-
392
+ price = (
393
+ (Data.AskInfo.Price + _adjust).to_eng_string()
394
+ if Quantity > 0
395
+ else (Data.BidInfo.Price - _adjust).to_eng_string()
396
+ )
387
397
  await self.interactiveEngine.limit_order(
388
398
  ExchangeSegment,
389
399
  ExchangeInstrumentID,
390
400
  ProductType,
391
401
  Quantity,
392
- (
393
- (Data.AskInfo.Price + _adjust).to_eng_string()
394
- if Quantity > 0
395
- else (Data.BidInfo.Price - _adjust).to_eng_string()
396
- ),
402
+ price,
397
403
  OrderUniqueIdentifier,
398
404
  )
399
405
  if self.interactiveEngine.user_logger:
400
406
  self.interactiveEngine.user_logger.info(
401
- f"Placing Limit Order for {ExchangeInstrumentID} with Quantity {Quantity}",
407
+ f"Placing Limit Order for {ExchangeInstrumentID} with Quantity {Quantity} with Price {price} and Initial Bid {InitialBid} and Initial Ask {InitialAsk}",
402
408
  caller=f"{self.__class__.__name__}.safe_market_order",
403
409
  )
404
410
  await asyncio.sleep(0.1)
@@ -495,5 +501,7 @@ class BaseAlgo(ABC):
495
501
  position.ExchangeInstrumentID,
496
502
  position.ProductType,
497
503
  -1 * position.Quantity,
504
+ 0,
505
+ 0,
498
506
  )
499
507
  )
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.2
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=LE4ZYb-gLpPMU45ETMg58kRQdGN-Q9wgDhKEasovL-k,20922
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.2.dist-info/METADATA,sha256=VLtZGyIGNMtDLAP0SsYsHl6AzebV8W7M-IifeRLL1Ms,2627
32
+ tradx-0.7.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
33
+ tradx-0.7.2.dist-info/RECORD,,
File without changes