Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
marketcalls avatar

Live Feed

  • 382 installs
  • 13 repo stars
  • Updated June 12, 2026
  • marketcalls/openalgo-indicator-skills

live-feed is a Claude Code skill that connects OpenAlgo to live market WebSocket and REST streams, normalizes ticks, handles reconnects, and fans real-time quotes to indicators and Plotly charts for developers who need s

About

live-feed is an agent skill from marketcalls/openalgo-indicator-skills that sets up real-time indicator computation on OpenAlgo WebSocket market data. The skill parses symbol, exchange, and mode arguments—defaulting to SBIN on NSE in quote mode—and supports ltp, quote, depth, and multi stream types. It normalizes incoming ticks, manages reconnect logic, and fans quotes out to indicator pipelines with optional Plotly live charting. Allowed tools include Read, Write, Edit, Bash, Glob, Grep, and AskUserQuestion for end-to-end feed wiring. Developers reach for live-feed when charts and indicators must update on every tick instead of polling REST endpoints. The workflow yields a running stream handler, normalized tick pipeline, and live chart hooks ready for downstream indicator jobs.

  • WebSocket subscription lifecycle
  • Tick normalization and symbol mapping
  • Reconnect and backoff strategies
  • Rate-limit and auth handling
  • Fan-out to indicators and UI

Live Feed by the numbers

  • 382 all-time installs (skills.sh)
  • +21 installs in the week ending Aug 2, 2026 (Skillselion tracking)
  • Ranked #1,137 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/marketcalls/openalgo-indicator-skills --skill live-feed

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs382
repo stars13
Last updatedJune 12, 2026
Repositorymarketcalls/openalgo-indicator-skills

How do you stream live ticks into OpenAlgo indicators?

Connect OpenAlgo to live market feeds via WebSocket or REST streams, normalize ticks, handle reconnects, and fan out real-time quotes to indicators and charts.

Who is it for?

Developers building real-time OpenAlgo indicator pipelines that must survive reconnects and support multiple stream modes.

Skip if: Skip live-feed when you only need historical backtests or a static dashboard without streaming market data.

When should I use this skill?

The user asks to connect OpenAlgo to live WebSocket or REST feeds, stream LTP/quote/depth, or chart real-time ticks.

What you get

WebSocket feed handler, normalized tick pipeline, reconnect logic, and optional Plotly live chart wiring.

  • Live feed handler
  • Tick normalization pipeline

By the numbers

  • Supports 4 WebSocket stream modes: ltp, quote, depth, and multi
  • Default stream targets SBIN on NSE exchange in quote mode

Files

SKILL.mdMarkdownGitHub ↗

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

"""
Real-Time Indicator Feed for {SYMBOL}
Mode: {mode}
"""
import os
import time
import numpy as np
from datetime import datetime, timedelta
from dotenv import find_dotenv, load_dotenv
from openalgo import api, ta

load_dotenv(find_dotenv(), override=False)

SYMBOL = "{symbol}"
EXCHANGE = "{exchange}"

client = api(
    api_key=os.getenv("OPENALGO_API_KEY"),
    host=os.getenv("OPENALGO_HOST", "http://127.0.0.1:5000"),
    verbose=1,
)

# Pre-fetch historical data for buffer initialization
df = client.history(
    symbol=SYMBOL, exchange=EXCHANGE, interval="1m",
    start_date=(datetime.now() - timedelta(days=1)).strftime("%Y-%m-%d"),
    end_date=datetime.now().strftime("%Y-%m-%d"),
)
close_buffer = list(df["close"].values[-200:])

instruments = [{"exchange": EXCHANGE, "symbol": SYMBOL}]

def on_data(data):
    ltp = data["data"].get("ltp")
    if ltp is None:
        return

    close_buffer.append(float(ltp))
    if len(close_buffer) > 200:
        close_buffer.pop(0)

    if len(close_buffer) >= 20:
        arr = np.array(close_buffer, dtype=np.float64)
        ema_val = ta.ema(arr, 20)[-1]
        rsi_val = ta.rsi(arr, 14)[-1] if len(arr) >= 15 else float("nan")

        timestamp = datetime.now().strftime("%H:%M:%S")
        print(f"[{timestamp}] {SYMBOL} LTP:{ltp:>10.2f} | "
              f"EMA(20):{ema_val:>10.2f} | RSI(14):{rsi_val:>6.2f}")

# Connect and subscribe
client.connect()
client.subscribe_ltp(instruments, on_data_received=on_data)

print(f"Streaming {SYMBOL} on {EXCHANGE} — Press Ctrl+C to stop")
try:
    while True:
        time.sleep(1)
except KeyboardInterrupt:
    print("Stopping feed...")

client.unsubscribe_ltp(instruments)
client.disconnect()

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

Related skills

How it compares

Pick live-feed over indicator-dashboard when the task is streaming and normalizing ticks rather than assembling multi-symbol alert dashboards.

FAQ

Which OpenAlgo stream modes does live-feed support?

live-feed supports OpenAlgo WebSocket modes ltp, quote, depth, and multi. Developers pass symbol, exchange, and mode arguments—defaults are SBIN on NSE in quote mode—to control the incoming tick shape.

Does live-feed include live charting?

live-feed optionally wires normalized ticks into Plotly live charts while computing indicators in real time. The skill focuses on stream setup, reconnect handling, and fan-out rather than dashboard layout.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.