基金实盘交易 Skill for OpenCode - 支持账户管理、基金查询、申购赎回
Project description
fund-trading-skill
基金实盘交易 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.1-py3-none-any.whl.
File metadata
- Download URL: fund_trading_skill-1.0.1-py3-none-any.whl
- Upload date:
- Size: 10.5 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 |
dff49d9ec4860aeca46ea8be204a6b2454aa060128ba3d14ad7ac7abdd203f9a
|
|
| MD5 |
fa75dbeb592ba77abb4c8cc4a2731e8f
|
|
| BLAKE2b-256 |
9578926bf8fbef127ba42f7c88bf77452634af8d3d4e57c2d176bbcbb9e3b5d1
|