Fetch live OHLCV data from a crypto exchange and run a PyneCore indicator on it in real time. No API keys needed — uses public market data.
uv run run.pyThis will:
- Fetch 100 historical BTC/USDT 1h candles from Binance
- Run RSI on the historical data (warmup)
- Poll for new candles every 10 seconds and process them live
Edit the constants at the top of run.py:
EXCHANGE = "binance" # any CCXT-supported exchange
SYMBOL = "BTC/USDT" # trading pair
TIMEFRAME = "1h" # candle timeframe
HISTORY_BARS = 100 # historical bars for indicator warmup
LIVE_UPDATES = 5 # number of live poll cycles
POLL_INTERVAL_SEC = 10 # seconds between pollsCCXT supports 100+ exchanges. Just change the EXCHANGE variable:
EXCHANGE = "coinbase" # Coinbase
EXCHANGE = "kraken" # Kraken
EXCHANGE = "bybit" # Bybit
EXCHANGE = "okx" # OKX- Replace polling with websocket streaming for real-time updates
- Add multiple indicators by creating more scripts
- Connect to a trading bot (see
05-freqtrade/for a complete example)