Platform API
MetaApi
Cloud REST and WebSocket API over MT4 and MT5 accounts at any MetaTrader broker.
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.
MetaApi API rate limits and allowances
| Limit | Value | Scope | Source |
|---|---|---|---|
| CPU credits per account | 5,000 CPU credits per 10 seconds | Per MetaTrader account. REST and RPC calls only | metaapi.cloudchecked |
| CPU credits an hour, per application | 18,000 | Per application, multiplied by the number of accounts deployed to MetaApi. REST and RPC calls only, counted in CPU credits and not in requests | metaapi.cloudchecked |
| CPU credits a minute, per application | 6,000 | Per application, multiplied by the number of accounts deployed to MetaApi. REST and RPC calls only, counted in CPU credits and not in requests | metaapi.cloudchecked |
| CPU credits a second, per application | 1,000 | Per application, multiplied by the number of accounts deployed to MetaApi. REST and RPC calls only, counted in CPU credits and not in requests | metaapi.cloudchecked |
| Concurrent historical market data requests | 5 | Per MetaTrader account, historical market data API only | metaapi.cloudchecked |
| CPU credits a second, per server | 2,000 | Per shared front end server. REST and RPC calls only, counted in CPU credits and not in requests | metaapi.cloudchecked |
Access, authentication and streaming
API types listed in the record: REST, WebSocket (socket.io), Node SDK, Python SDK, Java SDK.
- How you get access
Self-serve retail sign-up at metaapi.cloud, then connect your existing MT4 or MT5 account at any MetaTrader broker.
MetaApichecked
- Who can use it
MetaApi's home page says the service supports any MetaTrader broker, with the same API for MT4 and MT5. You sign up yourself and add your own MetaTrader account. Adding an account means giving MetaApi the account's trading password so that its servers can connect to your broker, or the investor password for read only access.
MetaApi home pagechecked MetaApi documentation, FAQchecked
- Demo
Yes: MetaApi's FAQ says you can add a demo MetaTrader account to the service to try it without real trades, or give the investor password for read only access. There is no separate demo API environment: the same API is used, and what makes it a demo is the MetaTrader account you connect.
MetaApi documentation, FAQchecked
- Authentication
An authorisation token sent in the auth-token header of every REST request. You take the token from the MetaApi web application. An invalid token returns HTTP 401.
MetaApi documentation, authentication and authorisationchecked
- Streaming
Yes: a WebSocket API on the socket.io protocol that pushes terminal state changes, quotes, candles, ticks and order book data in real time. MetaApi recommends it over REST for automated trading. Streaming does not use the CPU credits that REST and RPC calls use, but each account has its own market data streaming credits, and going over them downgrades the subscription.
MetaApi documentation, overviewchecked MetaApi documentation, rate limitingchecked
- History depth
Unverified. MetaApi's home page says historical market data comes from your broker, and its documentation lists endpoints for history orders, deals, ticks and candles, but the pages opened on 12 Oct 2026 were not read for how far back a request can go or how many rows it returns.
UnverifiedMetaApi documentation, overviewchecked
- Rate limits, as worded
Limits are counted in CPU credits, not requests. Each REST or RPC call costs credits: most reads cost 50, a trade costs 10 and listing symbols costs 500. An application gets 1,000 credits a second, 6,000 a minute, 18,000 an hour and 43,200 per 6 hours, each multiplied by the number of accounts it has deployed. A single shared front end server allows 2,000 credits a second, a single account allows 5,000 credits per 10 seconds, and historical market data allows 5 concurrent requests per account. Going over returns HTTP 429 with a recommended retry time in the error.
MetaApi API SDKs and wrappers
| Library | Language | Official | Note | Source |
|---|---|---|---|---|
| metaapi.cloud-sdk | Node.js and browser JavaScript | Official | Listed on MetaApi's own SDK page. The package page itself was not opened. | metaapi.cloudchecked |
| metaapi-cloud-sdk | Python | Official | Listed on MetaApi's own SDK page. The package page itself was not opened. | metaapi.cloudchecked |
| metaapi-java-sdk | Java | Official | Listed on MetaApi's own SDK page. The repository itself was not opened. | metaapi.cloudchecked |
MetaApi API endpoints
17 documented endpoints. They belong to the platform's own API, so the calls are the same whichever broker or firm the account is with. Only the base address can differ. Grouped by what they do
- GET/users/current/accounts/{accountId}/account-informationRead the MetaTrader account's balance, equity, margin, free margin, leverage and currency, with its broker and server.
- POST/users/current/accounts/{accountId}/calculate-marginWork out the margin that opening a given trade on the account would need, without placing it.
- GET/users/current/accounts/{accountId}/historical-market-data/symbols/{symbol}/timeframes/{timeframe}/candlesDownload historical candles for one symbol and timeframe, loaded backwards from a start time, up to 1000 at a time.
- GET/users/current/accounts/{accountId}/history-deals/position/{positionId}List the history deals that belong to one position.
- GET/users/current/accounts/{accountId}/history-deals/time/{startTime}/{endTime}List the account's history deals inside a time range, a page at a time.
- GET/users/current/accounts/{accountId}/history-orders/time/{startTime}/{endTime}List the account's completed orders inside a time range, a page at a time.
- GET/users/current/accounts/{accountId}/ordersList the open, pending orders on the MetaTrader account.
- GET/users/current/accounts/{accountId}/orders/{orderId}Read one open order by its id, the ticket number.
- GET/users/current/accounts/{accountId}/positionsList the open positions on the MetaTrader account.
- GET/users/current/accounts/{accountId}/positions/{positionId}Read one open position by its id, the ticket number.
- GET/users/current/accounts/{accountId}/server-timeRead the trading server's time for the MetaTrader account.
- GET/users/current/accounts/{accountId}/symbolsList the symbols available on the MetaTrader account, as plain names.
- GET/users/current/accounts/{accountId}/symbols/{symbol}/current-candles/{timeframe}Read the candle now forming for one symbol at one timeframe.
- GET/users/current/accounts/{accountId}/symbols/{symbol}/current-priceRead the current price of one symbol.
- GET/users/current/accounts/{accountId}/symbols/{symbol}/current-tickRead the latest tick of one symbol. The page says MT4 G1 accounts do not support this call.
- GET/users/current/accounts/{accountId}/symbols/{symbol}/specificationRead the trading specification of one symbol.
- POST/users/current/accounts/{accountId}/tradeSend one trade command to the MetaTrader account. The actionType in the body decides what it does: open at market, place, change or cancel a pending order, or change or close a position.
MetaApi API: questions and answers
Each answer is read from the record on this page, not written separately. Where the record is unverified, the answer says so.
How do I get access to the MetaApi API?
Self-serve retail sign-up at metaapi.cloud, then connect your existing MT4 or MT5 account at any MetaTrader broker.
MetaApichecked
Who can use the MetaApi API?
MetaApi's home page says the service supports any MetaTrader broker, with the same API for MT4 and MT5. You sign up yourself and add your own MetaTrader account.
MetaApi home pagechecked MetaApi documentation, FAQchecked
MetaApi API demo: is there a demo or sandbox?
Yes: MetaApi's FAQ says you can add a demo MetaTrader account to the service to try it without real trades, or give the investor password for read only access.
MetaApi documentation, FAQchecked
What are the MetaApi API rate limits?
CPU credits per account: 5,000 CPU credits per 10 seconds. Scope: Per MetaTrader account. REST and RPC calls only. CPU credits an hour, per application: 18,000 credits per hour. Scope: Per application, multiplied by the number of accounts deployed to MetaApi. REST and RPC calls only, counted in CPU credits and not in requests. CPU credits a minute, per application: 6,000 credits per minute. Scope: Per application, multiplied by the number of accounts deployed to MetaApi. REST and RPC calls only, counted in CPU credits and not in requests. CPU credits a second, per application: 1,000 credits per second. Scope: Per application, multiplied by the number of accounts deployed to MetaApi. REST and RPC calls only, counted in CPU credits and not in requests. Concurrent historical market data requests: 5 concurrent requests. Scope: Per MetaTrader account, historical market data API only. CPU credits a second, per server: 2,000 credits per second. Scope: Per shared front end server. REST and RPC calls only, counted in CPU credits and not in requests. As the record words it: Limits are counted in CPU credits, not requests. Each REST or RPC call costs credits: most reads cost 50, a trade costs 10 and listing symbols costs 500.
metaapi.cloudchecked
How does MetaApi API authentication work?
An authorisation token sent in the auth-token header of every REST request. You take the token from the MetaApi web application. An invalid token returns HTTP 401.
MetaApi documentation, authentication and authorisationchecked
Does the MetaApi API support streaming?
Yes: a WebSocket API on the socket.io protocol that pushes terminal state changes, quotes, candles, ticks and order book data in real time. MetaApi recommends it over REST for automated trading.
MetaApi documentation, overviewchecked MetaApi documentation, rate limitingchecked
How much history does the MetaApi API return?
Unverified.
UnverifiedMetaApi documentation, overviewchecked
Is there a Python library for the MetaApi API?
This register lists one Python library for the MetaApi API. metaapi-cloud-sdk (official, Python): Listed on MetaApi's own SDK page. The package page itself was not opened.
metaapi-cloud-sdkchecked
MetaApi API questions, each answered in a sentence or two.
Everything this site records for MetaApi, as one JSON file. Each section of the file states its own licence. About the files. This page as Markdown.
MetaApi API guides and reference
Open source repositories for MetaApi
Read from GitHub's own records and ordered by stars as read. A listing is not a recommendation.
Brokers that offer MetaApi
No broker on this register is recorded as offering MetaApi. That is a gap in the records, not a finding that none does.
How to cite this
MetaApi. Broker API Hub, https://openbrokerapi.com/platforms/metaapi, newest check .
Where you rely on a single figure, cite the source and the checked date printed beside it as well.