aboutsummaryrefslogtreecommitdiff
path: root/helper.py
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-02-24 23:35:40 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2018-02-25 01:35:28 +0100
commiteb9c92e155941b51042ba57e23f651454bd8e55a (patch)
tree8de8ed33394777aec4b538275ffa319368086bed /helper.py
parent17ff995eb623dcaea579e33e507091d6169c52e5 (diff)
downloadTrader-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.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/helper.py b/helper.py
index d9c69cc..fa92ac7 100644
--- a/helper.py
+++ b/helper.py
@@ -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
130def reset_all():
131 # use them as regular classes, sub-object of market
132 ReportStore.logs = []
133 BalanceStore.all = {}
134 TradeStore.all = []
135
130def process_sell_needed__1_sell(market, liquidity="medium", base_currency="BTC", debug=False): 136def 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")