Initial commit: BTC Bot with dashboard, TA analysis, and 14 timeframes
This commit is contained in:
36
scripts/backfill.sh
Normal file
36
scripts/backfill.sh
Normal file
@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
# Backfill script for Hyperliquid historical data
|
||||
# Usage: ./backfill.sh [coin] [days|max] [intervals...]
|
||||
# Examples:
|
||||
# ./backfill.sh BTC 7 "1m" # Last 7 days of 1m candles
|
||||
# ./backfill.sh BTC max "1m 1h 1d" # Maximum available data for all intervals
|
||||
|
||||
set -e
|
||||
|
||||
COIN=${1:-BTC}
|
||||
DAYS=${2:-7}
|
||||
INTERVALS=${3:-"1m"}
|
||||
|
||||
echo "=== Hyperliquid Historical Data Backfill ==="
|
||||
echo "Coin: $COIN"
|
||||
if [ "$DAYS" == "max" ]; then
|
||||
echo "Mode: MAXIMUM (up to 5000 candles per interval)"
|
||||
else
|
||||
echo "Days: $DAYS"
|
||||
fi
|
||||
echo "Intervals: $INTERVALS"
|
||||
echo ""
|
||||
|
||||
# Change to project root
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# Run backfill inside Docker container
|
||||
docker exec btc_collector python -m src.data_collector.backfill \
|
||||
--coin "$COIN" \
|
||||
--days "$DAYS" \
|
||||
--intervals $INTERVALS \
|
||||
--db-host localhost \
|
||||
--db-port 5433
|
||||
|
||||
echo ""
|
||||
echo "=== Backfill Complete ==="
|
||||
Reference in New Issue
Block a user