quantplay 2.0.54__tar.gz → 2.0.56__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.54 → quantplay-2.0.56}/PKG-INFO +1 -1
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/broker_factory.py +14 -10
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay.egg-info/PKG-INFO +1 -1
- {quantplay-2.0.54 → quantplay-2.0.56}/setup.py +1 -1
- {quantplay-2.0.54 → quantplay-2.0.56}/README.md +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/pyproject.toml +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/__init__.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/__init__.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/aliceblue.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/angelone.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/auto_login/__init__.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/auto_login/aliceblue.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/dhan.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/finvasia_utils/__init__.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/finvasia_utils/fa_noren.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/five_paisa.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/flattrade.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/ft_utils/__init__.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/ft_utils/flattrade_utils.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/ft_utils/ft_noren.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/generics/__init__.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/generics/broker.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/iifl_xts.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/kite_utils.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/kotak.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/motilal.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/noren.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/shoonya.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/uplink/__init__.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/uplink/uplink_utils.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/upstox.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/xts.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/xts_utils/Connect.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/xts_utils/Exception.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/xts_utils/InteractiveSocketClient.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/xts_utils/__init__.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/broker/zerodha.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/exception/__init__.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/exception/exceptions.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/model/__init__.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/model/broker.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/model/generics.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/model/instrument_data.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/model/order_event.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/py.typed +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/utils/__init__.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/utils/caching.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/utils/constant.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/utils/exchange.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/utils/number_utils.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/utils/pickle_utils.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/utils/selenium_utils.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/wrapper/__init__.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/wrapper/aws/__init__.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay/wrapper/aws/s3.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay.egg-info/SOURCES.txt +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay.egg-info/dependency_links.txt +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay.egg-info/requires.txt +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/quantplay.egg-info/top_level.txt +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/setup.cfg +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/tests/__init__.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/tests/conftest.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/tests/wrapper/__init__.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/tests/wrapper/aws/__init__.py +0 -0
- {quantplay-2.0.54 → quantplay-2.0.56}/tests/wrapper/aws/s3_test.py +0 -0
|
@@ -62,8 +62,9 @@ broker_instruments_map = {
|
|
|
62
62
|
Broker.ANGELONE: "angelone_instruments",
|
|
63
63
|
Broker.ALICEBLUE: "aliceblue_instruments",
|
|
64
64
|
Broker.UPSTOX: "upstox_instruments",
|
|
65
|
-
Broker.
|
|
65
|
+
Broker.DHAN: "upstox_instruments",
|
|
66
66
|
Broker.KOTAK: "upstox_instruments",
|
|
67
|
+
Broker.FIVEPAISA_OPENAPI: "5paisa_instruments",
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
broker_required_args = {
|
|
@@ -90,14 +91,16 @@ broker_required_args = {
|
|
|
90
91
|
|
|
91
92
|
broker_generate_args = {
|
|
92
93
|
Broker.ZERODHA: set(["user_id", "api_key", "api_secret", "password", "totp"]),
|
|
93
|
-
Broker.
|
|
94
|
-
Broker.FLATTRADE: set(["user_id", "user_token"]),
|
|
94
|
+
Broker.FLATTRADE: set(["user_id" "api_secret", "password", "totp_key", "api_key"]),
|
|
95
95
|
Broker.IIFL_XTS: set(["user_id", "wrapper", "md_wrapper"]),
|
|
96
96
|
Broker.MOTILAL: set(["user_id", "password", "api_key", "two_fa", "totp"]),
|
|
97
97
|
Broker.ALICEBLUE: set(["user_id", "api_key"]),
|
|
98
98
|
Broker.DHAN: set(["user_id", "access_token"]),
|
|
99
99
|
Broker.FIVEPAISA_OPENAPI: set(["user_id", "client"]),
|
|
100
100
|
Broker.ANGELONE: set(["user_id", "api_key", "mpin", "totp"]),
|
|
101
|
+
Broker.FINVASIA: set(
|
|
102
|
+
["api_secret", "imei", "password", "totp_key", "user_id", "vendor_code"]
|
|
103
|
+
),
|
|
101
104
|
Broker.KOTAK: set(
|
|
102
105
|
["consumer_key", "consumer_secret", "mobilenumber", "password", "mpin"]
|
|
103
106
|
),
|
|
@@ -294,10 +297,10 @@ class BrokerFactory:
|
|
|
294
297
|
else:
|
|
295
298
|
raise InvalidArgumentException(f"Broker '{broker}' not supported")
|
|
296
299
|
|
|
297
|
-
return
|
|
298
|
-
broker_client,
|
|
299
|
-
broker_data,
|
|
300
|
-
|
|
300
|
+
return {
|
|
301
|
+
"broker_client": broker_client,
|
|
302
|
+
"broker_data": broker_data,
|
|
303
|
+
}
|
|
301
304
|
|
|
302
305
|
def store_broker_client(
|
|
303
306
|
self, broker_info: Dict[str, Any], load_instrument: bool = True
|
|
@@ -305,6 +308,8 @@ class BrokerFactory:
|
|
|
305
308
|
username = broker_info["username"]
|
|
306
309
|
nickname = broker_info["nickname"]
|
|
307
310
|
|
|
311
|
+
self.validate_broker_args(broker_info)
|
|
312
|
+
|
|
308
313
|
broker_key = self.get_broker_key(username, nickname)
|
|
309
314
|
|
|
310
315
|
broker_data = broker_info["broker_data"]
|
|
@@ -318,14 +323,14 @@ class BrokerFactory:
|
|
|
318
323
|
load_instrument=load_instrument,
|
|
319
324
|
)
|
|
320
325
|
|
|
321
|
-
|
|
326
|
+
elif broker == Broker.DHAN:
|
|
322
327
|
broker_client = Dhan(
|
|
323
328
|
user_id=broker_data["user_id"],
|
|
324
329
|
access_token=broker_data["access_token"],
|
|
325
330
|
load_instrument=load_instrument,
|
|
326
331
|
)
|
|
327
332
|
|
|
328
|
-
|
|
333
|
+
elif broker == Broker.KOTAK:
|
|
329
334
|
broker_client = Kotak(
|
|
330
335
|
configuration=broker_data["configuration"],
|
|
331
336
|
load_instrument=load_instrument,
|
|
@@ -413,7 +418,6 @@ class BrokerFactory:
|
|
|
413
418
|
if broker_key in self.client_broker_data:
|
|
414
419
|
return self.client_broker_data[broker_key]
|
|
415
420
|
|
|
416
|
-
self.validate_broker_args(broker_info)
|
|
417
421
|
broker_client = self.store_broker_client(broker_info, load_instrument=False)
|
|
418
422
|
|
|
419
423
|
if broker_client is not None:
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|