Coding
PromptBeginner5 minmarkdown
Markdown Converter
Agent skill for markdown-converter
7
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
THSAutoTrader is an automated trading tool for THS (同花顺) client that provides a web API for programmatic trading operations. It uses GUI automation to interact with the THS trading interface and provides both a Tkinter desktop interface and a Vue.js web frontend.
# Install dependencies poetry install # Run in development mode (with hot reload) poetry run dev # Run normally poetry run start # Build executable poetry run build
# Navigate to frontend directory cd front # Install dependencies npm install # Run development server npm run dev # Build for production npm run build
main.py - Creates Tkinter GUI and starts AutomationAppsrc/app/automation.py - Main application orchestratorsrc/controller/automation_controller.py - Business logic for trading operationsflask_service.py - HTTP API server (runs on port 5000)window_service.py - Windows automation and GUI controltrading_service.py - Trading-specific operationsposition_service.py - Position and balance managementsrc/view/automation_view.py - Tkinter GUI interfacesrc/models/app_model.py - Data modelssrc/util/logger.py - Logging utilitiesStockPool.vue - Stock selection interfaceTradingService.vue - Trading controlsResultDisplay.vue - Results and logs displayWindowControl.vue - Window management controls../html/ directory for integration with Python backendThe Flask service provides these main endpoints:
GET /xiadan?code=STOCK_CODE&status=1|2&amount=OPTIONAL - Buy/sell ordersGET /position - Get current positionsGET /balance - Get account balanceGET /cancel_all_orders - Cancel all pending ordersGET /send_key?key=KEYS - Send keyboard input to THS clienthtml/ directory for web interfaceTesseract-OCR/ directory for OCR functionalitydist/下单辅助程序.exestatic/icon.ico - Application iconhtml/ - Web interface files (built from Vue frontend)Tesseract-OCR/ - OCR engine and language dataconfig/ - Configuration filesThis application is Windows-only due to: