easyquotation
Copilot instructions5.5k starsChanged 8 months agoMITView on GitHub
easyquotation is a Python library for fetching real-time stock quotations from Chinese financial data sources (Sina, Tencent, Jisilu, Bank of China). The primary runtime dependency is requests. Formatting: black -l 79. Import sorting: isort. Two class patterns coexist: Factory entry point: easyquotation.use(source) in api.py maps source strings to classes. Stock codes: Loaded from stock_codes.conf (a JSON file with .conf extension). helpers.py manages code loading, updating from remote, and determining market prefix (sh/sz/bj).
We split this copilot-instructions.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 44
No tests exist for Jsl, Boc, or Tencent
≈ “Common” is an estimate: at least 1 in 5 of the 3,669 Copilot instructions 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
Project Guidelines
Overview
easyquotation is a Python library for fetching real-time stock quotations from Chinese financial data sources (Sina, Tencent, Jisilu, Bank of China). The primary runtime dependency is requests.
Build and Test
make init # Set up Pipenv + dev deps + pre-commit
pipenv shell # Enter virtual environment
pytest # Run tests
pytest --cov # Run tests with coverage
mypy easyquotation # Type check (ignore_missing_imports enabled)Formatting: black -l 79. Import sorting: isort.
Architecture
Two class patterns coexist:
BaseQuotationsubclasses (template method):Sina,Tencent,HKQuote,DayKline— share stock code loading, batched threaded HTTP fetching, and a commonreal()/market_snapshot()API. Subclasses overridestock_api(URL),format_response_data()(parsing), and optionally_gen_stock_prefix(),_get_headers(),max_num.- Standalone classes:
JslandBochave completely different interfaces (jsl.etfindex(),jsl.cb(),boc.get_exchange_rate()). They do NOT inherit fromBaseQuotationand do NOT implementreal()ormarket_snapshot().
Factory entry point: easyquotation.use(source) in api.py maps source strings to classes.
Stock codes: Loaded from stock_codes.conf (a JSON file with .conf extension). helpers.py manages code loading, updating from remote, and determining market prefix (sh/sz/bj).
Conventions
# coding:utf8header on every source file (legacy convention, maintain it)- Sina/HKQuote use English dict keys; Tencent uses Chinese keys (
"涨跌(%)","流通市值") — be source-aware - Response parsing is regex-based (Sina) or split-based (Tencent) — fragile to API format changes
requests.Sessionis reused inBaseQuotation;Jslcreates ad-hoc sessions;Bocuses plainrequests.get- Concurrency via
multiprocessing.pool.ThreadPoolfor batched HTTP fetches
Testing
- Framework:
unittestclasses run withpytest - Unit tests pass mock data strings directly to
format_response_data(), bypassing HTTP TestEasyquotationcontains integration tests that hit live Sina/Tencent APIs — these fail offline- No tests exist for
Jsl,Boc, orTencent
Pitfalls
build/directory is stale — never edit files there; authoritative source iseasyquotation/- No HTTP timeouts or retries — requests can hang; adding timeouts changes behavior
- Jsl
__cb_urlmutation —self.__cb_url.format(...)consumes the{ctime:d}placeholder on first call, breaking reuse on the same instance - Live API tests — network-dependent tests may fail; don't treat as code bugs
stock_codes.confloaded at init — if missing/corrupt, allBaseQuotationsubclasses fail at construction
Trending
Quiet since August.thin dataabout the whole repository
Who's talking about shidenggui/easyquotation
- GuoHaoyu1688/cn-us-market-lag-radar“Update easyquotation requirement from >=0.7 to >=0.7.7”GitHub · Aug 14, 2026
- yinanfang/DBDCapital-Node“Stock API Comparison”GitHub · Jan 9, 2017
The biggest 2 of 2 mentions linking to the repository that our crawl found. Each line is their own headline.
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,297 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
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.

