Post-Trade Risk
Post-trade risk is evaluated after positions are open. When an account breaches a threshold (like a daily loss limit or trailing max drawdown), the system automatically liquidates positions and can lock the account.
Configuring Post-Trade Risk Settings
You can configure post-trade risk in two ways:
- At account creation, by providing a
postTradeRiskobject on the account object. - At any time after creation, by calling
updateUserAutoLiq.
Both methods let you configure the following settings:
All these fields are optional. Omitting a field will simply ignore calculations for that liquidation type. For example, an account without a dailyLossAutoLiq has no daily loss limit applied.
Checking Liquidation Status
To check where an account currently stands, call accountRiskStatus/list. It returns the following information for each account you can access: its current status (adminAction), the reason code for that status (adminActionReasonCode), the start and stop timestamps of the most recent auto-liquidation period (autoLiqStarted and autoLiqStopped), and how many times the account has been auto-liquidated (autoLiqCounter).