Broker API HubMenu

Broker API

IG trading API: limits, auth and errors

REST plus streaming for IG spread bet and CFD accounts.

Independent and unofficialNewest reading Official documentation

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.

Quickstart: key to first call49 endpoints5 messages132 error codes

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

LimitValueScopeSource
Historical price data points a week10,000Per account, price history endpoints onlylabs.ig.comchecked
Non trading requests a minute30Per account, non trading calls onlylabs.ig.comchecked
Non trading requests a minute60Per application, that is per API key, non trading calls onlylabs.ig.comchecked
Concurrent streaming subscriptions40Per streaming connectionlabs.ig.comchecked corroborated by labs.ig.com/streaming-api-guide.html
Trading requests a minute100Sources conflict ig.com states around 40, checked . IG's own pages disagree. The conflict is labelled, not resolved. Pace against 40.Per account, trading calls onlylabs.ig.comchecked

IG API rate limits in full, with pacing advice and the related error codes.

Access, authentication and streaming

API types listed in the record: REST, Streaming.

How you get a key

API keys are only issued to existing live account holders: generate one in My IG > Settings > API keys.

How to use IG APIchecked

Who can use it

Spread bet and CFD accounts only. Share dealing, ISA and SIPP are not supported (error stockbroking-not-supported).

trading-ig FAQ (community source)checked

Demo

Partial: demo API works, but no key from a standalone demo account unless it is linked to a live account.

How to use IG APIchecked IG Labs FAQ: the demo and live base addresses, and the demo key rulechecked IG REST trading API guide: examples on the demo hostchecked

Authentication

API key plus username and password returns CST and X-SECURITY-TOKEN, valid 12 hours on a rolling basis with each call resetting the clock on the IG Labs FAQ, while IG's REST trading API guide says 6 hours at first, extended up to a maximum of 72 hours: a disagreement between two IG pages that the blocked reference page could not settle on 23 Sep 2026. The v3 OAuth access token lasts as long as the login response says, with a refresh token that expires later. All tokens are invalidated during weekend maintenance.

Sources conflict IG Labs FAQ: 12 hours between calls, reset by each call. IG Labs REST trading API guide: 6 hours at first, extended up to 72 hours while in use.

IG Labs REST trading API guidechecked IG Labs FAQchecked

Streaming

Streaming runs on Lightstreamer: IG's Streaming API Guide starts by sending you to the Lightstreamer client library, and the server address to connect to comes back from the /session call. By default a connection holds up to 40 simultaneous subscriptions. The guide asks you to contact IG to raise that quota and the FAQ says to manage it by unsubscribing and subscribing as needed; both warn that opening extra connections to get past it may cost you the API key or your API permissions. The streaming API does not take OAuth tokens, only the CST and X-SECURITY-TOKEN pair.

IG Labs Streaming API Guidechecked IG Labs FAQchecked

History depth

Up to 20 years of price history depending on resolution; 10,000 historical data points per week. Transactions and activity history are paged.

IG: How to use IG APIchecked IG Labs FAQchecked

IG API endpoints

49 documented endpoints. Grouped by what they do

IG messages

5 documented messages and subscriptions of the IG Streaming API. They are not HTTP endpoints: none has a method or a path, and each travels over a connection that stays open. Grouped by what they do, each with its summary

IG API error codes

132 decoded error codes. All IG errors

Platform APIs an account here can reach

Platform APIOfferedNoteSource
MetaTrader 4 (MQL4)YesOffered for spread betting and CFD accounts. Expert Advisors allowed: page says you can build strategies to execute automatically using your algorithms or MT4's own, called Expert Advisors.IG UK MetaTrader 4checked
MetaTrader 5 (Python package and MQL5)YesMT5 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.IG UK MetaTrader 5checked
cTrader Open APINocTrader not listed on the broker's UK platforms page; absence from an overview page is not proof, so unverified.UnverifiedIG UK trading platformschecked
TradeLocker APINoTradeLocker not listed on the broker's UK platforms page; absence from an overview page is not proof, so unverified.UnverifiedIG UK trading platformschecked
Match-Trader Platform APINoMatch-Trader not listed on the broker's UK platforms page; absence from an overview page is not proof, so unverified.UnverifiedIG UK trading platformschecked
DXtrade APIsNoDXtrade not listed on the broker's UK platforms page; absence from an overview page is not proof, so unverified.UnverifiedIG UK trading platformschecked

IG API SDKs and wrappers

LibraryLanguageOfficialNoteSource
trading-igPythonCommunityCommunity wrapper, maintained in spare time; 214 forks. Version 0.0.25 (25 Aug 2026) needs Python 3.10 or later; BSD-3-Clause, marked Alpha on PyPI.github.comchecked
ig-webapi-java-sampleJavaOfficialOfficial IG sample, deprecated since Aug 2024; may be removed or replaced.github.comchecked
ig-webapi-dotnet-sampleC#OfficialOfficial IG sample, deprecated since Aug 2024; may be removed or replaced.github.comchecked
ig-webapi-javascript-sampleJavaScriptOfficialOfficial IG sample, deprecated since Aug 2024; may be removed or replaced.github.comchecked

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

Does IG have an API?

Yes. This register records IG as having its own API (REST and Streaming), with availability marked as active. REST plus streaming for IG spread bet and CFD accounts.

IG Labschecked

IG API key: how do I get one?

API keys are only issued to existing live account holders: generate one in My IG > Settings > API keys.

How to use IG APIchecked

Who can use the IG API?

Spread bet and CFD accounts only. Share dealing, ISA and SIPP are not supported (error stockbroking-not-supported).

trading-ig FAQ (community source)checked

IG API demo: is there a demo or sandbox?

Partial: demo API works, but no key from a standalone demo account unless it is linked to a live account.

How to use IG APIchecked IG Labs FAQ: the demo and live base addresses, and the demo key rulechecked IG REST trading API guide: examples on the demo hostchecked

What are the IG API rate limits?

Historical price data points a week: 10,000 data points per week. Scope: Per account, price history endpoints only. Non trading requests a minute: 30 requests per minute. Scope: Per account, non trading calls only. Non trading requests a minute: 60 requests per minute. Scope: Per application, that is per API key, non trading calls only. Concurrent streaming subscriptions: 40 subscriptions. Scope: Per streaming connection. Trading requests a minute: 100 requests per minute. Scope: Per account, trading calls only. Sources conflict: ig.com states around 40 trade requests per minute.

Sources conflictlabs.ig.comchecked

How does IG API authentication work?

Sources conflict. API key plus username and password returns CST and X-SECURITY-TOKEN, valid 12 hours on a rolling basis with each call resetting the clock on the IG Labs FAQ, while IG's REST trading API guide says 6 hours at first, extended up to a maximum of 72 hours: a disagreement between two IG pages that the blocked reference page could not settle on 23 Sep 2026. The other reading: IG Labs FAQ: 12 hours between calls, reset by each call. IG Labs REST trading API guide: 6 hours at first, extended up to 72 hours while in use.

Sources conflictIG Labs REST trading API guidechecked IG Labs FAQchecked

Does the IG API support streaming?

Streaming runs on Lightstreamer: IG's Streaming API Guide starts by sending you to the Lightstreamer client library, and the server address to connect to comes back from the /session call. By default a connection holds up to 40 simultaneous subscriptions.

IG Labs Streaming API Guidechecked IG Labs FAQchecked

How much history does the IG API return?

Up to 20 years of price history depending on resolution; 10,000 historical data points per week. Transactions and activity history are paged.

IG: How to use IG APIchecked IG Labs FAQchecked

Is there a Python library for the IG API?

This register lists one Python library for the IG API. trading-ig (community, Python): Community wrapper, maintained in spare time; 214 forks. Version 0.0.25 (25 Aug 2026) needs Python 3.10 or later; BSD-3-Clause, marked Alpha on PyPI.

trading-igchecked

Which platform APIs work with an account at IG?

Recorded as offered, with a source: MetaTrader 4 and MetaTrader 5. Not verified either way: cTrader, TradeLocker, Match-Trader and DXtrade.

IG UK MetaTrader 4checked IG UK MetaTrader 5checked

IG API questions, each answered in a sentence or two.

The capability tables read one feature at a time across every broker and platform record, IG included.

Everything this site records for IG, as one JSON file. Each section of the file states its own licence. About the files. This page as Markdown.

IG API guides and reference

IG API compared

The same fields from two records, side by side. No winner is picked.

What changed recently for the IG API

The newest entries are shown. Every dated change, all brokers and platforms. Follow IG changes by RSS

Sample apps that use the IG API

Every app and sample

Open source repositories for IG

Read from GitHub's own records and ordered by stars as read. A listing is not a recommendation.

The full repository list

Partner programme

No published figure. The IG partner programme record. The programme register holds every record. This site carries no affiliate links.

How to cite this

IG trading API: limits, auth and errors. Broker API Hub, https://openbrokerapi.com/brokers/ig, newest check .

Where you rely on a single figure, cite the source and the checked date printed beside it as well.

Sections