volatility db dump

This commit is contained in:
Nicolás Sánchez 2024-11-05 18:08:36 -03:00
parent 8166ffc82f
commit 83fb5f7135
2 changed files with 30 additions and 1 deletions

9
.gitignore vendored
View File

@ -11,6 +11,13 @@ utils/close.py
utils/credentials.py
utils/set_exchange.py
utils/stuff.py
logs/*.log
logs/binance.log
logs/okex.log
logs/gateio.log
logs/kucoin.log
upload_testnet.sh
upload_mainnet.sh
utils/data/binance.db
utils/data/okex.db
utils/data/gateio.db
utils/data/kucoin.db

22
utils/data/db_read.py Normal file
View File

@ -0,0 +1,22 @@
import sqlite3
import sys
# Connect to the SQLite database
conn = sqlite3.connect(f"{sys.argv[1]}.db")
cursor = conn.cursor()
# Execute a SELECT query to retrieve data from the database
cursor.execute('SELECT * FROM volatilities_table')
# Fetch all rows from the result set
rows = cursor.fetchall()
# Print the data
for row in rows:
print(row)
#data = json.loads(rows[-3][-1])
#print(data[-1])
#print(f"Number of entries: {len(rows)}")
# Close the connection
conn.close()