Skip to content

Metatrader symbol specification#

About#

Contains symbol specification.

Fields#

Name Type Required Description
symbol string Yes symbol (e.g. a currency pair or an index)
tickSize number Yes tick size
minVolume number Yes minimum order volume for the symbol
maxVolume number Yes maximum order volume for the symbol
volumeStep number Yes order volume step for the symbol
fillingModes array Yes list of allowed order filling modes. Can contain ORDER_FILLING_FOK, ORDER_FILLING_IOC or both. See MQL5 docs for more details.
executionMode string Yes deal execution mode. Possible values are SYMBOL_TRADE_EXECUTION_REQUEST, SYMBOL_TRADE_EXECUTION_INSTANT, SYMBOL_TRADE_EXECUTION_MARKET, SYMBOL_TRADE_EXECUTION_EXCHANGE. See MQL5 docs for more details.
contractSize number Yes trade contract size
quoteSessions MetatraderSessions Yes quote sessions, indexed by day of week
tradeSessions MetatraderSessions Yes trade sessions, indexed by day of week
tradeMode string order execution type. Possible values are SYMBOL_TRADE_MODE_DISABLED, SYMBOL_TRADE_MODE_LONGONLY, SYMBOL_TRADE_MODE_SHORTONLY, SYMBOL_TRADE_MODE_CLOSEONLY, SYMBOL_TRADE_MODE_FULL. See MQL5 docs for more details.
bondAccruedInterest number accrued interest – accumulated coupon interest, i.e. part of the coupon interest calculated in proportion to the number of days since the coupon bond issuance or the last coupon interest payment
bondFaceValue number face value – initial bond value set by the issuer
optionStrike number the strike price of an option. The price at which an option buyer can buy (in a Call option) or sell (in a Put option) the underlying asset, and the option seller is obliged to sell or buy the appropriate amount of the underlying asset.
optionPriceSensivity number option/warrant sensitivity shows by how many points the price of the option's underlying asset should change so that the price of the option changes by one point
liquidityRate number liquidity Rate is the share of the asset that can be used for the margin
initialMargin number Yes initial margin means the amount in the margin currency required for opening a position with the volume of one lot. It is used for checking a client's assets when he or she enters the market
maintenanceMargin number Yes the maintenance margin. If it is set, it sets the margin amount in the margin currency of the symbol, charged from one lot. It is used for checking a client\'s assets when his/her account state changes. If the maintenance margin is equal to 0, the initial margin is used
hedgedMargin number Yes contract size or margin value per one lot of hedged positions (oppositely directed positions of one symbol). Two margin calculation methods are possible for hedged positions. The calculation method is defined by the broker
priceCalculationMode string Yes contract price calculation mode. One of SYMBOL_CALC_MODE_UNKNOWN, SYMBOL_CALC_MODE_FOREX, SYMBOL_CALC_MODE_FOREX_NO_LEVERAGE, SYMBOL_CALC_MODE_FUTURES, SYMBOL_CALC_MODE_CFD, SYMBOL_CALC_MODE_CFDINDEX, SYMBOL_CALC_MODE_CFDLEVERAGE, SYMBOL_CALC_MODE_EXCH_STOCKS, SYMBOL_CALC_MODE_EXCH_FUTURES, SYMBOL_CALC_MODE_EXCH_FUTURES_FORTS, SYMBOL_CALC_MODE_EXCH_BONDS, SYMBOL_CALC_MODE_EXCH_STOCKS_MOEX, SYMBOL_CALC_MODE_EXCH_BONDS_MOEX, SYMBOL_CALC_MODE_SERV_COLLATERAL. See MQL5 docs for more details.
hedgedMarginUsesLargerLeg boolean calculating hedging margin using the larger leg (Buy or Sell)
marginCurrency string Yes margin currency
baseCurrency string Yes base currency
profitCurrency string profit currency
swapMode string Yes swap calculation model. Allowed values are SYMBOL_SWAP_MODE_DISABLED, SYMBOL_SWAP_MODE_POINTS, SYMBOL_SWAP_MODE_CURRENCY_SYMBOL, SYMBOL_SWAP_MODE_CURRENCY_MARGIN, SYMBOL_SWAP_MODE_CURRENCY_DEPOSIT, SYMBOL_SWAP_MODE_INTEREST_CURRENT, SYMBOL_SWAP_MODE_INTEREST_OPEN, SYMBOL_SWAP_MODE_REOPEN_CURRENT, SYMBOL_SWAP_MODE_REOPEN_BID. See MQL5 docs for more details
swapLong number long swap value
swapShort number short swap value
swapRollover3Days string day of week to charge 3 days swap rollover. Allowed values are SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURDAY, FRIDAY, SATURDAY, NONE
allowedExpirationModes array Yes allowed order expiration modes. Allowed values are SYMBOL_EXPIRATION_GTC, SYMBOL_EXPIRATION_DAY, SYMBOL_EXPIRATION_SPECIFIED, SYMBOL_EXPIRATION_SPECIFIED_DAY. See MQL5 docs for more details
allowedOrderTypes array Yes allowed order types. Allowed values are SYMBOL_ORDER_MARKET, SYMBOL_ORDER_LIMIT, SYMBOL_ORDER_STOP, SYMBOL_ORDER_STOP_LIMIT, SYMBOL_ORDER_SL, SYMBOL_ORDER_TP, SYMBOL_ORDER_CLOSEBY. See MQL5 docs for more details
orderGTCMode string if the expirationMode property is set to SYMBOL_EXPIRATION_GTC (good till canceled), the expiration of pending orders, as well as of Stop Loss/Take Profit orders should be additionally set using this enumeration. Allowed values are SYMBOL_ORDERS_GTC, SYMBOL_ORDERS_DAILY, SYMBOL_ORDERS_DAILY_EXCLUDING_STOPS. See MQL5 docs for more details
digits number Yes digits after a decimal point
point number Yes point size
path string path in the symbol tree
description string Yes symbol description
startTime datetime date of the symbol trade beginning (usually used for futures)
expirationTime datetime date of the symbol trade end (usually used for futures)
pipSize number size of a pip. Pip size is defined for spot and CFD symbols only
stopsLevel number Yes minimal distance from the current market price to stop price (SL, TP, open price) in points. The SL, TP, open price can not be placed closer to market price than this distance.
freezeLevel number Yes distance in points from market price to pending order open price to freeze updates on the pending order. If the distance between order open price and current market price is less than this value, then you are not allowed to modify the pending order.

