Broker API HubMenu

MetaApi API rate limits

What is recorded about how fast you may call the MetaApi API: 6 limit records, the wording from the record and no related error code yet.

Independent and unofficialNewest check

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.

Recorded limits

One record per limit. The scope is part of the limit: a figure is only useful once you know whether it applies to a key, an account, a session or an address.

LimitValueScopeSource
CPU credits per account5,000 CPU credits per 10 secondsPer MetaTrader account. REST and RPC calls onlymetaapi.cloudchecked
CPU credits an hour, per application18,000Per application, multiplied by the number of accounts deployed to MetaApi. REST and RPC calls only, counted in CPU credits and not in requestsmetaapi.cloudchecked
CPU credits a minute, per application6,000Per application, multiplied by the number of accounts deployed to MetaApi. REST and RPC calls only, counted in CPU credits and not in requestsmetaapi.cloudchecked
CPU credits a second, per application1,000Per application, multiplied by the number of accounts deployed to MetaApi. REST and RPC calls only, counted in CPU credits and not in requestsmetaapi.cloudchecked
Concurrent historical market data requests5Per MetaTrader account, historical market data API onlymetaapi.cloudchecked
CPU credits a second, per server2,000Per shared front end server. REST and RPC calls only, counted in CPU credits and not in requestsmetaapi.cloudchecked

Rate limits, as the record words them

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 documentation, rate limitingchecked

Error codes that concern limits

Not recorded No decoded MetaApi error names a rate limit yet.

Pacing and backoff, in general

This part is general advice and says nothing about MetaApi in particular. The figures that apply are the recorded ones above, and the provider's own documentation is the authority.

Pace before you are refused. Work out the gap between requests that keeps you under the limit, then leave a margin, because a limit counted by a provider's clock will not line up exactly with yours. Spread calls evenly: a burst at the start of each window is the usual way to hit a limit while staying under it on average. The rate limit calculator checks a polling plan against a limit and gives the shortest interval that fits.

When a request is refused for rate, stop sending and wait. Double the wait after each refusal in a row, add a small random amount so that several programs do not retry together, and cap the number of attempts. If the reply names how long to wait, use that figure in place of your own.

Take extra care with dealing requests. A refused or unanswered order may or may not have gone through, so check the state of the order before you send it again. Cache what does not change, such as instrument details and history you have already downloaded, and prefer a stream to polling where one is offered.

Where to go next

Other platforms: cTrader, DXtrade, Match-Trader, MetaCopier, MetaTrader 4, MetaTrader 5, TradeLocker.