aboutsummaryrefslogtreecommitdiff
path: root/market.py
diff options
context:
space:
mode:
Diffstat (limited to 'market.py')
-rw-r--r--market.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/market.py b/market.py
index caa9513..9550b77 100644
--- a/market.py
+++ b/market.py
@@ -1,4 +1,4 @@
1from ccxt import ExchangeError, NotSupported, RequestTimeout, InvalidNonce 1from ccxt import AuthenticationError, ExchangeError, NotSupported, RequestTimeout, InvalidNonce
2import ccxt_wrapper as ccxt 2import ccxt_wrapper as ccxt
3import time 3import time
4import dbs 4import dbs
@@ -88,6 +88,7 @@ class Market:
88 88
89 def process(self, actions, before=False, after=False): 89 def process(self, actions, before=False, after=False):
90 try: 90 try:
91 self.ccxt.check_required_credentials()
91 for action in actions: 92 for action in actions:
92 if bool(before) is bool(after): 93 if bool(before) is bool(after):
93 self.processor.process(action, steps="all") 94 self.processor.process(action, steps="all")
@@ -95,6 +96,8 @@ class Market:
95 self.processor.process(action, steps="before") 96 self.processor.process(action, steps="before")
96 elif after: 97 elif after:
97 self.processor.process(action, steps="after") 98 self.processor.process(action, steps="after")
99 except AuthenticationError:
100 self.report.log_error("market_authentication", message="Impossible to authenticate to market")
98 except Exception as e: 101 except Exception as e:
99 import traceback 102 import traceback
100 self.report.log_error("market_process", exception=e, message=traceback.format_exc()) 103 self.report.log_error("market_process", exception=e, message=traceback.format_exc())