MetatraderSessions fields#

Name Type Required Description
SUNDAY MetatraderSession array of sessions for SUNDAY
MONDAY MetatraderSession array of sessions for MONDAY
TUEDSAY MetatraderSession array of sessions for TUESDAY
WEDNESDAY MetatraderSession array of sessions for WEDNESDAY
THURSDAY MetatraderSession array of sessions for THURSDAY
FRIDAY MetatraderSession array of sessions for FRIDAY
SATURDAY MetatraderSession array of sessions for SATURDAY

MetatraderSession fields#

Name Type Required Description
from string Yes session start time, in hh.mm.ss.SSS format
to string Yes session end time, in hh.mm.ss.SSS format

Example#

{
  "symbol": "AUDNZD",
  "tickSize": 0.00001,
  "minVolume": 0.01,
  "maxVolume": 100,
  "volumeStep": 0.01,
  "contractSize": 100000,
  "quoteSessions": {
    "SUNDAY": [],
    "MONDAY": [{"from": "00:00:00.000", "to": "23:59:59.999"}],
    "TUESDAY": [{"from": "00:00:00.000", "to": "23:59:59.999"}],
    "WEDNESDAY": [{"from": "00:00:00.000", "to": "23:59:59.999"}],
    "THURSDAY": [{"from": "00:00:00.000", "to": "23:59:59.999"}],
    "FRIDAY": [{"from": "00:00:00.000", "to": "23:59:59.999"}],
    "SATURDAY": []
  },
  "tradeSessions": {
    "SUNDAY": [],
    "MONDAY": [{"from": "00:05:00.000", "to": "23:59:59.999"}],
    "TUESDAY": [{"from": "00:05:00.000", "to": "23:59:59.999"}],
    "WEDNESDAY": [{"from": "00:05:00.000", "to": "23:59:59.999"}],
    "THURSDAY": [{"from": "00:05:00.000", "to": "23:59:59.999"}],
    "FRIDAY": [{"from": "00:05:00.000", "to": "23:59:59.999"}],
    "SATURDAY": []
  },
  "initialMargin": 100000,
  "maintenenceMargin": 0,
  "hedgedMargin": 0,
  "priceCalculationMode": "SYMBOL_CALC_MODE_FOREX",
  "marginCurrency": "AUD",
  "baseCurrency": "AUD",
  "profitCurrency": "NZD",
  "swapMode": "SYMBOL_SWAP_MODE_DISABLED",
  "allowedExpirationModes": ["SYMBOL_EXPIRATION_GTC", "SYMBOL_EXPIRATION_DAY", "SYMBOL_EXPIRATION_SPECIFIED", "SYMBOL_EXPIRATION_SPECIFIED_DAY"],
  "allowedOrderTypes": ["SYMBOL_ORDER_MARKET", "SYMBOL_ORDER_LIMIT", "SYMBOL_ORDER_STOP", "SYMBOL_ORDER_STOP_LIMIT", "SYMBOL_ORDER_SL", "SYMBOL_ORDER_TP", "SYMBOL_ORDER_CLOSEBY"],
  "digits": 5,
  "description": "Australian Dollar vs New Zealand Dollar"
}

Usages#