diff --git a/stock_monitor.py b/stock_monitor.py index ca9c2ee..3a1408a 100644 --- a/stock_monitor.py +++ b/stock_monitor.py @@ -345,7 +345,7 @@ def get_coin_saved_data(symbol, interval, data): conn = sqlite3.connect('coins.db') cursor = conn.cursor() - for i in range(2, len(data)): + for i in range(1, len(data)): cursor.execute("SELECT * from " + symbol + " where CODE = ? and ymdhms = ? and interval = ?", (symbol, data['datetime'].iloc[-i].strftime('%Y-%m-%d %H:%M:%S'), interval)) arr = cursor.fetchone() if not arr: @@ -541,4 +541,5 @@ def run_schedule(): if __name__ == "__main__": - run_schedule() + #run_schedule() + monitor_coins()