Token导航 LogoToken导航TokenDH.com
开发需要联网clawhub未标认证来源可访问clear审计提醒

vbrokers-trading虚拟经纪商交易

Agent Skill

vbrokers-trading 用于辅助安全审计、权限检查和凭据风险排查,适合在 OpenClaw 中需要复核安全边界、认证流程或敏感配置时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

9,831

周安装

418

GitHub Stars

公开资料未说明

下载量

3,444
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:vbrokers-trading(虚拟经纪商交易)
来源仓库:https://github.com/lcy360/vbrokers-trading
安装命令:
openclaw skills install vbrokers-trading
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install vbrokers-trading

简介

vbrokers-trading 用于通过本地 OpenAPI Gateway 实现自动化证券交易。

  • 适用于华盛通等虚拟经纪商平台的订单执行与账户管理。
  • 通过 clawhub 安装并使用 openclaw skills install vbrokers-trading 命令部署。
  • 使用前必须设置账户凭证并确保本地端口 11111 处于监听状态。
  • 建议查阅原始文档了解交易接口的安全机制与风控限制。

SKILL.md

name
vbrokers-trader
description
VBrokers (华盛通 VCL HK) trading automation via OpenAPI Gateway running on localhost port 11111. Use when: setting up VBrokers or 华盛通 account access, authenticating trading sessions, checking portfolio or positions or funds, placing or cancelling orders for US, HK or A stocks, fetching real-time quotes or K-lines, building automated trading bots, or implementing stop-loss and take-profit logic. Handles AES-ECB password encryption, sessionType for pre/post-market trading, mktTmType for time-segment quotes, and all major trade/quote endpoints.

VBrokers Trader

Automate trading on VBrokers (华盛通 VCL HK) via the OpenAPI Gateway running locally.

Prerequisites

  • OpenAPI Gateway must be running locally (GUI app: 华盛通OpenAPIGateway.app)
  • Gateway URL: http://127.0.0.1:11111
  • AES key for password encryption: provided during account setup (see references/api-reference.md)
  • Python packages: pycryptodome (pip install pycryptodome)

Quick Start

Copy scripts/vbrokers_client.py to your project and import it:

import sys
sys.path.insert(0, '/path/to/skill/scripts')
import vbrokers_client as vb

# 1. Login (required after Gateway restart)
vb.trade_login("your_trading_password")

# 2. Check account
funds = vb.get_account_funds("P")   # P=US, K=HK

# 3. Get real-time quote (use correct mktTmType for time segment)
quote = vb.get_quotes_batch(["AAPL"], session=-1)  # -1=pre-market

# 4. Place order
result = vb.place_order("AAPL", "P", "1", 1, 180.00)  # BUY 1 share limit $180

# 5. Check positions
positions = vb.get_positions("P")

Key Concepts

Request Format (Critical)

All HTTP requests must use nested params:

{"timeout_sec": 10, "params": {"exchangeType": "P", ...}}

Exchange Types

CodeMarket
PUS Stocks
KHK Stocks
v深股通
t沪股通

Session Types (for orders)

ValueMeaning
"0"Regular hours only
"1"Extended (pre + post market) — use for US stocks

mktTmType (for real-time quotes)

ValueSegmentBeijing Time
1Regular (盘中)22:30–05:00
-1Pre-market (盘前)17:00–22:30
-2After-hours (盘后)05:00–09:00
-3Night session (夜盘)09:00–17:00
omitDefault (last close)

⚠️ Always specify mktTmType for real-time prices — omitting it returns the previous close.

Password Encryption

Trading password must be AES-ECB encrypted before login:

# Already handled in vbrokers_client.py via encrypt_password()
# Key: base64-encoded 24-byte AES key (provided at account setup)

Common Workflows

Stop-Loss / Take-Profit Monitor

result = vb.check_stop_loss("AAPL", "P", cost_price=150.0,
                             stop_loss_pct=0.08, take_profit_pct=0.10)
# Returns: {"action": "hold"/"stop_loss"/"take_profit", "current_price": ..., "pnl_pct": ...}
if result["action"] == "stop_loss":
    vb.place_order("AAPL", "P", "2", qty, 0, entrust_type="5")  # market sell

Batch Quotes with Time Segment

from datetime import datetime, timezone, timedelta
bj_hour = (datetime.now(tz=timezone.utc) + timedelta(hours=8)).hour
# Determine correct mktTmType based on Beijing time
session = 1 if (bj_hour >= 22 or bj_hour <= 4) else -1 if bj_hour >= 17 else -2 if bj_hour <= 8 else -3
quotes = vb.get_quotes_batch(["AAPL", "TSLA", "NVDA"], session=session)

Cancel All Orders

vb.cancel_all_orders("P")  # Cancel all pending US stock orders

API Reference

For complete endpoint documentation, parameters, and response schemas: → See references/api-reference.md

For the full verified client implementation: → See scripts/vbrokers_client.py

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

96.07%
按下载量换算3,309

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

未展示

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills