init
This commit is contained in:
@@ -11,6 +11,11 @@ class MonitorCoin (Monitor):
|
||||
super().__init__(cooldown_file)
|
||||
|
||||
def monitor_coins(self) -> None:
|
||||
tmps = self.getBalances()
|
||||
balances = {}
|
||||
for tmp in tmps:
|
||||
balances[tmp['currency']] = {'balance': float(tmp['balance']), 'avg_buy_price': float(tmp['avg_buy_price'])}
|
||||
|
||||
print("[{}] KRW COINs: {}".format(datetime.now().strftime('%Y-%m-%d %H:%M:%S'), ','.join(KR_COINS.keys())))
|
||||
for symbol in KR_COINS:
|
||||
interval = 60
|
||||
@@ -21,7 +26,7 @@ class MonitorCoin (Monitor):
|
||||
recent_inverseData = self.check_point(symbol, inverseData)
|
||||
if recent_inverseData['point'].iloc[-1] != 1:
|
||||
continue
|
||||
sell_success = self.sell_ticker_1h(symbol, recent_inverseData)
|
||||
sell_success = self.sell_ticker_1h(symbol, recent_inverseData, balances)
|
||||
if not sell_success:
|
||||
continue
|
||||
|
||||
|
||||
@@ -11,6 +11,11 @@ class MonitorCoin (Monitor):
|
||||
super().__init__(cooldown_file)
|
||||
|
||||
def monitor_coins(self) -> None:
|
||||
tmps = self.getBalances()
|
||||
balances = {}
|
||||
for tmp in tmps:
|
||||
balances[tmp['currency']] = {'balance': float(tmp['balance']), 'avg_buy_price': float(tmp['avg_buy_price'])}
|
||||
|
||||
for symbol in KR_COINS_2:
|
||||
print("[{}] {}".format(datetime.now().strftime('%Y-%m-%d %H:%M:%S'), symbol))
|
||||
interval = 60
|
||||
@@ -21,7 +26,7 @@ class MonitorCoin (Monitor):
|
||||
recent_inverseData = self.check_point(symbol, inverseData)
|
||||
if recent_inverseData['point'].iloc[-1] != 1:
|
||||
continue
|
||||
sell_success = self.sell_ticker_1h(symbol, recent_inverseData)
|
||||
sell_success = self.sell_ticker_1h(symbol, recent_inverseData, balances)
|
||||
if not sell_success:
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user