Hello everyone,
This is my first post on your forum, but I’ve already learned a lot from you recently by reading your various posts, so first of all, a big thank you for the valuable help you’ve provided, even without realizing it. I hope you’ll be able to help me because I’m at an impasse, and IG Group’s support was either unable or unwilling to assist me.
I’m trying to use IG’s Lightstreamer API in Java to receive real-time CFD data. I can successfully create a REST session and connect to Lightstreamer, but all my subscriptions fail with error code 21 (Invalid group) or -1 (incorrect instrument setup), no matter the combination I try.
Here’s what I’ve tested:
Items: PRICE:{accountId}:{epic}, MARKET:{epic}, CHART:{epic}:TICK
Modes: MERGE, DISTINCT
Adapters: DEFAULT, Pricing, null
Fields: BIDPRICE1, ASKPRICE1, BID, OFFER, MID_OPEN, HIGH, LOW
I’ve tested all possible combinations and I either get a server error or no response.
My questions are:
Is there an official or documented list of valid combinations item + adapter + mode + fields for an IG demo account?
Could the error be caused by an instrument that’s unavailable on my account type, even in demo?
Has anyone successfully received CFD data via IG Lightstreamer in Java? If so, which exact combination worked?
Any guidance or example of a working subscription would be greatly appreciated.
Thank you in advance and have a great day.