From 108beeb8efe0086b2d08cba219fdf3923fdbf475 Mon Sep 17 00:00:00 2001 From: dsyoon Date: Sun, 22 Jan 2023 12:56:54 +0900 Subject: [PATCH] init --- Bithumb_minute.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Bithumb_minute.py b/Bithumb_minute.py index 72e69a9..3678352 100644 --- a/Bithumb_minute.py +++ b/Bithumb_minute.py @@ -709,6 +709,7 @@ class Bithumb_minute(HTS): count = round((balance * (bsLine['buy_weight'][len(bsLine['buy_weight']) - 1] / 100)) / bsLine['buy'][len(bsLine['buy']) - 1], 2) order = self.bithumb.buy_limit_order(ticker, bsLine['buy'][len(bsLine['buy']) - 1], count) # order: ('bid', 'BTC', 'C0101000000322993432', 'KRW') + print(ticker, "/", datetime.now().strftime('%Y-%m-%d %H:%M:%S'), "/", data['close'][len(data['close']) - 1], "/ BUY / ", data['slow_k'][len(data['slow_k']) - 1], "/", bsLine['buy'][len(bsLine['buy']) - 1], "/", count) with open(log_filename, 'a', newline='', encoding='utf-8') as log_file: wr = csv.writer(log_file) @@ -723,6 +724,7 @@ class Bithumb_minute(HTS): return count = tmp[0] order = self.bithumb.sell_limit_order(ticker, bsLine['sell'][len(bsLine['sell'])-1], count) + print(ticker, "/", datetime.now().strftime('%Y-%m-%d %H:%M:%S'), "/", data['close'][len(data['close']) - 1], "/ BUY / ", data['slow_k'][len(data['slow_k']) - 1], "/", bsLine['sell'][len(bsLine['sell']) - 1], "/", count) dirName = os.path.join(RESOURCE_PATH, 'analysis', 'bithumb') self.writeFile(dirName, ticker, data, bsLine, datetime.now().strftime('%Y%m%d %H%M%S'), 'sell')