# MetaTrader 5 Python API

Independent and unofficial. Not affiliated with or endorsed by any broker or platform named here. Educational only: nothing here is advice, and nothing here recommends a broker or a trade.

This is the markdown version of https://openbrokerapi.com/platforms/metatrader-5, written from the same records as that page.

Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.

MetaQuotes' multi-asset trading terminal. MQL5 programs run inside it, and the MetaTrader5 Python package talks to it locally.

- Kind: Platform API
- Newest reading: 2026-10-12
- Official documentation: [mql5.com](https://www.mql5.com/en/docs/python_metatrader5)
- Everything recorded for MetaTrader 5 (Python package and MQL5), as one JSON file: https://openbrokerapi.com/data/platforms/metatrader-5.json
- Quickstart, key to first call: https://openbrokerapi.com/platforms/metatrader-5/quickstart

## Access, authentication and streaming

- How you get access: Install the MT5 terminal from your broker, then pip install MetaTrader5 on Windows x86-64 or write MQL5 in MetaEditor. The terminal must be at build 4755 or later.
  - Status: verified. Source: [order_send](https://www.mql5.com/en/docs/python_metatrader5/mt5ordersend_py), checked 2026-09-20.
- Who can use it: Real accounts come from brokers offering MT5; the API runs through your own local terminal.
  - Status: verified. Source: [Opening an account (MT5 help)](https://www.metatrader5.com/en/terminal/help/startworking/acc_open), checked 2026-09-21.
- Demo: Yes: demo accounts can be opened from within the terminal.
  - Status: verified. Source: [Opening an account (MT5 help)](https://www.metatrader5.com/en/terminal/help/startworking/acc_open), checked 2026-09-21.
- Authentication: No API keys: initialize() connects to the local terminal, optionally with account login, password and server.
  - Status: verified. Source: [initialize](https://www.mql5.com/en/docs/python_metatrader5/mt5initialize_py), checked 2026-09-20.
- Streaming: No push API in Python: poll ticks and bars; market_book_add subscribes the terminal to depth events. MQL5 EAs get tick events.
  - Status: verified. Source: [MetaTrader for Python](https://www.mql5.com/en/docs/python_metatrader5), checked 2026-09-20.
- History depth: Bars limited to the terminal's Max bars in chart setting. Deal history by date range with no stated limit.
  - Status: verified. Source: [MQL5 docs: copy_rates_from](https://www.mql5.com/en/docs/python_metatrader5/mt5copyratesfrom_py), checked 2026-09-22.
- Rate limits, as worded: Not published. The Python page states none, carries no version and no date, and gives no consolidated error list beyond last_error() (read 22 Sep 2026).
  - Status: verified. Source: [MetaTrader for Python](https://www.mql5.com/en/docs/python_metatrader5), checked 2026-09-20.

## MetaTrader 5 functions

78 documented functions. They are not HTTP endpoints: none has a method or a path. [Grouped by what they do](https://openbrokerapi.com/platforms/metatrader-5/functions).

- [account_info()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-account-info) (MetaTrader5 Python package): Returns everything the terminal holds about the trading account it is logged in to, in one call.
- [copy_rates_from()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-copy-rates-from) (MetaTrader5 Python package): Returns a number of bars for one instrument and timeframe, counting back from a date.
- [copy_rates_from_pos()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-copy-rates-from-pos) (MetaTrader5 Python package): Returns a number of bars for one instrument and timeframe, starting from a bar index where 0 is the bar now forming.
- [copy_rates_range()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-copy-rates-range) (MetaTrader5 Python package): Returns the bars for one instrument and timeframe that open between two dates.
- [copy_ticks_from()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-copy-ticks-from) (MetaTrader5 Python package): Returns a number of ticks for one instrument, starting from a date.
- [copy_ticks_range()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-copy-ticks-range) (MetaTrader5 Python package): Returns the ticks for one instrument between two dates.
- [history_deals_get()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-history-deals-get) (MetaTrader5 Python package): Returns deals from the account's trading history: those between two dates, optionally filtered by symbol, or those of one order, or those of one position.
- [history_deals_total()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-history-deals-total) (MetaTrader5 Python package): Returns how many deals are in the account's trading history between two dates.
- [history_orders_get()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-history-orders-get) (MetaTrader5 Python package): Returns orders from the account's trading history: those between two dates, optionally filtered by symbol, or the one with a given ticket, or those of one position.
- [history_orders_total()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-history-orders-total) (MetaTrader5 Python package): Returns how many orders are in the account's trading history between two dates.
- [initialize()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-initialize) (MetaTrader5 Python package): Connects the Python package to a MetaTrader 5 terminal on the same computer, starting the terminal if it is not running, and can log in to a trading account in the same call.
- [last_error()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-last-error) (MetaTrader5 Python package): Returns the code and description of the last error raised by a call to the package. The codes are the package's own, not the terminal's.
- [login()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-login) (MetaTrader5 Python package): Switches the connected terminal to a trading account, by account number, with the password and server optional.
- [market_book_add()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-market-book-add) (MetaTrader5 Python package): Subscribes the terminal to changes in the depth of market for one instrument, which is what makes market_book_get() return data.
- [market_book_get()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-market-book-get) (MetaTrader5 Python package): Returns the current depth of market for one instrument, once market_book_add() has subscribed the terminal to it.
- [market_book_release()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-market-book-release) (MetaTrader5 Python package): Ends the terminal's subscription to depth of market changes for one instrument.
- [order_calc_margin()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-order-calc-margin) (MetaTrader5 Python package): Works out the margin, in the account's currency, that a trade of a given type, symbol, volume and price would need.
- [order_calc_profit()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-order-calc-profit) (MetaTrader5 Python package): Works out the profit or loss, in the account's currency, of a trade opened at one price and closed at another.
- [order_check()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-order-check) (MetaTrader5 Python package): Checks whether the account has the funds for a trade request without sending it, and returns what the balance, equity and margin would be.
- [order_send()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-order-send) (MetaTrader5 Python package): Sends a trade request from the terminal to the trade server. One call covers a market order, a pending order, a change to an order or position, a cancellation and a close: the request's action field says which.
- [orders_get()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-orders-get) (MetaTrader5 Python package): Returns the active pending orders on the account: all of them, those in one symbol, those whose symbol matches a filter, or the one with a given ticket.
- [orders_total()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-orders-total) (MetaTrader5 Python package): Returns how many pending orders are active on the account.
- [positions_get()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-positions-get) (MetaTrader5 Python package): Returns the open positions on the account: all of them, those in one symbol, those whose symbol matches a filter, or the one with a given ticket.
- [positions_total()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-positions-total) (MetaTrader5 Python package): Returns how many positions are open on the account.
- [shutdown()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-shutdown) (MetaTrader5 Python package): Closes the connection that initialize() opened between the Python package and the terminal.
- [symbol_info()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-symbol-info) (MetaTrader5 Python package): Returns the terminal's data on one financial instrument: its contract and dealing properties as well as its latest prices.
- [symbol_info_tick()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-symbol-info-tick) (MetaTrader5 Python package): Returns the last tick the terminal has for one financial instrument.
- [symbol_select()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-symbol-select) (MetaTrader5 Python package): Adds a financial instrument to the terminal's Market Watch window, or removes it.
- [symbols_get()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-symbols-get) (MetaTrader5 Python package): Returns the financial instruments in the terminal, all of them or those whose names match a filter.
- [symbols_total()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-symbols-total) (MetaTrader5 Python package): Returns how many financial instruments the terminal holds.
- [terminal_info()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-terminal-info) (MetaTrader5 Python package): Returns the status and settings of the connected terminal in one call.
- [version()](https://openbrokerapi.com/platforms/metatrader-5/functions/python-version) (MetaTrader5 Python package): Returns the version of the connected MetaTrader 5 terminal, with its build number and the date of that build.
- [AccountInfoDouble()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-accountinfodouble) (MQL5): Returns one floating point property of the trading account, such as its balance, equity or free margin.
- [AccountInfoInteger()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-accountinfointeger) (MQL5): Returns one integer property of the trading account, such as its number, its leverage or whether trading is allowed.
- [AccountInfoString()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-accountinfostring) (MQL5): Returns one text property of the trading account, such as its currency, the server's name or the broker's company name.
- [CopyRates()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-copyrates) (MQL5): Copies historical bars of a symbol and timeframe into an array of MqlRates structures, by start position and count, by start time and count, or between two times.
- [CopyTicks()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-copyticks) (MQL5): Copies ticks of a symbol into an array of MqlTick structures, from a time onwards or the most recent ones. The oldest tick copied is at index 0.
- [CopyTicksRange()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-copyticksrange) (MQL5): Copies the ticks of a symbol between two times into an array of MqlTick structures. The oldest tick copied is at index 0.
- [HistoryDealGetDouble()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-historydealgetdouble) (MQL5): Returns one floating point property of a deal in the account's history, by ticket.
- [HistoryDealGetInteger()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-historydealgetinteger) (MQL5): Returns one integer or date property of a deal in the account's history, by ticket.
- [HistoryDealGetString()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-historydealgetstring) (MQL5): Returns one text property of a deal in the account's history, by ticket.
- [HistoryDealGetTicket()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-historydealgetticket) (MQL5): Returns the ticket of the deal at a place in the loaded history, and selects that deal for the history deal functions.
- [HistoryDealSelect()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-historydealselect) (MQL5): Selects one deal in the account's history by its ticket, so the history deal functions can read it.
- [HistoryDealsTotal()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-historydealstotal) (MQL5): Returns how many deals are in the history that was last loaded.
- [HistoryOrderGetDouble()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-historyordergetdouble) (MQL5): Returns one floating point property of an order in the account's history, by ticket.
- [HistoryOrderGetInteger()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-historyordergetinteger) (MQL5): Returns one integer or date property of an order in the account's history, by ticket.
- [HistoryOrderGetString()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-historyordergetstring) (MQL5): Returns one text property of an order in the account's history, by ticket.
- [HistoryOrderGetTicket()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-historyordergetticket) (MQL5): Returns the ticket of the order at a place in the loaded history.
- [HistoryOrderSelect()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-historyorderselect) (MQL5): Selects one order in the account's history by its ticket, so the history order functions can read it.
- [HistoryOrdersTotal()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-historyorderstotal) (MQL5): Returns how many orders are in the history that was last loaded.
- [HistorySelect()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-historyselect) (MQL5): Loads the account's history of deals and orders for a period of server time, so the other history functions have something to read.
- [HistorySelectByPosition()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-historyselectbyposition) (MQL5): Loads the deals and orders that belong to one position, by the position's identifier.
- [OrderCalcMargin()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-ordercalcmargin) (MQL5): Works out the margin, in the account's currency, that an order of a given type, symbol, volume and price would need on the account as it stands.
- [OrderCalcProfit()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-ordercalcprofit) (MQL5): Works out the profit or loss, in the account's currency, of a trade opened at one price and closed at another, on the account and market as they stand.
- [OrderCheck()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-ordercheck) (MQL5): Checks whether there is enough money for a trade request without sending it, and writes what the account would look like into a result structure.
- [OrderGetDouble()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-ordergetdouble) (MQL5): Returns one floating point property of a pending order. It reads the order last selected with OrderGetTicket() or OrderSelect().
- [OrderGetInteger()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-ordergetinteger) (MQL5): Returns one integer or date property of a pending order. It reads the order last selected with OrderGetTicket() or OrderSelect().
- [OrderGetString()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-ordergetstring) (MQL5): Returns one text property of a pending order. It reads the order last selected with OrderGetTicket() or OrderSelect().
- [OrderGetTicket()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-ordergetticket) (MQL5): Returns the ticket of the pending order at a position in the list of current orders, and selects that order so its properties can be read.
- [OrderSelect()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-orderselect) (MQL5): Selects a pending order by its ticket, so that OrderGetDouble(), OrderGetInteger() and OrderGetString() read that order.
- [OrderSend()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-ordersend) (MQL5): Sends a trade request to the trade server and waits for its answer. One function covers a market order, a pending order, a change, a cancellation and a close: the action field of the request says which.
- [OrderSendAsync()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-ordersendasync) (MQL5): Sends a trade request to the trade server without waiting for its answer. The page describes it as made for high frequency trading, where waiting for the server is not acceptable.
- [OrdersTotal()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-orderstotal) (MQL5): Returns how many pending orders are current on the account.
- [PositionGetDouble()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-positiongetdouble) (MQL5): Returns one floating point property of an open position. It reads the position last selected with PositionGetSymbol() or PositionSelect().
- [PositionGetInteger()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-positiongetinteger) (MQL5): Returns one integer or date property of an open position. It reads the position last selected with PositionGetSymbol() or PositionSelect().
- [PositionGetString()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-positiongetstring) (MQL5): Returns one text property of an open position. It reads the position last selected with PositionGetSymbol() or PositionSelect().
- [PositionGetSymbol()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-positiongetsymbol) (MQL5): Returns the symbol of the open position at a place in the list of positions, and selects that position so its properties can be read.
- [PositionGetTicket()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-positiongetticket) (MQL5): Returns the ticket of the open position at an index in the list of positions, and selects that position so its properties can be read.
- [PositionSelect()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-positionselect) (MQL5): Selects the open position in a symbol, so that PositionGetDouble(), PositionGetInteger() and PositionGetString() read it.
- [PositionSelectByTicket()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-positionselectbyticket) (MQL5): Selects an open position by its ticket, so that PositionGetDouble(), PositionGetInteger() and PositionGetString() read it.
- [PositionsTotal()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-positionstotal) (MQL5): Returns how many positions are open on the account.
- [SymbolInfoDouble()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-symbolinfodouble) (MQL5): Returns one floating point property of a symbol, such as its bid, its ask or its point size.
- [SymbolInfoInteger()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-symbolinfointeger) (MQL5): Returns one integer property of a symbol, such as its spread, or whether that spread floats.
- [SymbolInfoString()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-symbolinfostring) (MQL5): Returns one text property of a symbol, such as its description or its base and profit currencies.
- [SymbolInfoTick()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-symbolinfotick) (MQL5): Writes the current prices of a symbol, with the time they were last updated, into an MqlTick structure.
- [SymbolName()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-symbolname) (MQL5): Returns the name of the symbol at a place in the list of symbols.
- [SymbolSelect()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-symbolselect) (MQL5): Adds a symbol to the Market Watch window, or removes it.
- [SymbolsTotal()](https://openbrokerapi.com/platforms/metatrader-5/functions/mql5-symbolstotal) (MQL5): Returns how many symbols are available: those selected in Market Watch, or all of them.

## MetaTrader 5 API SDKs and wrappers

- MetaTrader5 (Python, Official): Official MetaQuotes package, version 5.0.6231 of 27 Sep 2026, MIT licence, CPython 3.6 to 3.14, classified Production/Stable. Wheels are published for Windows x86-64 only, so the Python route is Windows only.
  - Status: verified. Source: [pypi.org](https://pypi.org/project/MetaTrader5/), checked 2026-10-04.
- Community Python MCP server (MQL5 article 21905) (Python, Community): A community route documented in MQL5's own article library on 30 Apr 2026, separate from the native MCP in build 6060. It exposes 14 tools including place, modify and cancel orders, is Windows only because of the MT5 Python API, is single-threaded, and executes on whatever account MT5 is logged into. It has no approval step. The author advises demo testing first.
  - Status: verified. Source: [mql5.com](https://www.mql5.com/en/articles/21905), checked 2026-09-19.

## MetaTrader 5 API error codes

311 decoded error codes. [All MetaTrader 5 (Python package and MQL5) errors](https://openbrokerapi.com/errors/mt5).

- [-1](https://openbrokerapi.com/errors/mt5/res-e-fail): A generic failure.
- [-2](https://openbrokerapi.com/errors/mt5/res-e-invalid-params): The function was called with invalid arguments.
- [-3](https://openbrokerapi.com/errors/mt5/res-e-no-memory): The terminal ran out of memory.
- [-4](https://openbrokerapi.com/errors/mt5/res-e-not-found): No history was found for the request.
- [-5](https://openbrokerapi.com/errors/mt5/res-e-invalid-version): Version mismatch.
- [-6](https://openbrokerapi.com/errors/mt5/res-e-auth-failed): Login to the trade account failed.
- [-7](https://openbrokerapi.com/errors/mt5/res-e-unsupported): The method is not supported.
- [-8](https://openbrokerapi.com/errors/mt5/minus-8-res-e-auto-trading-disabled): Algo trading is disabled in the terminal.
- [-10000](https://openbrokerapi.com/errors/mt5/res-e-internal-fail): General failure talking to the terminal.
- [-10001](https://openbrokerapi.com/errors/mt5/res-e-internal-fail-send): Sending to the terminal failed.
- [-10002](https://openbrokerapi.com/errors/mt5/res-e-internal-fail-receive): Receiving from the terminal failed.
- [-10003](https://openbrokerapi.com/errors/mt5/minus-10003-res-e-internal-fail-init): IPC initialisation failed; the docs also list RES_E_INTERNAL_FAIL_CONNECT (internal IPC no ipc) under -10003.
- [-10003](https://openbrokerapi.com/errors/mt5/res-e-internal-fail-connect): No interprocess link (IPC) between the Python package and the terminal.
- [-10005](https://openbrokerapi.com/errors/mt5/res-e-internal-fail-timeout): The terminal did not respond in time.
- [0](https://openbrokerapi.com/errors/mt5/0-err-success): The operation completed successfully.
- [1](https://openbrokerapi.com/errors/mt5/1-res-s-ok): Generic success: the last call to the MetaTrader5 Python package worked.
- [4001](https://openbrokerapi.com/errors/mt5/4001-err-internal-error): "Unexpected internal error" is MetaQuotes' whole description of this code.
- [4002](https://openbrokerapi.com/errors/mt5/4002-err-wrong-internal-parameter): "Wrong parameter in the inner call of the client terminal function" is MetaQuotes' whole description of this code.
- [4003](https://openbrokerapi.com/errors/mt5/4003-err-invalid-parameter): "Wrong parameter when calling the system function" is MetaQuotes' whole description of this code.
- [4004](https://openbrokerapi.com/errors/mt5/4004-err-not-enough-memory): "Not enough memory to perform the system function" is MetaQuotes' whole description of this code.
- [4005 ERR_STRUCT_WITHOBJECTS_ORCLASS](https://openbrokerapi.com/errors/mt5/4005): The structure contains strings, dynamic arrays, classes, or structures that hold any of these.
- [4006](https://openbrokerapi.com/errors/mt5/4006-err-invalid-array): The array is of the wrong type or the wrong size, or the object of a dynamic array is damaged.
- [4007](https://openbrokerapi.com/errors/mt5/4007-err-array-resize-error): There is not enough memory to relocate an array, or the code tried to change the size of a static array.
- [4008](https://openbrokerapi.com/errors/mt5/4008-err-string-resize-error): "Not enough memory for the relocation of string" is MetaQuotes' whole description of this code.
- [4009](https://openbrokerapi.com/errors/mt5/4009-err-notinitialized-string): "Not initialized string" is MetaQuotes' whole description of this code.
- [4010](https://openbrokerapi.com/errors/mt5/4010-err-invalid-datetime): "Invalid date and/or time" is MetaQuotes' whole description of this code.
- [4011](https://openbrokerapi.com/errors/mt5/4011-err-array-bad-size): "Total amount of elements in the array cannot exceed 2147483647" is MetaQuotes' whole description of this code.
- [4012](https://openbrokerapi.com/errors/mt5/4012-err-invalid-pointer): "Wrong pointer" is MetaQuotes' whole description of this code.
- [4013](https://openbrokerapi.com/errors/mt5/4013-err-invalid-pointer-type): "Wrong type of pointer" is MetaQuotes' whole description of this code.
- [4014](https://openbrokerapi.com/errors/mt5/4014-err-function-not-allowed): "Function is not allowed for call" is MetaQuotes' whole description of this code.
- [4015](https://openbrokerapi.com/errors/mt5/4015-err-resource-name-duplicated): "The names of the dynamic and the static resource match" is MetaQuotes' whole description of this code.
- [4016](https://openbrokerapi.com/errors/mt5/4016-err-resource-not-found): "Resource with this name has not been found in EX5" is MetaQuotes' whole description of this code.
- [4017 ERR_RESOURCE_UNSUPPORTED_TYPE](https://openbrokerapi.com/errors/mt5/4017): "Unsupported resource type or its size exceeds 16 Mb" is MetaQuotes' whole description of this code.
- [4018 ERR_RESOURCE_NAME_IS_TOO_LONG](https://openbrokerapi.com/errors/mt5/4018): "The resource name exceeds 63 characters" is MetaQuotes' whole description of this code.
- [4019](https://openbrokerapi.com/errors/mt5/4019-err-math-overflow): "Overflow occurred when calculating math function" is MetaQuotes' whole description of this code.
- [4020](https://openbrokerapi.com/errors/mt5/4020-err-sleep-error): "Out of test end date after calling Sleep()" is MetaQuotes' whole description of this code.
- [4022](https://openbrokerapi.com/errors/mt5/4022-err-program-stopped): The test was forcibly stopped from outside.
- [4023](https://openbrokerapi.com/errors/mt5/4023-err-invalid-type): "Invalid type" is MetaQuotes' whole description of this code.
- [4024](https://openbrokerapi.com/errors/mt5/4024-err-invalid-handle): "Invalid handle" is MetaQuotes' whole description of this code.
- [4025](https://openbrokerapi.com/errors/mt5/4025-err-too-many-objects): "Object pool filled out" is MetaQuotes' whole description of this code.
- [4101](https://openbrokerapi.com/errors/mt5/4101-err-chart-wrong-id): "Wrong chart ID" is MetaQuotes' whole description of this code.
- [4102](https://openbrokerapi.com/errors/mt5/4102-err-chart-no-reply): "Chart does not respond" is MetaQuotes' whole description of this code.
- [4103](https://openbrokerapi.com/errors/mt5/4103-err-chart-not-found): "Chart not found" is MetaQuotes' whole description of this code.
- [4104](https://openbrokerapi.com/errors/mt5/4104-err-chart-no-expert): "No Expert Advisor in the chart that could handle the event" is MetaQuotes' whole description of this code.
- [4105](https://openbrokerapi.com/errors/mt5/4105-err-chart-cannot-open): "Chart opening error" is MetaQuotes' whole description of this code.
- [4106](https://openbrokerapi.com/errors/mt5/4106-err-chart-cannot-change): "Failed to change chart symbol and period" is MetaQuotes' whole description of this code.
- [4107](https://openbrokerapi.com/errors/mt5/4107-err-chart-wrong-parameter): "Error value of the parameter for the function of working with charts" is MetaQuotes' whole description of this code.
- [4108 ERR_CHART_CANNOT_CREATE_TIMER](https://openbrokerapi.com/errors/mt5/4108): "Failed to create timer" is MetaQuotes' whole description of this code.
- [4109](https://openbrokerapi.com/errors/mt5/4109-err-chart-wrong-property): "Wrong chart property ID" is MetaQuotes' whole description of this code.
- [4110](https://openbrokerapi.com/errors/mt5/4110-err-chart-screenshot-failed): "Error creating screenshots" is MetaQuotes' whole description of this code.
- [4111](https://openbrokerapi.com/errors/mt5/4111-err-chart-navigate-failed): "Error navigating through chart" is MetaQuotes' whole description of this code.
- [4112](https://openbrokerapi.com/errors/mt5/4112-err-chart-template-failed): "Error applying template" is MetaQuotes' whole description of this code.
- [4113](https://openbrokerapi.com/errors/mt5/4113-err-chart-window-not-found): "Subwindow containing the indicator was not found" is MetaQuotes' whole description of this code.
- [4114 ERR_CHART_INDICATOR_CANNOT_ADD](https://openbrokerapi.com/errors/mt5/4114): "Error adding an indicator to chart" is MetaQuotes' whole description of this code.
- [4115 ERR_CHART_INDICATOR_CANNOT_DEL](https://openbrokerapi.com/errors/mt5/4115): "Error deleting an indicator from the chart" is MetaQuotes' whole description of this code.
- [4116 ERR_CHART_INDICATOR_NOT_FOUND](https://openbrokerapi.com/errors/mt5/4116): "Indicator not found on the specified chart" is MetaQuotes' whole description of this code.
- [4201](https://openbrokerapi.com/errors/mt5/4201-err-object-error): "Error working with a graphical object" is MetaQuotes' whole description of this code.
- [4202](https://openbrokerapi.com/errors/mt5/4202-err-object-not-found): "Graphical object was not found" is MetaQuotes' whole description of this code.
- [4203](https://openbrokerapi.com/errors/mt5/4203-err-object-wrong-property): "Wrong ID of a graphical object property" is MetaQuotes' whole description of this code.
- [4204](https://openbrokerapi.com/errors/mt5/4204-err-object-getdate-failed): "Unable to get date corresponding to the value" is MetaQuotes' whole description of this code.
- [4205](https://openbrokerapi.com/errors/mt5/4205-err-object-getvalue-failed): "Unable to get value corresponding to the date" is MetaQuotes' whole description of this code.
- [4301](https://openbrokerapi.com/errors/mt5/4301-err-market-unknown-symbol): "Unknown symbol" is MetaQuotes' whole description of this code.
- [4302](https://openbrokerapi.com/errors/mt5/4302-err-market-not-selected): "Symbol is not selected in MarketWatch" is MetaQuotes' whole description of this code.
- [4303](https://openbrokerapi.com/errors/mt5/4303-err-market-wrong-property): "Wrong identifier of a symbol property" is MetaQuotes' whole description of this code.
- [4304](https://openbrokerapi.com/errors/mt5/4304-err-market-lasttime-unknown): "Time of the last tick is not known (no ticks)" is MetaQuotes' whole description of this code.
- [4305](https://openbrokerapi.com/errors/mt5/4305-err-market-select-error): "Error adding or deleting a symbol in MarketWatch" is MetaQuotes' whole description of this code.
- [4306](https://openbrokerapi.com/errors/mt5/4306-err-market-select-limit): "Exceeded the limit of selected symbols in MarketWatch" is MetaQuotes' whole description of this code.
- [4307](https://openbrokerapi.com/errors/mt5/4307-err-market-session-index): The session ID passed to SymbolInfoSessionQuote or SymbolInfoSessionTrade is wrong.
- [4401](https://openbrokerapi.com/errors/mt5/4401-err-history-not-found): "Requested history not found" is MetaQuotes' whole description of this code.
- [4402](https://openbrokerapi.com/errors/mt5/4402-err-history-wrong-property): "Wrong ID of the history property" is MetaQuotes' whole description of this code.
- [4403](https://openbrokerapi.com/errors/mt5/4403-err-history-timeout): "Exceeded history request timeout" is MetaQuotes' whole description of this code.
- [4404](https://openbrokerapi.com/errors/mt5/4404-err-history-bars-limit): "Number of requested bars limited by terminal settings" is MetaQuotes' whole description of this code.
- [4405](https://openbrokerapi.com/errors/mt5/4405-err-history-load-errors): "Multiple errors when loading history" is MetaQuotes' whole description of this code.
- [4407](https://openbrokerapi.com/errors/mt5/4407-err-history-small-buffer): "Receiving array is too small to store all requested data" is MetaQuotes' whole description of this code.
- [4501](https://openbrokerapi.com/errors/mt5/4501-err-globalvariable-not-found): "Global variable of the client terminal is not found" is MetaQuotes' whole description of this code.
- [4502](https://openbrokerapi.com/errors/mt5/4502-err-globalvariable-exists): "Global variable of the client terminal with the same name already exists" is MetaQuotes' whole description of this code.
- [4503 ERR_GLOBALVARIABLE_NOT_MODIFIED](https://openbrokerapi.com/errors/mt5/4503): "Global variables were not modified" is MetaQuotes' whole description of this code.
- [4504 ERR_GLOBALVARIABLE_CANNOTREAD](https://openbrokerapi.com/errors/mt5/4504): "Cannot read file with global variable values" is MetaQuotes' whole description of this code.
- [4505 ERR_GLOBALVARIABLE_CANNOTWRITE](https://openbrokerapi.com/errors/mt5/4505): "Cannot write file with global variable values" is MetaQuotes' whole description of this code.
- [4510](https://openbrokerapi.com/errors/mt5/4510-err-mail-send-failed): "Email sending failed" is MetaQuotes' whole description of this code.
- [4511](https://openbrokerapi.com/errors/mt5/4511-err-play-sound-failed): "Sound playing failed" is MetaQuotes' whole description of this code.
- [4512](https://openbrokerapi.com/errors/mt5/4512-err-mql5-wrong-property): "Wrong identifier of the program property" is MetaQuotes' whole description of this code.
- [4513](https://openbrokerapi.com/errors/mt5/4513-err-terminal-wrong-property): "Wrong identifier of the terminal property" is MetaQuotes' whole description of this code.
- [4514](https://openbrokerapi.com/errors/mt5/4514-err-ftp-send-failed): "File sending via ftp failed" is MetaQuotes' whole description of this code.
- [4515](https://openbrokerapi.com/errors/mt5/4515-err-notification-send-failed): "Failed to send a notification" is MetaQuotes' whole description of this code.
- [4516 ERR_NOTIFICATION_WRONG_PARAMETER](https://openbrokerapi.com/errors/mt5/4516): The parameter for sending a notification is invalid: an empty string or NULL was passed to SendNotification().
- [4517 ERR_NOTIFICATION_WRONG_SETTINGS](https://openbrokerapi.com/errors/mt5/4517): The notification settings in the terminal are wrong: the ID is not specified or permission is not set.
- [4518 ERR_NOTIFICATION_TOO_FREQUENT](https://openbrokerapi.com/errors/mt5/4518): "Too frequent sending of notifications" is MetaQuotes' whole description of this code.
- [4519](https://openbrokerapi.com/errors/mt5/4519-err-ftp-noserver): "FTP server is not specified" is MetaQuotes' whole description of this code.
- [4520](https://openbrokerapi.com/errors/mt5/4520-err-ftp-nologin): "FTP login is not specified" is MetaQuotes' whole description of this code.
- [4521](https://openbrokerapi.com/errors/mt5/4521-err-ftp-file-error): The file to send to the FTP server was not found in the Files directory under MQL5.
- [4522](https://openbrokerapi.com/errors/mt5/4522-err-ftp-connect-failed): "FTP connection failed" is MetaQuotes' whole description of this code.
- [4523](https://openbrokerapi.com/errors/mt5/4523-err-ftp-changedir): "FTP path not found on server" is MetaQuotes' whole description of this code.
- [4601](https://openbrokerapi.com/errors/mt5/4601-err-buffers-no-memory): "Not enough memory for the distribution of indicator buffers" is MetaQuotes' whole description of this code.
- [4602](https://openbrokerapi.com/errors/mt5/4602-err-buffers-wrong-index): "Wrong indicator buffer index" is MetaQuotes' whole description of this code.
- [4603](https://openbrokerapi.com/errors/mt5/4603-err-custom-wrong-property): "Wrong ID of the custom indicator property" is MetaQuotes' whole description of this code.
- [4701](https://openbrokerapi.com/errors/mt5/4701-err-account-wrong-property): "Wrong account property ID" is MetaQuotes' whole description of this code.
- [4751](https://openbrokerapi.com/errors/mt5/4751-err-trade-wrong-property): "Wrong trade property ID" is MetaQuotes' whole description of this code.
- [4752](https://openbrokerapi.com/errors/mt5/4752-err-trade-disabled): Trading by Expert Advisors is prohibited.
- [4753](https://openbrokerapi.com/errors/mt5/4753-err-trade-position-not-found): "Position not found" is MetaQuotes' whole description of this code.
- [4754](https://openbrokerapi.com/errors/mt5/4754-err-trade-order-not-found): "Order not found" is MetaQuotes' whole description of this code.
- [4755](https://openbrokerapi.com/errors/mt5/4755-err-trade-deal-not-found): "Deal not found" is MetaQuotes' whole description of this code.
- [4756](https://openbrokerapi.com/errors/mt5/4756-err-trade-send-failed): "Trade request sending failed" is MetaQuotes' whole description of this code.
- [4758](https://openbrokerapi.com/errors/mt5/4758-err-trade-calc-failed): "Failed to calculate profit or margin" is MetaQuotes' whole description of this code.
- [4801](https://openbrokerapi.com/errors/mt5/4801-err-indicator-unknown-symbol): "Unknown symbol" is MetaQuotes' whole description of this code.
- [4802](https://openbrokerapi.com/errors/mt5/4802-err-indicator-cannot-create): "Indicator cannot be created" is MetaQuotes' whole description of this code.
- [4803](https://openbrokerapi.com/errors/mt5/4803-err-indicator-no-memory): "Not enough memory to add the indicator" is MetaQuotes' whole description of this code.
- [4804](https://openbrokerapi.com/errors/mt5/4804-err-indicator-cannot-apply): "The indicator cannot be applied to another indicator" is MetaQuotes' whole description of this code.
- [4805](https://openbrokerapi.com/errors/mt5/4805-err-indicator-cannot-add): "Error applying an indicator to chart" is MetaQuotes' whole description of this code.
- [4806](https://openbrokerapi.com/errors/mt5/4806-err-indicator-data-not-found): "Requested data not found" is MetaQuotes' whole description of this code.
- [4807](https://openbrokerapi.com/errors/mt5/4807-err-indicator-wrong-handle): "Wrong indicator handle" is MetaQuotes' whole description of this code.
- [4808 ERR_INDICATOR_WRONG_PARAMETERS](https://openbrokerapi.com/errors/mt5/4808): "Wrong number of parameters when creating an indicator" is MetaQuotes' whole description of this code.
- [4809 ERR_INDICATOR_PARAMETERS_MISSING](https://openbrokerapi.com/errors/mt5/4809): "No parameters when creating an indicator" is MetaQuotes' whole description of this code.
- [4810](https://openbrokerapi.com/errors/mt5/4810-err-indicator-custom-name): "The first parameter in the array must be the name of the custom indicator" is MetaQuotes' whole description of this code.
- [4811](https://openbrokerapi.com/errors/mt5/4811-err-indicator-parameter-type): "Invalid parameter type in the array when creating an indicator" is MetaQuotes' whole description of this code.
- [4812](https://openbrokerapi.com/errors/mt5/4812-err-indicator-wrong-index): "Wrong index of the requested indicator buffer" is MetaQuotes' whole description of this code.
- [4901](https://openbrokerapi.com/errors/mt5/4901-err-books-cannot-add): "Depth Of Market can not be added" is MetaQuotes' whole description of this code.
- [4902](https://openbrokerapi.com/errors/mt5/4902-err-books-cannot-delete): "Depth Of Market can not be removed" is MetaQuotes' whole description of this code.
- [4903](https://openbrokerapi.com/errors/mt5/4903-err-books-cannot-get): "The data from Depth Of Market can not be obtained" is MetaQuotes' whole description of this code.
- [4904](https://openbrokerapi.com/errors/mt5/4904-err-books-cannot-subscribe): "Error in subscribing to receive new data from Depth Of Market" is MetaQuotes' whole description of this code.
- [5001](https://openbrokerapi.com/errors/mt5/5001-err-too-many-files): "More than 64 files cannot be opened at the same time" is MetaQuotes' whole description of this code.
- [5002](https://openbrokerapi.com/errors/mt5/5002-err-wrong-filename): "Invalid file name" is MetaQuotes' whole description of this code.
- [5003](https://openbrokerapi.com/errors/mt5/5003-err-too-long-filename): "Too long file name" is MetaQuotes' whole description of this code.
- [5004](https://openbrokerapi.com/errors/mt5/5004-err-cannot-open-file): "File opening error" is MetaQuotes' whole description of this code.
- [5005](https://openbrokerapi.com/errors/mt5/5005-err-file-cachebuffer-error): "Not enough memory for cache to read" is MetaQuotes' whole description of this code.
- [5006](https://openbrokerapi.com/errors/mt5/5006-err-cannot-delete-file): "File deleting error" is MetaQuotes' whole description of this code.
- [5007](https://openbrokerapi.com/errors/mt5/5007-err-invalid-filehandle): The file with this handle was closed, or was never opened.
- [5008](https://openbrokerapi.com/errors/mt5/5008-err-wrong-filehandle): "Wrong file handle" is MetaQuotes' whole description of this code.
- [5009](https://openbrokerapi.com/errors/mt5/5009-err-file-nottowrite): "The file must be opened for writing" is MetaQuotes' whole description of this code.
- [5010](https://openbrokerapi.com/errors/mt5/5010-err-file-nottoread): "The file must be opened for reading" is MetaQuotes' whole description of this code.
- [5011](https://openbrokerapi.com/errors/mt5/5011-err-file-notbin): "The file must be opened as a binary one" is MetaQuotes' whole description of this code.
- [5012](https://openbrokerapi.com/errors/mt5/5012-err-file-nottxt): "The file must be opened as a text" is MetaQuotes' whole description of this code.
- [5013](https://openbrokerapi.com/errors/mt5/5013-err-file-nottxtorcsv): "The file must be opened as a text or CSV" is MetaQuotes' whole description of this code.
- [5014](https://openbrokerapi.com/errors/mt5/5014-err-file-notcsv): "The file must be opened as CSV" is MetaQuotes' whole description of this code.
- [5015](https://openbrokerapi.com/errors/mt5/5015-err-file-readerror): "File reading error" is MetaQuotes' whole description of this code.
- [5016](https://openbrokerapi.com/errors/mt5/5016-err-file-binstringsize): "String size must be specified, because the file is opened as binary" is MetaQuotes' whole description of this code.
- [5017](https://openbrokerapi.com/errors/mt5/5017-err-incompatible-file): "A text file must be for string arrays, for other arrays - binary" is MetaQuotes' whole description of this code.
- [5018](https://openbrokerapi.com/errors/mt5/5018-err-file-is-directory): "This is not a file, this is a directory" is MetaQuotes' whole description of this code.
- [5019](https://openbrokerapi.com/errors/mt5/5019-err-file-not-exist): "File does not exist" is MetaQuotes' whole description of this code.
- [5020](https://openbrokerapi.com/errors/mt5/5020-err-file-cannot-rewrite): "File can not be rewritten" is MetaQuotes' whole description of this code.
- [5021](https://openbrokerapi.com/errors/mt5/5021-err-wrong-directoryname): "Wrong directory name" is MetaQuotes' whole description of this code.
- [5022](https://openbrokerapi.com/errors/mt5/5022-err-directory-not-exist): "Directory does not exist" is MetaQuotes' whole description of this code.
- [5023](https://openbrokerapi.com/errors/mt5/5023-err-file-isnot-directory): "This is a file, not a directory" is MetaQuotes' whole description of this code.
- [5024](https://openbrokerapi.com/errors/mt5/5024-err-cannot-delete-directory): "The directory cannot be removed" is MetaQuotes' whole description of this code.
- [5025](https://openbrokerapi.com/errors/mt5/5025-err-cannot-clean-directory): The directory could not be cleared.
- [5026](https://openbrokerapi.com/errors/mt5/5026-err-file-writeerror): "Failed to write a resource to a file" is MetaQuotes' whole description of this code.
- [5027](https://openbrokerapi.com/errors/mt5/5027-err-file-endoffile): The end of a CSV file was reached, so the next piece of data could not be read.
- [5030](https://openbrokerapi.com/errors/mt5/5030-err-no-string-date): "No date in the string" is MetaQuotes' whole description of this code.
- [5031](https://openbrokerapi.com/errors/mt5/5031-err-wrong-string-date): "Wrong date in the string" is MetaQuotes' whole description of this code.
- [5032](https://openbrokerapi.com/errors/mt5/5032-err-wrong-string-time): "Wrong time in the string" is MetaQuotes' whole description of this code.
- [5033](https://openbrokerapi.com/errors/mt5/5033-err-string-time-error): "Error converting string to date" is MetaQuotes' whole description of this code.
- [5034](https://openbrokerapi.com/errors/mt5/5034-err-string-out-of-memory): "Not enough memory for the string" is MetaQuotes' whole description of this code.
- [5035](https://openbrokerapi.com/errors/mt5/5035-err-string-small-len): "The string length is less than expected" is MetaQuotes' whole description of this code.
- [5036](https://openbrokerapi.com/errors/mt5/5036-err-string-too-bignumber): "Too large number, more than ULONG_MAX" is MetaQuotes' whole description of this code.
- [5037](https://openbrokerapi.com/errors/mt5/5037-err-wrong-formatstring): "Invalid format string" is MetaQuotes' whole description of this code.
- [5038](https://openbrokerapi.com/errors/mt5/5038-err-too-many-formatters): "Amount of format specifiers more than the parameters" is MetaQuotes' whole description of this code.
- [5039](https://openbrokerapi.com/errors/mt5/5039-err-too-many-parameters): "Amount of parameters more than the format specifiers" is MetaQuotes' whole description of this code.
- [5040](https://openbrokerapi.com/errors/mt5/5040-err-wrong-string-parameter): "Damaged parameter of string type" is MetaQuotes' whole description of this code.
- [5041](https://openbrokerapi.com/errors/mt5/5041-err-stringpos-outofrange): "Position outside the string" is MetaQuotes' whole description of this code.
- [5042](https://openbrokerapi.com/errors/mt5/5042-err-string-zeroadded): "0 added to the string end, a useless operation" is MetaQuotes' whole description of this code.
- [5043](https://openbrokerapi.com/errors/mt5/5043-err-string-unknowntype): "Unknown data type when converting to a string" is MetaQuotes' whole description of this code.
- [5044](https://openbrokerapi.com/errors/mt5/5044-err-wrong-string-object): "Damaged string object" is MetaQuotes' whole description of this code.
- [5050](https://openbrokerapi.com/errors/mt5/5050-err-incompatible-arrays): The arrays being copied are incompatible.
- [5051](https://openbrokerapi.com/errors/mt5/5051-err-small-asseries-array): "The receiving array is declared as AS_SERIES, and it is of insufficient size" is MetaQuotes' whole description of this code.
- [5052](https://openbrokerapi.com/errors/mt5/5052-err-small-array): "Too small array, the starting position is outside the array" is MetaQuotes' whole description of this code.
- [5053](https://openbrokerapi.com/errors/mt5/5053-err-zerosize-array): "An array of zero length" is MetaQuotes' whole description of this code.
- [5054](https://openbrokerapi.com/errors/mt5/5054-err-number-arrays-only): "Must be a numeric array" is MetaQuotes' whole description of this code.
- [5055](https://openbrokerapi.com/errors/mt5/5055-err-onedim-arrays-only): "Must be a one-dimensional array" is MetaQuotes' whole description of this code.
- [5056](https://openbrokerapi.com/errors/mt5/5056-err-series-array): "Timeseries cannot be used" is MetaQuotes' whole description of this code.
- [5057](https://openbrokerapi.com/errors/mt5/5057-err-double-array-only): "Must be an array of type double" is MetaQuotes' whole description of this code.
- [5058](https://openbrokerapi.com/errors/mt5/5058-err-float-array-only): "Must be an array of type float" is MetaQuotes' whole description of this code.
- [5059](https://openbrokerapi.com/errors/mt5/5059-err-long-array-only): "Must be an array of type long" is MetaQuotes' whole description of this code.
- [5060](https://openbrokerapi.com/errors/mt5/5060-err-int-array-only): "Must be an array of type int" is MetaQuotes' whole description of this code.
- [5061](https://openbrokerapi.com/errors/mt5/5061-err-short-array-only): "Must be an array of type short" is MetaQuotes' whole description of this code.
- [5062](https://openbrokerapi.com/errors/mt5/5062-err-char-array-only): "Must be an array of type char" is MetaQuotes' whole description of this code.
- [5063](https://openbrokerapi.com/errors/mt5/5063-err-string-array-only): "String array only" is MetaQuotes' whole description of this code.
- [5100](https://openbrokerapi.com/errors/mt5/5100-err-opencl-not-supported): "OpenCL functions are not supported on this computer" is MetaQuotes' whole description of this code.
- [5101](https://openbrokerapi.com/errors/mt5/5101-err-opencl-internal): "Internal error occurred when running OpenCL" is MetaQuotes' whole description of this code.
- [5102](https://openbrokerapi.com/errors/mt5/5102-err-opencl-invalid-handle): "Invalid OpenCL handle" is MetaQuotes' whole description of this code.
- [5103](https://openbrokerapi.com/errors/mt5/5103-err-opencl-context-create): "Error creating the OpenCL context" is MetaQuotes' whole description of this code.
- [5104](https://openbrokerapi.com/errors/mt5/5104-err-opencl-queue-create): "Failed to create a run queue in OpenCL" is MetaQuotes' whole description of this code.
- [5105](https://openbrokerapi.com/errors/mt5/5105-err-opencl-program-create): "Error occurred when compiling an OpenCL program" is MetaQuotes' whole description of this code.
- [5106 ERR_OPENCL_TOO_LONG_KERNEL_NAME](https://openbrokerapi.com/errors/mt5/5106): "Too long kernel name (OpenCL kernel)" is MetaQuotes' whole description of this code.
- [5107](https://openbrokerapi.com/errors/mt5/5107-err-opencl-kernel-create): "Error creating an OpenCL kernel" is MetaQuotes' whole description of this code.
- [5108 ERR_OPENCL_SET_KERNEL_PARAMETER](https://openbrokerapi.com/errors/mt5/5108): "Error occurred when setting parameters for the OpenCL kernel" is MetaQuotes' whole description of this code.
- [5109](https://openbrokerapi.com/errors/mt5/5109-err-opencl-execute): "OpenCL program runtime error" is MetaQuotes' whole description of this code.
- [5110](https://openbrokerapi.com/errors/mt5/5110-err-opencl-wrong-buffer-size): "Invalid size of the OpenCL buffer" is MetaQuotes' whole description of this code.
- [5111 ERR_OPENCL_WRONG_BUFFER_OFFSET](https://openbrokerapi.com/errors/mt5/5111): "Invalid offset in the OpenCL buffer" is MetaQuotes' whole description of this code.
- [5112](https://openbrokerapi.com/errors/mt5/5112-err-opencl-buffer-create): "Failed to create an OpenCL buffer" is MetaQuotes' whole description of this code.
- [5113](https://openbrokerapi.com/errors/mt5/5113-err-opencl-too-many-objects): "Too many OpenCL objects" is MetaQuotes' whole description of this code.
- [5114](https://openbrokerapi.com/errors/mt5/5114-err-opencl-selectdevice): "OpenCL device selection error" is MetaQuotes' whole description of this code.
- [5120](https://openbrokerapi.com/errors/mt5/5120-err-database-internal): "Internal database error" is MetaQuotes' whole description of this code.
- [5121](https://openbrokerapi.com/errors/mt5/5121-err-database-invalid-handle): "Invalid database handle" is MetaQuotes' whole description of this code.
- [5122 ERR_DATABASE_TOO_MANY_OBJECTS](https://openbrokerapi.com/errors/mt5/5122): "Exceeded the maximum acceptable number of Database objects" is MetaQuotes' whole description of this code.
- [5123](https://openbrokerapi.com/errors/mt5/5123-err-database-connect): "Database connection error" is MetaQuotes' whole description of this code.
- [5124](https://openbrokerapi.com/errors/mt5/5124-err-database-execute): "Request execution error" is MetaQuotes' whole description of this code.
- [5125](https://openbrokerapi.com/errors/mt5/5125-err-database-prepare): "Request generation error" is MetaQuotes' whole description of this code.
- [5126](https://openbrokerapi.com/errors/mt5/5126-err-database-no-more-data): "No more data to read" is MetaQuotes' whole description of this code.
- [5127](https://openbrokerapi.com/errors/mt5/5127-err-database-step): "Failed to move to the next request entry" is MetaQuotes' whole description of this code.
- [5128](https://openbrokerapi.com/errors/mt5/5128-err-database-not-ready): "Data for reading request results are not ready yet" is MetaQuotes' whole description of this code.
- [5129](https://openbrokerapi.com/errors/mt5/5129-err-database-bind-parameters): "Failed to auto substitute parameters to an SQL request" is MetaQuotes' whole description of this code.
- [5200 ERR_WEBREQUEST_INVALID_ADDRESS](https://openbrokerapi.com/errors/mt5/5200): "Invalid URL" is MetaQuotes' whole description of this code.
- [5201 ERR_WEBREQUEST_CONNECT_FAILED](https://openbrokerapi.com/errors/mt5/5201): "Failed to connect to specified URL" is MetaQuotes' whole description of this code.
- [5202](https://openbrokerapi.com/errors/mt5/5202-err-webrequest-timeout): "Timeout exceeded" is MetaQuotes' whole description of this code.
- [5203 ERR_WEBREQUEST_REQUEST_FAILED](https://openbrokerapi.com/errors/mt5/5203): "HTTP request failed" is MetaQuotes' whole description of this code.
- [5270](https://openbrokerapi.com/errors/mt5/5270-err-netsocket-invalidhandle): "Invalid socket handle passed to function" is MetaQuotes' whole description of this code.
- [5271 ERR_NETSOCKET_TOO_MANY_OPENED](https://openbrokerapi.com/errors/mt5/5271): "Too many open sockets (max 128)" is MetaQuotes' whole description of this code.
- [5272](https://openbrokerapi.com/errors/mt5/5272-err-netsocket-cannot-connect): "Failed to connect to remote host" is MetaQuotes' whole description of this code.
- [5273](https://openbrokerapi.com/errors/mt5/5273-err-netsocket-io-error): "Failed to send/receive data from socket" is MetaQuotes' whole description of this code.
- [5274 ERR_NETSOCKET_HANDSHAKE_FAILED](https://openbrokerapi.com/errors/mt5/5274): "Failed to establish secure connection (TLS Handshake)" is MetaQuotes' whole description of this code.
- [5275](https://openbrokerapi.com/errors/mt5/5275-err-netsocket-no-certificate): "No data on certificate protecting the connection" is MetaQuotes' whole description of this code.
- [5300](https://openbrokerapi.com/errors/mt5/5300-err-not-custom-symbol): "A custom symbol must be specified" is MetaQuotes' whole description of this code.
- [5301](https://openbrokerapi.com/errors/mt5/5301-err-custom-symbol-wrong-name): The name of the custom symbol is invalid.
- [5302](https://openbrokerapi.com/errors/mt5/5302-err-custom-symbol-name-long): The name of the custom symbol is too long.
- [5303](https://openbrokerapi.com/errors/mt5/5303-err-custom-symbol-path-long): The path of the custom symbol is too long.
- [5304](https://openbrokerapi.com/errors/mt5/5304-err-custom-symbol-exist): "A custom symbol with the same name already exists" is MetaQuotes' whole description of this code.
- [5305](https://openbrokerapi.com/errors/mt5/5305-err-custom-symbol-error): "Error occurred while creating, deleting or changing the custom symbol" is MetaQuotes' whole description of this code.
- [5306](https://openbrokerapi.com/errors/mt5/5306-err-custom-symbol-selected): "You are trying to delete a custom symbol selected in Market Watch" is MetaQuotes' whole description of this code.
- [5307 ERR_CUSTOM_SYMBOL_PROPERTY_WRONG](https://openbrokerapi.com/errors/mt5/5307): "An invalid custom symbol property" is MetaQuotes' whole description of this code.
- [5308 ERR_CUSTOM_SYMBOL_PARAMETER_ERROR](https://openbrokerapi.com/errors/mt5/5308): "A wrong parameter while setting the property of a custom symbol" is MetaQuotes' whole description of this code.
- [5309 ERR_CUSTOM_SYMBOL_PARAMETER_LONG](https://openbrokerapi.com/errors/mt5/5309): "A too long string parameter while setting the property of a custom symbol" is MetaQuotes' whole description of this code.
- [5310](https://openbrokerapi.com/errors/mt5/5310-err-custom-ticks-wrong-order): "Ticks in the array are not arranged in the order of time" is MetaQuotes' whole description of this code.
- [5400](https://openbrokerapi.com/errors/mt5/5400-err-calendar-more-data): "Array size is insufficient for receiving descriptions of all values" is MetaQuotes' whole description of this code.
- [5401](https://openbrokerapi.com/errors/mt5/5401-err-calendar-timeout): "Request time limit exceeded" is MetaQuotes' whole description of this code.
- [5402](https://openbrokerapi.com/errors/mt5/5402-err-calendar-no-data): "Country is not found" is MetaQuotes' whole description of this code.
- [5601](https://openbrokerapi.com/errors/mt5/5601-err-database-error): "Generic error" is MetaQuotes' whole description of this code.
- [5602](https://openbrokerapi.com/errors/mt5/5602-err-database-logic): "SQLite internal logic error" is MetaQuotes' whole description of this code.
- [5603](https://openbrokerapi.com/errors/mt5/5603-err-database-perm): "Access denied" is MetaQuotes' whole description of this code.
- [5604](https://openbrokerapi.com/errors/mt5/5604-err-database-abort): "Callback routine requested abort" is MetaQuotes' whole description of this code.
- [5605](https://openbrokerapi.com/errors/mt5/5605-err-database-busy): "Database file locked" is MetaQuotes' whole description of this code.
- [5606](https://openbrokerapi.com/errors/mt5/5606-err-database-locked): "Database table locked" is MetaQuotes' whole description of this code.
- [5607](https://openbrokerapi.com/errors/mt5/5607-err-database-nomem): "Insufficient memory for completing operation" is MetaQuotes' whole description of this code.
- [5608](https://openbrokerapi.com/errors/mt5/5608-err-database-readonly): "Attempt to write to readonly database" is MetaQuotes' whole description of this code.
- [5609](https://openbrokerapi.com/errors/mt5/5609-err-database-interrupt): "Operation terminated by sqlite3_interrupt()" is MetaQuotes' whole description of this code.
- [5610](https://openbrokerapi.com/errors/mt5/5610-err-database-ioerr): "Disk I/O error" is MetaQuotes' whole description of this code.
- [5611](https://openbrokerapi.com/errors/mt5/5611-err-database-corrupt): "Database disk image corrupted" is MetaQuotes' whole description of this code.
- [5612](https://openbrokerapi.com/errors/mt5/5612-err-database-notfound): "Unknown operation code in sqlite3_file_control()" is MetaQuotes' whole description of this code.
- [5613](https://openbrokerapi.com/errors/mt5/5613-err-database-full): "Insertion failed because database is full" is MetaQuotes' whole description of this code.
- [5614](https://openbrokerapi.com/errors/mt5/5614-err-database-cantopen): "Unable to open the database file" is MetaQuotes' whole description of this code.
- [5615](https://openbrokerapi.com/errors/mt5/5615-err-database-protocol): "Database lock protocol error" is MetaQuotes' whole description of this code.
- [5616](https://openbrokerapi.com/errors/mt5/5616-err-database-empty): "Internal use only" is MetaQuotes' whole description of this code.
- [5617](https://openbrokerapi.com/errors/mt5/5617-err-database-schema): "Database schema changed" is MetaQuotes' whole description of this code.
- [5618](https://openbrokerapi.com/errors/mt5/5618-err-database-toobig): "String or BLOB exceeds size limit" is MetaQuotes' whole description of this code.
- [5619](https://openbrokerapi.com/errors/mt5/5619-err-database-constraint): "Abort due to constraint violation" is MetaQuotes' whole description of this code.
- [5620](https://openbrokerapi.com/errors/mt5/5620-err-database-mismatch): "Data type mismatch" is MetaQuotes' whole description of this code.
- [5621](https://openbrokerapi.com/errors/mt5/5621-err-database-misuse): "Library used incorrectly" is MetaQuotes' whole description of this code.
- [5622](https://openbrokerapi.com/errors/mt5/5622-err-database-nolfs): "Uses OS features not supported on host" is MetaQuotes' whole description of this code.
- [5623](https://openbrokerapi.com/errors/mt5/5623-err-database-auth): "Authorization denied" is MetaQuotes' whole description of this code.
- [5624](https://openbrokerapi.com/errors/mt5/5624-err-database-format): "Not used" is MetaQuotes' whole description of this code.
- [5625](https://openbrokerapi.com/errors/mt5/5625-err-database-range): "Bind parameter error, incorrect index" is MetaQuotes' whole description of this code.
- [5626](https://openbrokerapi.com/errors/mt5/5626-err-database-notadb): "File opened that is not database file" is MetaQuotes' whole description of this code.
- [5700](https://openbrokerapi.com/errors/mt5/5700-err-matrix-internal): "Internal error of the matrix/vector executing subsystem" is MetaQuotes' whole description of this code.
- [5701](https://openbrokerapi.com/errors/mt5/5701-err-matrix-not-initialized): "Matrix/vector not initialized" is MetaQuotes' whole description of this code.
- [5702](https://openbrokerapi.com/errors/mt5/5702-err-matrix-inconsistent): "Inconsistent size of matrices/vectors in operation" is MetaQuotes' whole description of this code.
- [5703](https://openbrokerapi.com/errors/mt5/5703-err-matrix-invalid-size): "Invalid matrix/vector size" is MetaQuotes' whole description of this code.
- [5704](https://openbrokerapi.com/errors/mt5/5704-err-matrix-invalid-type): "Invalid matrix/vector type" is MetaQuotes' whole description of this code.
- [5705](https://openbrokerapi.com/errors/mt5/5705-err-matrix-func-not-allowed): "Function not available for this matrix/vector" is MetaQuotes' whole description of this code.
- [5706](https://openbrokerapi.com/errors/mt5/5706-err-matrix-contains-nan): "Matrix/vector contains non-numbers (Nan/Inf)" is MetaQuotes' whole description of this code.
- [5707](https://openbrokerapi.com/errors/mt5/5707-err-matrix-openblas): "Error during execution of an OpenBLAS function" is MetaQuotes' whole description of this code.
- [5708 ERR_MATRIX_OPENBLAS_PARAMETER](https://openbrokerapi.com/errors/mt5/5708): "Invalid parameter of an OpenBLAS function" is MetaQuotes' whole description of this code.
- [5800](https://openbrokerapi.com/errors/mt5/5800-err-onnx-internal): "ONNX internal error" is MetaQuotes' whole description of this code.
- [5801](https://openbrokerapi.com/errors/mt5/5801-err-onnx-not-initialized): "ONNX Runtime API initialization error" is MetaQuotes' whole description of this code.
- [5802](https://openbrokerapi.com/errors/mt5/5802-err-onnx-not-supported): "Property or value not supported by MQL5" is MetaQuotes' whole description of this code.
- [5803](https://openbrokerapi.com/errors/mt5/5803-err-onnx-run-failed): "ONNX runtime API run error" is MetaQuotes' whole description of this code.
- [5804 ERR_ONNX_INVALID_PARAMETERS_COUNT](https://openbrokerapi.com/errors/mt5/5804): "Invalid number of parameters passed to OnnxRun" is MetaQuotes' whole description of this code.
- [5805](https://openbrokerapi.com/errors/mt5/5805-err-onnx-invalid-parameter): "Invalid parameter value" is MetaQuotes' whole description of this code.
- [5806 ERR_ONNX_INVALID_PARAMETER_TYPE](https://openbrokerapi.com/errors/mt5/5806): "Invalid parameter type" is MetaQuotes' whole description of this code.
- [5807 ERR_ONNX_INVALID_PARAMETER_SIZE](https://openbrokerapi.com/errors/mt5/5807): "Invalid parameter size" is MetaQuotes' whole description of this code.
- [5808](https://openbrokerapi.com/errors/mt5/5808-err-onnx-wrong-dimension): "Tensor dimension not set or invalid" is MetaQuotes' whole description of this code.
- [10004](https://openbrokerapi.com/errors/mt5/trade-retcode-requote): The price changed and the server offered a new one.
- [10006](https://openbrokerapi.com/errors/mt5/trade-retcode-reject): The server rejected the request.
- [10007](https://openbrokerapi.com/errors/mt5/10007-trade-retcode-cancel): The request was cancelled by the trader.
- [10008](https://openbrokerapi.com/errors/mt5/10008-trade-retcode-placed): The order was placed.
- [10009](https://openbrokerapi.com/errors/mt5/10009-trade-retcode-done): The request was completed.
- [10010](https://openbrokerapi.com/errors/mt5/10010-trade-retcode-done-partial): Only part of the request was completed.
- [10011](https://openbrokerapi.com/errors/mt5/10011-trade-retcode-error): The server reports an error in processing the request.
- [10012](https://openbrokerapi.com/errors/mt5/10012-trade-retcode-timeout): The request was cancelled because it timed out.
- [10013](https://openbrokerapi.com/errors/mt5/trade-retcode-invalid): The trade request is malformed.
- [10014](https://openbrokerapi.com/errors/mt5/trade-retcode-invalid-volume): Volume is outside min, max or step for the symbol.
- [10015](https://openbrokerapi.com/errors/mt5/trade-retcode-invalid-price): The price is not valid.
- [10016](https://openbrokerapi.com/errors/mt5/trade-retcode-invalid-stops): Stop loss or take profit is invalid, often too close to price.
- [10017 TRADE_RETCODE_TRADE_DISABLED](https://openbrokerapi.com/errors/mt5/10017): Trading is disabled.
- [10018](https://openbrokerapi.com/errors/mt5/trade-retcode-market-closed): The market is closed.
- [10019](https://openbrokerapi.com/errors/mt5/trade-retcode-no-money): Insufficient margin.
- [10020](https://openbrokerapi.com/errors/mt5/10020-trade-retcode-price-changed): Prices changed while the request was being handled.
- [10021](https://openbrokerapi.com/errors/mt5/10021-trade-retcode-price-off): There are no quotes to process the request.
- [10022 TRADE_RETCODE_INVALID_EXPIRATION](https://openbrokerapi.com/errors/mt5/10022): The order expiration date in the request is invalid.
- [10023](https://openbrokerapi.com/errors/mt5/10023-trade-retcode-order-changed): The state of the order changed.
- [10024 TRADE_RETCODE_TOO_MANY_REQUESTS](https://openbrokerapi.com/errors/mt5/10024): Requests are being sent too often.
- [10025](https://openbrokerapi.com/errors/mt5/10025-trade-retcode-no-changes): The request contains no changes.
- [10026 TRADE_RETCODE_SERVER_DISABLES_AT](https://openbrokerapi.com/errors/mt5/10026): Autotrading is disabled by the server.
- [10027](https://openbrokerapi.com/errors/mt5/trade-retcode-client-disables-at): Algo trading is switched off in the terminal.
- [10028](https://openbrokerapi.com/errors/mt5/10028-trade-retcode-locked): The request is locked for processing.
- [10029](https://openbrokerapi.com/errors/mt5/10029-trade-retcode-frozen): The order or position is frozen.
- [10030](https://openbrokerapi.com/errors/mt5/10030): Invalid order filling type: order_send asked for a filling mode the symbol does not allow.
- [10031](https://openbrokerapi.com/errors/mt5/10031-trade-retcode-connection): There is no connection with the trade server.
- [10032](https://openbrokerapi.com/errors/mt5/10032-trade-retcode-only-real): The operation is allowed only for live accounts.
- [10033](https://openbrokerapi.com/errors/mt5/10033-trade-retcode-limit-orders): The number of pending orders has reached the limit.
- [10034](https://openbrokerapi.com/errors/mt5/10034-trade-retcode-limit-volume): The volume of orders and positions for the symbol has reached the limit.
- [10035](https://openbrokerapi.com/errors/mt5/10035-trade-retcode-invalid-order): The order type is incorrect or prohibited.
- [10036 TRADE_RETCODE_POSITION_CLOSED](https://openbrokerapi.com/errors/mt5/10036): The position with the specified POSITION_IDENTIFIER has already been closed.
- [10038 TRADE_RETCODE_INVALID_CLOSE_VOLUME](https://openbrokerapi.com/errors/mt5/10038): The close volume is larger than the current volume of the position.
- [10039 TRADE_RETCODE_CLOSE_ORDER_EXIST](https://openbrokerapi.com/errors/mt5/10039): A close order already exists for the position.
- [10040 TRADE_RETCODE_LIMIT_POSITIONS](https://openbrokerapi.com/errors/mt5/10040): The number of open positions on the account has reached a limit set on the server.
- [10041](https://openbrokerapi.com/errors/mt5/10041-trade-retcode-reject-cancel): The request to activate a pending order was rejected and the order was cancelled.
- [10042](https://openbrokerapi.com/errors/mt5/10042-trade-retcode-long-only): The request was rejected because the symbol has the rule "Only long positions are allowed" (POSITION_TYPE_BUY).
- [10043](https://openbrokerapi.com/errors/mt5/10043-trade-retcode-short-only): The request was rejected because the symbol has the rule "Only short positions are allowed" (POSITION_TYPE_SELL).
- [10044](https://openbrokerapi.com/errors/mt5/10044-trade-retcode-close-only): The request was rejected because the symbol has the rule "Only position closing is allowed".
- [10045](https://openbrokerapi.com/errors/mt5/10045-trade-retcode-fifo-close): The request was rejected because the trading account has the flag "Position closing is allowed only by FIFO rule" set (ACCOUNT_FIFO_CLOSE=true).
- [10046 TRADE_RETCODE_HEDGE_PROHIBITED](https://openbrokerapi.com/errors/mt5/10046): The request was rejected because the trading account has the rule "Opposite positions on a single symbol are disabled".
- [65536](https://openbrokerapi.com/errors/mt5/65536-err-user-error-first): This is not an error in itself: it is the first code available for errors that a program defines for itself.

## MetaTrader 5 API: questions and answers

### How do I get access to the MetaTrader 5 API?

Install the MT5 terminal from your broker, then pip install MetaTrader5 on Windows x86-64 or write MQL5 in MetaEditor. The terminal must be at build 4755 or later.

- Status: verified. Source: [order_send](https://www.mql5.com/en/docs/python_metatrader5/mt5ordersend_py), checked 2026-09-20.

### Who can use the MetaTrader 5 API?

Real accounts come from brokers offering MT5; the API runs through your own local terminal.

- Status: verified. Source: [Opening an account (MT5 help)](https://www.metatrader5.com/en/terminal/help/startworking/acc_open), checked 2026-09-21.

### MetaTrader 5 API demo: is there a demo or sandbox?

Yes: demo accounts can be opened from within the terminal.

- Status: verified. Source: [Opening an account (MT5 help)](https://www.metatrader5.com/en/terminal/help/startworking/acc_open), checked 2026-09-21.

### What are the MetaTrader 5 API rate limits?

Not published. The Python page states none, carries no version and no date, and gives no consolidated error list beyond last_error() (read 22 Sep 2026).

- Status: verified. Source: [MetaTrader for Python](https://www.mql5.com/en/docs/python_metatrader5), checked 2026-09-20.

### How does MetaTrader 5 API authentication work?

No API keys: initialize() connects to the local terminal, optionally with account login, password and server.

- Status: verified. Source: [initialize](https://www.mql5.com/en/docs/python_metatrader5/mt5initialize_py), checked 2026-09-20.

### Does the MetaTrader 5 API support streaming?

No push API in Python: poll ticks and bars; market_book_add subscribes the terminal to depth events. MQL5 EAs get tick events.

- Status: verified. Source: [MetaTrader for Python](https://www.mql5.com/en/docs/python_metatrader5), checked 2026-09-20.

### How much history does the MetaTrader 5 API return?

Bars limited to the terminal's Max bars in chart setting. Deal history by date range with no stated limit.

- Status: verified. Source: [MQL5 docs: copy_rates_from](https://www.mql5.com/en/docs/python_metatrader5/mt5copyratesfrom_py), checked 2026-09-22.

### Is there a Python library for the MetaTrader 5 API?

This register lists these Python libraries for the MetaTrader 5 API. MetaTrader5 (official, Python): Official MetaQuotes package, version 5.0.6231 of 27 Sep 2026, MIT licence, CPython 3.6 to 3.14, classified Production/Stable. Wheels are published for Windows x86-64 only, so the Python route is Windows only. Community Python MCP server (MQL5 article 21905) (community, Python): A community route documented in MQL5's own article library on 30 Apr 2026, separate from the native MCP in build 6060. It exposes 14 tools including place, modify and cancel orders, is Windows only because of the MT5 Python API, is single-threaded, and executes on whatever account MT5 is logged into. It has no approval step. The author advises demo testing first.

- Status: verified. Source: [MetaTrader5](https://pypi.org/project/MetaTrader5/), checked 2026-10-04.
- Status: verified. Source: [Community Python MCP server (MQL5 article 21905)](https://www.mql5.com/en/articles/21905), checked 2026-09-19.

### Which brokers offer MetaTrader 5?

Brokers on this register recorded as offering MetaTrader 5, with a source: Axi, IG, OANDA, Pepperstone, Swissquote, ThinkMarkets and Tickmill. Recorded as offering it but unverified: FxPro.

- Status: verified. Source: [Axi UK](https://www.axi.com/uk), checked 2026-10-12.
- Status: verified. Source: [IG UK MetaTrader 5](https://www.ig.com/uk/trading-platforms/metatrader-5), checked 2026-09-18.
- Status: verified. Source: [OANDA UK MetaTrader 5](https://www.oanda.com/uk-en/trading/platforms/metatrader-5/), checked 2026-09-18.
- Status: verified. Source: [Pepperstone UK trading platforms](https://pepperstone.com/en-gb/trading-platforms/), checked 2026-09-18.
- Status: verified. Source: [Swissquote UK, forex and CFD platforms](https://www.swissquote.com/en-uk/private/trade/platforms/forex-cfds), checked 2026-10-12.
- Status: verified. Source: [ThinkMarkets support: Spread betting account](https://support.thinkmarkets.com/hc/en-gb/articles/11613215353745-Spread-betting-account), checked 2026-09-18.
- Status: verified. Source: [Tickmill UK](https://www.tickmill.com/uk), checked 2026-09-18.

[MetaTrader 5 API questions, each answered in a sentence or two](https://openbrokerapi.com/answers/metatrader-5).

## Partner programme

Not verified. No programme page was opened, which is not evidence that no programme exists. [The MetaQuotes partner programme record](https://openbrokerapi.com/partners/metatrader-5). This site carries no affiliate links.

## Brokers that offer MetaTrader 5 (Python package and MQL5)

- [Axi](https://openbrokerapi.com/brokers/axi) (Axi Financial Services (UK) Limited): Listed on Axi's UK site, which says MT5 lets you develop algorithmic strategies with Expert Advisors.
  - Status: verified. Source: [Axi UK](https://www.axi.com/uk), checked 2026-10-12.
- [FxPro](https://openbrokerapi.com/brokers/fxpro) (FxPro group (UK entity not confirmed on page)): Listed on platform comparison; entity not stated.
  - Status: unverified. Source: [FxPro platform comparison](https://www.fxpro.com/trading-platforms/comparison), checked 2026-09-18.
- [IG](https://openbrokerapi.com/brokers/ig) (IG UK (IG Markets Ltd / IG Index Ltd)): MT5 offered to UK clients; page mentions running Expert Advisors, MQL5 and free VPS for qualifying accounts. Account type split (CFD vs spread bet) not stated on page.
  - Status: verified. Source: [IG UK MetaTrader 5](https://www.ig.com/uk/trading-platforms/metatrader-5), checked 2026-09-18.
- [OANDA](https://openbrokerapi.com/brokers/oanda) (OANDA Europe Limited): MT5 on web, desktop and mobile, live and demo. Expert Advisors allowed: 'Create expert advisors in MQL5 to automate your trading strategies'.
  - Status: verified. Source: [OANDA UK MetaTrader 5](https://www.oanda.com/uk-en/trading/platforms/metatrader-5/), checked 2026-09-18.
- [Pepperstone](https://openbrokerapi.com/brokers/pepperstone) (Pepperstone Limited): MetaTrader 5 is listed on the broker's UK platforms page for UK clients.
  - Status: verified. Source: [Pepperstone UK trading platforms](https://pepperstone.com/en-gb/trading-platforms/), checked 2026-09-18.
- [Swissquote](https://openbrokerapi.com/brokers/swissquote) (Swissquote Ltd (UK)): Listed on the UK private client forex and CFD platforms page, with Expert Advisors ticked in the comparison table.
  - Status: verified. Source: [Swissquote UK, forex and CFD platforms](https://www.swissquote.com/en-uk/private/trade/platforms/forex-cfds), checked 2026-10-12.
- [ThinkMarkets](https://openbrokerapi.com/brokers/thinkmarkets) (TF Global Markets (UK) Limited): Support article: spread betting is available on ThinkTrader, MT4 and MT5 for UK residents, so MT5 is offered to UK clients.
  - Status: verified. Source: [ThinkMarkets support: Spread betting account](https://support.thinkmarkets.com/hc/en-gb/articles/11613215353745-Spread-betting-account), checked 2026-09-18.
- [Tickmill](https://openbrokerapi.com/brokers/tickmill) (Tickmill UK Ltd): MT5 on Windows, macOS, mobile and WebTrader.
  - Status: verified. Source: [Tickmill UK](https://www.tickmill.com/uk), checked 2026-09-18.

## Licence and how to cite

The limit records on this page come from the limits register, which is CC BY 4.0 (https://openbrokerapi.com/data/limits.json). Everything else on it comes from records that are all rights reserved. This file is the page itself, at its own address, in another format, and it is not part of the CC BY 4.0 downloads listed at https://openbrokerapi.com/data.

Cite as: MetaTrader 5 Python API. Broker API Hub, https://openbrokerapi.com/platforms/metatrader-5, newest check 2026-10-12.

Where you rely on a single figure, cite the source and the checked date printed beside it as well. Where this page and a broker's own documentation differ, the documentation wins.
