Skip to main content
Use a balance adjustment when money moves on your side (a deposit, a withdrawal, a correction) and the trading account should follow. You send a signed amount and your own reference; Hyperprop changes the account’s live balance by that amount and records it under your reference.
A balance adjustment changes the balance by an amount. It never sets the balance to a value, so it cannot overwrite profit or loss the trader makes at the same moment. Use it instead of setting currentBalance with PATCH /organization/trading-accounts/{accountId} whenever the account may be trading.

Credit or debit an account

A new adjustment returns 201 Created:
balanceBefore and balanceAfter are the live balance just before and just after the change. To debit, send a negative amount, for example "amount": -250.

Retry safely with your reference

Your reference is the idempotency key, and it never expires.
  • Same reference, same request: you get the original adjustment back with 200 and "replayed": true. Nothing changes.
  • Same reference, different request (another account, amount, reason, metadata or option): refused with 409 REFERENCE_CONFLICT. Use a new reference for a new adjustment.
So when a call times out or your process restarts, send the same request again. It is applied once at most. The Idempotency-Key header is accepted too, as on every write, but you do not need it here.

Which accounts can be adjusted

Debits and the account’s rules

  • A debit that would take the balance below zero is refused with 422 INSUFFICIENT_BALANCE. Nothing is recorded, so you can reuse the reference.
  • A debit is not checked against the account’s loss limits. The account’s rules apply to the new balance as after any balance change, so a debit that reaches the maximum loss or drawdown limit fails the account and you receive account.failed. Check the account with GET /organization/trading-accounts/{accountId} first when that matters.

Errors

The two 503 answers include the adjustment in an adjustment field. Sending the same request again settles it; it is never applied twice.

Reconcile

List an account’s adjustments, newest first (filter by status, paginate with limit and offset):
Or look one up by your reference, for example after a response you did not receive:

Webhooks

Subscribe an endpoint to account.balance_adjusted to receive one event per adjustment (never for a replay):
account.balance_adjusted is delivered only to endpoints that list it explicitly. A "*" subscription does not include it.
Every adjustment also produces account.updated (with trigger balance_adjustment) and, for its subscribers, account.balance_changed with reason adjustment.

Permissions

Creating an adjustment needs manage permission on Traders & accounts, the same as editing an account’s balance. Listing and reading need view.