Skip to main content

天勤量化 Web UI 增强版 — 替换 tqsdk 默认 Web 界面,无需修改官方 SDK

Project description

tqwebhelper2

天勤量化 Web UI 增强版。通过 monkey-patch 替换 tqsdk 默认的 Web 界面,无需修改官方 SDK。

Preview

实盘

实盘

回测

回测

安装

pip install tqwebhelper2

使用

import tqwebhelper2
tqwebhelper2.patch()  # 必须在 TqApi 之前调用

from tqsdk import TqApi, TqAuth
api = TqApi(auth=TqAuth("user", "pass"), web_gui=True)

浏览器打开控制台输出的地址即可看到新版 Web 界面。

原理

  • 继承原版 TqWebHelper,只替换 _web_dir 指向本包内的编译产物
  • 通过 patch() 同时替换 tqsdk.tqwebhelpertqsdk.api 中的引用
  • WebSocket 数据通道、路由逻辑完全复用原版,零侵入
  • unpatch() 可恢复原版

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tqwebhelper2-0.1.1.tar.gz (86.1 kB view details)

Uploaded Source

Built Distribution

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

tqwebhelper2-0.1.1-py3-none-any.whl (86.1 kB view details)

Uploaded Python 3

File details

Details for the file tqwebhelper2-0.1.1.tar.gz.

File metadata

  • Download URL: tqwebhelper2-0.1.1.tar.gz
  • Upload date:
  • Size: 86.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.11

File hashes

Hashes for tqwebhelper2-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fbddf4c4b4750805a9e689204d7cd83b679e46bde96c043af3642aa802f79d35
MD5 7812e035663330bb56251abb63694023
BLAKE2b-256 b35595b3a21488fcdfa8dba561f7b23a995df3d2c20e7854963c39dffed762c2

See more details on using hashes here.

File details

Details for the file tqwebhelper2-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: tqwebhelper2-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 86.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.11

File hashes

Hashes for tqwebhelper2-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 15998902bfdf3a80c273c362110cd77f3c89d35554811a319a9a6b70d17a3b3f
MD5 afb1d83f789036b2afb6d61c00cd77b7
BLAKE2b-256 e89e99e852b94049827842c09bc51fd5919ee1f4c6721f97798eda63a258b176

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