live-feed
Set up real-time indicator computation on live WebSocket market data. Streams LTP/Quote/Depth and computes indicators in real-time with optional Plotly live charting.
By marketcalls · 469 installs
npx skills add marketcalls/openalgo-indicator-skills --skill live-feed
Source repository · Upstream listing
Create a real time indicator feed using OpenAlgo WebSocket streaming.
Arguments
Parse $ARGUMENTS as: symbol exchange mode
$0 = symbol (e.g., SBIN, RELIANCE, NIFTY). Default: SBIN
$1 = exchange (e.g., NSE, NSE INDEX). Default: NSE
$2 = mode (e.g., ltp, quote, depth, multi). Default: quote
If no arguments, ask user for symbol and what data they want.
Instructions
1. Read the indicator expert rules, especially:
rules/websocket feeds.md — WebSocket connection and subscription
rules/data fetching.md — Historical data for buffer initialization
2. Create charts/live/ directory (on demand)
3. Create {symbol} live feed.py
4. Use the template from rules/assets/live feed/template.py
Feed Types
ltp — Last Traded Price + Indicators
Subscribe to LTP feed
Maintain rolling buffer (last 200 ticks)
Compute EMA, RSI on buffer
Print real time indicator values
quote — Full Quote + Indicators
Subscribe to Quote feed
Display OHLC + LTP + Volume
Compute indicators on close buffer
Color coded output (bullish/bearish)
depth — Market Depth Analysis
Subscribe to Depth feed
Display L5 bid/ask book
Compute bid ask spread, order imbalance
Show total buy vs sell quantity
multi — Multi Symbol Feed
Subscribe to multiple symbols
Display watchlist table with LTP and key indicator
Auto refresh display
Script Structure
Cleanup
The script must:
Handle Ctrl+C gracefully
Unsubscribe from all feeds
Disconnect WebSocket
Print summary of session duration and bars processed
Verbose Levels
Inform user about verbose options:
verbose=0 : Silent mode (errors only)
verbose=1 : Connection and subscription logs
verbose=2 : All data updates (debug mode)
Example Usage
/live feed SBIN NSE ltp
/live feed NIFTY NSE INDEX quote
/live feed SBIN NSE depth
/live feed multi NSE