MCPInstall

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.

Installs
557
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/marketcalls/openalgo-indicator-skills --skill live-feed
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads live-feed automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

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

FAQ

What does the live-feed skill do?

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.

How do I install live-feed?

Run npx skills add https://github.com/marketcalls/openalgo-indicator-skills --skill live-feed in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/live-feed/ (personal) or .claude/skills/live-feed/ (project).

Which AI agents can use live-feed?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is live-feed safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains live-feed?

It is published by marketcalls in marketcalls/openalgo-indicator-skills. It has 557 recorded installs.

More from marketcalls/openalgo-indicator-skills

View all →

indicator-expert

marketcalls/openalgo-indicator-skills

OpenAlgo indicator expert. Use when user asks about technical indicators, charting, plotting indicators, creating custom indicators, building dashboards, real-time feeds, scanning stocks, indicator combinations, or using openalgo.ta. Also triggers for indicator functions (sma, ema, rsi, macd, supertrend, bollinger, atr, adx, ichimoku, stochastic, obv, vwap, crossover, crossunder, exrem).

667 installs

indicator-chart

marketcalls/openalgo-indicator-skills

Chart any technical indicator on a symbol using Plotly. Creates interactive dark-themed charts with candlestick, overlays, and subplots. Supports all 100+ openalgo.ta indicators.

665 installs

indicator-scanner

marketcalls/openalgo-indicator-skills

Scan multiple symbols with indicator conditions. Find stocks matching RSI oversold, EMA crossovers, Supertrend signals, and custom filter combinations.

582 installs

indicator-dashboard

marketcalls/openalgo-indicator-skills

Build a web dashboard for technical indicator analysis using Plotly Dash or Streamlit. Supports single-symbol, multi-symbol, and multi-timeframe layouts with real-time refresh.

Data & Databases571 installs

custom-indicator

marketcalls/openalgo-indicator-skills

Create a custom technical indicator using vectorized NumPy on top of openalgo's Rust-core ta primitives. Generates production-grade, O(n) indicator functions with charting and benchmarking.

Backend & APIs570 installs

indicator-setup

marketcalls/openalgo-indicator-skills

Set up the Python environment for OpenAlgo indicator analysis. Installs openalgo, plotly, dash, streamlit, yfinance, matplotlib, seaborn, and creates the project folder structure.

552 installs

Popular other skills

View category →

hyperframes-cli

heygen-com/hyperframes

The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.

1.3M installs

triage

mattpocock/skills

Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.

1M installs

ask-matt

mattpocock/skills

Ask which skill or flow fits your situation. A router over the skills in this repo.

778.4K installs

to-questionnaire

mattpocock/skills

Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

508.9K installs

wait-what

mattpocock/skills

Stop. That last message did not land: re-pitch it.

459.7K installs

loop-me

mattpocock/skills

Grill me about specs for the workflows I want to build, within this workspace.

447.9K installs