基金模拟交易 Skill for OpenCode - 真实基金净值,虚拟资金交易
Project description
fund-trading-skill (TypeScript)
基金模拟交易 Skill for OpenCode - 真实基金净值,虚拟资金交易
⚠️ 重要声明
真实基金净值,虚拟资金交易
- 📊 基金净值和行情数据 - 来自真实市场,实时更新
- 💰 交易资金 - 虚拟模拟资金,仅供学习和测试
- 🎯 适用场景 - 投资学习、策略测试、模拟交易
安装
pip install fund-trading-skill
使用
安装后,fund-trading 命令将可用:
# 查看帮助
fund-trading --help
# 注册账户
fund-trading register --username 我的账户
# 查看账户列表
fund-trading account --list
# 查询基金列表
fund-trading list
# 查询基金详情
fund-trading detail --fund-code 000001
# 获取推荐基金
fund-trading recommend
# 查询持仓
fund-trading position
# 查询交易记录
fund-trading orders
# 申购基金
fund-trading subscribe --fund-code 000001 --amount 1000
# 赎回基金
fund-trading redeem --fund-code 000001 --shares 100
# 撤销订单
fund-trading cancel --trade-id TRADE_ID
配置
配置文件保存在 ~/.config/opencode/skills/fund-trading/data/config.json
认证
使用 OAuth 2.0 Client Credentials 模式:
- 调用
/openapi/v1/oauth/token获取 JWT Token - 使用
Authorization: Bearer {token}调用业务 API
API 端点
| 命令 | API 路径 | 方法 |
|---|---|---|
| Token | /openapi/v1/oauth/token |
POST |
list |
/openapi/v1/shipan/fund/list |
GET |
detail |
/openapi/v1/shipan/fund/detail?productCode=xxx |
GET |
recommend |
https://m2.nicaifu.com/mobileGateway/V1/channel/getPageChannelInfo |
GET |
subscribe |
/openapi/v1/shipan/trade/subscribe |
POST |
redeem |
/openapi/v1/shipan/trade/redeem |
POST |
cancel |
/openapi/v1/shipan/trade/cancel |
POST |
position |
/openapi/v1/shipan/asset/query |
POST |
orders |
/openapi/v1/shipan/trade/query |
POST |
register |
/openapi/v1/channel/register |
POST |
许可证
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fund_trading_skill-1.0.2-py3-none-any.whl.
File metadata
- Download URL: fund_trading_skill-1.0.2-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d48418b1fa2897f039f03f95b0d12e1a02fd0229932b67acac052f4dcfbb9393
|
|
| MD5 |
32419bb9237a8b97919bb8eec13d009f
|
|
| BLAKE2b-256 |
19e5d0a9b073a0318d4992b61f8750aa8ec8be22da626bd61b900b9b067b294a
|