Execute a payout (balance withdrawal)
Withdraw balance from a trading account synchronously — the trade engine deducts the amount in-memory within milliseconds and persists in the background.
Idempotency (recommended): send an Idempotency-Key header (or the equivalent x-idempotency-key — both spellings work everywhere). Replays with the same key return the original payout and never withdraw twice — safe to retry on timeouts. The key is honored at two layers: the API-wide idempotency cache (uniform across every mutating endpoint) and the trade engine itself (which guarantees the same key can never withdraw twice, HTTP 200 with duplicate: true).
What a payout does to the account:
- Deducts
amountfrom the balance. The daily baseline and high-water mark shift down by the same amount, so the withdrawal never appears as a trading loss or phantom drawdown. moveMllToLock(optional): locks the loss floor atinitial balance + payoutMllLockOffset(rule default, e.g. +$100) or at your explicitlockBalance. From then on, equity at/below the floor is a max-loss violation.consistencyReset(optional): starts a new payout cycle — the funded consistency rule resets to $0 cycle profit.enforceConsistency(optional): pre-checks the funded consistency rule and rejects the payout with the full status if any day in the cycle reaches the daily cap.
Requirements: the account must be flat (no open positions or working orders) and tradable.
Webhooks: account.payout_processed fires on every executed payout; account.max_payouts_reached fires when the account hits the rule’s maxPayouts (e.g. “goes live after 5 payouts”).
Example:
curl -X POST ".../v1/organization/accounts/7c9e6679-7425-40de-944b-e07fc1f90ae7/payouts" \
-H "X-API-Key: hp_live_your_key_here" \
-H "x-idempotency-key: payout-2026-07-13-acc7c9e" \
-H "Content-Type: application/json" \
-d '{ "amount": 1600, "moveMllToLock": true, "consistencyReset": true, "enforceConsistency": true }'
Error codes:
| Code | Meaning |
|---|---|
OPEN_EXPOSURE | Account has open positions/working orders — flatten first |
CONSISTENCY_BLOCKED | Funded consistency rule fails right now (response includes the full consistency status with the blocking days) |
INVALID_AMOUNT | Amount exceeds balance, or post-payout balance would breach the requested loss floor |
ACCOUNT_NOT_TRADABLE | Account is violated/completed/paused |
ENGINE_UNREACHABLE | Engine did not respond — the payout was NOT executed; retry with the same idempotency key |
Authorizations
JWT Bearer token for user session auth. Format: "Bearer {token}". Used by User and Organization endpoints.
Path Parameters
Trading account to withdraw from
Body
Amount to withdraw from the account balance ($)
1600
Lock the max-loss floor after the withdrawal: floor = initial balance + the rule's payoutMllLockOffset (or lockBalance when provided). Equity at/below the locked floor fails the account.
true
Explicit loss-floor balance for moveMllToLock (overrides the rule's payoutMllLockOffset).
50100
Start a new consistency payout cycle at the post-withdrawal balance. The funded consistency rule then measures against profit made after this payout.
true
Reject the payout (409 CONSISTENCY_BLOCKED, with the full consistency status in the response) when the account currently fails its funded consistency rule.
true
Related topics
List payouts for an accountIdempotencyPayout queue — bulk payout eligibilityUpdate a trading accountMCP connector (AI agents)