tradingview-mcp

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

TradingView MCP (Headless Market Data)

TradingView MCP(无头市场数据)

Market data via the bundled
tradingview
MCP server
— TradingView's public scanner API plus Yahoo Finance, spoken over MCP. No TradingView desktop app or account. Most tools need no API key. The server ships with this plugin (
.mcp.json
) and starts automatically; its 37 tools appear under the plugin's
tradingview
MCP namespace (load them through the client's deferred-tool mechanism when necessary).
Read-only. Nothing here places trades or mutates any account.
通过内置的
tradingview
MCP服务器
获取市场数据——整合TradingView公开扫描API与Yahoo Finance数据,通过MCP协议交互。无需TradingView桌面应用或账户。大多数工具无需API密钥。该服务器随此插件(
.mcp.json
)一同发布并自动启动;其37个工具归属于插件的
tradingview
MCP命名空间(必要时可通过客户端的延迟工具机制加载)。
只读权限。本工具不会执行任何交易操作或修改任何账户数据。

When to use this vs the other data skills

何时使用本技能 vs 其他数据技能

NeedSkill
Quotes, TA readout, indicator ratings, multi-timeframe alignmentthis skill
Exchange-wide scans: squeeze / volume breakout / gainers / losersthis skill
Futures (NQ, ES, CL, GC…) overview, movers, category quotesthis skill
Pre-market / after-hours pricethis skill
Options chain quick look (bid/ask/IV/OI, no greeks), unusual activitythis skill (fallback / positioning scan)
Options chain with greeks (delta/gamma/theta/vega), IV skew, expiries with contract counts
tradingview-reader
(desktop app)
Watchlists, alerts, TV news, chart state / screenshots, custom-column screener
tradingview-reader
(desktop app)
Rule of thumb: this skill first for anything price/TA/scan shaped — it needs zero setup and won't force a CDP relaunch of the user's TradingView app. Drop to
tradingview-reader
only for greeks or account-bound data (watchlists, alerts, charts).
需求技能
报价、技术分析读数、指标评级、多时间框架对齐本技能
全交易所扫描:收缩/成交量突破/涨幅榜/跌幅榜本技能
期货(NQ、ES、CL、GC…)概览、异动、分类报价本技能
盘前/盘后价格本技能
期权链快速查看(买价/卖价/隐含波动率/持仓量,无希腊值)、异常活动本技能(回退/持仓扫描)
带希腊值(delta/gamma/theta/vega)的期权链、隐含波动率偏度、含合约数量的到期日
tradingview-reader
(桌面应用)
观察列表、警报、TradingView新闻、图表状态/截图、自定义列筛选器
tradingview-reader
(桌面应用)
经验法则:任何与价格/技术分析/扫描相关的需求优先使用本技能——无需任何设置,也不会强制用户重启TradingView应用。仅当需要希腊值或账户绑定数据(观察列表、警报、图表)时,才使用
tradingview-reader
。

Step 1: Check requirements

步骤1:检查要求

  • uv
    installed (
    brew install uv
    ) — the server runs via
    uvx
    and self-installs on first launch (give the first call ~30s).
  • Python 3.10–3.13. The pinned upstream currently excludes Python 3.14.
  • Optional:
    MARKETAUX_API_TOKEN
    enables
    market_sentiment
    ,
    financial_news
    , and the news legs of combined analysis.
If the MCP tools are missing, ask the user to restart the agent after enabling the plugin. Do not silently replace market data with invented values.
  • 已安装
    uv
    (执行
    brew install uv
    )——服务器通过
    uvx
    运行,首次启动时会自动安装(首次调用需等待约30秒)。
  • Python版本为3.10–3.13。当前依赖的上游版本暂不支持Python 3.14。
  • 可选:
    MARKETAUX_API_TOKEN
    可启用
    market_sentiment
    、
    financial_news
    以及综合分析中的新闻模块。
若MCP工具缺失,请要求用户启用插件后重启Agent。切勿用虚构数据替代真实市场数据。

Step 2: Select the smallest useful tool set

步骤2:选择最小可用工具集

Prefer one focused call for a simple question. For a research brief, combine only the independent views that matter: price/snapshot, TA, volume, and optionally news. Avoid calling multiple overlapping TA tools merely to produce more output.
对于简单问题,优先使用单一针对性调用。对于研究需求,仅组合相关的独立视图:价格/快照、技术分析、成交量,必要时可添加新闻。避免调用多个重叠的技术分析工具来生成冗余输出。

Quotes & snapshots

报价与快照

ToolUse for
stock_prices(tickers)
Bulk quotes.
tickers
is comma-separated
EXCHANGE:SYMBOL
(e.g.
"NASDAQ:NVDA,NYSE:DELL"
), up to 1,000 rows in one call. OHLC + change%.
yahoo_price(symbol)
Single quote, Yahoo symbology:
AAPL
,
BTC-USD
,
SPY
,
^GSPC
,
^VIX
,
EURUSD=X
,
THYAO.IS
.
stock_extended_hours(symbol)
Pre-market / after-hours price for a US symbol — earnings reactions, overnight moves.
market_snapshot()
Global one-shot: major indices, top crypto, FX, key ETFs.
bitcoin_market_pulse()
BTC price + dominance + total mcap risk frame — call before analyzing any crypto.
工具适用场景
stock_prices(tickers)
批量报价。
tickers
为逗号分隔的
EXCHANGE:SYMBOL
格式(如
"NASDAQ:NVDA,NYSE:DELL"
),单次调用最多支持1000条数据。返回OHLC(开盘价/最高价/最低价/收盘价)+涨跌幅。
yahoo_price(symbol)
单一报价,采用Yahoo符号体系:
AAPL
、
BTC-USD
、
SPY
、
^GSPC
、
^VIX
、
EURUSD=X
、
THYAO.IS
。
stock_extended_hours(symbol)
美股的盘前/盘后价格——适用于财报反应、隔夜异动场景。
market_snapshot()
全球市场快照:主要指数、顶级加密货币、外汇、关键ETF。
bitcoin_market_pulse()
BTC价格+市值占比+总市值风险框架——分析任何加密货币前调用此工具。

Technical analysis (single symbol)

技术分析(单一标的)

ToolUse for
coin_analysis(symbol, exchange, timeframe)
The canonical TA readout for one stock or coin — RSI, MACD, Bollinger rating, indicator summary. Despite the name it handles stocks:
coin_analysis("NVDA", "NASDAQ", "1D")
.
multi_timeframe_analysis(symbol, exchange)
Weekly → Daily → 4H → 1H → 15m trend alignment.
combined_analysis(symbol, exchange, timeframe)
TA + news + sentiment in one call (news legs need
MARKETAUX_API_TOKEN
).
multi_agent_analysis(symbol, exchange, timeframe)
Technical vs Sentiment vs Risk "debate" summary.
volume_confirmation_analysis(symbol, exchange, timeframe)
Is the move volume-confirmed?
工具适用场景
coin_analysis(symbol, exchange, timeframe)
标准技术分析读数,适用于单只股票或加密货币——包含RSI、MACD、布林带评级、指标总结。尽管名称含“coin”,但也支持股票:
coin_analysis("NVDA", "NASDAQ", "1D")
。
multi_timeframe_analysis(symbol, exchange)
周→日→4小时→1小时→15分钟的趋势对齐分析。
combined_analysis(symbol, exchange, timeframe)
技术分析+新闻+情绪分析一体化调用(新闻模块需
MARKETAUX_API_TOKEN
)。
multi_agent_analysis(symbol, exchange, timeframe)
技术面vs情绪面vs风险面的“辩论”总结。
volume_confirmation_analysis(symbol, exchange, timeframe)
价格变动是否得到成交量确认?

Exchange-wide scans

全交易所扫描

ToolUse for
top_gainers
/
top_losers(exchange, timeframe, limit)
Movers on one exchange.
bollinger_scan(exchange, timeframe, bbw_threshold, limit)
Low-BBW squeeze candidates.
rating_filter(exchange, timeframe, rating, limit)
Filter by BB rating −3 (strong sell) … +3 (strong buy).
volume_breakout_scanner
/
smart_volume_scanner
Volume + price breakout detection.
consecutive_candles_scan
/
advanced_candle_pattern
Candle-pattern scans.
stock_screener(country, stock_type, limit, …)
Common/preferred share screen by country (
america
,
japan
, …), mcap-ranked.
工具适用场景
top_gainers
/
top_losers(exchange, timeframe, limit)
单交易所内的异动标的。
bollinger_scan(exchange, timeframe, bbw_threshold, limit)
低BBW(布林带宽度)收缩候选标的。
rating_filter(exchange, timeframe, rating, limit)
按布林带评级筛选−3(强力卖出)…+3(强力买入)的标的。
volume_breakout_scanner
/
smart_volume_scanner
成交量+价格突破检测。
consecutive_candles_scan
/
advanced_candle_pattern
K线形态扫描。
stock_screener(country, stock_type, limit, …)
按国家(
america
、
japan
…)筛选普通股/优先股,按市值排名。

Futures (夜盘 / overnight)

期货(夜盘/隔夜)

ToolUse for
futures_market_overview(category, exchanges, limit)
Top contracts by volume.
category
: all / equity_index / energy / metals / agriculture / rates / forex / crypto_futures;
exchanges
: us / global.
futures_top_movers(direction, exchanges, limit)
Biggest % movers today.
futures_category_snapshot(category)
OHLCV for all front-month contracts in one category — e.g.
equity_index
→ NQ, ES, YM, RTY.
futures_watchlist()
Canonical front-month symbol list per category.
工具适用场景
futures_market_overview(category, exchanges, limit)
按成交量排名的顶级合约。
category
:all / equity_index / energy / metals / agriculture / rates / forex / crypto_futures;
exchanges
:us / global。
futures_top_movers(direction, exchanges, limit)
当日涨跌幅最大的标的。
futures_category_snapshot(category)
某一分类下所有近月合约的OHLCV数据——例如
equity_index
→NQ、ES、YM、RTY。
futures_watchlist()
各分类下的标准近月标的列表。

Options (US equities — no greeks)

期权(美股——无希腊值)

ToolUse for
stock_options_chain(symbol, expiry)
Calls + puts for one expiry (
YYYY-MM-DD
; omit → nearest). Returns strike, last, bid/ask, volume, OI, IV, ITM flag, plus the full
available_expiries
list. Source: Yahoo. No delta/gamma/theta/vega — use
tradingview-reader
for greeks.
stock_options_unusual_activity(symbol, top_n, min_volume, expiries)
Top strikes by volume/OI ratio across the soonest expiries — positioning scan before earnings.
工具适用场景
stock_options_chain(symbol, expiry)
某一到期日的看涨+看跌期权(
expiry
为
YYYY-MM-DD
格式;省略则默认最近到期日)。返回行权价、最新价、买价/卖价、成交量、持仓量、隐含波动率、实值标记,以及完整的
available_expiries
列表。数据源:Yahoo。无delta/gamma/theta/vega——如需希腊值请使用
tradingview-reader
。
stock_options_unusual_activity(symbol, top_n, min_volume, expiries)
近期到期日中成交量/持仓量比率最高的行权价——财报前的持仓扫描。

Backtesting

回测

ToolUse for
backtest_strategy(symbol, strategy, period, interval, …)
One strategy (
rsi
,
bollinger
,
macd
,
ema_cross
,
supertrend
,
donchian
,
rsi_pullback
,
keltner_breakout
,
triple_ema
) with Sharpe, max DD, win rate, vs buy-and-hold. Yahoo symbology.
compare_strategies(symbol, period, …)
All 9 strategies ranked.
walk_forward_backtest_strategy(…)
Train/test split with an overfitting verdict.
工具适用场景
backtest_strategy(symbol, strategy, period, interval, …)
单一策略(
rsi
、
bollinger
、
macd
、
ema_cross
、
supertrend
、
donchian
、
rsi_pullback
、
keltner_breakout
、
triple_ema
)回测,返回夏普比率、最大回撤、胜率,并与买入持有策略对比。采用Yahoo符号体系。
compare_strategies(symbol, period, …)
对全部9种策略进行排名。
walk_forward_backtest_strategy(…)
训练/测试拆分,并给出过拟合判断。

News & sentiment (needs
MARKETAUX_API_TOKEN
)

新闻与情绪分析(需
MARKETAUX_API_TOKEN
)

market_sentiment(symbol, category)
·
financial_news(symbol, category, limit)
market_sentiment(symbol, category)
·
financial_news(symbol, category, limit)

Regional extras

区域附加工具

egx_*
(Egyptian Exchange suite) — rarely relevant; also BIST, HKEX, SSE, SZSE, TWSE supported via the
exchange
param on scan tools.
egx_*
(埃及交易所套件)——很少用到;扫描工具的
exchange
参数也支持BIST、HKEX、SSE、SZSE、TWSE等交易所。

Step 3: Normalize inputs

步骤3:标准化输入

  1. exchange
    defaults to
    KUCOIN
    (crypto!) on most scan/TA tools
    — always pass
    NASDAQ
    /
    NYSE
    explicitly for US equities.
  2. Three symbologies coexist: scanner tools take bare symbol +
    exchange
    param;
    stock_prices
    takes
    EXCHANGE:SYMBOL
    ; Yahoo-backed tools (
    yahoo_price
    , backtests, options) take Yahoo tickers (
    BTC-USD
    ,
    ^VIX
    ,
    THYAO.IS
    ).
  3. Timeframes:
    5m, 15m, 1h, 4h, 1D, 1W, 1M
    . Intraday scans on stock exchanges can be sparse — prefer
    1D
    for equities.
  4. Tool names are canonical as listed. Use
    coin_analysis
    and
    multi_timeframe_analysis
    , not README-style aliases such as
    get_technical_analysis
    .
  1. 多数扫描/技术分析工具的
    exchange
    默认值为
    KUCOIN
    (加密货币交易所!)
    ——针对美股需显式传入
    NASDAQ
    /
    NYSE
    。
  2. 三种符号体系共存:扫描工具接受纯标的符号+
    exchange
    参数;
    stock_prices
    接受
    EXCHANGE:SYMBOL
    格式;基于Yahoo的工具(
    yahoo_price
    、回测、期权)接受Yahoo代码(
    BTC-USD
    、
    ^VIX
    、
    THYAO.IS
    )。
  3. 时间框架:
    5m, 15m, 1h, 4h, 1D, 1W, 1M
    。股票交易所的日内扫描数据可能稀疏——对股票优先使用
    1D
    时间框架。
  4. 工具名称以列表中为准。使用
    coin_analysis
    和
    multi_timeframe_analysis
    ,而非README中的别名如
    get_technical_analysis
    。

Step 4: Validate and interpret results

步骤4:验证与解读结果

  1. Check timestamps, exchange, symbol, session, and currency before drawing conclusions.
  2. Treat a returned error envelope as an error, not as an empty result. Use its retryability and symbol suggestions; retry at most once when marked retryable.
  3. Filter wide scanner results to roughly 10 rows and the columns relevant to the question.
  4. Treat Yahoo options IV as suitable for chain shape and OI/volume positioning, not precise IV rank or skew. Cross-check IV-sensitive work with
    tradingview-reader
    .
  5. Backtests are historical simulations. Report the period, interval, costs, sample size, benchmark, and walk-forward result when available; do not present them as forecasts.
  1. 得出结论前,检查时间戳、交易所、标的、交易时段和货币单位。
  2. 将返回的错误包视为错误,而非空结果。利用其重试提示和标的建议;标记为可重试时最多重试一次。
  3. 将范围较广的扫描结果过滤至约10行,并保留与问题相关的列。
  4. Yahoo期权的隐含波动率适用于期权链形态和持仓量/成交量分析,但不适用于精确的隐含波动率排名或偏度分析。涉及隐含波动率的工作需用
    tradingview-reader
    交叉验证。
  5. 回测是历史模拟。报告时需包含周期、时间间隔、成本、样本量、基准,以及可用的向前测试结果;不得将其作为预测呈现。

Step 5: Respond to the user

步骤5:响应用户

Lead with the answer, then show a compact evidence table. Include an as-of timestamp and data source, name any missing or stale fields, and separate observed facts from interpretation. For trading-shaped requests, keep the response analytical and read-only: discuss risks and scenarios without placing or offering to place a trade.
先给出答案,再展示简洁的证据表格。包含数据更新时间戳和数据源,注明缺失或过时的字段,区分观测事实与解读内容。对于交易相关请求,保持响应的分析性和只读性:讨论风险和场景,但不执行或提议执行交易。

Maintainer note

维护说明

The server is pinned to an immutable upstream commit in
.mcp.json
. To upgrade it, select a reviewed SHA, update the pin, perform a real MCP initialize +
tools/list
handshake, confirm all tools remain read-only, and reconcile this catalog with the registered tool names and schemas.
服务器在
.mcp.json
中固定为不可变的上游提交版本。如需升级,选择已审核的SHA,更新版本固定,执行真实的MCP初始化+
tools/list
握手,确认所有工具仍为只读,并核对此目录与已注册工具的名称和 schema。