This commit is contained in:
dsyoon
2023-01-27 11:15:27 +09:00
parent 9fe73b1479
commit ae978a6f24

View File

@@ -627,7 +627,7 @@ class Bithumb_minute(HTS):
tmp = self.bithumb.get_balance(ticker)
balance = tmp[2]
#count = round((balance * (bsLine['buy_weight'][len(bsLine['buy_weight']) - 1] / 100)) / bsLine['buy'][len(bsLine['buy']) - 1], 2)
count = round(self.MAX_BUY_PRICE / bsLine['buy_weight'][len(bsLine['buy_weight']) - 1], 2)
count = round(self.MAX_BUY_PRICE / 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')
if len(stock1['close']) > 0:
@@ -680,9 +680,9 @@ class Bithumb_minute(HTS):
dirName = os.path.join(RESOURCE_PATH, 'analysis', 'bithumb')
self.writeFile(dirName, ticker, stock1, bsLine, 'sell')
else:
dirName = os.path.join(RESOURCE_PATH, 'analysis', 'bithumb')
self.writeFile(dirName, ticker, stock1, bsLine)
#else:
# dirName = os.path.join(RESOURCE_PATH, 'analysis', 'bithumb')
# self.writeFile(dirName, ticker, stock1, bsLine)
return