quantplay 2.1.30__tar.gz → 2.1.32__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.
- {quantplay-2.1.30 → quantplay-2.1.32}/PKG-INFO +1 -1
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/generics/broker.py +2 -2
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/icici_direct.py +3 -1
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/wrapper/redis.py +9 -4
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay.egg-info/PKG-INFO +1 -1
- {quantplay-2.1.30 → quantplay-2.1.32}/setup.py +1 -1
- {quantplay-2.1.30 → quantplay-2.1.32}/README.md +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/pyproject.toml +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/__init__.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/__init__.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/aliceblue.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/angelone.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/auto_login/__init__.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/auto_login/aliceblue.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/breeze/__init__.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/breeze/breeze_utils.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/broker_factory.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/dhan.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/finvasia_utils/__init__.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/finvasia_utils/fa_noren.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/five_paisa.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/flattrade.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/ft_utils/__init__.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/ft_utils/flattrade_utils.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/ft_utils/ft_noren.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/generics/__init__.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/iifl_xts.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/jainam_xts.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/kite_utils.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/kotak.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/kotak_utils/__init__.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/kotak_utils/kotak_ws.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/kotak_utils/kotak_ws_lib.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/motilal.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/noren.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/shoonya.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/uplink/__init__.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/uplink/uplink_utils.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/upstox.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/xts.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/xts_utils/Connect.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/xts_utils/Exception.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/xts_utils/InteractiveSocketClient.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/xts_utils/__init__.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/xts_utils_v2/ConnectV2.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/xts_utils_v2/InteractiveSocketClientV2.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/xts_utils_v2/__init__.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/zerodha.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/core/__init__.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/core/strategy.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/exception/__init__.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/exception/exceptions.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/indicator/__init__.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/indicator/iv.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/model/__init__.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/model/broker.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/model/broker_response.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/model/generics.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/model/instrument_data.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/model/order_event.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/py.typed +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/strategy/__init__.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/strategy/iv_spike.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/strategy/obuy.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/utils/__init__.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/utils/caching.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/utils/constant.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/utils/exchange.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/utils/number_utils.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/utils/pickle_utils.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/utils/selenium_utils.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/wrapper/__init__.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/wrapper/aws/__init__.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay/wrapper/aws/s3.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay.egg-info/SOURCES.txt +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay.egg-info/dependency_links.txt +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay.egg-info/requires.txt +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/quantplay.egg-info/top_level.txt +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/setup.cfg +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/tests/__init__.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/tests/conftest.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/tests/wrapper/__init__.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/tests/wrapper/aws/__init__.py +0 -0
- {quantplay-2.1.30 → quantplay-2.1.32}/tests/wrapper/aws/s3_test.py +0 -0
|
@@ -975,10 +975,10 @@ class Broker(ABC):
|
|
|
975
975
|
)
|
|
976
976
|
|
|
977
977
|
def ltp_from_token(self, token: int) -> float | None:
|
|
978
|
-
return self.redis_client.
|
|
978
|
+
return self.redis_client.hget(str(token)) # type:ignore
|
|
979
979
|
|
|
980
980
|
def ltp_from_tokens(self, tokens: list[int]) -> float | None:
|
|
981
|
-
return self.redis_client.
|
|
981
|
+
return self.redis_client.hget_multi(tokens) # type:ignore
|
|
982
982
|
|
|
983
983
|
def token_converter(self, token: int, exchange: ExchangeType) -> int:
|
|
984
984
|
exchangeMap = {
|
|
@@ -4,7 +4,7 @@ from typing import Any, Literal, Dict
|
|
|
4
4
|
from breeze_connect import BreezeConnect # type: ignore
|
|
5
5
|
|
|
6
6
|
from quantplay.broker.breeze.breeze_utils import BreezeUtils
|
|
7
|
-
from quantplay.exception import QuantplayOrderPlacementException, InvalidArgumentException
|
|
7
|
+
from quantplay.exception import QuantplayOrderPlacementException, InvalidArgumentException, TokenException
|
|
8
8
|
|
|
9
9
|
from quantplay.broker.generics.broker import Broker
|
|
10
10
|
import polars as pl
|
|
@@ -415,6 +415,8 @@ class ICICI(Broker):
|
|
|
415
415
|
|
|
416
416
|
def margins(self) -> MarginsResponse:
|
|
417
417
|
margins = self.invoke_wrapper(self.wrapper.get_funds)
|
|
418
|
+
if margins is None:
|
|
419
|
+
raise TokenException("ICICI account token expired")
|
|
418
420
|
|
|
419
421
|
return {
|
|
420
422
|
"total_balance": float(margins["total_bank_balance"]),
|
|
@@ -39,14 +39,19 @@ class Redis:
|
|
|
39
39
|
|
|
40
40
|
Redis.__instance = self
|
|
41
41
|
|
|
42
|
-
def
|
|
42
|
+
def hget(self, key: int):
|
|
43
43
|
if self.error:
|
|
44
44
|
return None
|
|
45
45
|
|
|
46
|
-
return self.redis_client.
|
|
46
|
+
return self.redis_client.hget(f"mktx:{key}", "c") # type: ignore
|
|
47
47
|
|
|
48
|
-
def
|
|
48
|
+
def hget_multi(self, keys: list[int]) -> list[float] | None:
|
|
49
49
|
if self.error:
|
|
50
50
|
return None
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
pipe = self.redis_client.pipeline() # type: ignore
|
|
53
|
+
|
|
54
|
+
for key in keys:
|
|
55
|
+
pipe.hget(f"mktx:{key}", "c")
|
|
56
|
+
|
|
57
|
+
return pipe.execute() # type: ignore
|
|
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
|
{quantplay-2.1.30 → quantplay-2.1.32}/quantplay/broker/xts_utils_v2/InteractiveSocketClientV2.py
RENAMED
|
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
|