Skip to main content

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

  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.1-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for fund_trading_skill-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dff49d9ec4860aeca46ea8be204a6b2454aa060128ba3d14ad7ac7abdd203f9a
MD5 fa75dbeb592ba77abb4c8cc4a2731e8f
BLAKE2b-256 9578926bf8fbef127ba42f7c88bf77452634af8d3d4e57c2d176bbcbb9e3b5d1

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