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.2.tar.gz (86.4 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.2-py3-none-any.whl (86.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tqwebhelper2-0.1.2.tar.gz
  • Upload date:
  • Size: 86.4 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.2.tar.gz
Algorithm Hash digest
SHA256 85c47f1d4f9e71a2b6742c677462752625cf0e0cad7199a55b3a34f74d8bdd43
MD5 df399287910b78c230fdbb6938aa04dc
BLAKE2b-256 ef7d26dd19f71c7edae4ea95282ea30dc09db9fee7473528a2ac711c5488a713

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tqwebhelper2-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 86.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5a6778723706d963f54fc53a70fddefa9293eb61fc2e332429082c9e1d53c021
MD5 a5389582eaba46fce4223006cb6b4b86
BLAKE2b-256 7be66d8c97d96de77c4ba7407c1e7876f992de21d851589df936a4c86d11ed24

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