quantplay 2.0.68__tar.gz → 2.0.71__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.68 → quantplay-2.0.71}/PKG-INFO +26 -1
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/angelone.py +1 -1
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/auto_login/aliceblue.py +1 -1
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/five_paisa.py +2 -1
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/flattrade.py +17 -11
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/ft_utils/flattrade_utils.py +33 -6
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/kite_utils.py +2 -2
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/kotak.py +11 -8
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/motilal.py +5 -4
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/shoonya.py +9 -5
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/uplink/uplink_utils.py +1 -1
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/upstox.py +1 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/zerodha.py +5 -2
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay.egg-info/PKG-INFO +26 -1
- {quantplay-2.0.68 → quantplay-2.0.71}/setup.py +1 -1
- {quantplay-2.0.68 → quantplay-2.0.71}/README.md +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/pyproject.toml +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/__init__.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/__init__.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/aliceblue.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/auto_login/__init__.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/broker_factory.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/dhan.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/finvasia_utils/__init__.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/finvasia_utils/fa_noren.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/ft_utils/__init__.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/ft_utils/ft_noren.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/generics/__init__.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/generics/broker.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/iifl_xts.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/noren.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/uplink/__init__.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/xts.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/xts_utils/Connect.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/xts_utils/Exception.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/xts_utils/InteractiveSocketClient.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/broker/xts_utils/__init__.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/exception/__init__.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/exception/exceptions.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/model/__init__.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/model/broker.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/model/generics.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/model/instrument_data.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/model/order_event.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/py.typed +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/utils/__init__.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/utils/caching.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/utils/constant.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/utils/exchange.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/utils/number_utils.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/utils/pickle_utils.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/utils/selenium_utils.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/wrapper/__init__.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/wrapper/aws/__init__.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay/wrapper/aws/s3.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay.egg-info/SOURCES.txt +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay.egg-info/dependency_links.txt +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay.egg-info/requires.txt +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/quantplay.egg-info/top_level.txt +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/setup.cfg +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/tests/__init__.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/tests/conftest.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/tests/wrapper/__init__.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/tests/wrapper/aws/__init__.py +0 -0
- {quantplay-2.0.68 → quantplay-2.0.71}/tests/wrapper/aws/s3_test.py +0 -0
|
@@ -1,11 +1,36 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: quantplay
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.71
|
|
4
4
|
Summary: This python package will be stored in AWS CodeArtifact
|
|
5
5
|
Home-page:
|
|
6
6
|
Author:
|
|
7
7
|
Author-email:
|
|
8
8
|
License: MIT
|
|
9
|
+
Requires-Dist: setuptools
|
|
10
|
+
Requires-Dist: path
|
|
11
|
+
Requires-Dist: pyotp
|
|
12
|
+
Requires-Dist: retrying
|
|
13
|
+
Requires-Dist: boto3
|
|
14
|
+
Requires-Dist: numpy
|
|
15
|
+
Requires-Dist: websocket-client
|
|
16
|
+
Requires-Dist: smartapi-python
|
|
17
|
+
Requires-Dist: logzero
|
|
18
|
+
Requires-Dist: selenium
|
|
19
|
+
Requires-Dist: requests
|
|
20
|
+
Requires-Dist: pandas
|
|
21
|
+
Requires-Dist: pyarrow
|
|
22
|
+
Requires-Dist: polars
|
|
23
|
+
Requires-Dist: kiteconnect
|
|
24
|
+
Requires-Dist: pya3
|
|
25
|
+
Requires-Dist: py5paisa
|
|
26
|
+
Requires-Dist: upstox-python-sdk
|
|
27
|
+
Requires-Dist: undetected-chromedriver
|
|
28
|
+
Requires-Dist: cachetools
|
|
29
|
+
Requires-Dist: py_vollib
|
|
30
|
+
Requires-Dist: python-engineio
|
|
31
|
+
Requires-Dist: python-socketio
|
|
32
|
+
Requires-Dist: six
|
|
33
|
+
Requires-Dist: dhanhq
|
|
9
34
|
|
|
10
35
|
# Quantplay Alpha playground
|
|
11
36
|
|
|
@@ -83,7 +83,7 @@ class AliceblueLogin:
|
|
|
83
83
|
AliceblueLogin.click_on_login(driver)
|
|
84
84
|
AliceblueLogin.enter_user_id(driver, user_id)
|
|
85
85
|
AliceblueLogin.enter_password(driver, password)
|
|
86
|
-
AliceblueLogin.enter_totp(driver, pyotp.TOTP(totp).now())
|
|
86
|
+
AliceblueLogin.enter_totp(driver, pyotp.TOTP(str(totp)).now())
|
|
87
87
|
|
|
88
88
|
except binascii.Error:
|
|
89
89
|
raise InvalidArgumentException("Invalid TOTP key provided")
|
|
@@ -77,10 +77,11 @@ class FivePaisa(Broker):
|
|
|
77
77
|
if totp is None:
|
|
78
78
|
raise InvalidArgumentException("TOTP Key is Missing")
|
|
79
79
|
|
|
80
|
-
self.client.get_totp_session(client_id, pyotp.TOTP(totp).now(), pin)
|
|
80
|
+
self.client.get_totp_session(client_id, pyotp.TOTP(str(totp)).now(), pin)
|
|
81
81
|
|
|
82
82
|
try:
|
|
83
83
|
self.margins()
|
|
84
|
+
|
|
84
85
|
except TokenException:
|
|
85
86
|
raise RetryableException("Generating token again")
|
|
86
87
|
else:
|
|
@@ -2,12 +2,13 @@ import binascii
|
|
|
2
2
|
import hashlib
|
|
3
3
|
from queue import Queue
|
|
4
4
|
|
|
5
|
+
from quantplay.exception import TokenException
|
|
5
6
|
import requests
|
|
6
7
|
|
|
7
8
|
from quantplay.broker.ft_utils.flattrade_utils import FlatTradeUtils
|
|
8
9
|
from quantplay.broker.ft_utils.ft_noren import FT_NorenApi
|
|
9
10
|
from quantplay.broker.noren import Noren
|
|
10
|
-
from quantplay.exception.exceptions import
|
|
11
|
+
from quantplay.exception.exceptions import RetryableException
|
|
11
12
|
from quantplay.model.order_event import OrderUpdateEvent
|
|
12
13
|
|
|
13
14
|
|
|
@@ -32,6 +33,12 @@ class FlatTrade(Noren):
|
|
|
32
33
|
try:
|
|
33
34
|
if user_token and user_id:
|
|
34
35
|
self.api.set_session(userid=user_id, usertoken=user_token)
|
|
36
|
+
response = {
|
|
37
|
+
"susertoken": user_token,
|
|
38
|
+
"actid": user_id,
|
|
39
|
+
"email": None,
|
|
40
|
+
"uname": None,
|
|
41
|
+
}
|
|
35
42
|
|
|
36
43
|
elif user_id and password and totp and api_key and api_secret:
|
|
37
44
|
token = self.login(
|
|
@@ -43,21 +50,20 @@ class FlatTrade(Noren):
|
|
|
43
50
|
)
|
|
44
51
|
|
|
45
52
|
self.api.set_session(userid=user_id, usertoken=token)
|
|
53
|
+
response = {
|
|
54
|
+
"susertoken": token,
|
|
55
|
+
"actid": user_id,
|
|
56
|
+
"email": None,
|
|
57
|
+
"uname": None,
|
|
58
|
+
}
|
|
46
59
|
|
|
47
60
|
else:
|
|
48
|
-
raise
|
|
61
|
+
raise TokenException("Missing Arguments")
|
|
49
62
|
|
|
50
|
-
|
|
51
|
-
"susertoken": user_token,
|
|
52
|
-
"actid": user_id,
|
|
53
|
-
"email": None,
|
|
54
|
-
"uname": None,
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
except InvalidArgumentException:
|
|
63
|
+
except TokenException:
|
|
58
64
|
raise
|
|
59
65
|
except binascii.Error:
|
|
60
|
-
raise
|
|
66
|
+
raise TokenException("Invalid TOTP key provided")
|
|
61
67
|
except Exception as e:
|
|
62
68
|
raise RetryableException(str(e))
|
|
63
69
|
|
|
@@ -22,6 +22,7 @@ class FlatTradeUtils:
|
|
|
22
22
|
totp_xpath = '//*[@id="pan"]'
|
|
23
23
|
|
|
24
24
|
login_xpath = '//*[@id="sbmt"]'
|
|
25
|
+
error_xpath = '//*[@id="app"]/div/div/div[2]/div/div[2]/div[1]/div/form/div[5]/div'
|
|
25
26
|
|
|
26
27
|
@staticmethod
|
|
27
28
|
@retry(
|
|
@@ -32,7 +33,7 @@ class FlatTradeUtils:
|
|
|
32
33
|
)
|
|
33
34
|
def get_request_code(api_key: str, user_id: str, password: str, totp: str):
|
|
34
35
|
try:
|
|
35
|
-
pyotp.TOTP(totp).now()
|
|
36
|
+
pyotp.TOTP(str(totp)).now()
|
|
36
37
|
driver = Selenium().get_browser()
|
|
37
38
|
|
|
38
39
|
flattrade_url = f"https://auth.flattrade.in/?app_key={api_key}"
|
|
@@ -47,7 +48,7 @@ class FlatTradeUtils:
|
|
|
47
48
|
password_element.send_keys(password)
|
|
48
49
|
|
|
49
50
|
totp_pin = driver.find_element("xpath", FlatTradeUtils.totp_xpath)
|
|
50
|
-
totp_pin.send_keys(pyotp.TOTP(totp).now())
|
|
51
|
+
totp_pin.send_keys(pyotp.TOTP(str(totp)).now())
|
|
51
52
|
|
|
52
53
|
time.sleep(1)
|
|
53
54
|
|
|
@@ -58,8 +59,34 @@ class FlatTradeUtils:
|
|
|
58
59
|
|
|
59
60
|
url = driver.current_url
|
|
60
61
|
|
|
62
|
+
if url.split("/")[2] == flattrade_url.split("/")[2]:
|
|
63
|
+
error_message = ""
|
|
64
|
+
|
|
65
|
+
try:
|
|
66
|
+
error_attempt = driver.find_element(
|
|
67
|
+
"xpath", FlatTradeUtils.error_xpath
|
|
68
|
+
)
|
|
69
|
+
error_message = error_attempt.text
|
|
70
|
+
|
|
71
|
+
if error_message in [
|
|
72
|
+
"Invalid Input : Wrong Password",
|
|
73
|
+
"Invalid API key",
|
|
74
|
+
]:
|
|
75
|
+
raise InvalidArgumentException(
|
|
76
|
+
f"Flattrade Login Failed: {error_message}"
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
except Exception as e:
|
|
80
|
+
Constants.logger.error(f"Flattrade Selenium Error : {e}")
|
|
81
|
+
traceback.print_exc()
|
|
82
|
+
|
|
83
|
+
finally:
|
|
84
|
+
Constants.logger.error(
|
|
85
|
+
f"Flattrade Unkown Selenium Error : {error_message}"
|
|
86
|
+
)
|
|
87
|
+
raise Exception(f"Flattrade Unkown Selenium Error : {error_message}")
|
|
88
|
+
|
|
61
89
|
try:
|
|
62
|
-
# TODO: IndexError: list index out of range
|
|
63
90
|
request_token = url.split("code=")[1].split("&")[0]
|
|
64
91
|
except Exception as e:
|
|
65
92
|
Constants.logger.error(f"Flattrade Selenium Error for {url}")
|
|
@@ -72,10 +99,10 @@ class FlatTradeUtils:
|
|
|
72
99
|
|
|
73
100
|
except binascii.Error:
|
|
74
101
|
raise InvalidArgumentException("Invalid TOTP key provided")
|
|
75
|
-
except InvalidArgumentException:
|
|
76
|
-
raise
|
|
102
|
+
except InvalidArgumentException as e:
|
|
103
|
+
raise e
|
|
77
104
|
except WebDriverException:
|
|
78
105
|
raise WrongLibrarySetup("Selenium setup need to be fixed")
|
|
79
106
|
except Exception as e:
|
|
80
|
-
|
|
107
|
+
traceback.print_exc()
|
|
81
108
|
raise RetryableException(str(e))
|
|
@@ -70,7 +70,7 @@ class KiteUtils:
|
|
|
70
70
|
raise InvalidArgumentException("Password Key is Missing")
|
|
71
71
|
|
|
72
72
|
try:
|
|
73
|
-
pyotp.TOTP(totp).now()
|
|
73
|
+
pyotp.TOTP(str(totp)).now()
|
|
74
74
|
driver = Selenium().get_browser()
|
|
75
75
|
|
|
76
76
|
kite_url = "https://kite.trade/connect/login?api_key={}&v=3".format(api_key)
|
|
@@ -95,7 +95,7 @@ class KiteUtils:
|
|
|
95
95
|
KiteUtils.check_error(page_source)
|
|
96
96
|
|
|
97
97
|
kite_pin = driver.find_element("xpath", KiteUtils.kite_pin_xpath)
|
|
98
|
-
kite_pin.send_keys(pyotp.TOTP(totp).now())
|
|
98
|
+
kite_pin.send_keys(pyotp.TOTP(str(totp)).now())
|
|
99
99
|
time.sleep(1)
|
|
100
100
|
|
|
101
101
|
page_source = driver.page_source
|
|
@@ -21,11 +21,8 @@ PROD_BASE_URL = "https://gw-napi.kotaksecurities.com/"
|
|
|
21
21
|
SESSION_PROD_BASE_URL = "https://napi.kotaksecurities.com/"
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
#
|
|
25
|
-
# pVwafvF3ssA_jFVbKPrwhKt7igwa
|
|
26
|
-
# Kotak@123
|
|
27
|
-
# +918149949114
|
|
28
|
-
# 491700
|
|
24
|
+
# from quantplay.broker.kotak import Kotak
|
|
25
|
+
# client = Kotak(None,"EvOUzPVqkwvlFl_6cZYZSCO5mwQa","pVwafvF3ssA_jFVbKPrwhKt7igwa","+918149949114","Kotak@123","491700")
|
|
29
26
|
|
|
30
27
|
|
|
31
28
|
class Kotak(Broker):
|
|
@@ -84,8 +81,6 @@ class Kotak(Broker):
|
|
|
84
81
|
data=json.dumps({"grant_type": "client_credentials"}),
|
|
85
82
|
)
|
|
86
83
|
|
|
87
|
-
print(session_init)
|
|
88
|
-
|
|
89
84
|
if not session_init.ok:
|
|
90
85
|
raise Exception("")
|
|
91
86
|
|
|
@@ -185,7 +180,15 @@ class Kotak(Broker):
|
|
|
185
180
|
return {"user_id": self.user_id or ""}
|
|
186
181
|
|
|
187
182
|
def margins(self) -> Dict[str, float]:
|
|
188
|
-
|
|
183
|
+
limits_resp = self.request(
|
|
184
|
+
"limits", body={"seg": "ALL", "exch": "ALL", "prod": "ALL"}
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
margins = {
|
|
188
|
+
"margin_used": limits_resp["MarginUsed"],
|
|
189
|
+
"margin_available": limits_resp["Net"],
|
|
190
|
+
}
|
|
191
|
+
return margins
|
|
189
192
|
|
|
190
193
|
# **
|
|
191
194
|
# ** POST/PUT Api's
|
|
@@ -139,8 +139,9 @@ class Motilal(Broker):
|
|
|
139
139
|
raise Exception("Missing Arguments")
|
|
140
140
|
|
|
141
141
|
self.user_id = self.headers["vendorinfo"]
|
|
142
|
+
|
|
142
143
|
except binascii.Error:
|
|
143
|
-
raise
|
|
144
|
+
raise TokenException("Invalid TOTP key provided")
|
|
144
145
|
except InvalidArgumentException:
|
|
145
146
|
raise
|
|
146
147
|
except Exception as e:
|
|
@@ -230,11 +231,11 @@ class Motilal(Broker):
|
|
|
230
231
|
def generate_token(
|
|
231
232
|
self, user_id: str, password: str, api_key: str, two_fa: str, totp: str
|
|
232
233
|
):
|
|
233
|
-
current_totp = pyotp.TOTP(totp).now()
|
|
234
|
+
current_totp = pyotp.TOTP(str(totp)).now()
|
|
234
235
|
Constants.logger.info("TOTP is {}".format(current_totp))
|
|
235
236
|
# initializing string
|
|
236
|
-
|
|
237
|
-
result = hashlib.sha256(
|
|
237
|
+
encoded_str = "{}{}".format(password, api_key)
|
|
238
|
+
result = hashlib.sha256(encoded_str.encode())
|
|
238
239
|
|
|
239
240
|
data = {
|
|
240
241
|
"userid": user_id,
|
|
@@ -5,7 +5,11 @@ import pyotp
|
|
|
5
5
|
|
|
6
6
|
from quantplay.broker.finvasia_utils.fa_noren import FA_NorenApi
|
|
7
7
|
from quantplay.broker.noren import Noren
|
|
8
|
-
from quantplay.exception.exceptions import
|
|
8
|
+
from quantplay.exception.exceptions import (
|
|
9
|
+
InvalidArgumentException,
|
|
10
|
+
RetryableException,
|
|
11
|
+
TokenException,
|
|
12
|
+
)
|
|
9
13
|
from quantplay.model.order_event import OrderUpdateEvent
|
|
10
14
|
|
|
11
15
|
|
|
@@ -38,7 +42,7 @@ class FinvAsia(Noren):
|
|
|
38
42
|
"uname": None,
|
|
39
43
|
}
|
|
40
44
|
elif user_id and password and totp and vendor_code and api_secret and imei:
|
|
41
|
-
totp = pyotp.TOTP(totp).now()
|
|
45
|
+
totp = pyotp.TOTP(str(totp)).now()
|
|
42
46
|
response = self.login(
|
|
43
47
|
user_id=user_id,
|
|
44
48
|
password=password,
|
|
@@ -48,12 +52,12 @@ class FinvAsia(Noren):
|
|
|
48
52
|
imei=imei,
|
|
49
53
|
)
|
|
50
54
|
else:
|
|
51
|
-
raise
|
|
55
|
+
raise TokenException("Missing Args")
|
|
52
56
|
|
|
53
|
-
except
|
|
57
|
+
except TokenException:
|
|
54
58
|
raise
|
|
55
59
|
except binascii.Error:
|
|
56
|
-
raise
|
|
60
|
+
raise TokenException("Invalid TOTP key provided")
|
|
57
61
|
except Exception as e:
|
|
58
62
|
raise RetryableException(str(e))
|
|
59
63
|
|
|
@@ -133,6 +133,7 @@ class Upstox(Broker):
|
|
|
133
133
|
try:
|
|
134
134
|
symbol_info = self.symbol_data[f"{exchange}:{tradingsymbol}"]
|
|
135
135
|
# Market quotes and instruments - LTP quotes.
|
|
136
|
+
# TODO:Check Get FN->symbol_info
|
|
136
137
|
api_response = api_instance.ltp( # type: ignore
|
|
137
138
|
symbol_info.get("instrument_key"), self.api_version
|
|
138
139
|
)
|
|
@@ -112,7 +112,7 @@ class Zerodha(Broker):
|
|
|
112
112
|
|
|
113
113
|
def stream_order_data(self):
|
|
114
114
|
if self.wrapper.api_key is None or self.wrapper.access_token is None:
|
|
115
|
-
raise InvalidArgumentException("")
|
|
115
|
+
raise InvalidArgumentException("Zerodha WS: API Key or Access Token Missing")
|
|
116
116
|
|
|
117
117
|
kite_ticker = KiteTicker(self.wrapper.api_key, self.wrapper.access_token)
|
|
118
118
|
kite_ticker.on_order_update = self.on_order_update
|
|
@@ -270,9 +270,12 @@ class Zerodha(Broker):
|
|
|
270
270
|
|
|
271
271
|
except TokenException as e:
|
|
272
272
|
message = str(e)
|
|
273
|
+
|
|
273
274
|
if "Invalid" in message and "checksum" in message:
|
|
274
275
|
raise InvalidArgumentException("Invalid API secret")
|
|
275
|
-
|
|
276
|
+
|
|
277
|
+
raise QuantplayTokenException(str(e))
|
|
278
|
+
|
|
276
279
|
except Exception as e:
|
|
277
280
|
traceback.print_exc()
|
|
278
281
|
print("Need token input " + kite.login_url())
|
|
@@ -1,11 +1,36 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: quantplay
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.71
|
|
4
4
|
Summary: This python package will be stored in AWS CodeArtifact
|
|
5
5
|
Home-page:
|
|
6
6
|
Author:
|
|
7
7
|
Author-email:
|
|
8
8
|
License: MIT
|
|
9
|
+
Requires-Dist: setuptools
|
|
10
|
+
Requires-Dist: path
|
|
11
|
+
Requires-Dist: pyotp
|
|
12
|
+
Requires-Dist: retrying
|
|
13
|
+
Requires-Dist: boto3
|
|
14
|
+
Requires-Dist: numpy
|
|
15
|
+
Requires-Dist: websocket-client
|
|
16
|
+
Requires-Dist: smartapi-python
|
|
17
|
+
Requires-Dist: logzero
|
|
18
|
+
Requires-Dist: selenium
|
|
19
|
+
Requires-Dist: requests
|
|
20
|
+
Requires-Dist: pandas
|
|
21
|
+
Requires-Dist: pyarrow
|
|
22
|
+
Requires-Dist: polars
|
|
23
|
+
Requires-Dist: kiteconnect
|
|
24
|
+
Requires-Dist: pya3
|
|
25
|
+
Requires-Dist: py5paisa
|
|
26
|
+
Requires-Dist: upstox-python-sdk
|
|
27
|
+
Requires-Dist: undetected-chromedriver
|
|
28
|
+
Requires-Dist: cachetools
|
|
29
|
+
Requires-Dist: py_vollib
|
|
30
|
+
Requires-Dist: python-engineio
|
|
31
|
+
Requires-Dist: python-socketio
|
|
32
|
+
Requires-Dist: six
|
|
33
|
+
Requires-Dist: dhanhq
|
|
9
34
|
|
|
10
35
|
# Quantplay Alpha playground
|
|
11
36
|
|
|
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
|