The Setup, Simplified
Getting trading signals from JoinQuant to your QMT terminal sounds like it should be complicated. With QuantLink, it takes three steps. No custom middleware, no server provisioning, no manual code editing (unless you want to). Here is how it works.
Step 1: Create Your Strategy on QuantLink
After signing in to QuantLink, create a new strategy entry. The platform generates two things you need:
- Webhook URL — the endpoint where JoinQuant will send signals (e.g.,
https://your-domain.com/api/webhooks/joinquant/abc123) - Webhook Token — a unique secret that authenticates incoming signals from JoinQuant
Keep the token secure. It acts as a password — only requests carrying the correct token are accepted. Each strategy gets its own token, so compromise of one does not affect others.
That is all the configuration you need on the QuantLink side for signal reception.
Step 2: Inject Signal Push Code into JoinQuant
Your JoinQuant strategy already has order calls like order_target_value(), order(), buy(), or sell(). QuantLink needs to know when these calls happen so it can relay the signals.
You have two options:
Option A: Auto-Injection (Recommended)
QuantLink includes an auto-injection feature that analyzes your JoinQuant Python code and automatically inserts send_signal_to_quantlink() calls after each order function. It handles eight order types: order_target_value, order, buy, sell, order_to, order_target_percent, order_value, and order_shares.
The injection process is idempotent — you can run it multiple times without creating duplicates. It also strips any previous QuantLink injections before applying new ones, so it is safe to re-inject after editing your strategy.
Option B: Manual Integration
If you prefer full control, you can manually add the signal function calls yourself. Each call sends the order details to QuantLink via HTTP POST.
Position Snapshot Reporting
During injection, QuantLink also adds a daily position snapshot reporter (run_daily at 15:05) that sends your JoinQuant virtual positions to the platform. This powers the drift monitoring feature, which compares virtual positions against your actual QMT holdings.
Step 3: Register Your QMT Terminal and Execute
On the QMT side, register your terminal with QuantLink. The platform assigns an auth token that your terminal uses to pull pending signals via a polling endpoint:
GET /api/terminals/pull
Authorization: Bearer <authToken>The terminal pulls signals, executes them locally through QMT's API, and sends an acknowledgment back to QuantLink:
POST /api/terminals/ackThis acknowledgment loop creates a complete delivery record:
- Signal received from JoinQuant (webhook)
- Signal queued for delivery
- Signal pulled by terminal
- Signal executed on QMT
- Execution confirmed back to QuantLink
Each step is timestamped, so you can measure end-to-end latency down to the millisecond.
Signal Deduplication: No Duplicate Orders
Network retries, terminal reconnections, and webhook redelivery can cause the same signal to arrive multiple times. QuantLink prevents this with SHA-256 payload hash deduplication.
Every incoming signal is hashed using its raw payload. If a signal with the same hash already exists in the database, it is silently discarded. This guarantee holds regardless of how many times JoinQuant retries the delivery.
Security: Authentication at Every Layer
Each connection point in the relay pipeline has its own authentication mechanism:
| Layer | Auth Method | Purpose |
|---|---|---|
| JoinQuant → QuantLink | Bearer webhookToken | Verify signal source |
| Terminal → QuantLink (pull) | Bearer authToken + device fingerprint | Verify terminal identity |
| Terminal → QuantLink (ack) | Bearer authToken | Confirm delivery |
Terminal auth includes device fingerprint binding — the first terminal to connect claims the token. If a different device attempts to connect, it receives a DEVICE_TAKEN_OVER error. This prevents unauthorized terminals from pulling your signals.
End-to-End Latency
From the moment JoinQuant sends a signal to the moment your terminal pulls it, the typical latency is under 100 milliseconds. The relay pipeline is designed for speed:
- Webhook processing and deduplication: ~10ms
- Signal queuing: ~5ms
- Terminal polling interval: configurable (default: frequent)
- Pull response time: ~20ms
For most trading strategies, this latency is negligible compared to exchange execution time.
Summary
| Feature | Detail |
|---|---|
| Setup time | Under 10 minutes |
| Steps required | 3 (create strategy, inject code, register terminal) |
| Code editing | None required (auto-injection) |
| Signal deduplication | SHA-256 payload hash |
| Typical latency | < 100ms end-to-end |
| Security | Token auth + device fingerprint binding |
Three steps. No middleware. No duplicated orders. That is the QuantLink signal relay.