# MetaTrader 4 API: questions and answers

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/answers/metatrader-4, 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.

5 questions about the MetaTrader 4 API, each answered from the MetaTrader 4 record on this site (https://openbrokerapi.com/platforms/metatrader-4) and nothing else. 1 of the answers rests on a record labelled unverified.

- Newest check: 2026-09-21
- Official documentation: [docs.mql4.com](https://docs.mql4.com/)

An answer here is the record's own wording, cut at the end of a sentence, or a list of names read from records. An answer that opens with the word Unverified has no dated source behind it. Where this page and the provider's own documentation differ, the documentation wins. Nothing here recommends a broker.

## MetaTrader 4 API questions

### Does MetaTrader 4 have a demo or paper trading API?

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

- Status: verified. Source: [Opening of accounts (MT4 help)](https://www.metatrader4.com/en/trading-platform/help/userguide/open_an_account), checked 2026-09-21.

- [The MetaTrader 4 record's full wording](https://openbrokerapi.com/platforms/metatrader-4#access)

### What are MetaTrader 4's API rate limits?

Not published.

- Status: verified. Source: [MQL4 Reference](https://docs.mql4.com/), checked 2026-09-20.

- [MetaTrader 4 API rate limits, as the record words them](https://openbrokerapi.com/platforms/metatrader-4/rate-limits)

### How do I authenticate with the MetaTrader 4 API?

No API keys: code runs inside a terminal already logged in to a trading account.

- Status: verified. Source: [MQL4 Reference](https://docs.mql4.com/), checked 2026-09-20.

- [The MetaTrader 4 record's full wording](https://openbrokerapi.com/platforms/metatrader-4#access)

### Does MetaTrader 4 support streaming or WebSocket prices?

In-terminal events only (new tick, timer, depth changes); no external streaming API.

- Status: verified. Source: [MQL4 Reference](https://docs.mql4.com/), checked 2026-09-20.

- [The MetaTrader 4 record's full wording](https://openbrokerapi.com/platforms/metatrader-4#access)

### Does MetaTrader 4 have an MCP server?

Unverified. Not found on the pages opened, which is not proof that none exists. No agent tooling found, and no first party MetaQuotes MT4 page was opened. Recorded as no route found, not as confirmed absence.

- Status: unverified. No source opened.

- [The MCP server directory: looked for and not found](https://openbrokerapi.com/ai/mcp-directory#none-found)

## Not recorded here

The MetaTrader 4 record cannot answer these questions yet, so they are not asked above. That is a gap in this dataset. It says nothing either way about MetaTrader 4.

- [Is there an official Python library for MetaTrader 4?](https://openbrokerapi.com/answers/python-library) (not recorded here)
- [What does the most referenced MetaTrader 4 error mean?](https://openbrokerapi.com/answers/error-codes) (not recorded here)

## Where to go next

- [The MetaTrader 4 API record in full: every field with its source](https://openbrokerapi.com/platforms/metatrader-4)
- [Answers for every broker and platform API](https://openbrokerapi.com/answers)
- [Which broker APIs have a demo environment?](https://openbrokerapi.com/answers/demo-api)
- [What are the rate limits of each broker API?](https://openbrokerapi.com/answers/rate-limits)
- [How does each broker API authenticate?](https://openbrokerapi.com/answers/authentication)
- [Which broker APIs stream prices?](https://openbrokerapi.com/answers/streaming)
- [Which broker APIs have an official Python library?](https://openbrokerapi.com/answers/python-library)
- [Which broker APIs have an MCP server?](https://openbrokerapi.com/answers/mcp-server)
- [What does each API's most referenced error mean?](https://openbrokerapi.com/answers/error-codes)
- [cTrader API: questions and answers](https://openbrokerapi.com/answers/ctrader)
- [DXtrade API: questions and answers](https://openbrokerapi.com/answers/dxtrade)
- [Match-Trader API: questions and answers](https://openbrokerapi.com/answers/match-trader)
- [MetaApi API: questions and answers](https://openbrokerapi.com/answers/metaapi)
- [MetaCopier API: questions and answers](https://openbrokerapi.com/answers/metacopier)
- [MetaTrader 5 API: questions and answers](https://openbrokerapi.com/answers/metatrader-5)
- [TradeLocker API: questions and answers](https://openbrokerapi.com/answers/tradelocker)

## Licence and how to cite

The records behind this page are all rights reserved. This file is the page itself, at its own address, in another format. It is not part of the CC BY 4.0 downloads listed at https://openbrokerapi.com/data. Quote from it with a link to the page.

Cite as: MetaTrader 4 API: questions and answers. Broker API Hub, https://openbrokerapi.com/answers/metatrader-4, newest check 2026-09-21.

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.
