diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-03-04 23:35:16 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-03-04 23:35:16 +0100 |
commit | f9226903cb53a9b303a26de562e321159349f8df (patch) | |
tree | 671e139c9cadaf4070287f50d1f71c0d26d6ba80 /main.py | |
parent | c5a7f2863f5c041ff906b2407a74971e2178a729 (diff) | |
download | Trader-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.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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) |