Symbols and prices
The broker's symbols, their specifications and prices.
List symbols
Every symbol the broker offers the account, in Market Watch or not, read from the terminal. Large brokers list thousands; read a symbol for its full specification.
Path
The account's id, acc_ and 26 characters, as the dashboard shows it.
Response
A list of theseWhere it sits in the broker's symbol tree.
Whether the terminal could read its properties.
MT5's SYMBOL_TRADE_MODE: whether and which way the symbol can be traded.
Whether it is in the terminal's Market Watch.
Errors
| 401 | invalid_api_key | The key is not a workspace's current key (a rolled key stops working within about a minute). |
| 401 | missing_api_key | No API key: send it as |
| 404 | no_such_account | No such account, or one the key's workspace doesn't have: the two look the same. |
| 503 | account_not_connected | The account's terminal is not connected to the engine (stopped, starting, or restarting). Nothing was sent, except by the kill switch: engaging it still engages it, and may already have deleted pending orders. |
| 503 | engine_busy | The account's engine host has too many calls in flight (256). Nothing was done; try again. |
| 503 | engine_unavailable | The account's engine host is not connected to Pipsocket, or disconnected while the call waited. A trade it already had is still settled: look it up. |
| 503 | symbol_too_large | One symbol's entry is too large for the terminal to list. |
| 503 | terminal_error | The terminal did not give the answer asked for. |
| 504 | engine_timeout | The account's engine did not answer within 30 seconds. |
| 504 | terminal_timeout | The account's terminal did not answer within 5 seconds. |
Get a symbol
A symbol's specification from the terminal: digits, contract size, volume limits, stops and freeze levels, and the filling modes, execution, order types and expirations it allows.
Path
The account's id, acc_ and 26 characters, as the dashboard shows it.
The symbol exactly as the broker names it, such as EURUSD.
Response
Whether the terminal could read its properties; when false the rest are empty values.
The closest stops may be to the price, in points.
How close to the price an order or stop is frozen, in points.
MT5's flags, as filling_modes spells them out.
MT5's value, as trading spells it out.
MT5's value, as execution spells it out.
MT5's flags, as order_types spells them out.
MT5's flags, as expirations spells them out.
The type_filling modes MT5's SYMBOL_FILLING_MODE flags allow. return has no flag: whether it is accepted depends on the symbol's execution and the broker.
MT5's SYMBOL_TRADE_EXEMODE. Instant and request execution need price (and use deviation).
The orders the symbol allows (MT5's SYMBOL_ORDER_MODE).
The type_time values the symbol allows (MT5's SYMBOL_EXPIRATION_MODE).
MT5's SYMBOL_TRADE_MODE: whether and which way the symbol can be traded.
Errors
| 401 | invalid_api_key | The key is not a workspace's current key (a rolled key stops working within about a minute). |
| 401 | missing_api_key | No API key: send it as |
| 404 | no_such_account | No such account, or one the key's workspace doesn't have: the two look the same. |
| 404 | no_such_symbol | The broker has no symbol by that name. |
| 503 | account_not_connected | The account's terminal is not connected to the engine (stopped, starting, or restarting). Nothing was sent, except by the kill switch: engaging it still engages it, and may already have deleted pending orders. |
| 503 | engine_busy | The account's engine host has too many calls in flight (256). Nothing was done; try again. |
| 503 | engine_unavailable | The account's engine host is not connected to Pipsocket, or disconnected while the call waited. A trade it already had is still settled: look it up. |
| 503 | terminal_error | The terminal did not give the answer asked for. |
| 504 | engine_timeout | The account's engine did not answer within 30 seconds. |
| 504 | terminal_timeout | The account's terminal did not answer within 5 seconds. |
Get a symbol's price
The symbol's latest tick (MT5's MqlTick) from the terminal. A symbol the terminal has just added to Market Watch can take up to 2 seconds to have a price.
Path
The account's id, acc_ and 26 characters, as the dashboard shows it.
The symbol exactly as the broker names it, such as EURUSD.
Response
Broker server time, milliseconds since 1970.
MT5's TICK_FLAG_* bits: what changed.
Errors
| 401 | invalid_api_key | The key is not a workspace's current key (a rolled key stops working within about a minute). |
| 401 | missing_api_key | No API key: send it as |
| 404 | no_such_account | No such account, or one the key's workspace doesn't have: the two look the same. |
| 404 | no_such_symbol | The broker has no symbol by that name. |
| 503 | account_not_connected | The account's terminal is not connected to the engine (stopped, starting, or restarting). Nothing was sent, except by the kill switch: engaging it still engages it, and may already have deleted pending orders. |
| 503 | engine_busy | The account's engine host has too many calls in flight (256). Nothing was done; try again. |
| 503 | engine_unavailable | The account's engine host is not connected to Pipsocket, or disconnected while the call waited. A trade it already had is still settled: look it up. |
| 503 | no_price | The terminal has no price for the symbol yet (it waited 2 seconds). |
| 503 | terminal_error | The terminal did not give the answer asked for. |
| 504 | engine_timeout | The account's engine did not answer within 30 seconds. |
| 504 | terminal_timeout | The account's terminal did not answer within 5 seconds. |