← 返回
效率工具 中文

Tvscreener

Query TradingView screener data for HK, A-share, A-share ETF, and US symbols with deepentropy/tvscreener. Use for stock lookup, technical indicators (price/change/RSI/MACD/volume), symbol filtering, and custom field/filter-based market queries.
使用 deepentropy/tvscreener 查询港股、A股、A股ETF及美股的TradingView数据。适用于股票查询、技术指标(价格/涨跌幅/RSI/MACD/成交量)获取、标的筛选,以及基于自定义字段和条件的市场查询。
subway-chenyan
效率工具 clawhub v1.0.0 1 版本 99613 Key: 无需
★ 0
Stars
📥 2,059
下载
💾 208
安装
1
版本
#latest

概述

tvscreener

Use this skill for market queries with simple scripts first, then native Python when needed.

Install

python3 -m pip install -U tvscreener

Python must be >=3.10.

Quick commands (run from skill root)

> Use Python 3.10+ in your preferred environment (venv/pyenv/system Python).

# Preset single-symbol output (recommended)
python3 scripts/query_symbol.py --symbol HKEX:700 --market HONGKONG

# Custom query (fields + filters)
bash scripts/run_query.sh \
  --market CHINA \
  --symbol SHSE:600519 \
  --fields 'NAME,PRICE,CHANGE_PERCENT,VOLUME,RELATIVE_STRENGTH_INDEX_14,MACD_LEVEL_12_26,MACD_SIGNAL_12_26,MACD_HIST,SIMPLE_MOVING_AVERAGE_20,SIMPLE_MOVING_AVERAGE_50,SIMPLE_MOVING_AVERAGE_200,EXPONENTIAL_MOVING_AVERAGE_20,EXPONENTIAL_MOVING_AVERAGE_50,EXPONENTIAL_MOVING_AVERAGE_200,BOLLINGER_UPPER_BAND_20,BOLLINGER_LOWER_BAND_20,STOCHASTIC_PERCENTK_14_3_3,STOCHASTIC_PERCENTD_14_3_3,AVERAGE_TRUE_RANGE_14,MOVING_AVERAGES_RATING' \
  --filter 'NAME=600519'

# Field discovery
python3 scripts/discover_fields.py --keyword macd --limit 20

Shell quoting notes

  • Wrap --fields and --filter in single quotes.
  • If you use interval syntax like FIELD|60, quoting is mandatory to avoid shell pipe parsing.

Query rules

  • Core technical set (recommended): PRICE, CHANGE_PERCENT, VOLUME, RELATIVE_STRENGTH_INDEX_14, MACD_LEVEL_12_26, MACD_SIGNAL_12_26, MACD_HIST, SIMPLE_MOVING_AVERAGE_20/50/200, EXPONENTIAL_MOVING_AVERAGE_20/50/200, BOLLINGER_UPPER_BAND_20, BOLLINGER_LOWER_BAND_20, STOCHASTIC_PERCENTK_14_3_3, STOCHASTIC_PERCENTD_14_3_3, AVERAGE_TRUE_RANGE_14, MOVING_AVERAGES_RATING
  • Interval fields syntax: FIELD|60 / FIELD|240 (example: RELATIVE_STRENGTH_INDEX_14|60)
  • Current caveat: interval fields may fail in scripts/custom_query.py with FieldWithInterval attribute errors in some tvscreener versions.
  • Workaround: run without interval fields, or use scripts/query_symbol.py for stable single-symbol technical snapshots.
  • Filters: =, !=, >, <, >=, <=

Troubleshooting

  • ImportError: cannot import name 'Market' from 'tvscreener'
  • Usually caused by mismatched Python/site-packages or multiple Python environments.
  • Fix: ensure commands and installation use the same Python (3.10+), then reinstall:
  • python3 -m pip install -U tvscreener
  • zsh: command not found: 60,...
  • Cause: unquoted FIELD|60 interpreted as shell pipes.
  • Fix: single-quote the full --fields string.

References

  • Workflow + patterns: references/README_USAGE.md
  • API details:
  • references/api/screeners.md
  • references/api/fields.md
  • references/api/filters.md
  • references/api/enums.md

If scripts are insufficient, read references and write direct Python using tvscreener native API.

Regression test

bash scripts/test_markets.sh

Covers Tencent (HK), Moutai (A), A-share ETF (510300), and BIDU (US).

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-28 21:31 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Obsidian

steipete
操作 Obsidian 仓库(纯 Markdown 笔记)并通过 obsidian-cli 自动化。
★ 430 📥 103,705
productivity

Nano Pdf

steipete
使用nano-pdf CLI通过自然语言指令编辑PDF
★ 275 📥 114,741
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 438 📥 147,223