diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-03-08 02:04:50 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-03-08 11:35:15 +0100 |
commit | ada1b5f109ebaa6f3adb7cd87b007c6db891811c (patch) | |
tree | 7b4b40d2c08f21793da62b1708c649ec72fe5bae /market.py | |
parent | a18ce2f16973155c81f983643aba675f62dea7af (diff) | |
download | Trader-ada1b5f109ebaa6f3adb7cd87b007c6db891811c.tar.gz Trader-ada1b5f109ebaa6f3adb7cd87b007c6db891811c.tar.zst Trader-ada1b5f109ebaa6f3adb7cd87b007c6db891811c.zip |
Move Portfolio to store and cleanup methods
Make report stored in portfolio class instead of market
Diffstat (limited to 'market.py')
-rw-r--r-- | market.py | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -312,7 +312,7 @@ class Processor: | |||
312 | import inspect | 312 | import inspect |
313 | 313 | ||
314 | if action == "wait_for_recent": | 314 | if action == "wait_for_recent": |
315 | method = portfolio.Portfolio.wait_for_recent | 315 | method = Portfolio.wait_for_recent |
316 | elif action == "prepare_trades": | 316 | elif action == "prepare_trades": |
317 | method = self.market.prepare_trades | 317 | method = self.market.prepare_trades |
318 | elif action == "prepare_orders": | 318 | elif action == "prepare_orders": |
@@ -345,8 +345,4 @@ class Processor: | |||
345 | def run_action(self, action, default_args, kwargs): | 345 | def run_action(self, action, default_args, kwargs): |
346 | method, args = self.parse_args(action, default_args, kwargs) | 346 | method, args = self.parse_args(action, default_args, kwargs) |
347 | 347 | ||
348 | if action == "wait_for_recent": | 348 | method(**args) |
349 | method(self.market, **args) | ||
350 | else: | ||
351 | method(**args) | ||
352 | |||