Idempotency
Network calls fail and retry. To make sure a retried submission never creates a duplicate
signal, send a client_signal_id — a stable string you generate per logical signal.
How it works
Section titled “How it works”- The first request with a given
client_signal_idis stored and returns201 Createdwith"deduped": false. - Any later request from the same desk with the same
client_signal_idis not stored again. It returns200 OKwith"deduped": trueand the original signal’sid.
Deduplication is scoped per desk: two different desks may use the same
client_signal_id without colliding.
Example
Section titled “Example”# First send → 201 Created, deduped: falsecurl -X POST https://api.traderz.dev/v1/signals \ -H "Authorization: Bearer $TRADERZ_API_KEY" -H "Content-Type: application/json" \ -d '{"source":"binance","type":"crypto","symbol":"ETH/USDT","side":"open","client_signal_id":"trade-8842-open"}'
# Same client_signal_id again → 200 OK, deduped: true, same idChoosing a key
Section titled “Choosing a key”- Make it deterministic for a given logical event — e.g.
${strategy}-${trade}-${side}. - Keep it stable across retries of the same event, and unique across different events.
- If you omit
client_signal_id, every request is stored as a new signal (no dedup).