通达信TQ

Initialize tqcenter and retrieve Tongdaxin TQ market and financial data.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/crimes342/skills --skill tq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 通达信TQ
Source: https://github.com/crimes342/skills/tree/main/skills/tdxskill/tdx-quant
Command: npx skills add https://github.com/crimes342/skills --skill tq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you integrate Tongdaxin’s TQ quant platform into your workflow by guiding how to locate the correct Tdx installation, initialize the tqcenter interface, and then query market, stock, sector, and professional financial datasets through the tq API.

Core Features & Use Cases

  • TdxQuant (tqcenter.py) Initialization & Connection Management: Detects running TdxW.exe processes (or prompts you if none exists), validates that tqcenter.py is supported, configures sys.path correctly, and initializes the tq client with the required initialize/close lifecycle.
  • Market & Instrument Data Retrieval: Pull historical K-lines and real-time snapshots (e.g., get_market_data, get_market_snapshot), plus stock metadata and relationships (get_stock_info, get_relation, get_more_info).
  • Professional Finance & Trading Analytics Access: Fetches professional financial statements and trading/sector/macro datasets through dedicated tq interfaces (e.g., get_financial_data, get_gpjy_value, get_bkjy_value, get_scjy_value) for research and decision support.

Quick Start

Ask the AI to initialize Tongdaxin TQ and provide example calls to fetch K-line data and a real-time snapshot for a given stock code.

Frequently Asked Questions about 通达信TQ

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I retrieve historical K-lines and real-time market snapshots using Tongdaxin TQ?

To retrieve historical K-lines and real-time market snapshots with Tongdaxin TQ, initialize the tqcenter connection and call get_market_data or get_market_snapshot APIs. You must configure sys.path correctly and maintain the tq.initialize to tq.close lifecycle during securities research.

How can I fetch professional financial statements and trading datasets from Tongdaxin?

Fetch professional financial statements and trading datasets from Tongdaxin by invoking dedicated tq interfaces like get_financial_data, get_gpjy_value, get_bkjy_value, and get_scjy_value after initializing the tq client for decision support analytics.

Do I need a running TdxW.exe process to query stock fundamentals and sector data with TQ?

Yes, querying stock fundamentals and sector data with TQ requires an existing running TdxW.exe process. The Skill detects this process, validates tqcenter.py support, and inserts PYPlugins/user into sys.path to successfully initialize the tq client.

What is the proper initialization lifecycle for Tongdaxin tqcenter API connections?

The proper initialization lifecycle for Tongdaxin tqcenter API connections involves locating the Tdx installation, configuring sys.path, calling tq.initialize(__file__) to start queries, and ending with tq.close to safely release the market and stock data interfaces.

Can I use Tongdaxin TQ to get stock metadata, block membership, and relationship data?

Yes, Tongdaxin TQ retrieves stock metadata and block membership through APIs like get_stock_info, get_relation, and get_more_info. These functions provide instrument relationships and fundamental datasets for comprehensive securities research workflows.