Files
btc-trading/config/data_config.yaml

85 lines
2.0 KiB
YAML

# Data Collection Configuration
data_collection:
# Primary data source
primary_exchange: "hyperliquid"
# Assets to collect
assets:
cbBTC:
symbol: "cbBTC-PERP"
enabled: true
base_asset: "cbBTC"
quote_asset: "USD"
# Validation settings
validation:
enabled: true
tolerance_percent: 1.0 # 1% price divergence allowed
check_interval_minutes: 5
# Reference sources for cross-validation
references:
uniswap_v3:
enabled: true
chain: "base"
pool_address: "0x4f1480ba4F40f2A41a718c8699E64976b222b56d" # cbBTC/USDC
rpc_url: "https://base-mainnet.g.alchemy.com/v2/YOUR_API_KEY"
coinbase:
enabled: true
api_url: "https://api.exchange.coinbase.com"
# Intervals to collect (1m is base, others computed)
intervals:
- "1m" # Base collection
# WebSocket settings
websocket:
url: "wss://api.hyperliquid.xyz/ws"
reconnect_attempts: 10
reconnect_delays: [1, 2, 5, 10, 30, 60, 120, 300, 600, 900] # seconds
ping_interval: 30
ping_timeout: 10
# Buffer settings
buffer:
max_size: 1000 # candles in memory
flush_interval_seconds: 30
batch_size: 100
# Database settings
database:
host: "${DB_HOST}"
port: ${DB_PORT}
name: "${DB_NAME}"
user: "${DB_USER}"
password: "${DB_PASSWORD}"
pool_size: 5
max_overflow: 10
# Backfill settings
backfill:
enabled: true
max_gap_minutes: 60
rest_api_url: "https://api.hyperliquid.xyz/info"
# Quality monitoring
quality_monitor:
enabled: true
check_interval_seconds: 300 # 5 minutes
anomaly_detection:
price_change_threshold: 0.10 # 10%
volume_spike_std: 5.0 # 5 sigma
# Logging
logging:
level: "INFO"
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
file: "/app/logs/collector.log"
max_size_mb: 100
backup_count: 10
# Performance
performance:
max_cpu_percent: 80
max_memory_mb: 256