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