Skip to main content

基金模拟交易 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 模式:

  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

Project details


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

If you're not sure about the file name format, learn more about wheel file names.

fund_trading_skill-1.0.2-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file fund_trading_skill-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for fund_trading_skill-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d48418b1fa2897f039f03f95b0d12e1a02fd0229932b67acac052f4dcfbb9393
MD5 32419bb9237a8b97919bb8eec13d009f
BLAKE2b-256 19e5d0a9b073a0318d4992b61f8750aa8ec8be22da626bd61b900b9b067b294a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page