tvscreener
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
--fieldsand--filterin 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.pywithFieldWithIntervalattribute errors in some tvscreener versions. - Workaround: run without interval fields, or use
scripts/query_symbol.pyfor stable single-symbol technical snapshots.
- Current caveat: interval fields may fail in
- 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|60interpreted as shell pipes. - Fix: single-quote the full
--fieldsstring.
- Cause: unquoted
References
- Workflow + patterns:
references/README_USAGE.md - API details:
references/api/screeners.mdreferences/api/fields.mdreferences/api/filters.mdreferences/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).
More from ninehills/skills
file-manager
Find, organize, and manage files on the user's computer. Search by name, type, size, or date. Move, rename, compress, and clean up files.
125self-reflection
Daily self-reflection and personal growth. Triggered by heartbeat at end of day. Review the day's experiences, extract lessons, update personality, and write a diary entry.
124send-file
Send files, photos, audio, or videos to the current chat. MUST use whenever you need to deliver any file to the user. Covers: sending images, selfies, generated art, documents, music, videos, voice messages, screenshots, or ANY file the user asks to see. Triggers: 'send it to me', 'send it over', 'let me see', 'send me', 'show me', 'send photo', 'send file', sharing any file path. NEVER paste raw file paths in text — ALWAYS use this skill to send files.
117news-aggregator-skill
Comprehensive news aggregator that fetches, filters, and deeply analyzes real-time content from 8 major sources: Hacker News, GitHub Trending, Product Hunt, 36Kr, Tencent News, WallStreetCN, V2EX, and Weibo. Best for 'daily scans', 'tech news briefings', 'finance updates', and 'deep interpretations' of hot topics.
99screenshot
Take screenshots of the screen using macOS screencapture. Use when users ask to see the screen, debug UI, or capture what's displayed. Resize before returning to avoid blowing up model context.
38agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.
36