quantplay 2.0.9__tar.gz → 2.0.11__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.0.9 → quantplay-2.0.11}/PKG-INFO +1 -1
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/noren.py +14 -7
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay.egg-info/PKG-INFO +1 -1
- {quantplay-2.0.9 → quantplay-2.0.11}/setup.py +1 -1
- {quantplay-2.0.9 → quantplay-2.0.11}/README.md +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/pyproject.toml +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/aliceblue.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/angelone.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/auto_login/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/auto_login/aliceblue.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/finvasia_utils/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/finvasia_utils/fa_noren.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/five_paisa.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/flattrade.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/ft_utils/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/ft_utils/flattrade_utils.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/ft_utils/ft_noren.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/generics/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/generics/broker.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/iifl_xts.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/kite_utils.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/motilal.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/shoonya.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/uplink/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/uplink/uplink_utils.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/upstox.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/xts.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/xts_utils/Connect.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/xts_utils/Exception.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/xts_utils/InteractiveSocketClient.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/xts_utils/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/broker/zerodha.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/exception/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/exception/exceptions.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/model/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/model/broker/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/model/broker/generics.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/py.typed +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/strategies/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/strategies/equities/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/strategies/equities/intraday/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/strategies/equities/overnight/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/strategies/futures/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/strategies/futures/overnight/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/strategies/options/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/strategies/options/intraday/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/strategies/options/intraday/ladder.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/strategies/options/intraday/musk.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/strategies/options/intraday/short_straddle.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/utils/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/utils/constant.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/utils/exchange.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/utils/number_utils.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/utils/pickle_utils.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/utils/selenium_utils.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/wrapper/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/wrapper/aws/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay/wrapper/aws/s3.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay.egg-info/SOURCES.txt +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay.egg-info/dependency_links.txt +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay.egg-info/requires.txt +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/quantplay.egg-info/top_level.txt +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/setup.cfg +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/tests/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/tests/conftest.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/tests/wrapper/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/tests/wrapper/aws/__init__.py +0 -0
- {quantplay-2.0.9 → quantplay-2.0.11}/tests/wrapper/aws/s3_test.py +0 -0
|
@@ -123,14 +123,11 @@ class Noren(Broker):
|
|
|
123
123
|
order["order_id"] = order["norenordno"]
|
|
124
124
|
order["exchange_order_id"] = order["exchordid"]
|
|
125
125
|
order["exchange"] = order["exch"]
|
|
126
|
-
|
|
127
|
-
# TODO translate symbol
|
|
128
|
-
# -EQ should be removed
|
|
129
|
-
# F&O symbol translation
|
|
130
126
|
order["tradingsymbol"] = order["tsym"]
|
|
131
127
|
|
|
132
128
|
if order["exchange"] == "NSE":
|
|
133
129
|
order["tradingsymbol"] = order["tradingsymbol"].replace("-EQ", "")
|
|
130
|
+
|
|
134
131
|
elif order["exchange"] in ["NFO", "MCX"]:
|
|
135
132
|
order["tradingsymbol"] = self.broker_symbol_map[order["tradingsymbol"]]
|
|
136
133
|
|
|
@@ -649,16 +646,20 @@ class Noren(Broker):
|
|
|
649
646
|
def invoke_noren_api(self, fn: Callable, *args, **kwargs) -> Dict:
|
|
650
647
|
try:
|
|
651
648
|
response = fn(*args, **kwargs)
|
|
652
|
-
|
|
649
|
+
|
|
650
|
+
if response is None or (
|
|
651
|
+
"stat" in response and "not_ok" == response["stat"].lower()
|
|
652
|
+
):
|
|
653
653
|
raise TokenException(response["emsg"])
|
|
654
|
+
|
|
654
655
|
return response
|
|
655
656
|
|
|
656
657
|
except JSONDecodeError:
|
|
657
|
-
raise BrokerException("Failed to
|
|
658
|
+
raise BrokerException("Failed to Receive Data from broker")
|
|
658
659
|
|
|
659
660
|
except Exception:
|
|
660
661
|
traceback.print_exc()
|
|
661
|
-
raise RetryableException("Failed to
|
|
662
|
+
raise RetryableException("Failed to Receive Data from broker. Retrying Again")
|
|
662
663
|
|
|
663
664
|
@timeit(MetricName="Finvasia:positions")
|
|
664
665
|
@retry(
|
|
@@ -679,8 +680,10 @@ class Noren(Broker):
|
|
|
679
680
|
api_margins["margin_used"] = 0
|
|
680
681
|
else:
|
|
681
682
|
api_margins["margin_used"] = api_margins["marginused"]
|
|
683
|
+
|
|
682
684
|
if "payin" not in api_margins:
|
|
683
685
|
api_margins["payin"] = 0
|
|
686
|
+
|
|
684
687
|
margin_available = (
|
|
685
688
|
float(api_margins["cash"])
|
|
686
689
|
+ float(collateral)
|
|
@@ -691,16 +694,20 @@ class Noren(Broker):
|
|
|
691
694
|
margins = {}
|
|
692
695
|
margins["margin_used"] = api_margins["margin_used"]
|
|
693
696
|
margins["margin_available"] = margin_available
|
|
697
|
+
|
|
694
698
|
try:
|
|
695
699
|
margins["cash"] = float(api_margins["cash"])
|
|
696
700
|
except Exception:
|
|
697
701
|
margins["cash"] = 0
|
|
702
|
+
|
|
698
703
|
margins["total_balance"] = float(api_margins["cash"]) + float(collateral)
|
|
699
704
|
|
|
700
705
|
return margins
|
|
706
|
+
|
|
701
707
|
except Exception as e:
|
|
702
708
|
logger.error(f"[NOREN_MARGIN_ERROR] {e}")
|
|
703
709
|
RetryableException("[NOREN] Failed to fetch account margin")
|
|
710
|
+
|
|
704
711
|
return {}
|
|
705
712
|
|
|
706
713
|
@timeit(MetricName="Finvasia:account_summary")
|
|
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
|
{quantplay-2.0.9 → quantplay-2.0.11}/quantplay/strategies/options/intraday/short_straddle.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
|