# Margin Update

:::warning[]
You must be authenticated and [subscribed](https://docs.onetrading.com/websocket/subscribe.md) to the `TRADING` channel in order to receive `MARGIN_UPDATE` messages.
:::

The `MARGIN_UPDATE` message is sent via the trading channel to notify users of changes to their margin status when they have open futures positions. This message is triggered whenever the user's ratio moves into a new status category, reflecting changes in their account's risk and margin utilization.

The ratio represents the relationship between the user’s available margin and their maintenance margin requirement. Depending on the value of the ratio, the status changes as follows:


<Steps>
  <Step title="🟢 ACTIVE (Ratio > 1.5)">
    The account has sufficient margin to support its open positions. No immediate action is required.
  </Step>
  <Step title="🟠 DERISK (1.0 < Ratio ≤ 1.5)">
    The account is nearing its maintenance margin threshold. The user should take action, such as reducing open positions or adding margin, to avoid further risks.
  </Step>
  <Step title="🔴 LIQUIDATION (Ratio ≤ 1.0)">
    The account has fallen below the maintenance margin requirement, triggering liquidation of positions to bring the account back into compliance.
  </Step>
</Steps>

```json
{
    "channel_name": "TRADING",
    "type": "MARGIN_UPDATE",
    "cash_balance": "3000",
    "maintenance_margin": "525",
    "margin_used": "3000",
    "estimated_profit": "-3000",
    "ratio": 0.79,
    "status": "LIQUIDATION"
}
```

<DataSchema id="408021" />