Post-Trade Risk

Managing Post-Trade Risk is another place where our system shines. We allow our partners to set Post-Trade risk at the time of account creation. There are two ways to set Post-Trade risk:

  1. At account creation. You can configure Post-Trade risk by providing a postTradeRisk object on the account object.
  2. Any time you desire by using userAccountAutoLiq/update.

Structure

Both the creation-based post-trade risk management as well as the update-based post-trade risk management have the same basic JSON request structure. The userAccountAutoLiq/update and postTradeRisk fields should be a JSON object such as the following:

Response
1{
2 "id": 1,
3 "changesLocked": true,
4 "marginPercentageAlert": 1.1,
5 "dailyLossPercentageAlert": 1.1,
6 "dailyLossAlert": 1.1,
7 "marginPercentageLiqOnly": 1.1,
8 "dailyLossPercentageLiqOnly": 1.1,
9 "dailyLossLiqOnly": 1.1,
10 "marginPercentageAutoLiq": 1.1,
11 "dailyLossPercentageAutoLiq": 1.1,
12 "dailyLossAutoLiq": 1.1,
13 "weeklyLossAutoLiq": 1.1,
14 "flattenTimestamp": "2024-01-15T09:30:00Z",
15 "trailingMaxDrawdown": 1.1,
16 "trailingMaxDrawdownLimit": 1.1,
17 "trailingMaxDrawdownMode": "EOD",
18 "dailyProfitAutoLiq": 1.1,
19 "weeklyProfitAutoLiq": 1.1,
20 "doNotUnlock": true
21}

Here is a table of all of the settings you can define.

Note: You don’t need to assign a value for every field - omitting a field will simply ignore calculations for that liquidation type. For example, an account without a dailyLossAutoLiq has no daily loss limit applied.

FieldDescription
marginPercentageAlertSends an Alert to the permitted user when % margin is reached.
dailyLossPercentageAlertSends an Alert to the permitted user when this % of the day’s starting balance is reached
dailyLossAlertSends an Alert to the permitted user when this dollar value daily loss is reached
marginPercentageLiqOnlySets an account to Liquidate Only mode when % margin is reached (in
dailyLossPercentageLiqOnlySets an account to Liquidate Only mode when daily loss reaches this % of the day’s starting balance.
dailyLossLiqOnlySets an account to Liquidate Only mode when this dollar value daily loss is reached.
marginPercentageAutoLiqAutomatically liquidate an account that reaches this % of margin.
dailyLossPercentageAutoLiqAutomatically liquidate an account that reaches this % of daily loss from the day’s starting balance. Unlocks at the next market open.
dailyLossAutoLiqAutomatically liquidate an account that reaches this dollar value daily loss. Unlocks at the next market open
weeklyLossAutoLiqAutomatically liquidate an account that reaches this dollar value weekly loss. Unlocks at market open on Sunday.
flattenTimestampForce an account to flatten and cancel open positions at this time. *Note: this setting is for a specific date-time, not a repeating time. Once flattened, nothing prevents a user from re-opening positions.*
trailingMaxDrawdownSpecify the maximum loss the account can sustain before being auto-liquidated, trailing up as the account makes profit.
trailingMaxDrawdownLimitSpecify an equity level at which the trailing behavior stops. For example, if set to 50,100ona50,100 on a 50,000 account, the trailing drawdown level will not increase beyond $50,100.
trailingMaxDrawdownModeSpecify the behavior of trailing calculations. This can be "EOD" or "RealTime". When in "EOD" mode, the trailing level will only change at end-of-day (4PM CT). When in "RealTime" mode, the trailing level will change in real-time, even when unrealized profit is made.
dailyProfitAutoLiqYou can specify a dollar-value daily profit amount to liquidate an account at. Accounts locked this way will unlock at the next market open.
weeklyProfitAutoLiqSpecify a dollar-value weekly profit amount to liquidate this account. Accounts locked this way will unlock at the next Sunday open (5PM CT).
doNotUnlockIf this setting is set to true, this account will not unlock from the liquidation conditions listed above. This means even a daily loss level will lock an account semi-permanently (you the partner can still reset or manually unlock the account)