Overview
- Skill Key
- coderwpf/ptrade
- Author
- coderwpf
- Source Repo
- openclaw/skills
- Version
- 1.0.0
- Source Path
- skills/coderwpf/ptrade
- Latest Commit SHA
- d6fa920e3d00bcd00e59fd97bc79c1cb14272c5d
Ptrade quantitative trading platform by 恒生电子 — cloud-hosted Python strategies with broker-grade execution for Chinese securities.
Stars
0
Installs
0
Status
ACTIVE
Visibility
PUBLIC
直接复制以下提示词,发送给你的 AI 助手即可完成安装。
请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 ptrade 技能。 若已安装,则直接安装 ptrade 技能。
# Ptrade (恒生量化交易平台)
[Ptrade](https://ptradeapi.com) is a professional quantitative trading platform by 恒生电子 (Hundsun). Strategies run on **broker servers** (intranet), providing low-latency execution. It uses an event-driven Python framework.
> ⚠️ **Requires broker account with Ptrade access**. Strategies run in broker's cloud — no internet access from within strategies. Cannot install pip packages; only built-in third-party libraries are available.
## Supported markets & business types
**Backtest supports:**
1. 普通股票买卖 (单位:股)
2. 可转债买卖 (单位:张,T+0)
3. 融资融券担保品买卖 (单位:股)
4. 期货投机类型交易 (单位:手,T+0)
5. LOF基金买卖 (单位:股)
6. ETF基金买卖 (单位:股)
**Trading (live) supports:**
1. 普通股票买卖 (单位:股)
2. 可转债买卖 (T+0)
3. 融资融券交易 (单位:股)
4. ETF申赎、套利 (单位:份)
5. 国债逆回购 (单位:份)
6. 期货投机类型交易 (单位:手,T+0)
7. ETF基金买卖 (单位:股)
**Default supports Level2 十档行情**, some brokers provide free L2 逐笔数据.
### Price decimal rules
| Asset | Min tick | Decimals |
|---|---|---|
| Stock | 0.01 | 2 |
| Convertible bond | 0.001 | 3 |
| LOF / ETF | 0.001 | 3 |
| Reverse repo | 0.005 | 3 |
| Stock index futures | 0.2 | 1 |
| Treasury futures | 0.005 | 3 |
| ETF options | 0.0001 | 4 |
> ⚠️ When using `limit_price` in order functions, price must match the correct decimal precision or the order will be rejected.
## Stock code format
- Shanghai: `600570.SS`
- Shenzhen: `000001.SZ`
- Index: `000300.SS` (沪深300)
---
## Strategy lifecycle (event-driven)
```python
def initialize(context):
"""Required — called once at startup. Use for setting universe, benchmark, scheduling."""
g.security = '600570.SS'
set_universe(g.security)
def before_trading_start(context, data):
"""Optional — called before market open.
In backtest: runs at 8:30 each trading day.
In trading: runs immediately on first start, then daily at 9:10 (default, broker configurable)."""
log.info('Pre...
caoyumin97
Structured problem analysis and communication using system mapping and hierarchical logic. Use when a request involves messy, multi-factor problems, root-cause analysis, intervention design, feedback loops or delays, or when a clear top-line recommendation with logically grouped support is required.
chaimengphp
Query real-time and historical financial data across equities and crypto—prices, market moves, metrics, and trends for analysis, alerts, and reporting.
cerbug45
AI Wallet Payment System Skill Guide
bywallace
Read and manage Kubera.com portfolio data (net worth, assets, debts, allocation, holdings). Use when a user asks about their finances, net worth, portfolio, investments, holdings, asset allocation, or wants to update asset values in Kubera. Works with any AI agent or CLI that can run Python scripts.
c-goro
Expense tracking and accounting for AI agents. Log purchases, set budgets, generate spending reports, and manage multi-currency finances — all stored locally. Privacy.com card import, natural language queries, CSV/JSON export. Use when agents make purchases and need a financial audit trail.
c0rv0s
Short-form video for AI agents. Generate videos using the latest models, pay with USDC via x402.