diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-02-24 23:35:40 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-02-25 01:35:28 +0100 |
commit | eb9c92e155941b51042ba57e23f651454bd8e55a (patch) | |
tree | 8de8ed33394777aec4b538275ffa319368086bed /helper.py | |
parent | 17ff995eb623dcaea579e33e507091d6169c52e5 (diff) | |
download | Trader-eb9c92e155941b51042ba57e23f651454bd8e55a.tar.gz Trader-eb9c92e155941b51042ba57e23f651454bd8e55a.tar.zst Trader-eb9c92e155941b51042ba57e23f651454bd8e55a.zip |
Add main running file and fetch information from database
Diffstat (limited to 'helper.py')
-rw-r--r-- | helper.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -127,6 +127,12 @@ def print_balances(market, base_currency="BTC"): | |||
127 | ReportStore.print_log("total:") | 127 | ReportStore.print_log("total:") |
128 | ReportStore.print_log(sum(BalanceStore.in_currency(base_currency, market).values())) | 128 | ReportStore.print_log(sum(BalanceStore.in_currency(base_currency, market).values())) |
129 | 129 | ||
130 | def reset_all(): | ||
131 | # use them as regular classes, sub-object of market | ||
132 | ReportStore.logs = [] | ||
133 | BalanceStore.all = {} | ||
134 | TradeStore.all = [] | ||
135 | |||
130 | def process_sell_needed__1_sell(market, liquidity="medium", base_currency="BTC", debug=False): | 136 | def process_sell_needed__1_sell(market, liquidity="medium", base_currency="BTC", debug=False): |
131 | ReportStore.log_stage("process_sell_needed__1_sell_begin") | 137 | ReportStore.log_stage("process_sell_needed__1_sell_begin") |
132 | BalanceStore.fetch_balances(market, tag="process_sell_needed__1_sell_begin") | 138 | BalanceStore.fetch_balances(market, tag="process_sell_needed__1_sell_begin") |