Idempotency
Senticore guarantees idempotent order placement through client-controlled identifiers.
How it works
Every place-order request accepts a clientOrderId. The server stores the (account, clientOrderId) mapping. Re-submission of the same pair returns the existing order rather than creating a duplicate.
const order = await client.placeOrder({
market: 'BTC-USDC',
side: 'buy',
price: '60000',
quantity: '0.01',
clientOrderId: 'my-strategy-12345',
});
Retention
| State | Retention |
|---|---|
| Active order | Until terminal state |
| Terminal order | 7 days for reconciliation |
| Historical fill | Standard account history retention |
After retention, the same key can be reused by the client.
Best practices
- Generate
clientOrderIddeterministically from your internal order id. - Use UUID v4 if no deterministic source exists.
- Never reuse a key for a different intended order.
- Treat idempotency conflict as "already exists, fetch state".
- For cancel and replace, target the original
clientOrderId.
Protocol equivalents
| Surface | Equivalent |
|---|---|
| HTTP | clientOrderId or X-Client-Order-Id |
| FIX | ClOrdID tag 11 |
| Binary | client_order_id field |