wencai-screener
Skill5 starsChanged 4 days agoMITView on GitHub
Query Chinese A-share market data using the pywencai library. Supports natural language queries for real-time prices, financial indicators, technical analysis, and sector information. Basic usage pattern: Critical requirement: Cookie parameter is mandatory. Users must provide their cookie from https://www.iwencai.com/ Before first use, verify dependencies: Required: - Node.js v16+ (pywencai executes JS code internally) - pywencai package: pip install pywencai Every query requires a valid cookie parameter. Guide users to obtain cookie: 1. Visit https://www.iwencai.com/ and login 2. Open browser DevTools…
- Installs packages
In this repository45 other files it gives its agents.
- llms.txtllms.txt
- alpha-zooSkill
- breadth-chart-analystSkill
- canslim-screenerSkill
- factor-mining-pandaaiSkill
- backtesting-bias-avoidanceSkill
- backtest-reviewSkill
- data-quality-auditSkill
- paper-reproSkill
- pine-backtesterSkill
- stats-test-pickerSkill
- vectorbt-backtestSkill
- vectorbt-optimizeSkill
- akquantSkill
- ashare-pre-st-filterSkill
- a-stock-dataSkill
- cninfo-disclosureSkill
- ctp-apiSkill
- hithink-finance-financialsSkill
- hithink-finance-marketSkill
- longbridge-derivativesSkill
- longbridge-market-dataSkill
- ptrade-strategy-writingSkill
- quant-buddySkill
- ssquant-futuresSkill
- tdxquantSkill
- tqsdk-tradingSkill
- uzi-deep-analysisSkill
- ccxt-pythonSkill
- defillama-dataSkill
- defillama-flowsSkill
- defillama-yieldsSkill
- okx-dex-marketSkill
- perp-funding-basisSkill
- pine-debuggerSkill
- pine-developerSkill
- alphagbm-greeksSkill
- alphagbm-vol-surfaceSkill
- comps-analysisSkill
- dcf-modelSkill
- edgar-financialsSkill
- llmquant-equitiesSkill
- llmquant-macroSkill
- llmquant-riskSkill
- openquant-tradingSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 34
Before first use, verify dependencies:
- Very specific: line 129
Use no_detail=True to always return DataFrame or None
- Distinctive: line 133
Low frequency usage: - Avoid high-frequency calls to prevent blocking
- Very specific: line 136
Rate limiting: - Use sleep parameter for batch queries
- Distinctive: line 137
Data validation: - Check if result is None or empty DataFrame
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!--
Imported from: https://github.com/raidery/quant-skills
Source Path: wencai/SKILL.md
Curated for awesome-quant-skills
-->name: wencai description: "Query Chinese A-share market data using pywencai library with natural language queries. Use when users need to: (1) Query real-time stock prices, financial indicators, or technical analysis data for A-share stocks, (2) Search for stocks by conditions (e.g., 市盈率小于20的科技股, 昨日涨幅前10), (3) Get sector/industry information, (4) Query indices, funds, convertible bonds, or other financial instruments, (5) Analyze financial statements or technical indicators. Triggers on mentions of: A股, 同花顺, 问财,wencai, pywencai, A股, Chinese stocks, or natural language stock queries in Chinese."
Wencai - A股市场数据查询
Overview
Query Chinese A-share market data using the pywencai library. Supports natural language queries for real-time prices, financial indicators, technical analysis, and sector information.
Quick Start
Basic usage pattern:
import pywencai
# Simple query
result = pywencai.get(query='昨日涨幅前10', cookie='your_cookie_here')
print(result)Critical requirement: Cookie parameter is mandatory. Users must provide their cookie from https://www.iwencai.com/
Environment Setup
Before first use, verify dependencies:
python scripts/check_environment.pyRequired:
- Node.js v16+ (pywencai executes JS code internally)
- pywencai package:
pip install pywencai
Cookie Authentication
Every query requires a valid cookie parameter.
Guide users to obtain cookie:
- Visit https://www.iwencai.com/ and login
- Open browser DevTools (F12)
- Go to Network tab
- Copy the Cookie header value from any request
Store cookie securely (environment variable or config file recommended).
Common Query Patterns
Market Screening
# By valuation
pywencai.get(query='市盈率小于20且市值大于50亿', cookie=cookie)
# By performance
pywencai.get(query='近5日涨幅超过20%', cookie=cookie)
# By sector
pywencai.get(query='新能源汽车板块', cookie=cookie)
# By technical indicators
pywencai.get(query='MACD金叉', cookie=cookie)Advanced Multi-Condition Screening
# Complex technical analysis (verified working example)
query = """
涨幅大于1%,大单金额大于5000万,10日内ma10金叉ma60,
月macd大于0,流通市值大于50亿,收盘价大于ma10,ma10向上角度大于40度
""".replace("\n", "").strip()
result = pywencai.get(
query=query,
cookie=cookie,
loop=True, # Get all pages
perpage=100, # Max 100 per page
log=True # Show debug logs
)
if result is not None:
print(f"Found {len(result)} stocks")
print(result.head())Sorted Results
pywencai.get(
query='科技股',
sort_key='涨跌幅',
sort_order='desc',
cookie=cookie
)Multiple Pages
# Get all data
pywencai.get(query='A股', loop=True, cookie=cookie)
# Get first 3 pages
pywencai.get(query='A股', loop=3, cookie=cookie)Non-Stock Queries
# Indices
pywencai.get(query='上证指数', query_type='zhishu', cookie=cookie)
# Funds
pywencai.get(query='科技类基金', query_type='fund', cookie=cookie)
# Convertible bonds
pywencai.get(query='可转债', query_type='conbond', cookie=cookie)Return Values
- List queries →
pandas.DataFrame - Detail queries →
dict(contains text and DataFrames) - Use
no_detail=Trueto always return DataFrame or None
Best Practices
- Low frequency usage - Avoid high-frequency calls to prevent blocking
- Cookie management - Store cookie securely, refresh when expired
- Error handling - Wrap calls in try-except for network/auth errors
- Rate limiting - Use
sleepparameter for batch queries - Data validation - Check if result is None or empty DataFrame
Detailed References
- API parameters: See api_reference.md for complete parameter documentation
- Query examples: See query_examples.md for comprehensive query patterns
Troubleshooting
"Cookie required" error: User must provide valid cookie parameter
"Node.js not found": Install Node.js v16+ from https://nodejs.org/
Empty results: Query may be too restrictive or cookie expired
Rate limiting: Reduce query frequency or add sleep parameter
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

