Skip to content
Snippets Groups Projects
Commit 9e0a33ad authored by iehl1g23's avatar iehl1g23
Browse files

graph script for other cryptos, added error handling for collect data script...

graph script for other cryptos, added error handling for collect data script and sql dump with more extracted data
parent 539a904c
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
# Database credentials
DB_USER="root"
DB_PASS="password"
DB_NAME="crypto_tracker"
# Temporary file for storing the data
temp_file="bnb_temp_data.txt"
# Fetch data for the last 24 hours
mysql -u "$DB_USER" -p"$DB_PASS" -D "$DB_NAME" -e \
"SELECT UNIX_TIMESTAMP(timestamp), price FROM bnb_prices WHERE timestamp >= NOW() - INTERVAL 24 HOUR ORDER BY timestamp ASC" > "$temp_file"
# Format the data for gnuplot
tail -n +2 "$temp_file" > "bnb_formatted_data.txt"
# Check for sufficient data
if [[ $(wc -l < bnb_formatted_data.txt) -lt 2 ]]; then
echo "Error: Not enough Binance Coin data points to plot. Try again later."
rm -f "$temp_file" "bnb_formatted_data.txt"
exit 1
fi
# Resample data
awk 'BEGIN {last_timestamp = 0} {if ($1 - last_timestamp >= 8640) {print $1, $2; last_timestamp = $1}}' bnb_formatted_data.txt > "bnb_resampled_data.txt"
# Create graph
gnuplot << EOF
set terminal pngcairo size 800,600 enhanced font 'Arial,10'
set output 'bnb_price_$(date +'%Y-%m-%d').png'
set title 'Binance Coin Price vs Time (Last 24 Hours)'
set xlabel 'Time'
set ylabel 'Price (USD)'
set timefmt "%s"
set xdata time
set format x "%H:%M"
plot 'bnb_resampled_data.txt' using 1:2 with linespoints title 'Price'
EOF
# Clean up
rm -f "$temp_file" "bnb_formatted_data.txt" "bnb_resampled_data.txt"
echo "Binance Coin price graph for the last 24 hours generated successfully!"
#!/bin/bash
# Download the HTML content
curl -s https://www.coindesk.com/price/bitcoin > btc.html
curl -s https://www.coindesk.com/price/ethereum > eth.html
curl -s https://www.coindesk.com/price/solana > sol.html
curl -s https://www.coindesk.com/price/binance-coin > bnb.html
curl -s https://www.coindesk.com/price/dogecoin > doge.html
# Helper function for error handling
handle_error() {
echo "$(date): $1" >> error.log
echo "Error: $1"
}
# Extract the current price
btcprice=$(grep -oP '\d{1,3}(?:,\d{3})*(?:\.\d+)? USD' btc.html | head -n 1)
ethprice=$(grep -oP '\d{1,3}(?:,\d{3})*(?:\.\d+)? USD' eth.html | head -n 1)
solprice=$(grep -oP '\d{1,3}(?:,\d{3})*(?:\.\d+)? USD' sol.html | head -n 1)
bnbprice=$(grep -oP '\d{1,3}(?:,\d{3})*(?:\.\d+)? USD' bnb.html | head -n 1)
dogeprice=$(grep -oP '\d{1,3}(?:,\d{3})*(?:\.\d+)? USD' doge.html | head -n 1)
# URLs and output files
declare -A crypto_urls=(
["btc"]="https://www.coindesk.com/price/bitcoin"
["eth"]="https://www.coindesk.com/price/ethereum"
["sol"]="https://www.coindesk.com/price/solana"
["bnb"]="https://www.coindesk.com/price/binance-coin"
["doge"]="https://www.coindesk.com/price/dogecoin"
)
declare -A html_files=(
["btc"]="btc.html"
["eth"]="eth.html"
["sol"]="sol.html"
["bnb"]="bnb.html"
["doge"]="doge.html"
)
# Extract all prices from the file and separate high and low explicitly
btchigh=$(grep -oP '<span class="Noto_Sans_xs_Sans-600-xs text-color-black ">\K\d{1,3}(?:,\d{3})*(?:\.\d+)? USD' btc.html | sed -n '1p')
btclow=$(grep -oP '<span class="Noto_Sans_xs_Sans-600-xs text-color-black ">\K\d{1,3}(?:,\d{3})*(?:\.\d+)? USD' btc.html | sed -n '2p')
# Download HTML content and check for errors
for key in "${!crypto_urls[@]}"; do
curl -s "${crypto_urls[$key]}" -o "${html_files[$key]}"
if [[ $? -ne 0 ]] || [[ ! -s "${html_files[$key]}" ]]; then
handle_error "Failed to download ${crypto_urls[$key]} or file is empty."
exit 1
fi
done
ethhigh=$(grep -oP '<span class="Noto_Sans_xs_Sans-600-xs text-color-black ">\K\d{1,3}(?:,\d{3})*(?:\.\d+)? USD' eth.html | sed -n '1p')
ethlow=$(grep -oP '<span class="Noto_Sans_xs_Sans-600-xs text-color-black ">\K\d{1,3}(?:,\d{3})*(?:\.\d+)? USD' eth.html | sed -n '2p')
# Extract and validate data
extract_price() {
local file=$1
local pattern=$2
local result=$(grep -oP "$pattern" "$file" | head -n 1 | sed 's/[^0-9.]//g')
if [[ -z "$result" ]]; then
handle_error "Failed to extract price data from $file"
echo "0"
else
echo "$result"
fi
}
sollow=$(grep -oP '<span class="Noto_Sans_xs_Sans-600-xs text-color-black ">\K\d{1,3}(?:,\d{3})*(?:\.\d+)? USD' sol.html | sed -n '1p')
solhigh=$(grep -oP '<span class="Noto_Sans_xs_Sans-600-xs text-color-black ">\K\d{1,3}(?:,\d{3})*(?:\.\d+)? USD' sol.html | sed -n '2p')
# Patterns for price, high, and low
price_pattern='\d{1,3}(?:,\d{3})*(?:\.\d+)? USD'
high_low_pattern='<span class="Noto_Sans_xs_Sans-600-xs text-color-black ">\K\d{1,3}(?:,\d{3})*(?:\.\d+)? USD'
bnblow=$(grep -oP '<span class="Noto_Sans_xs_Sans-600-xs text-color-black ">\K\d{1,3}(?:,\d{3})*(?:\.\d+)? USD' bnb.html | sed -n '1p')
bnbhigh=$(grep -oP '<span class="Noto_Sans_xs_Sans-600-xs text-color-black ">\K\d{1,3}(?:,\d{3})*(?:\.\d+)? USD' bnb.html | sed -n '2p')
# Extract data
btcprice=$(extract_price "btc.html" "$price_pattern")
btchigh=$(grep -oP "$high_low_pattern" btc.html | sed -n '1p' | sed 's/[^0-9.]//g')
btclow=$(grep -oP "$high_low_pattern" btc.html | sed -n '2p' | sed 's/[^0-9.]//g')
dogehigh=$(grep -oP '<span class="Noto_Sans_xs_Sans-600-xs text-color-black ">\K\d{1,3}(?:,\d{3})*(?:\.\d+)? USD' doge.html | sed -n '1p')
dogelow=$(grep -oP '<span class="Noto_Sans_xs_Sans-600-xs text-color-black ">\K\d{1,3}(?:,\d{3})*(?:\.\d+)? USD' doge.html | sed -n '2p')
ethprice=$(extract_price "eth.html" "$price_pattern")
ethhigh=$(grep -oP "$high_low_pattern" eth.html | sed -n '1p' | sed 's/[^0-9.]//g')
ethlow=$(grep -oP "$high_low_pattern" eth.html | sed -n '2p' | sed 's/[^0-9.]//g')
solprice=$(extract_price "sol.html" "$price_pattern")
solhigh=$(grep -oP "$high_low_pattern" sol.html | sed -n '2p' | sed 's/[^0-9.]//g')
sollow=$(grep -oP "$high_low_pattern" sol.html | sed -n '1p' | sed 's/[^0-9.]//g')
# Remove the "USD" text, commas and making doge have 4 dp. for proper insertion into the database
btcprice=$(echo $btcprice | sed 's/[^0-9.]//g')
btchigh=$(echo $btchigh | sed 's/[^0-9.]//g')
btclow=$(echo $btclow | sed 's/[^0-9.]//g')
ethprice=$(echo $ethprice | sed 's/[^0-9.]//g')
ethhigh=$(echo $ethhigh | sed 's/[^0-9.]//g')
ethlow=$(echo $ethlow | sed 's/[^0-9.]//g')
solprice=$(echo $solprice | sed 's/[^0-9.]//g')
solhigh=$(echo $solhigh | sed 's/[^0-9.]//g')
sollow=$(echo $sollow | sed 's/[^0-9.]//g')
bnbprice=$(echo $bnbprice | sed 's/[^0-9.]//g')
bnbhigh=$(echo $bnbhigh | sed 's/[^0-9.]//g')
bnblow=$(echo $bnblow | sed 's/[^0-9.]//g')
dogeprice=$(echo $dogeprice | sed 's/[^0-9.]//g')
dogehigh=$(echo $dogehigh | sed 's/[^0-9.]//g')
dogelow=$(echo $dogelow | sed 's/[^0-9.]//g')
bnbprice=$(extract_price "bnb.html" "$price_pattern")
bnbhigh=$(grep -oP "$high_low_pattern" bnb.html | sed -n '2p' | sed 's/[^0-9.]//g')
bnblow=$(grep -oP "$high_low_pattern" bnb.html | sed -n '1p' | sed 's/[^0-9.]//g')
# Echo the extracted values
dogeprice=$(extract_price "doge.html" "$price_pattern")
dogehigh=$(grep -oP "$high_low_pattern" doge.html | sed -n '1p' | sed 's/[^0-9.]//g')
dogelow=$(grep -oP "$high_low_pattern" doge.html | sed -n '2p' | sed 's/[^0-9.]//g')
# Validate extracted data
if [[ $btcprice == "0" || $ethprice == "0" || $solprice == "0" || $bnbprice == "0" || $dogeprice == "0" ]]; then
handle_error "One or more cryptocurrencies failed to extract valid prices. Skipping database insertion."
exit 1
fi
# Echo extracted values
echo "Bitcoin: Price=$btcprice, High=$btchigh, Low=$btclow"
echo "Ethereum: Price=$ethprice, High=$ethhigh, Low=$ethlow"
echo "Solana: Price=$solprice, High=$solhigh, Low=$sollow"
......@@ -60,7 +87,7 @@ DB_USER="root"
DB_PASS="password"
DB_NAME="crypto_tracker"
# Insert the extracted data into the respective cryptocurrency tables
# Insert data into the database
mysql -u $DB_USER -p$DB_PASS $DB_NAME <<EOF
INSERT INTO btc_prices (price, high, low) VALUES ($btcprice, $btchigh, $btclow);
INSERT INTO eth_prices (price, high, low) VALUES ($ethprice, $ethhigh, $ethlow);
......
#!/bin/bash
# Database credentials
DB_USER="root"
DB_PASS="password"
DB_NAME="crypto_tracker"
# Temporary file for storing the data
temp_file="doge_temp_data.txt"
# Fetch data for the last 24 hours
mysql -u "$DB_USER" -p"$DB_PASS" -D "$DB_NAME" -e \
"SELECT UNIX_TIMESTAMP(timestamp), price FROM doge_prices WHERE timestamp >= NOW() - INTERVAL 24 HOUR ORDER BY timestamp ASC" > "$temp_file"
# Format the data for gnuplot
tail -n +2 "$temp_file" > "doge_formatted_data.txt"
# Check for sufficient data
if [[ $(wc -l < doge_formatted_data.txt) -lt 2 ]]; then
echo "Error: Not enough Dogecoin data points to plot. Try again later."
rm -f "$temp_file" "doge_formatted_data.txt"
exit 1
fi
# Resample data
awk 'BEGIN {last_timestamp = 0} {if ($1 - last_timestamp >= 8640) {print $1, $2; last_timestamp = $1}}' doge_formatted_data.txt > "doge_resampled_data.txt"
# Create graph
gnuplot << EOF
set terminal pngcairo size 800,600 enhanced font 'Arial,10'
set output 'doge_price_$(date +'%Y-%m-%d').png'
set title 'Dogecoin Price vs Time (Last 24 Hours)'
set xlabel 'Time'
set ylabel 'Price (USD)'
set timefmt "%s"
set xdata time
set format x "%H:%M"
plot 'doge_resampled_data.txt' using 1:2 with linespoints title 'Price'
EOF
# Clean up
rm -f "$temp_file" "doge_formatted_data.txt" "doge_resampled_data.txt"
echo "Dogecoin price graph for the last 24 hours generated successfully!"
#!/bin/bash
# Database credentials
DB_USER="root"
DB_PASS="password"
DB_NAME="crypto_tracker"
# Temporary file for storing the data
temp_file="eth_temp_data.txt"
# Fetch data for the last 24 hours
mysql -u "$DB_USER" -p"$DB_PASS" -D "$DB_NAME" -e \
"SELECT UNIX_TIMESTAMP(timestamp), price FROM eth_prices WHERE timestamp >= NOW() - INTERVAL 24 HOUR ORDER BY timestamp ASC" > "$temp_file"
# Format the data for gnuplot (remove the first line containing column names)
tail -n +2 "$temp_file" > "eth_formatted_data.txt"
# Check if there's enough data
if [[ $(wc -l < eth_formatted_data.txt) -lt 2 ]]; then
echo "Error: Not enough Ethereum data points to plot. Try again later."
rm -f "$temp_file" "eth_formatted_data.txt"
exit 1
fi
# Resample the data to get one point every 2.4 hours (8640 seconds)
awk 'BEGIN {last_timestamp = 0} {if ($1 - last_timestamp >= 8640) {print $1, $2; last_timestamp = $1}}' eth_formatted_data.txt > "eth_resampled_data.txt"
# Create plots using gnuplot
gnuplot << EOF
set terminal pngcairo size 800,600 enhanced font 'Arial,10'
set output 'eth_price_$(date +'%Y-%m-%d').png'
set title 'Ethereum Price vs Time (Last 24 Hours)'
set xlabel 'Time'
set ylabel 'Price (USD)'
set timefmt "%s"
set xdata time
set format x "%H:%M"
plot 'eth_resampled_data.txt' using 1:2 with linespoints title 'Price'
EOF
# Clean up
rm -f "$temp_file" "eth_formatted_data.txt" "eth_resampled_data.txt"
echo "Ethereum price graph for the last 24 hours generated successfully!"
#!/bin/bash
# Database credentials
DB_USER="root"
DB_PASS="password"
DB_NAME="crypto_tracker"
# Temporary file for storing the data
temp_file="sol_temp_data.txt"
# Fetch data for the last 24 hours
mysql -u "$DB_USER" -p"$DB_PASS" -D "$DB_NAME" -e \
"SELECT UNIX_TIMESTAMP(timestamp), price FROM sol_prices WHERE timestamp >= NOW() - INTERVAL 24 HOUR ORDER BY timestamp ASC" > "$temp_file"
# Format the data for gnuplot
tail -n +2 "$temp_file" > "sol_formatted_data.txt"
# Check for sufficient data
if [[ $(wc -l < sol_formatted_data.txt) -lt 2 ]]; then
echo "Error: Not enough Solana data points to plot. Try again later."
rm -f "$temp_file" "sol_formatted_data.txt"
exit 1
fi
# Resample data
awk 'BEGIN {last_timestamp = 0} {if ($1 - last_timestamp >= 8640) {print $1, $2; last_timestamp = $1}}' sol_formatted_data.txt > "sol_resampled_data.txt"
# Create graph
gnuplot << EOF
set terminal pngcairo size 800,600 enhanced font 'Arial,10'
set output 'sol_price_$(date +'%Y-%m-%d').png'
set title 'Solana Price vs Time (Last 24 Hours)'
set xlabel 'Time'
set ylabel 'Price (USD)'
set timefmt "%s"
set xdata time
set format x "%H:%M"
plot 'sol_resampled_data.txt' using 1:2 with linespoints title 'Price'
EOF
# Clean up
rm -f "$temp_file" "sol_formatted_data.txt" "sol_resampled_data.txt"
echo "Solana price graph for the last 24 hours generated successfully!"
-- MySQL dump 10.13 Distrib 8.0.40, for Linux (x86_64)
--
-- Host: localhost Database: crypto_tracker
-- ------------------------------------------------------
-- Server version 8.0.40-0ubuntu0.24.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `bnb_prices`
--
DROP TABLE IF EXISTS `bnb_prices`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `bnb_prices` (
`id` int NOT NULL AUTO_INCREMENT,
`timestamp` datetime DEFAULT CURRENT_TIMESTAMP,
`price` decimal(10,2) DEFAULT NULL,
`high` decimal(10,2) DEFAULT NULL,
`low` decimal(10,2) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `bnb_prices`
--
LOCK TABLES `bnb_prices` WRITE;
/*!40000 ALTER TABLE `bnb_prices` DISABLE KEYS */;
INSERT INTO `bnb_prices` VALUES (4,'2024-12-16 22:03:32',711.04,724.47,704.00),(5,'2024-12-17 02:24:10',725.55,726.08,704.00),(6,'2024-12-17 04:48:10',727.72,730.17,704.00),(7,'2024-12-17 07:12:08',725.57,730.17,704.00),(8,'2024-12-17 09:36:10',717.78,730.17,704.00),(9,'2024-12-17 12:00:08',718.13,730.17,704.00),(10,'2024-12-17 14:24:09',717.07,730.17,704.00),(11,'2024-12-17 16:48:09',716.27,730.17,704.00),(12,'2024-12-17 19:12:09',721.09,730.17,704.00),(13,'2024-12-17 21:36:14',721.86,730.17,704.38),(14,'2024-12-18 00:00:10',726.07,736.71,712.57),(15,'2024-12-19 00:00:11',716.54,736.28,703.37),(16,'2024-12-19 02:24:10',709.75,736.28,703.37),(17,'2024-12-19 04:48:09',693.73,736.28,685.06),(18,'2024-12-19 07:12:09',709.75,736.28,703.37),(19,'2024-12-19 09:36:10',689.64,721.98,685.06),(20,'2024-12-19 12:00:09',677.66,720.24,676.55),(21,'2024-12-19 14:24:09',699.95,720.24,669.84),(22,'2024-12-19 15:20:35',702.35,720.24,669.84);
/*!40000 ALTER TABLE `bnb_prices` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `btc_prices`
--
DROP TABLE IF EXISTS `btc_prices`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `btc_prices` (
`id` int NOT NULL AUTO_INCREMENT,
`timestamp` datetime DEFAULT CURRENT_TIMESTAMP,
`price` decimal(10,2) DEFAULT NULL,
`high` decimal(10,2) DEFAULT NULL,
`low` decimal(10,2) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `btc_prices`
--
LOCK TABLES `btc_prices` WRITE;
/*!40000 ALTER TABLE `btc_prices` DISABLE KEYS */;
INSERT INTO `btc_prices` VALUES (24,'2024-12-16 22:03:32',103890.27,106495.73,102559.85),(25,'2024-12-17 02:24:10',107391.93,107461.42,102623.83),(26,'2024-12-17 04:48:10',106227.50,107778.43,102623.83),(27,'2024-12-17 07:12:08',105780.49,107778.43,103349.10),(28,'2024-12-17 09:36:10',106207.81,107778.43,103349.10),(29,'2024-12-17 12:00:08',106819.52,107778.43,103349.10),(30,'2024-12-17 14:24:09',106705.02,107778.43,103349.10),(31,'2024-12-17 16:48:09',107365.28,107778.43,103349.10),(32,'2024-12-17 19:12:09',107207.79,107778.43,103349.10),(33,'2024-12-17 21:36:14',107519.39,107778.43,103857.58),(34,'2024-12-18 00:00:10',106319.74,108266.71,105511.33),(35,'2024-12-19 00:00:11',104457.02,107652.45,103269.67),(36,'2024-12-19 02:24:10',104824.75,106983.81,103269.67),(37,'2024-12-19 04:48:09',100735.80,106800.16,100439.03),(38,'2024-12-19 07:12:09',100894.77,106498.31,100439.03),(39,'2024-12-19 09:36:10',100400.84,105661.59,100052.35),(40,'2024-12-19 12:00:09',101241.37,105353.05,98868.19),(41,'2024-12-19 14:24:09',101043.24,105353.05,98868.19),(42,'2024-12-19 15:20:35',101303.92,105353.05,98868.19);
/*!40000 ALTER TABLE `btc_prices` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `doge_prices`
--
DROP TABLE IF EXISTS `doge_prices`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `doge_prices` (
`id` int NOT NULL AUTO_INCREMENT,
`timestamp` datetime DEFAULT CURRENT_TIMESTAMP,
`price` decimal(10,4) DEFAULT NULL,
`high` decimal(10,4) DEFAULT NULL,
`low` decimal(10,4) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `doge_prices`
--
LOCK TABLES `doge_prices` WRITE;
/*!40000 ALTER TABLE `doge_prices` DISABLE KEYS */;
INSERT INTO `doge_prices` VALUES (2,'2024-12-16 22:03:32',0.3970,0.4144,0.3927),(3,'2024-12-17 02:24:10',0.4108,0.4144,0.3927),(4,'2024-12-17 04:48:10',0.4055,0.4144,0.3927),(5,'2024-12-17 07:12:08',0.4036,0.4144,0.3927),(6,'2024-12-17 09:36:10',0.3997,0.4135,0.3927),(7,'2024-12-17 12:00:08',0.4035,0.4135,0.3927),(8,'2024-12-17 14:24:09',0.3998,0.4135,0.3927),(9,'2024-12-17 16:48:09',0.4005,0.4135,0.3927),(10,'2024-12-17 19:12:09',0.4050,0.4135,0.3931),(11,'2024-12-17 21:36:14',0.4066,0.4135,0.3961),(12,'2024-12-18 00:00:10',0.3988,0.4135,0.3961),(13,'2024-12-19 00:00:11',0.3855,0.4040,0.3795),(14,'2024-12-19 02:24:10',0.3866,0.4022,0.3795),(15,'2024-12-19 04:48:09',0.3604,0.4013,0.3561),(16,'2024-12-19 07:12:09',0.3585,0.3971,0.3561),(17,'2024-12-19 09:36:10',0.3576,0.3940,0.3561),(18,'2024-12-19 12:00:09',0.3649,0.3909,0.3418),(19,'2024-12-19 14:24:09',0.3623,0.3909,0.3418),(20,'2024-12-19 15:20:35',0.3630,0.3909,0.3418);
/*!40000 ALTER TABLE `doge_prices` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `eth_prices`
--
DROP TABLE IF EXISTS `eth_prices`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `eth_prices` (
`id` int NOT NULL AUTO_INCREMENT,
`timestamp` datetime DEFAULT CURRENT_TIMESTAMP,
`price` decimal(10,2) DEFAULT NULL,
`high` decimal(10,2) DEFAULT NULL,
`low` decimal(10,2) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `eth_prices`
--
LOCK TABLES `eth_prices` WRITE;
/*!40000 ALTER TABLE `eth_prices` DISABLE KEYS */;
INSERT INTO `eth_prices` VALUES (4,'2024-12-16 22:03:32',3901.56,4021.19,3846.70),(5,'2024-12-17 02:24:10',4045.98,4049.18,3846.70),(6,'2024-12-17 04:48:10',4052.21,4106.39,3846.70),(7,'2024-12-17 07:12:08',4019.71,4106.39,3884.82),(8,'2024-12-17 09:36:10',3981.74,4106.39,3884.82),(9,'2024-12-17 12:00:08',4033.30,4106.39,3884.82),(10,'2024-12-17 14:24:09',4012.41,4106.39,3884.82),(11,'2024-12-17 16:48:09',4011.46,4106.39,3884.82),(12,'2024-12-17 19:12:09',4015.87,4106.39,3884.82),(13,'2024-12-17 21:36:14',4013.91,4106.39,3897.83),(14,'2024-12-18 00:00:10',3937.71,4106.39,3920.68),(15,'2024-12-19 00:00:11',3870.96,3984.60,3806.96),(16,'2024-12-19 02:24:10',3878.43,3954.26,3806.96),(17,'2024-12-19 04:48:09',3692.47,3950.81,3673.89),(18,'2024-12-19 07:12:09',3655.42,3904.19,3647.32),(19,'2024-12-19 09:36:10',3629.08,3901.77,3618.85),(20,'2024-12-19 12:00:09',3670.54,3901.77,3551.13),(21,'2024-12-19 14:24:09',3667.75,3901.77,3551.13),(22,'2024-12-19 15:20:35',3683.06,3901.77,3551.13);
/*!40000 ALTER TABLE `eth_prices` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `sol_prices`
--
DROP TABLE IF EXISTS `sol_prices`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sol_prices` (
`id` int NOT NULL AUTO_INCREMENT,
`timestamp` datetime DEFAULT CURRENT_TIMESTAMP,
`price` decimal(10,2) DEFAULT NULL,
`high` decimal(10,2) DEFAULT NULL,
`low` decimal(10,2) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `sol_prices`
--
LOCK TABLES `sol_prices` WRITE;
/*!40000 ALTER TABLE `sol_prices` DISABLE KEYS */;
INSERT INTO `sol_prices` VALUES (4,'2024-12-16 22:03:32',216.13,227.24,213.38),(5,'2024-12-17 02:24:10',219.23,227.24,213.38),(6,'2024-12-17 04:48:10',217.20,227.24,213.38),(7,'2024-12-17 07:12:08',217.94,227.24,213.38),(8,'2024-12-17 09:36:10',214.47,225.59,211.68),(9,'2024-12-17 12:00:08',215.48,223.80,211.68),(10,'2024-12-17 14:24:09',214.74,223.80,211.68),(11,'2024-12-17 16:48:09',217.26,221.70,211.68),(12,'2024-12-17 19:12:09',222.61,223.70,211.68),(13,'2024-12-17 21:36:14',224.87,227.47,211.68),(14,'2024-12-18 00:00:10',219.99,227.47,211.68),(15,'2024-12-19 00:00:11',217.24,228.93,213.82),(16,'2024-12-19 02:24:10',216.42,228.93,213.82),(17,'2024-12-19 04:48:09',208.95,226.73,207.75),(18,'2024-12-19 07:12:09',207.87,226.11,206.11),(19,'2024-12-19 09:36:10',205.47,220.36,204.98),(20,'2024-12-19 12:00:09',208.33,218.98,199.84),(21,'2024-12-19 14:24:09',209.45,218.98,199.84),(22,'2024-12-19 15:20:35',210.77,218.98,199.84);
/*!40000 ALTER TABLE `sol_prices` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2024-12-19 15:21:51
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment