init
This commit is contained in:
@@ -57,9 +57,6 @@ KR_COINS_1 = {
|
|||||||
"BONK": "BONK",
|
"BONK": "BONK",
|
||||||
"ENA": "ETHENA",
|
"ENA": "ETHENA",
|
||||||
"HBAR": "HBAR",
|
"HBAR": "HBAR",
|
||||||
}
|
|
||||||
|
|
||||||
KR_COINS_2 = {
|
|
||||||
"KAIA": "KAIA",
|
"KAIA": "KAIA",
|
||||||
"LINK": "Chainlink",
|
"LINK": "Chainlink",
|
||||||
"ONDO": "ONDO",
|
"ONDO": "ONDO",
|
||||||
@@ -68,16 +65,13 @@ KR_COINS_2 = {
|
|||||||
"POL": "POL",
|
"POL": "POL",
|
||||||
}
|
}
|
||||||
|
|
||||||
KR_COINS_3 = {
|
KR_COINS_2 = {
|
||||||
"SAND": "Sandbox",
|
"SAND": "Sandbox",
|
||||||
"SEI": "SEI",
|
"SEI": "SEI",
|
||||||
"SHIB": "Shiba Inu",
|
"SHIB": "Shiba Inu",
|
||||||
"STORJ": "Storj",
|
"STORJ": "Storj",
|
||||||
"SUI": "Sui Network",
|
"SUI": "Sui Network",
|
||||||
"TON": "Toncoin",
|
"TON": "Toncoin",
|
||||||
}
|
|
||||||
|
|
||||||
KR_COINS_4 = {
|
|
||||||
"TRX": "TRON",
|
"TRX": "TRON",
|
||||||
"UXLINK": "UXLINK",
|
"UXLINK": "UXLINK",
|
||||||
"VIRTUAL": "Virtuals Protocol",
|
"VIRTUAL": "Virtuals Protocol",
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
from datetime import datetime
|
|
||||||
import time
|
|
||||||
from config import *
|
|
||||||
|
|
||||||
from monitor import Monitor
|
|
||||||
|
|
||||||
class MonitorCoin (Monitor):
|
|
||||||
"""자산(코인/주식/ETF) 모니터링 및 매수 실행 클래스"""
|
|
||||||
|
|
||||||
def __init__(self, cooldown_file: str = 'coins_buy_time.json') -> None:
|
|
||||||
super().__init__(cooldown_file)
|
|
||||||
|
|
||||||
def monitor_coins(self) -> None:
|
|
||||||
for symbol in KR_COINS_3:
|
|
||||||
print("[{}] {}".format(datetime.now().strftime('%Y-%m-%d %H:%M:%S'), symbol))
|
|
||||||
interval = 60
|
|
||||||
data = self.get_coin_some_data(symbol, interval)
|
|
||||||
if data is not None and not data.empty:
|
|
||||||
try:
|
|
||||||
data = self.calculate_technical_indicators(data)
|
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
|
||||||
continue
|
|
||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
|
||||||
if not buy_success:
|
|
||||||
continue
|
|
||||||
except Exception as e:
|
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
|
||||||
else:
|
|
||||||
print(f"Data for {symbol} is empty or None.")
|
|
||||||
|
|
||||||
time.sleep(1)
|
|
||||||
|
|
||||||
return
|
|
||||||
# ------------- Scheduler -------------
|
|
||||||
def run_schedule(self) -> None:
|
|
||||||
|
|
||||||
while True:
|
|
||||||
self.monitor_coins()
|
|
||||||
time.sleep(3)
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
MonitorCoin(cooldown_file='coins_buy_time_3.json').run_schedule()
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
from datetime import datetime
|
|
||||||
import time
|
|
||||||
from config import *
|
|
||||||
|
|
||||||
from monitor import Monitor
|
|
||||||
|
|
||||||
class MonitorCoin (Monitor):
|
|
||||||
"""자산(코인/주식/ETF) 모니터링 및 매수 실행 클래스"""
|
|
||||||
|
|
||||||
def __init__(self, cooldown_file: str = 'coins_buy_time.json') -> None:
|
|
||||||
super().__init__(cooldown_file)
|
|
||||||
|
|
||||||
def monitor_coins(self) -> None:
|
|
||||||
for symbol in KR_COINS_4:
|
|
||||||
print("[{}] {}".format(datetime.now().strftime('%Y-%m-%d %H:%M:%S'), symbol))
|
|
||||||
interval = 60
|
|
||||||
data = self.get_coin_some_data(symbol, interval)
|
|
||||||
if data is not None and not data.empty:
|
|
||||||
try:
|
|
||||||
data = self.calculate_technical_indicators(data)
|
|
||||||
recent_data = self.check_buy_point(symbol, data)
|
|
||||||
if recent_data['buy_point'].iloc[-1] != 1:
|
|
||||||
continue
|
|
||||||
buy_success = self.buy_ticker(symbol, recent_data)
|
|
||||||
if not buy_success:
|
|
||||||
continue
|
|
||||||
except Exception as e:
|
|
||||||
print(f"Error processing data for {symbol}: {str(e)}")
|
|
||||||
else:
|
|
||||||
print(f"Data for {symbol} is empty or None.")
|
|
||||||
|
|
||||||
time.sleep(1)
|
|
||||||
|
|
||||||
return
|
|
||||||
# ------------- Scheduler -------------
|
|
||||||
def run_schedule(self) -> None:
|
|
||||||
|
|
||||||
while True:
|
|
||||||
self.monitor_coins()
|
|
||||||
time.sleep(3)
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
MonitorCoin(cooldown_file='coins_buy_time_4.json').run_schedule()
|
|
||||||
Reference in New Issue
Block a user