calc_margin
Calculate required margin for a hypothetical MetaTrader 5 order. Specify symbol, side, volume, and optional price to obtain margin in deposit currency.
Instructions
Broker-authoritative margin for a hypothetical order.
Wraps mt5.order_calc_margin. If price is omitted, uses the
current ask (buy) / bid (sell). Returned margin is in deposit
currency.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| side | Yes | ||
| volume | Yes | ||
| price | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| side | Yes | ||
| volume | Yes | ||
| price | Yes | ||
| margin | Yes | ||
| currency | Yes |