Margin:
Margin trading allows users operating with borrowed leveraged funds at the cost of a collateral (margin)—a relatively small amount of user's funds on their trading account. The user may top up the margin separately for each symbol (on an isolated margin account). During the period of margin existence, the user cannot decrease the balance by the reserved value (margin must be retrieved beforehand). Likewise, the user cannot retrieve margin already reserved for a position.
To open a new position, the user places an open order—and opens a zero position. A zero position, in fact, is not open—it may be canceled by cancelling all open orders before these are executed.
After an open order has been executed, the user enters a position and may close it by placing and executing orders of the opposite direction until the position quantity reaches zero. If the quantity of a close order exceeds residual position's quantity, the position will flip—i.e., change its direction and remain open.
The position may be closed either by the user performing a single trade at the market price, or by the system (liquidated) if the market goes to the point where the position is unlikely to gain any profit.
All sums charged and/or paid are denominated in units of the quote currency.
Setting Margin
Before opening a position, the user defines an amount of funds on the trading account pledged as a collateral. After that, a zero position is created even before the first order placement.
Order and Position Margin
The total account margin is comprised of orders margin and position margin
M = Mo + M
Margin Parameters
Margin parameters define the way and conditions of position liquidation, including the following parameters:
- CCA;
- BEA;
- force close fee (ffc );
- force close mode:
- place a FOK order before an OTC trade;
- place an IOC order before an OTC trade;
- perform an OTC trade immediately after liquidation.
- margin call leverage (Lmc );
- liquidation leverage (Lliq).
A position cannot be placed before margin parameters are set up for a symbol.
Opening
A position opens after the first open trade: at this point a part of order margin is being converted into position margin and cannot be retrieved just by cancellation.
Closing
A position is closed after its quantity becomes equal to zero as a result of a close trade. The user may deliberately close a position with a market or a limit order.
Liquidation
The liquidation process may be triggered by any of the following events:
- trade;
- (if there are no trades) periodically;
- interests charged.
For an individual symbol, after a trigger event has occurred, the system performs liquidation checks in the following order:
- Over the position that is funded by the isolated margin account.
- Over the positions that are funded by a common cross–margin account.