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.4.tar.gz (89.8 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.4-py3-none-any.whl (89.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tqwebhelper2-0.1.4.tar.gz
  • Upload date:
  • Size: 89.8 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.4.tar.gz
Algorithm Hash digest
SHA256 f85c5a9edbd96d3ba660e40caf05e729518bcfb0af724f860560a9b866b69740
MD5 6ff7909b5dbef02f1f611b2bfbb66f7c
BLAKE2b-256 20d64ad1428d47f474a38002507814d6dcb8af3ebc7b38f1d1704b57099c062b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tqwebhelper2-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 89.7 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7e6ff6110d2597f8b9ff14e8c71153e36d3c26ebc7f4c2007488aba9f1c9ab36
MD5 3c8b754f502ba936966ec4ffe9fc0e31
BLAKE2b-256 597e6e401cbb6b7a9675074ef7a79e3f8496645238afb4dbf89652a7619792ed

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