tqsdk
Explain, implement, or debug TqSdk Python workflows for wait_update or is_changing update loops, market data retrieval, historical download, account type sel...
MIT-0 · Free to use, modify, and redistribute. No attribution required.
⭐ 0 · 27 · 0 current installs · 0 all-time installs
MIT-0
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
The name/description (TqSdk help, examples, and debugging) matches the SKILL.md and the included reference files. No unrelated binaries, env vars, or config paths are requested and the document set is proportional to the stated purpose.
Instruction Scope
SKILL.md directs the agent to read specific repository reference files and to answer using those docs and small runnable snippets. It does not instruct the agent to read arbitrary system files, network endpoints, or to exfiltrate data. The examples show placeholders for TqAuth credentials, but the skill does not direct the agent to collect or transmit secrets.
Install Mechanism
No install spec or downloaded code — instruction-only skill. Nothing will be written to disk or installed by the skill itself.
Credentials
The skill declares no required environment variables or credentials, which is appropriate. Many example snippets show TqAuth("account","password") placeholders; users should be careful not to paste real credentials into chat. The skill itself does not request or store secrets.
Persistence & Privilege
always is false and the skill has no install or persistence behavior. The skill does not modify other skills or request system-level privileges.
Assessment
This is an instruction-only, documentation-backed helper for TqSdk and appears coherent and proportionate. Before enabling or invoking: (1) note that example code includes placeholders for TqAuth (account/password) — do not paste real credentials into the chat; provide credentials only when running code in a trusted local environment; (2) the skill will not install software or access your system, but if you ask it to produce runnable scripts you will need to run them locally or on your own servers (and supply any required credentials there); (3) if you need the agent to run code against live accounts, consider limiting permissions or using a simulated account (TqSim/TqKq) first; (4) if you want extra assurance, inspect the reference files yourself (they are included) to confirm there are no unexpected network endpoints or commands.Like a lobster shell, security has layers — review code before you run it.
Current versionv1.0.0
Download ziplatest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
SKILL.md
TqSdk Trading and Data
Use this skill to answer TqSdk questions with the repository's real APIs, docs, and examples. Prefer minimal runnable snippets, keep futures and stock behavior separate, and explain the update loop explicitly whenever the user's issue depends on wait_update().
Route The Request First
Read only the references needed for the user's question.
- Read references/wait-update-and-update-loop.md for
wait_update,is_changing,deadline, async update notifications, Jupyter caveats, or backtest progression questions. - Read references/market-data.md for
get_quote,get_kline_serial,get_tick_serial, contract discovery, symbol metadata, andDataDownloader. - Read references/account-type-matrix.md for
TqAccount,TqKq,TqKqStock,TqSim,TqSimStock, OTG account classes, andTqMultiAccount. - Read references/accounts-and-trading.md for account, position, order, and trade getters plus multi-account getter patterns.
- Read references/order-functions-and-position-tools.md for
insert_order,cancel_order,TargetPosTask,TargetPosScheduler, and advanced execution helpers. - Read references/object-fields.md when the user asks what fields mean on
Quote, K-line or tick rows,Account,Position,Order,Trade, or their stock variants. - Read references/simulation-and-backtest.md for local sim, Quick sim, stock sim, backtest, and cross-account backtest limits.
- Read references/error-faq.md when the user asks about common TqSdk failures, confusing behavior, or exception messages.
- Read references/example-map.md when you want a repository-backed example or doc page to imitate.
Core Rules
- Treat
get_*results as live references, not snapshots. Explain that they refresh duringwait_update(). - Explain
wait_update()whenever the user is confused by missing data, stale fields, orders not leaving the client, orTargetPosTasknot acting. - Distinguish futures and stock workflows:
- Futures accounts and objects use
Account,Position,Order,Trade. - Stock accounts and objects use
SecurityAccount,SecurityPosition,SecurityOrder,SecurityTrade. - Stock trading does not use
offset, andTargetPosTaskis not for stock trading.
- Futures accounts and objects use
- Choose account type before writing code. Do not default to
TqKqorTqAccountunless the user really needs that account mode. - In multi-account mode, pass
account=for getters and trading calls, or use the account object's ownget_account,get_position,get_order, andget_trade. - For current market examples, avoid expired contracts. Prefer contract discovery APIs or main-contract symbols.
- When the user asks for field meanings, explain the smallest relevant field set first and say whether the object is futures or stock.
- When the user asks for long historical ranges, prefer
DataDownloaderover pretendingget_kline_serialis an unlimited history API. - When the user asks for advanced execution, prefer public helpers first:
TargetPosTaskfor target net position.TargetPosSchedulerplustwap_tableorvwap_tablefromtqsdk.algorithmfor scheduled execution.- Mention
InsertOrderTaskandInsertOrderUntilAllTradedTaskas internal or advanced helpers, not the default answer.
Answering Style
- Prefer imports from
tqsdk.__init__for top-level APIs. When an API is documented under a submodule, use that official submodule path such astqsdk.toolsortqsdk.algorithm. - Prefer short, correct code blocks over broad pseudo-code.
- Name the exact API the user should call next.
- If behavior differs in live trading, Quick sim, local sim, stock sim, or backtest, say so explicitly.
- If the answer depends on a common pitfall, state the pitfall directly instead of burying it in examples.
Files
11 totalSelect a file
Select a file to preview.
Comments
Loading comments…
