# MetaApi

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/metaapi, 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.

Cloud REST and WebSocket API over MT4 and MT5 accounts at any MetaTrader broker.

- Kind: Platform API
- Newest reading: 2026-10-12
- Official documentation: [metaapi.cloud](https://metaapi.cloud/docs/client/)
- Everything recorded for MetaApi, as one JSON file: https://openbrokerapi.com/data/platforms/metaapi.json

## MetaApi API rate limits and allowances

One record per limit. The scope is part of the limit: a figure without its scope is not a figure you can pace against.

- CPU credits per account: 5,000 CPU credits per 10 seconds
  - Scope: Per MetaTrader account. REST and RPC calls only
  - Status: verified. Source: [metaapi.cloud](https://metaapi.cloud/docs/client/rateLimiting/), checked 2026-10-12.
  - Note: The window is 10 seconds, which a single unit cannot state, so the figure stays as wording.
- 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
  - Status: verified. Source: [metaapi.cloud](https://metaapi.cloud/docs/client/rateLimiting/), checked 2026-10-12.
  - Note: Also 43,200 credits per 6 hours.
- 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
  - Status: verified. Source: [metaapi.cloud](https://metaapi.cloud/docs/client/rateLimiting/), checked 2026-10-12.
- 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
  - Status: verified. Source: [metaapi.cloud](https://metaapi.cloud/docs/client/rateLimiting/), checked 2026-10-12.
  - Note: Most read calls cost 50 credits, a trade costs 10 and listing symbols costs 500. Streaming uses no CPU credits. HTTP 429 with a recommended retry time on breach.
- Concurrent historical market data requests: 5 concurrent requests
  - Scope: Per MetaTrader account, historical market data API only
  - Status: verified. Source: [metaapi.cloud](https://metaapi.cloud/docs/client/rateLimiting/), checked 2026-10-12.
- 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
  - Status: verified. Source: [metaapi.cloud](https://metaapi.cloud/docs/client/rateLimiting/), checked 2026-10-12.
  - Note: Also 18,000 a minute, 180,000 an hour and 432,000 per 6 hours on one server. The page says a different client-id header selects a different server.

[MetaApi API rate limits in full](https://openbrokerapi.com/platforms/metaapi/rate-limits), with the related error codes.

## Access, authentication and streaming

- How you get access: Self-serve retail sign-up at metaapi.cloud, then connect your existing MT4 or MT5 account at any MetaTrader broker.
  - Status: verified. Source: [MetaApi](https://metaapi.cloud/), checked 2026-09-21.
- 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.
  - Status: verified. Source: [MetaApi home page](https://metaapi.cloud/), checked 2026-10-12.
  - Status: verified. Source: [MetaApi documentation, FAQ](https://metaapi.cloud/docs/client/faq/), checked 2026-10-12.
- 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.
  - Status: verified. Source: [MetaApi documentation, FAQ](https://metaapi.cloud/docs/client/faq/), checked 2026-10-12.
- 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.
  - Status: verified. Source: [MetaApi documentation, authentication and authorisation](https://metaapi.cloud/docs/client/restApi/auth/), checked 2026-10-12.
- 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.
  - Status: verified. Source: [MetaApi documentation, overview](https://metaapi.cloud/docs/client/), checked 2026-10-12.
  - Status: verified. Source: [MetaApi documentation, rate limiting](https://metaapi.cloud/docs/client/rateLimiting/), checked 2026-10-12.
- 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.
  - Status: unverified. Source: [MetaApi documentation, overview](https://metaapi.cloud/docs/client/), checked 2026-10-12.
- 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.
  - Status: verified. Source: [MetaApi documentation, rate limiting](https://metaapi.cloud/docs/client/rateLimiting/), checked 2026-10-12.

## MetaApi API endpoints

17 documented endpoints. [Grouped by what they do](https://openbrokerapi.com/platforms/metaapi/endpoints).

- [GET /users/current/accounts/{accountId}/account-information](https://openbrokerapi.com/platforms/metaapi/endpoints/get-account-information): Read the MetaTrader account's balance, equity, margin, free margin, leverage and currency, with its broker and server.
- [POST /users/current/accounts/{accountId}/calculate-margin](https://openbrokerapi.com/platforms/metaapi/endpoints/post-calculate-margin): Work 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}/candles](https://openbrokerapi.com/platforms/metaapi/endpoints/get-historical-candles): Download 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}](https://openbrokerapi.com/platforms/metaapi/endpoints/get-history-deals-by-position): List the history deals that belong to one position.
- [GET /users/current/accounts/{accountId}/history-deals/time/{startTime}/{endTime}](https://openbrokerapi.com/platforms/metaapi/endpoints/get-history-deals-by-time): 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}](https://openbrokerapi.com/platforms/metaapi/endpoints/get-history-orders-by-time): List the account's completed orders inside a time range, a page at a time.
- [GET /users/current/accounts/{accountId}/orders](https://openbrokerapi.com/platforms/metaapi/endpoints/get-orders): List the open, pending orders on the MetaTrader account.
- [GET /users/current/accounts/{accountId}/orders/{orderId}](https://openbrokerapi.com/platforms/metaapi/endpoints/get-order): Read one open order by its id, the ticket number.
- [GET /users/current/accounts/{accountId}/positions](https://openbrokerapi.com/platforms/metaapi/endpoints/get-positions): List the open positions on the MetaTrader account.
- [GET /users/current/accounts/{accountId}/positions/{positionId}](https://openbrokerapi.com/platforms/metaapi/endpoints/get-position): Read one open position by its id, the ticket number.
- [GET /users/current/accounts/{accountId}/server-time](https://openbrokerapi.com/platforms/metaapi/endpoints/get-server-time): Read the trading server's time for the MetaTrader account.
- [GET /users/current/accounts/{accountId}/symbols](https://openbrokerapi.com/platforms/metaapi/endpoints/get-symbols): List the symbols available on the MetaTrader account, as plain names.
- [GET /users/current/accounts/{accountId}/symbols/{symbol}/current-candles/{timeframe}](https://openbrokerapi.com/platforms/metaapi/endpoints/get-symbol-current-candle): Read the candle now forming for one symbol at one timeframe.
- [GET /users/current/accounts/{accountId}/symbols/{symbol}/current-price](https://openbrokerapi.com/platforms/metaapi/endpoints/get-symbol-current-price): Read the current price of one symbol.
- [GET /users/current/accounts/{accountId}/symbols/{symbol}/current-tick](https://openbrokerapi.com/platforms/metaapi/endpoints/get-symbol-current-tick): Read the latest tick of one symbol. The page says MT4 G1 accounts do not support this call.
- [GET /users/current/accounts/{accountId}/symbols/{symbol}/specification](https://openbrokerapi.com/platforms/metaapi/endpoints/get-symbol-specification): Read the trading specification of one symbol.
- [POST /users/current/accounts/{accountId}/trade](https://openbrokerapi.com/platforms/metaapi/endpoints/post-trade): Send 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 SDKs and wrappers

- metaapi.cloud-sdk (Node.js and browser JavaScript, Official): Listed on MetaApi's own SDK page. The package page itself was not opened.
  - Status: verified. Source: [metaapi.cloud](https://metaapi.cloud/sdks), checked 2026-10-12.
- metaapi-cloud-sdk (Python, Official): Listed on MetaApi's own SDK page. The package page itself was not opened.
  - Status: verified. Source: [metaapi.cloud](https://metaapi.cloud/sdks), checked 2026-10-12.
- metaapi-java-sdk (Java, Official): Listed on MetaApi's own SDK page. The repository itself was not opened.
  - Status: verified. Source: [metaapi.cloud](https://metaapi.cloud/sdks), checked 2026-10-12.

## MetaApi API: questions and answers

### 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.

- Status: verified. Source: [MetaApi](https://metaapi.cloud/), checked 2026-09-21.

### 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.

- Status: verified. Source: [MetaApi home page](https://metaapi.cloud/), checked 2026-10-12.
- Status: verified. Source: [MetaApi documentation, FAQ](https://metaapi.cloud/docs/client/faq/), checked 2026-10-12.

### 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.

- Status: verified. Source: [MetaApi documentation, FAQ](https://metaapi.cloud/docs/client/faq/), checked 2026-10-12.

### 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.

- Status: verified. Source: [metaapi.cloud](https://metaapi.cloud/docs/client/rateLimiting/), checked 2026-10-12.

### 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.

- Status: verified. Source: [MetaApi documentation, authentication and authorisation](https://metaapi.cloud/docs/client/restApi/auth/), checked 2026-10-12.

### 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.

- Status: verified. Source: [MetaApi documentation, overview](https://metaapi.cloud/docs/client/), checked 2026-10-12.
- Status: verified. Source: [MetaApi documentation, rate limiting](https://metaapi.cloud/docs/client/rateLimiting/), checked 2026-10-12.

### How much history does the MetaApi API return?

Unverified.

- Status: unverified. Source: [MetaApi documentation, overview](https://metaapi.cloud/docs/client/), checked 2026-10-12.

### 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.

- Status: verified. Source: [metaapi-cloud-sdk](https://metaapi.cloud/sdks), checked 2026-10-12.

[MetaApi API questions, each answered in a sentence or two](https://openbrokerapi.com/answers/metaapi).

## Brokers that offer MetaApi

Unverified: no broker on this register is recorded as offering MetaApi. That is a gap in the records, not a finding that none does.

## 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: MetaApi. Broker API Hub, https://openbrokerapi.com/platforms/metaapi, 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.
