Search Docs…

Search Docs…

Reference

Balance Consistency Rules

Balance Consistency Rules

  1. Pre‑check: TS calls getbalance before attempting opentrade.

  2. Hold on open: You must reduce available funds / place a hold by amount.

  3. Settle on close: Add amount back if win/tie (per convention) and release the hold. For loss, release hold without crediting.

  4. Atomicity: opentrade and closetrade must be atomic on your side; protect against retries (idempotency) to avoid double processing.