aboutsummaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-03-04 23:35:16 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2018-03-04 23:35:16 +0100
commitf9226903cb53a9b303a26de562e321159349f8df (patch)
tree671e139c9cadaf4070287f50d1f71c0d26d6ba80 /main.py
parentc5a7f2863f5c041ff906b2407a74971e2178a729 (diff)
downloadTrader-f9226903cb53a9b303a26de562e321159349f8df.tar.gz
Trader-f9226903cb53a9b303a26de562e321159349f8df.tar.zst
Trader-f9226903cb53a9b303a26de562e321159349f8df.zip
Fixes after night runv0.5
- Currency pair doesn’t work when fetching orders - Store error in main to report. - Cancel orders when closing trade - Print closed status of trade to repr - Don’t try to cancel not cancellable orders
Diffstat (limited to 'main.py')
-rw-r--r--main.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/main.py b/main.py
index 17cf58c..d4bab02 100644
--- a/main.py
+++ b/main.py
@@ -10,6 +10,9 @@ for market_config, user_id in helper.main_fetch_markets(pg_config, args.user):
10 user_market = market.Market.from_config(market_config, debug=args.debug) 10 user_market = market.Market.from_config(market_config, debug=args.debug)
11 helper.main_process_market(user_market, args.action, before=args.before, after=args.after) 11 helper.main_process_market(user_market, args.action, before=args.before, after=args.after)
12 except Exception as e: 12 except Exception as e:
13 print("{}: {}".format(e.__class__.__name__, e)) 13 try:
14 user_market.report.log_error("main", exception=e)
15 except:
16 print("{}: {}".format(e.__class__.__name__, e))
14 finally: 17 finally:
15 helper.main_store_report(report_path, user_id, user_market) 18 helper.main_store_report(report_path, user_id, user_market)