quantplay 1.3.7__tar.gz → 1.3.8__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-1.3.7 → quantplay-1.3.8}/PKG-INFO +1 -1
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/broker/motilal.py +4 -1
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/broker/zerodha.py +2 -4
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay.egg-info/PKG-INFO +1 -1
- {quantplay-1.3.7 → quantplay-1.3.8}/setup.py +1 -1
- {quantplay-1.3.7 → quantplay-1.3.8}/README.md +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/backtest/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/backtest/backtest_trades.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/broker/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/broker/angelone.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/broker/broker_client.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/broker/client.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/broker/finvasia_utils/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/broker/finvasia_utils/shoonya.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/broker/generics/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/broker/generics/broker.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/broker/iifl.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/broker/iifl_xts.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/broker/kite_utils.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/broker/shoonya.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/broker/symphony.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/broker/xts.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/broker/xts_utils/Connect.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/broker/xts_utils/Exception.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/broker/xts_utils/InteractiveSocketClient.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/broker/xts_utils/MarketDataSocketClient.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/broker/xts_utils/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/brokerage/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/brokerage/angelone/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/brokerage/angelone/angel_broker.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/brokerage/generics/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/brokerage/generics/broker.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/brokerage/zerodha/ZBroker.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/brokerage/zerodha/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/config/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/config/qplay_config.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/create_sample_data.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/data_modify_script.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/date_fix.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/exception/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/exception/exceptions.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/executor/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/executor/strategy_executor.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/indicators/Indicator.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/indicators/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/indicators/atr.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/model/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/model/exchange/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/model/exchange/instrument.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/model/exchange/order.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/model/exchange/tick.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/model/strategy/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/model/strategy/strategy_response.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/oms/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/order_execution/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/order_execution/execution_algorithm.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/order_execution/mean_price.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/reporting/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/reporting/strategy_report.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/reporting/visuals.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/service.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/services/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/services/market.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/services/tradelens.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/strategies/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/strategies/equities/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/strategies/equities/intraday/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/strategies/equities/overnight/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/strategies/futures/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/strategies/futures/overnight/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/strategies/options/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/strategies/options/intraday/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/strategies/options/intraday/ladder.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/strategies/options/intraday/musk.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/strategies/options/intraday/short_straddle.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/strategy/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/strategy/base.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/strategy_run.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/utils/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/utils/config_util.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/utils/constant.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/utils/data_utils.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/utils/exchange.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/utils/number_utils.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/utils/pickle_utils.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/utils/selenium_utils.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay/utils/transaction_utils.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay.egg-info/SOURCES.txt +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay.egg-info/dependency_links.txt +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay.egg-info/requires.txt +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/quantplay.egg-info/top_level.txt +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/setup.cfg +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/test/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/test/broker/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/test/broker/finvasia.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/test/executor/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/test/executor/strategy_executor.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/test/strategy/__init__.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/test/strategy/base.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/test/strategy/sample_strategy.py +0 -0
- {quantplay-1.3.7 → quantplay-1.3.8}/test/test_motilal.py +0 -0
|
@@ -20,6 +20,7 @@ import _thread as thread
|
|
|
20
20
|
import copy
|
|
21
21
|
import threading
|
|
22
22
|
from quantplay.utils.pickle_utils import PickleUtils
|
|
23
|
+
from quantplay.exception.exceptions import QuantplayOrderPlacementException
|
|
23
24
|
|
|
24
25
|
|
|
25
26
|
class Motilal(Broker):
|
|
@@ -502,8 +503,10 @@ class Motilal(Broker):
|
|
|
502
503
|
response = requests.post(self.place_order_url, headers=self.headers, data=json.dumps(data)).json()
|
|
503
504
|
Constants.logger.info("[PLACE_ORDER_RESPONSE] {} input {}".format(response, json.dumps(data)))
|
|
504
505
|
if response['status'] == "ERROR":
|
|
505
|
-
raise
|
|
506
|
+
raise QuantplayOrderPlacementException(response['message'])
|
|
506
507
|
return response['uniqueorderid']
|
|
508
|
+
except QuantplayOrderPlacementException as e:
|
|
509
|
+
raise e
|
|
507
510
|
except Exception as e:
|
|
508
511
|
exception_message = "Order placement failed with error [{}]".format(str(e))
|
|
509
512
|
print(exception_message)
|
|
@@ -5,7 +5,6 @@ import numpy as np
|
|
|
5
5
|
import time
|
|
6
6
|
from retrying import retry
|
|
7
7
|
from quantplay.utils.constant import Constants, timeit
|
|
8
|
-
from quantplay.exception.exceptions import InvalidArgumentException
|
|
9
8
|
from quantplay.broker.generics.broker import Broker
|
|
10
9
|
from quantplay.config.qplay_config import QplayConfig
|
|
11
10
|
from kiteconnect import KiteConnect
|
|
@@ -15,7 +14,7 @@ import math
|
|
|
15
14
|
from quantplay.utils.number_utils import NumberUtils
|
|
16
15
|
import random
|
|
17
16
|
from kiteconnect import KiteTicker
|
|
18
|
-
from quantplay.exception.exceptions import InvalidArgumentException
|
|
17
|
+
from quantplay.exception.exceptions import InvalidArgumentException, QuantplayOrderPlacementException
|
|
19
18
|
from quantplay.utils.pickle_utils import PickleUtils
|
|
20
19
|
|
|
21
20
|
|
|
@@ -227,8 +226,7 @@ class Zerodha(Broker):
|
|
|
227
226
|
tag=tag)
|
|
228
227
|
return order_id
|
|
229
228
|
except Exception as e:
|
|
230
|
-
|
|
231
|
-
print(exception_message)
|
|
229
|
+
raise QuantplayOrderPlacementException(str(e))
|
|
232
230
|
|
|
233
231
|
def square_off_all(self, dry_run=True, strike=None, sleep_time=0.1):
|
|
234
232
|
positions = self.get_positions()['net']
|
|
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
|
|
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
|