tradx 0.7__tar.gz → 0.7.2__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.
- {tradx-0.7 → tradx-0.7.2}/PKG-INFO +1 -1
- {tradx-0.7 → tradx-0.7.2}/pyproject.toml +1 -1
- {tradx-0.7 → tradx-0.7.2}/src/tradx/baseClass/baseAlgo.py +16 -8
- {tradx-0.7 → tradx-0.7.2}/src/tradx/marketDataEngine.py +2 -1
- {tradx-0.7 → tradx-0.7.2}/.gitignore +0 -0
- {tradx-0.7 → tradx-0.7.2}/.vscode/settings.json +0 -0
- {tradx-0.7 → tradx-0.7.2}/README.md +0 -0
- {tradx-0.7 → tradx-0.7.2}/examples/example1.log +0 -0
- {tradx-0.7 → tradx-0.7.2}/examples/example1.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/examples/example2.log +0 -0
- {tradx-0.7 → tradx-0.7.2}/examples/example2.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/__init__.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/algoContainer.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/baseClass/candleData.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/baseClass/cmInstrument.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/baseClass/futureInstrument.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/baseClass/index.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/baseClass/instrumentPropertyChangeData.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/baseClass/ltpData.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/baseClass/ltpPartialData.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/baseClass/marketDepthData.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/baseClass/marketStatusData.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/baseClass/openInterestData.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/baseClass/openInterestPartialData.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/baseClass/optionsInstrument.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/baseClass/order.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/baseClass/orderEvent.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/baseClass/position.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/baseClass/positionEvent.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/baseClass/touchLineData.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/baseClass/touchLinePartialData.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/baseClass/tradeConversionEvent.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/baseClass/tradeEvent.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/constants/holidays.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/dualHashMap.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/interactiveEngine.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/logger/logger.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/logger/logger2.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/src/tradx/py.typed +0 -0
- {tradx-0.7 → tradx-0.7.2}/test/test_candleData.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/test/test_interactiveEngine.log +0 -0
- {tradx-0.7 → tradx-0.7.2}/test/test_interactiveEngine.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/test/test_logger.log +0 -0
- {tradx-0.7 → tradx-0.7.2}/test/test_logger.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/test/test_ltpData.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/test/test_ltpPartailData.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/test/test_marketDataEngine.log +0 -0
- {tradx-0.7 → tradx-0.7.2}/test/test_marketDataEngine.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/test/test_marketDepthData.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/test/test_marketStatusData.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/test/test_openInterestData.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/test/test_openInterestPartialData.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/test/test_option.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/test/test_orderEvent.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/test/test_positionEvent.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/test/test_touchLineData.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/test/test_tradeConversionEvent.py +0 -0
- {tradx-0.7 → tradx-0.7.2}/test/test_tradeEvent.py +0 -0
@@ -351,7 +351,13 @@ class BaseAlgo(ABC):
|
|
351
351
|
)
|
352
352
|
|
353
353
|
async def safe_market_order(
|
354
|
-
self,
|
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
|
)
|
@@ -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;{__}",
|
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
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|