The most-requested integration on Predexon. You pick a profitable wallet, watch every fill it does, and mirror those fills into your own account at a fraction of the size. You’ll build:Documentation Index
Fetch the complete documentation index at: https://docs.predexon.com/llms.txt
Use this file to discover all available pages before exploring further.
- A WebSocket listener that fires on every trade by the target wallet
- A handler that translates target-wallet trades into your-account orders
- A scale-and-execute path via the Order Router (cross-venue compatible)
Architecture
Step 1 — Verify the target
Before mirroring, check they’re actually profitable. Pull the wallet profile:Step 2 — Subscribe to their trades
The trades channel takes ausers filter. You’ll receive every fill they take in real time, on both V1 and V2 Polymarket contracts.
Step 3 — Scale and mirror
The hardest part of copy-trading is sizing. Mirror their trade as a fraction of their original size, capped by your venue balance.Step 4 — Run it under supervision
Things that will go wrong in production:| Failure | Mitigation |
|---|---|
| WebSocket disconnect | Wrap the loop with reconnect + resume. See Subscriptions. |
| Mirror order fails (insufficient balance) | Catch the 400, alert yourself, top up the venue, don’t auto-retry. |
| Target sells before you fill | Use market orders + smaller size; or accept the slippage as part of the cost. |
| Target wallet changes strategy | Re-pull the wallet profile daily; pause mirroring if realized_profit drops. |
| You mirror a trade and they immediately reverse | Build a “follow exits too” version: also handle side: "SELL" to close mirrored positions. |
Variations
- Multi-wallet copy-trading: subscribe with
filters: {"users": [w1, w2, w3, ...]}and route each trade to the right end-user account in your DB. - Filtered copy-trading: only mirror trades above a notional threshold, or in specific market categories.
- Cross-venue copy-trading: target trades on Polymarket, you mirror on Kalshi via canonical
predexon_id— the router handles the venue switch automatically. - Agent-driven copy-trading: replace the WebSocket loop with the Agent Cookbook recipe 4, which polls and reasons about whether to mirror.
Reference
- WebSocket trades channel — filter shape, event payload
- Order Router — Place — request body, response status
- Wallet Profile — for the daily target check
- Canonical Listings — token_id → predexon_id mapping
- Best Practices — WebSocket reconnect pattern
