quantplay 2.0.33__tar.gz → 2.0.34__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.33 → quantplay-2.0.34}/PKG-INFO +1 -1
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/angelone.py +10 -4
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/xts.py +0 -5
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/xts_utils/Connect.py +4 -5
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay.egg-info/PKG-INFO +1 -1
- {quantplay-2.0.33 → quantplay-2.0.34}/setup.py +1 -1
- {quantplay-2.0.33 → quantplay-2.0.34}/README.md +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/pyproject.toml +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/__init__.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/__init__.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/aliceblue.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/auto_login/__init__.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/auto_login/aliceblue.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/finvasia_utils/__init__.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/finvasia_utils/fa_noren.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/five_paisa.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/flattrade.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/ft_utils/__init__.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/ft_utils/flattrade_utils.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/ft_utils/ft_noren.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/generics/__init__.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/generics/broker.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/iifl_xts.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/kite_utils.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/motilal.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/noren.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/shoonya.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/uplink/__init__.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/uplink/uplink_utils.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/upstox.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/xts_utils/Exception.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/xts_utils/InteractiveSocketClient.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/xts_utils/__init__.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/zerodha.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/exception/__init__.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/exception/exceptions.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/model/__init__.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/model/broker.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/model/generics.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/model/instrument_data.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/model/order_event.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/py.typed +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/utils/__init__.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/utils/constant.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/utils/exchange.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/utils/number_utils.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/utils/pickle_utils.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/utils/selenium_utils.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/wrapper/__init__.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/wrapper/aws/__init__.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/wrapper/aws/s3.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay.egg-info/SOURCES.txt +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay.egg-info/dependency_links.txt +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay.egg-info/requires.txt +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/quantplay.egg-info/top_level.txt +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/setup.cfg +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/tests/__init__.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/tests/conftest.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/tests/wrapper/__init__.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/tests/wrapper/aws/__init__.py +0 -0
- {quantplay-2.0.33 → quantplay-2.0.34}/tests/wrapper/aws/s3_test.py +0 -0
|
@@ -568,17 +568,23 @@ class AngelOne(Broker):
|
|
|
568
568
|
response = fn(*args, **kwargs)
|
|
569
569
|
if "errorCode" in response and response["errorCode"] == "AG8001":
|
|
570
570
|
raise TokenException(f"{self.user_id}: Invalid Token")
|
|
571
|
-
|
|
571
|
+
|
|
572
|
+
elif isinstance(response, bytes):
|
|
572
573
|
raise InvalidArgumentException(
|
|
573
574
|
"Invalid data response. AngelOne sent incorrect data, Please check."
|
|
574
575
|
)
|
|
575
576
|
|
|
576
577
|
return response
|
|
578
|
+
|
|
577
579
|
except (TokenException, InvalidArgumentException):
|
|
578
580
|
raise
|
|
581
|
+
|
|
579
582
|
except DataException as e:
|
|
580
|
-
|
|
583
|
+
if "Access denied because of exceeding access rate" in str(e):
|
|
584
|
+
raise RetryableException(str(e))
|
|
585
|
+
|
|
581
586
|
raise BrokerException(str(e))
|
|
582
|
-
|
|
587
|
+
|
|
588
|
+
except Exception as e:
|
|
583
589
|
traceback.print_exc()
|
|
584
|
-
raise RetryableException(
|
|
590
|
+
raise RetryableException(str(e))
|
|
@@ -8,9 +8,7 @@ from typing import Dict
|
|
|
8
8
|
|
|
9
9
|
import pandas as pd
|
|
10
10
|
import polars as pl
|
|
11
|
-
import requests
|
|
12
11
|
from retrying import retry # type: ignore
|
|
13
|
-
from urllib3.exceptions import InsecureRequestWarning
|
|
14
12
|
|
|
15
13
|
from quantplay.broker.generics.broker import Broker
|
|
16
14
|
from quantplay.broker.xts_utils.Connect import XTSConnect
|
|
@@ -32,9 +30,6 @@ from quantplay.model.order_event import OrderUpdateEvent
|
|
|
32
30
|
from quantplay.utils.constant import Constants, OrderType
|
|
33
31
|
from quantplay.utils.pickle_utils import InstrumentData, PickleUtils
|
|
34
32
|
|
|
35
|
-
# -# Suppress only the single warning from urllib3 needed.
|
|
36
|
-
requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning) # type: ignore
|
|
37
|
-
|
|
38
33
|
|
|
39
34
|
class XTS(Broker):
|
|
40
35
|
source = "WebAPI"
|
|
@@ -3,8 +3,6 @@ Connect.py
|
|
|
3
3
|
|
|
4
4
|
API wrapper for XTS Connect REST APIs.
|
|
5
5
|
|
|
6
|
-
:copyright:
|
|
7
|
-
:license: see LICENSE for details.
|
|
8
6
|
"""
|
|
9
7
|
|
|
10
8
|
import json
|
|
@@ -14,6 +12,7 @@ import traceback
|
|
|
14
12
|
from typing import Any, Dict, Literal
|
|
15
13
|
|
|
16
14
|
import requests
|
|
15
|
+
import urllib3
|
|
17
16
|
import requests.adapters
|
|
18
17
|
|
|
19
18
|
from six.moves.urllib.parse import urljoin # type:ignore
|
|
@@ -24,6 +23,9 @@ from quantplay.exception.exceptions import BrokerException
|
|
|
24
23
|
|
|
25
24
|
log = logging.getLogger(__name__)
|
|
26
25
|
|
|
26
|
+
# Disable requests SSL warning
|
|
27
|
+
urllib3.disable_warnings(category=urllib3.exceptions.InsecureRequestWarning)
|
|
28
|
+
|
|
27
29
|
|
|
28
30
|
class XTSCommon:
|
|
29
31
|
"""
|
|
@@ -192,9 +194,6 @@ class XTSConnect(XTSCommon):
|
|
|
192
194
|
else:
|
|
193
195
|
self.reqsession = requests
|
|
194
196
|
|
|
195
|
-
# disable requests SSL warning
|
|
196
|
-
requests.packages.urllib3.disable_warnings() # type:ignore
|
|
197
|
-
|
|
198
197
|
def _set_common_variables(
|
|
199
198
|
self, access_token: str, userID: str, isInvestorClient: bool
|
|
200
199
|
):
|
|
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
|
|
File without changes
|