Skip to main content

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 模式:

  1. 调用 /openapi/v1/oauth/token 获取 JWT Token
  2. 使用 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

Metadata

Release files for fund-trading-skill 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for fund-trading-skill 1.0.2
File Interpreter ABI Platform
fund_trading_skill-1.0.2-py3-none-any.whl Python 3 none any Details

Release files / fund_trading_skill-1.0.2-py3-none-any.whl

Download URL fund_trading_skill-1.0.2-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d48418b1fa2897f039f03f95b0d12e1a02fd0229932b67acac052f4dcfbb9393
BLAKE2b-256 checksum
How to use checksums
19e5d0a9b073a0318d4992b61f8750aa8ec8be22da626bd61b900b9b067b294a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

1.0.2 This release

1 release file

1.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page