tradx 0.7.1__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.
tradx/baseClass/baseAlgo.py
CHANGED
@@ -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,7 +389,11 @@ class BaseAlgo(ABC):
|
|
383
389
|
]
|
384
390
|
)
|
385
391
|
)[0]
|
386
|
-
price = (
|
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,
|
@@ -491,5 +501,7 @@ class BaseAlgo(ABC):
|
|
491
501
|
position.ExchangeInstrumentID,
|
492
502
|
position.ProductType,
|
493
503
|
-1 * position.Quantity,
|
504
|
+
0,
|
505
|
+
0,
|
494
506
|
)
|
495
507
|
)
|
@@ -4,7 +4,7 @@ tradx/dualHashMap.py,sha256=XsidIc3aMvpVGOvdfV7lOeZaLCWAD5i180BGyAfdYXE,1737
|
|
4
4
|
tradx/interactiveEngine.py,sha256=DCuEEYJcTn6DEG9pbaZsmGyHeyWGNG2q46Iljel6Drc,34584
|
5
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=
|
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.
|
32
|
-
tradx-0.7.
|
33
|
-
tradx-0.7.
|
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
|