One Trading API
REST APIWebSocket API
REST APIWebSocket API
  1. Trading
  • Introduction
  • Authenticate
  • Subscribe
  • Ping / Pong
  • Trading
    • Introduction
    • Dead Man Switch (Auto Cancellation)
    • Create Order
    • Cancel All Orders
    • Cancel Order by Client ID
    • Cancel Order by Order ID
    • Margin Update
    • Settlement
    • Funding Payment
    • Order Booked
    • Order Rejected
    • Order Closed
    • Trade Executed
    • Order Fully Filled
    • Balance Adjustment
  • Orderbook
    • Introduction
    • Orderbook Snapshot
    • Orderbook Update
  • Price Ticks
    • Introduction
    • Price Tick
  • Book Ticker
    • Introduction
    • Book Tick
  1. Trading

Margin Update

You must be authenticated and subscribed 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:
1
🟢 ACTIVE (Ratio > 1.5)
The account has sufficient margin to support its open positions. No immediate action is required.
2
🟠 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.
3
🔴 LIQUIDATION (Ratio ≤ 1.0)
The account has fallen below the maintenance margin requirement, triggering liquidation of positions to bring the account back into compliance.
{
    "channel_name": "TRADING",
    "type": "MARGIN_UPDATE",
    "cash_balance": "3000",
    "maintenance_margin": "525",
    "margin_used": "3000",
    "estimated_profit": "-3000",
    "ratio": 0.79,
    "status": "LIQUIDATION"
}
MarginUpdate
channel_name
enum<string> 
required
Always set to "TRADING" to indicate the trading channel.
Allowed value:
TRADING
type
enum<string> 
required
Always set to "MARGIN_UPDATE" to identify the message type.
Allowed value:
MARGIN_UPDATE
cash_balance
string 
required
The user's current cash balance in their trading account.
maintenance_margin
string 
required
The minimum margin required to maintain the open positions.
margin_used
string 
required
The amount of margin currently in use by open positions.
estimated_profit
string 
required
The unrealised profit or loss from open positions.
ratio
string 
required
The calculated account ratio, determining the account’s margin status.
status
enum<string> 
required
The current margin status (ACTIVE, DERISK, or LIQUIDATION).
Allowed values:
ACTIVEDERISKLIQUIDATION
Previous
Cancel Order by Order ID
Next
Settlement
Built with