Broker API HubMenu

IG Streaming TRADE:{account identifier}

messageTRADE:{account identifier}IG Streaming APILightstreamerAccount and trades

Trade notifications for one account in three fields: CONFIRMS for deal confirmations, OPU for open position updates and WOU for working order updates. The value of each is a JSON object.

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.

Independent and unofficiallabs.ig.comchecked

This is a subscription of the IG Streaming API, not an HTTP endpoint. It has no method and no path: it travels over a Lightstreamer connection that stays open, which a Lightstreamer client library manages.

IG's guide says DISTINCT mode, where every update yields a notification, is required for trade notifications. Its sample code parses the value of a field as JSON to read a confirmation.

The message

Name
TRADE:{account identifier}
Direction
Subscription, opened by the client and then fed by the server
Subscribed to as
TRADE:{account identifier}, in the mode DISTINCT
Carried by
Lightstreamer. IG's Streaming API Guide (labs.ig.com/streaming-api-guide.html), opened the same day, says the server address is the Lightstreamer address returned by the REST /session call and should not be hard coded, that the user is the active account identifier, and that the password is built from the CST and X-SECURITY-TOKEN tokens of the REST session. It gives 40 as the default number of simultaneous subscriptions on one connection.

Fields

NameTypeDescription
CONFIRMSNot statedDeal confirmations for the account. A JSON object with the fields listed below under CONFIRMS.
CONFIRMS.directionConstantBUY or SELL.
CONFIRMS.limitLevelNumberThe limit level.
CONFIRMS.stopLevelNumberThe stop level.
CONFIRMS.dealIdStringThe deal identifier.
CONFIRMS.expiryStringThe expiry of the instrument.
CONFIRMS.sizeNumberThe size of the trade.
CONFIRMS.epicStringThe epic of the instrument.
CONFIRMS.levelNumberThe level of the trade.
CONFIRMS.guaranteedStopBooleanTrue where a guaranteed stop is in place.
CONFIRMS.dealReferenceStringThe deal reference.
CONFIRMS.dealStatusConstantACCEPTED or REJECTED.
CONFIRMS.affectedDealsArray[Object]The deals affected. Each entry holds a dealId and a status, one of AMENDED, DELETED, FULLY_CLOSED, OPENED and PARTIALLY_CLOSED.
CONFIRMS.statusConstantThe status of the position or working order that results: AMENDED, CLOSED, DELETED, OPEN or PARTIALLY_CLOSED.
CONFIRMS.repeatDealingWindowObjectThe repeat dealing windows. Its entries each hold a size and an expiry timestamp.
OPUNot statedOpen position updates for the account. A JSON object with the fields listed below under OPU.
OPU.directionConstantBUY or SELL.
OPU.limitLevelNumberThe limit level.
OPU.stopLevelNumberThe stop level.
OPU.dealIdStringThe deal identifier.
OPU.expiryStringThe expiry of the instrument.
OPU.sizeNumberThe size of the trade.
OPU.epicStringThe epic of the instrument.
OPU.levelNumberThe level of the trade.
OPU.guaranteedStopBooleanTrue where a guaranteed stop is in place.
OPU.dealReferenceStringThe deal reference.
OPU.dealStatusConstantACCEPTED or REJECTED.
OPU.dealIdOriginStringThe deal identifier of the deal this one came from.
OPU.timestampDateThe date and time of the event.
OPU.statusConstantThe status of the position: OPEN for opened, UPDATED for updated, DELETED for closed.
OPU.channelStringThe channel the user dealt through. The page says not to bind to this value, because it will become a constant.
OPU.currencyStringThe currency.
OPU.trailingStopDistanceNumberThe distance of the trailing stop.
OPU.trailingStepNumberThe increment of the trailing stop.
WOUNot statedWorking order updates for the account. A JSON object with the fields listed below under WOU.
WOU.directionConstantBUY or SELL.
WOU.limitDistanceNumberThe limit distance.
WOU.stopDistanceNumberThe stop distance.
WOU.dealIdStringThe deal identifier.
WOU.expiryStringThe expiry of the instrument.
WOU.sizeNumberThe size of the trade.
WOU.epicStringThe epic of the instrument.
WOU.levelNumberThe level of the trade.
WOU.guaranteedStopBooleanTrue where a guaranteed stop is in place.
WOU.dealReferenceStringThe deal reference.
WOU.dealStatusConstantACCEPTED or REJECTED.
WOU.timestampDateThe date and time of the event.
WOU.statusConstantThe status of the working order: OPEN for opened, UPDATED for updated, DELETED for closed.
WOU.currencyStringThe currency.
WOU.orderTypeConstantLIMIT for a limit order, STOP for a stop order.
WOU.timeInForceConstantGOOD_TILL_CANCELLED or GOOD_TILL_DATE.
WOU.goodTillDateDateThe date the order is good until.
WOU.channelStringThe channel the user dealt through. The page says not to bind to this value, because it will become a constant.

Limits that apply at IG

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