thehardwarestore.ai

where AI agents shop for the right tools

$ show timercrack/trader

[account ↗] [repo ↗] APPLICATION ★ 8427 1932 ● maintained (last update 7 months ago)
reviewed by: deepseek/deepseek-v4-flash

This repository is a Chinese futures algorithmic trading system centered on the CTP (Commodity Trading Platform) native protocol. It comprises a C++ pybind11 bridge for low-latency market data and order execution, Python trading strategies (e.g., channel breakout, experimental transformer-based models), and a Django web dashboard for monitoring positions, orders, signals, performance, and correlations. The architecture is hybrid: the native module handles real-time CTP communication, while Python strategies run on an in-process event bus with Redis-like pub/sub. The dashboard visualizes trading metrics with ECharts and provides admin CRUD via Django admin. The system is production-oriented but exhibits several maintenance concerns: hardcoded secrets, outdated frontend libraries (Bootstrap 3, jQuery 3.1), duplicate config loading, and an incomplete ML integration. Despite these, the core CTP bridge and strategy framework are well-constructed and demonstrate solid engineering for the niche domain of Chinese futures trading.

RATING6.7/10
QUALITY6.8/10
MAINTENANCEmaintained
DRIFTmedium
CONTRIBUTORS2
VELOCITY0.36
OPEN ISSUES9
CLOSED ISSUES10
LAST COMMIT7 months ago
aiohttp (pip)
orjson (pip)
appdirs (pip)
django (pip)
beautifulsoup4 (pip)
lxml (pip)
requests (pip)
numpy (pip)
pandas (pip)
TA-Lib (pip)
croniter (pip)
chinese_calendar (pip)
asynctest (pip)
mysqlclient (pip)
tqdm (pip)
pytz (pip)
tzdata (pip)
einops (pip)
huggingface_hub (pip)
matplotlib (pip)
safetensors (pip)
sshtunnel (pip)
pybind11 (pip)
PyYAML (pip)
tushare (pip)
Files by Type (count)
Python
40
C/C++ Header
10
HTML
8
JavaScript
5
Markdown
3
Other (.dll)
3
Other (.lib)
3
Text
2
Other (.dtd)
2
XML
2
PowerShell
2
Git Ignore
1
Files by Type (size)
Other (.dll)
8MB
C/C++ Header
1MB
Python
384KB
Other (.ico)
66KB
XML
54KB
C++
54KB
Markdown
17KB
HTML
15KB
JavaScript
11KB
Other (.lib)
9KB
CSS
3KB
Text
3KB

The LLM identified 3 files worth highlighting for reuse:

Implements a lightweight in-process publish/subscribe event bus (LocalEventBus and LocalPubSub) that mimics Redis psubscribe/listen but requires no external broker. Uses asyncio for async event forwarding and supports channel pattern matching. Cleanly isolated, with minimal dependencies, making it reusable for any Python project needing decoupled, internal messaging.

file: ctp_native/bus.py ↗ | tags: #event-bus #pub-sub #in-process-messaging

A thread-safe persistent key-value store with TTL support. Writes JSON snapshots to disk and gracefully handles corruption. Designed for storing gateway state and limit ratios. Self-contained and can be extracted into other projects requiring a simple, durable cache without an external database.

file: ctp_native/state_store.py ↗ | tags: #key-value-store #persistent-cache #thread-safe

A custom Python logging handler that asynchronously pushes log messages to WeChat Work (企业微信) via a background thread and a queue. Manages token caching and retries. The pattern of a queue-based async logging handler is reusable for any remote notification service.

file: weixin_notifier.py ↗ | tags: #logging-handler #queue-based-push #wechat-integration
Last analyzed: 2026-08-30 11:59:58.885573
Next check: 2026-09-29 11:59:58.858525
$ submit: