Broker API
IG trading API: limits, auth and errors
REST plus streaming for IG spread bet and CFD accounts.
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.
| Limit | Value | Scope | Source |
|---|---|---|---|
| Historical price data points a week | 10,000 | Per account, price history endpoints only | labs.ig.comchecked |
| Non trading requests a minute | 30 | Per account, non trading calls only | labs.ig.comchecked |
| Non trading requests a minute | 60 | Per application, that is per API key, non trading calls only | labs.ig.comchecked |
| Concurrent streaming subscriptions | 40 | Per streaming connection | labs.ig.comchecked corroborated by labs.ig.com/streaming-api-guide.html |
| Trading requests a minute | 100Sources 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 only | labs.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).
- 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
- GET/accountsList every account under the login (spread bet, CFD and so on) with balance, deposit, profit and loss and available funds.
- GET/accounts/preferencesRead the preferences held on the account. The one preference documented is whether trailing stops are switched on.
- PUT/accounts/preferencesChange the account preferences. The documented body carries one field, which switches trailing stops on or off.
- GET/categoriesThe categories of instrument switched on for the account, each with a code and a flag saying whether it can be traded.
- GET/categories/{categoryId}/instrumentsEvery instrument in one category, paged, with its epic, name, status and current bid and offer.
- GET/client-sentimentThe share of IG clients holding long and short positions in each of a list of markets, as two percentages per market.
- GET/client-sentiment/{marketId}The share of IG clients holding long and short positions in one market, as two percentages.
- GET/client-sentiment/related/{marketId}Client sentiment for the markets IG relates to the one you name: the long and short percentages for each.
- GET/confirms/{dealReference}Deal confirmation for a dealReference. This is where you learn whether the deal was ACCEPTED or REJECTED, and why.
- GET/history/activityAccount activity (deals, amendments, order changes) over a date range, with optional detail.
- GET/history/activity/{fromDate}/{toDate}Account activity between two dates, both given in the path. This is the version 1 form: every value in the reply is a string.
- GET/history/activity/{lastPeriod}Account activity for a period counted back from now, given in milliseconds. This is the version 1 form: every value in the reply is a string.
- GET/history/transactionsCash transactions (realised profit and loss, funding, deposits). This is the one you want for a trade journal or tax spreadsheet.
- GET/history/transactions/{transactionType}/{fromDate}/{toDate}Transaction history of one type between two dates, all three given in the path. The version 1 form of the transactions call.
- GET/history/transactions/{transactionType}/{lastPeriod}Transaction history of one type for a period counted back from now, given in milliseconds. The version 1 form of the transactions call.
- POST/indicativecostsandcharges/closeAsk for an indicative breakdown of the costs and charges of closing an open deal. Nothing is traded.
- GET/indicativecostsandcharges/durablemedium/{indicativeQuoteReference}Download an indicative costs and charges quote made earlier, as a PDF. The reference comes back from the open, close and edit quote calls.
- POST/indicativecostsandcharges/editAsk for an indicative breakdown of the costs and charges of editing an order, split into its stop and its limit. Nothing is traded.
- GET/indicativecostsandcharges/history/from/{from}/to/{to}The indicative costs and charges quotes made between two date times, paged. Each entry carries the reference needed to download its PDF.
- POST/indicativecostsandcharges/openAsk for an indicative breakdown of the costs and charges of opening a deal: spread, commission, funding and currency conversion. Nothing is traded.
- GET/marketsSearch markets by free text. Returns epics you then feed into every other call.
- GET/markets/{epic}Full market details for one epic: instrument, dealing rules (minimum size, stop distances) and snapshot.
- GET/operations/applicationList the API applications you own, each with its key, status and the request allowances set on it.
- PUT/operations/applicationChange one of your API applications: its status and its per account request allowances.
- PUT/operations/application/disableDisable the API key the request is sent with, so it stops serving requests. IG says a disabled key can be switched back on from the account pages of its platform.
- GET/positionsAll open positions on the active account, each with its market snapshot.
- GET/positions/{dealId}A single open position by deal ID.
- DELETE/positions/otcClose one or more positions. IG's official Java sample sends a DELETE with a request body; trading-ig sends a POST with the header _method: DELETE for clients that cannot put a body on a DELETE.
- POST/positions/otcOpen an OTC position. Returns a dealReference only: the deal is not confirmed until you call GET /confirms/{dealReference}.
- PUT/positions/otc/{dealId}Amend the stop, limit or trailing stop on an open position.
- GET/prices/{epic}Historical OHLC prices for an epic, paged. Each call eats into your weekly historical data allowance, so cache aggressively.
- GET/prices/{epic}/{resolution}/{numPoints}The most recent historical prices for an epic at one resolution, as a fixed number of data points. Each point counts against the historical data allowance.
- GET/prices/{epic}/{resolution}/{startDate}/{endDate}Historical prices for an epic at one resolution between two date times given in the path. Each point counts against the historical data allowance.
- DELETE/sessionLog out and end the current session. The page documents no parameters and no response body.
- POST/sessionLog in with username and password. Returns CST and X-SECURITY-TOKEN in the response headers; send both on every later call.
- PUT/sessionSwitch the session to another of your accounts, and optionally make that account the default one.
- GET/sessionRead the current session: client ID, active account and streaming endpoint. Optional fetchSessionTokens=true returns fresh CST headers.
- GET/session/encryptionKeyFetch the key and timestamp used to send a password in encrypted form when logging in. Only some logins need it.
- POST/session/refresh-tokenExchange a refresh token from a version 3 login for a new access token and a new refresh token.
- POST/watchlistsCreate a watchlist with a name and, if you wish, a first set of markets. The reply says whether every market was added.
- GET/watchlistsAll watchlists on the account, including the built in ones.
- DELETE/watchlists/{watchlistId}Delete a watchlist. The list itself is removed, not the markets or any position in them.
- PUT/watchlists/{watchlistId}Add one market to an existing watchlist, by its epic.
- GET/watchlists/{watchlistId}The markets in one watchlist, each with its epic, name, status and current bid and offer.
- DELETE/watchlists/{watchlistId}/{epic}Take one market out of a watchlist. The watchlist and its other markets stay as they are.
- GET/working-ordersAll working (pending) orders on the active account.
- POST/working-orders/otcCreate a working order (LIMIT or STOP) that triggers at a level.
- DELETE/working-orders/otc/{dealId}Delete an OTC working order by its deal identifier. Returns a dealReference.
- PUT/working-orders/otc/{dealId}Amend an OTC working order that has not filled: its level, type, stop, limit and expiry. Returns a dealReference to confirm, as dealing calls 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
ACCOUNT_The account is not enabled to trade.NOT_ ENABLED_ TO_ TRADING ATTACHED_The level of the attached stop or limit is not valid.ORDER_ LEVEL_ ERROR ATTACHED_The trailing stop value is not valid.ORDER_ TRAILING_ STOP_ ERROR authentication.The account used to log in is not a valid client account.failure. not- a- client- account CANNOT_The stop type cannot be changed.CHANGE_ STOP_ TYPE CANNOT_The stop cannot be removed.REMOVE_ STOP CLOSING_IG is not taking opening deals on a controlled risk basis on this market, so only closing trades are accepted.ONLY_ TRADES_ ACCEPTED_ ON_ THIS_ MARKET CLOSINGS_The account is currently restricted from opening new positions.ONLY_ ACCOUNT CONFLICTING_A resubmitted request does not match the original order.ORDER CONTACT_The instrument has an error.SUPPORT_ INSTRUMENT_ ERROR CR_IG could not process the order because the stop or limit level asked for is not a valid trading level in the underlying market.SPACING DUPLICATE_The order was rejected as a duplicate of an order issued earlier.ORDER_ ERROR endpoint.The API key was not accepted for this endpoint.unavailable. for. api- key error.No deal confirmation was found for the deal reference given.confirms. deal- not- found error.The date range in a price history request is not valid.invalid. daterange error.The watchlist id is not valid.invalid. watchlist error.A date in a price history request is not in a valid format.malformed. date error.The requested position was not found.position. notfound error.An unexpected error happened on IG's side while handling a positions request, and it could not proceed.positions. generic error.Reported while downloading historical prices, alongside the points allowance being exceeded.price- history. io- error error.The epic in the request was not found.public- api. epic- not- found error.The account's traffic allowance has been exceeded.public- api. exceeded- account- allowance error.The account's allowance for historical data has been exceeded.public- api. exceeded- account- historical- data- allowance error.The account's allowance for trading requests has been exceeded.public- api. exceeded- account- trading- allowance error.The traffic allowance of the API key has been exceeded.public- api. exceeded- api- key- allowance error.A login was sent to version 1 of the session endpoint by a client of the IG Singapore company.public- api. failure. encryption. required error.The account is not allowed to log in to the API.public- api. failure. kyc. required error.The request did not carry all of the security credentials the endpoint needs.public- api. failure. missing. credentials error.The account is not allowed to log in to the public API.public- api. failure. pending. agreements. required error.The user's preferred account is disabled.public- api. failure. preferred. account. disabled error.The user has not set a preferred account.public- api. failure. preferred. account. not. set error.The account's product type is not supported for public API users.public- api. failure. product- code- not- allowed error.IG's reference describes this code as "Stockbroking not supported for Public API users." It is listed under HTTP 403 in the Exceptions tables for /session.public- api. failure. stockbroking- not- supported error.The request named more epics than the endpoint accepts in one call.public- api. too- many- epics error.The date range in the request is not valid.request. invalid. date- range error.The page size in the request is not valid.request. invalid. page- size error.The account has been denied login privileges.security. account- access- denied error.The account has been migrated to IG's client and account model.security. account- migrated error.The account has not been activated yet.security. account- not- yet- activated error.The account has been suspended.security. account- suspended error.The endpoint needs an account token and the one sent was not valid.security. account- token- invalid error.The endpoint needs an account token and none was sent.security. account- token- missing error.All of the client's accounts are in a pending state.security. all- accounts- pending error.All of the client's accounts have been suspended.security. all- accounts- suspended error.The API key was not accepted because it is not currently enabled.security. api- key- disabled error.The API key provided was not accepted.security. api- key- invalid error.No API key was sent with the request.security. api- key- missing error.The API key is not valid for the account making the request.security. api- key- restricted error.The API key was not accepted because it has been revoked.security. api- key- revoked error.Authentication timed out.security. authentication. timeout error.The client has been suspended from using the platform.security. client- suspended error.The endpoint needs a client token and the one sent was not valid.security. client- token- invalid error.The endpoint needs a client token and none was sent.security. client- token- missing error.An unexpected error happened on IG's side and the request could not proceed.security. generic error.The request timed out while IG was retrieving the session details.security. get. session. timeout error.The user agent string sent with the request is not valid.security. invalid- application error.The credentials used to log in are not valid, so the login is rejected.security. invalid- details error.The site the account belongs to is not accessible through the API services.security. invalid- website error.The OAuth access token is not valid.security. oauth- token- invalid error.The maximum number of failed login attempts has been reached.security. too- many- failed- attempts error.The epic given when adding a market to a watchlist is not valid.service. watchlists. add- instrument. invalid- epic error.A switch to the account that is already active was attempted.switch. accountId- must- be- different error.The switch could not make the target account the new default account.switch. cannot- set- default- account error.A switch to an account id that is not valid was attempted.switch. invalid- accountId error.The instrument named in the dealing request was not found.trading. otc. instrument- not- found error.Market orders are not supported for this request.trading. otc. market- orders. not- supported error.The epic is not supported by the price history endpoint.unsupported. epic error.An attempt was made to delete a system generated watchlist, and IG rejected it.watchlists. management. cannot- delete- watchlist error.A watchlist could not be created because another watchlist already has that name.watchlists. management. duplicate- name error.A watchlist request failed for a reason IG does not specify.watchlists. management. error error.An attempt was made to delete a watchlist that does not exist, and IG rejected it.watchlists. management. watchlist- not- found EXCHANGE_An exchange check failed.MANUAL_ OVERRIDE EXPIRY_The order's expiry is shorter than the sprint market's minimum expiry.LESS_ THAN_ SPRINT_ MARKET_ MIN_ EXPIRY FINANCE_The total size of the deals placed on this market in a short period is more than IG permits.REPEAT_ DEALING FORCE_Forcing open a position in a different currency on the same market is not allowed.OPEN_ ON_ SAME_ MARKET_ DIFFERENT_ CURRENCY GENERAL_An error happened and no detailed information is available.ERROR GOOD_The working order was set to expire on a date that has already passed.TILL_ DATE_ IN_ THE_ PAST INSTRUMENT_The requested market was not found.NOT_ FOUND INSTRUMENT_The instrument cannot be traded in the currency given.NOT_ TRADEABLE_ IN_ THIS_ CURRENCY INSUFFICIENT_The account does not have enough funds available for the requested trade.FUNDS invalid.A generic error in the input data.input invalid.The request asked for too many markets in one call.input. too. many. markets invalid.A validation failure on the request field forceOpen.request. forceOpen invalid.The URL requested is not valid.url LEVEL_The market level moved and the deal was rejected.TOLERANCE_ ERROR LIMIT_The deal was rejected because the limit level is inconsistent with the current market price for the deal's direction.ORDER_ WRONG_ SIDE_ OF_ MARKET MANUAL_The time allowed for a manual order ran out.ORDER_ TIMEOUT MARGIN_The order was declined during margin checks.ERROR MARKET_The market is currently closed.CLOSED MARKET_The market is currently closed with edits.CLOSED_ WITH_ EDITS MARKET_The epic is due to expire shortly.CLOSING MARKET_The market does not allow short positions to be opened.NOT_ BORROWABLE MARKET_The market is currently offline.OFFLINE MARKET_The epic does not support the market order type.ORDERS_ NOT_ ALLOWED_ ON_ INSTRUMENT MARKET_The market can only be traded over the phone.PHONE_ ONLY MARKET_The market has been rolled to the next period.ROLLED MARKET_The requested market is not available to this account.UNAVAILABLE_ TO_ CLIENT MAX_The order size is larger than the maximum configured for the instrument for automatically hedging a deal's exposure.AUTO_ SIZE_ EXCEEDED MINIMUM_The order size is too small.ORDER_ SIZE_ ERROR MOVE_The limit level asked for is closer to the market level than the existing one.AWAY_ ONLY_ LIMIT MOVE_The stop level asked for is closer to the market level than the existing stop level.AWAY_ ONLY_ STOP MOVE_The order level asked for is closer to the market level than the existing order level.AWAY_ ONLY_ TRIGGER_ LEVEL NCR_The account is not permitted to open a position that is not controlled risk.POSITIONS_ ON_ CR_ ACCOUNT OPPOSING_Opening a controlled risk position in the opposite direction to an existing controlled risk position is not allowed.DIRECTION_ ORDERS_ NOT_ ALLOWED OPPOSING_The deal was rejected to avoid holding long and short positions on the same market, or long and short positions and working orders on the same epic.POSITIONS_ NOT_ ALLOWED ORDER_The order was declined.DECLINED ORDER_The order is locked and cannot be edited by the user.LOCKED ORDER_The order was not found.NOT_ FOUND ORDER_The order size cannot be filled at this price at the moment.SIZE_ CANNOT_ BE_ FILLED OVER_The total position size at this stop level is greater than the size allowed on this market.NORMAL_ MARKET_ SIZE PARTIALY_The position cannot be deleted because it has been partially closed.CLOSED_ POSITION_ NOT_ DELETED POSITION_The deal was rejected because of an existing position in the opposite direction.ALREADY_ EXISTS_ IN_ OPPOSITE_ DIRECTION POSITION_The position cannot be cancelled.NOT_ AVAILABLE_ TO_ CANCEL POSITION_The position cannot be closed.NOT_ AVAILABLE_ TO_ CLOSE POSITION_The position was not found.NOT_ FOUND public-A client side error on the indicative costs and charges endpoints.api. costs- and- charges. client- error public-A server side error on the indicative costs and charges endpoints.api. costs- and- charges. general- error public-The indicative quote reference was not found.api. costs- and- charges. indicative- quote- reference- not- found REJECT_A CFD style order was sent to a spread bet account.CFD_ ORDER_ ON_ SPREADBET_ ACCOUNT REJECT_A spread bet trade was submitted on a CFD account, which is not valid.SPREADBET_ ORDER_ ON_ CFD_ ACCOUNT SIZE_The order size is not a multiple of the size increment set for the market.INCREMENT SPRINT_The position's expiry would have fallen after the market's closing time.MARKET_ EXPIRY_ AFTER_ MARKET_ CLOSE STOP_The market does not allow attached stop or limit orders.OR_ LIMIT_ NOT_ ALLOWED STOP_The order requires a stop.REQUIRED_ ERROR STRIKE_The strike level submitted is not valid.LEVEL_ TOLERANCE system.A system error on IG's side.error TRAILING_The market or the account does not allow trailing stops.STOP_ NOT_ ALLOWED unauthorised.The account is not authorised to access equity data.access. to. equity. exception unauthorised.The API key is in the revoked state and cannot be used.api- key. revoked unauthorised.The API key does not belong to the authenticated individual.clientId. api- key. mismatch UNKNOWNThe operation ended in an unknown result.WRONG_The operation was attempted on the wrong side of the market for its direction.SIDE_ OF_ MARKET
Platform APIs an account here can reach
| Platform API | Offered | Note | Source |
|---|---|---|---|
| MetaTrader 4 (MQL4) | Yes | Offered 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) | Yes | MT5 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 API | No | cTrader not listed on the broker's UK platforms page; absence from an overview page is not proof, so unverified. | UnverifiedIG UK trading platformschecked |
| TradeLocker API | No | TradeLocker 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 API | No | Match-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 APIs | No | DXtrade 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
| Library | Language | Official | Note | Source |
|---|---|---|---|---|
| trading-ig | Python | Community | 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. | github.comchecked |
| ig-webapi-java-sample | Java | Official | Official IG sample, deprecated since Aug 2024; may be removed or replaced. | github.comchecked |
| ig-webapi-dotnet-sample | C# | Official | Official IG sample, deprecated since Aug 2024; may be removed or replaced. | github.comchecked |
| ig-webapi-javascript-sample | JavaScript | Official | Official 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).
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 quickstart: key to first call
- IG API endpoints, grouped by what they do
- IG API error codes
- ChatGPT trading bot with the IG API, the safe wayChatGPT can write IG API code for you, but it should never see your key or password, and nothing should trade until you arm it. Build read-first on a demo account, with a human confirming every order.
- Get your IG trade history into a spreadsheetUse the IG website, not the app: in My IG, open Live accounts, then History, pick your dates and all transaction types, and download the account ledger summary. IG UK says it comes only as a CSV file. We found no export in the mobile app.
- IG deal confirms: turning a deal reference into a resultA create call on IG hands back a deal reference, not a fill, and the client then reads the confirm for that reference. The rate limits, the session and the streaming cap that go with it.
- IG demo API key: how to get one and what it allowsIG does not hand out API keys from a standalone demo account. You need a live account, a demo account opened with the same email, and a separate key for demo. Here is the route, the two base URLs and the allowances you cannot raise.
- IG streaming with PythonIG's prices do not stream over its REST API. They stream over the streaming connection, and the endpoint you connect to is not in the documentation: it comes back in the body of your login response.
- IG API error: HTTP Error 403: Forbidden after hours of polling
IG API compared
The same fields from two records, side by side. No winner is picked.
What changed recently for the IG API
Documentation
IG's REST reference opened on 12 Oct 2026 at labs.ig.com/rest-trading-api-reference.html, after refusing our reader in September. It prints the working order paths with a hyphen: /working-orders, /working-orders/otc and /working-orders/otc/{dealId}. This site had recorded /workingorders, the spelling in IG's own deprecated Java sample. The three records now carry the reference spelling and are marked conflicting, because IG's two sources disagree and neither was tested against a host. The address without .html answered 500 the same day, so the eighteen records that linked it now link the page for their own call.
Documentation
Re-read against IG's reference on 12 Oct 2026, four IG records changed which fields they call required. Required now means only what the page marks as not null: size alone on DELETE /positions/otc; currencyCode, epic, expiry, forceOpen, guaranteedStop and size on POST /positions/otc; currencyCode, epic, expiry, guaranteedStop, level and size on POST /working-orders/otc. The page marks searchTerm optional on the market search. The _method header on deleting a working order is now recorded as optional, not required: IG's reference documents a plain DELETE, and IG's FAQ offers a POST with _method: DELETE only for clients that cannot send a body on a DELETE. This describes IG's page, not a test of what the host accepts.
Documentation
Three IG Labs addresses this site cited answered 500 on 12 Oct 2026 without a file ending and opened with one: the REST trading API guide, the FAQ and the streaming API guide now sit at rest-trading-api-guide.html, faq.html and streaming-api-guide.html. The IG record links the working addresses. The claims read there are unchanged: the FAQ still gives 12 hours for the session tokens and the guide still gives 6 hours extended up to 72.
IG Labs FAQchecked
The newest entries are shown. Every dated change, all brokers and platforms. Follow IG changes by RSS
Sample apps that use the IG API
- IG positions and P&L to CSVReads your open positions and realised P&L from IG and writes a CSV you can open in any spreadsheet.
- PipDeck for the IG APIStream Deck keys wired to IG's REST API. Planned as open source; the repo is not public yet. Your API key would stay on your machine and trading keys stay off until you arm them.
- Trade Exporter for the IG APIPulls balances, open positions, activity and transactions from the IG REST API into four CSV files. It runs on your own computer.
Open source repositories for IG
Read from GitHub's own records and ordered by stars as read. A listing is not a recommendation.
- ig-python/trading-igPython
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.