Guide
Wallet Action Endpoints
Wallet Action Endpoints (you implement)
TS will call the following server-to-server endpoints. Use HTTPS only.
6.1 POST /Wallet/Getbalance
Called before opening a trade to check if funds are sufficient.
Request
Response (approve)
Return current balance (pre‑debit). If insufficient, return status:"InsufficientFunds" (see errors).
6.2 POST /Wallet/Opentrade
Reserve/hold the stake when TS opens a trade.
Request
Response
Idempotency: Treat (externalTradeId, externalTradeType) as an idempotency key. If you receive duplicates, return the same result without double‑debiting.
6.3 POST /Wallet/Closetrade
Settle outcome and release hold.
Request
Response
Outcome convention - In‑the‑money: amount = stake + payout - Out‑of‑the‑money: amount = 0 - At‑the‑money: amount = stake