Jump to content

Spread bet demo price subscription error


Recommended Posts

I am using the IG web API within a python script(trading-ig) to subscribe to prices on my DEMO spread-bet account. Login, connection and session initialisation is working perfectly fine. Subscribing to the account balance is also working perfectly fine, see console logs below. However, subscribing to epic: "CS.D.GBPUSD.TODAY.IP" for fields "BID" and "OFFER" is failing on both my LIVE and DEMO accounts, please see attached screen shot showing this subscription working on the Streaming-API companion and the console logs for the failure via the API library.
Attached: Screen shot of epic subscription success using the streaming api companion
Logs Below: Login, Connection and session initialisation success, price subscription failure and account subscription success

[2020-12-31 15:29:44,655:20:handle_post_payload:226] Starting IGLS connection
[2020-12-31 15:29:44,655:30:handle_post_payload:228] INFO: Lightstreamer Server connection mode: DEMO
[2020-12-31 15:29:44,655:30:handle_post_payload:240] INFO: Service created
[2020-12-31 15:29:44,655:30:handle_post_payload:241] INFO: Lightstreamer Server: https://demo-api.ig.com/gateway/deal: connection mode: DEMO
[2020-12-31 15:29:44,655:30:handle_post_payload:244] INFO: Stream Service created
[2020-12-31 15:29:45,418:30:handle_post_payload:246] INFO: Session created
[2020-12-31 15:29:45,419:30:handle_post_payload:265] INFO: Account found for: XXXXXX
[2020-12-31 15:29:45,419:20:connect:78] Starting connection with https://demo-apd.marketdatasystems.com
[2020-12-31 15:29:45,419:30:connect:226] systemd.daemon not available, no watchdog notifications will be sent.
[2020-12-31 15:29:45,419:10:connect:228] Opening a new session to <https://demo-apd.marketdatasystems.com>
[2020-12-31 15:29:45,420:10:_call:192] Making a request to <https://demo-apd.marketdatasystems.com/lightstreamer/create_session.txt> with body <b'LS_op2=create&LS_cid=mgQkwtwdysogQz2BJ4Ji+kOj2Bg&LS_user=Z3QXT3&LS_password=CST-xxxxxxxxxxxxxxxxx%7CXST-xxxxxxxxxxxxxxxxxx&LS_content_length=1000000000'>
[2020-12-31 15:29:45,696:10:_handle_stream:264] DEBUG: Server response: OK

[2020-12-31 15:29:45,697:20:_handle_stream:266] Successfully connected to <https://demo-apd.marketdatasystems.com>
[2020-12-31 15:29:45,697:10:_handle_stream:267] Starting to handling real-time stream
[2020-12-31 15:29:45,698:10:_receive:393] Waiting for a new message
[2020-12-31 15:29:45,698:20:_handle_stream:290] Started handling of real-time stream
[2020-12-31 15:29:45,698:30:handle_post_payload:274] INFO: Stream Service connected to account Id
[2020-12-31 15:29:45,699:30:handle_post_payload:282] INFO: Subscribing to prices: ['CS.D.GBPUSD.TODAY.IP']
[2020-12-31 15:29:45,699:30:handle_post_payload:290] INFO: Adding listener for prices
[2020-12-31 15:29:45,699:30:handle_post_payload:294] INFO: Registering prices subscription
[2020-12-31 15:29:45,699:10:subscribe:340] Making a new subscription request
[2020-12-31 15:29:45,700:10:_call:192] Making a request to <https://apd245f.marketdatasystems.com/lightstreamer/control.txt> with body <b'LS_Table=1&LS_op=add&LS_mode=MERGE&LS_schema=BID+OFFER&LS_id=CS.D.GBPUSD.TODAY.IP&LS_session=Sf5a695f0b33a8a13M781T2945678'>
[2020-12-31 15:29:45,938:10:_control:212] Server response: <ERROR>
[2020-12-31 15:29:45,939:10:subscribe:351] Server response ---> <ERROR>
[2020-12-31 15:29:45,939:30:subscribe:355] Subscription error

[2020-12-31 15:29:45,939:30:handle_post_payload:298] INFO: Subscribing to account
[2020-12-31 15:29:45,939:30:handle_post_payload:306] INFO: Adding listener for account
[2020-12-31 15:29:45,940:30:handle_post_payload:310] INFO: Registering account subscription
[2020-12-31 15:29:45,940:10:subscribe:340] Making a new subscription request
[2020-12-31 15:29:45,940:10:_call:192] Making a request to <https://apd245f.marketdatasystems.com/lightstreamer/control.txt> with body <b'LS_Table=2&LS_op=add&LS_mode=MERGE&LS_schema=AVAILABLE_CASH&LS_id=ACCOUNT%3AZ3QXT3&LS_session=Sf5a695f0b33a8a13M781T2945678'> - - [31/Dec/2020 15:29:46] "POST / HTTP/1.1" 200 -
[2020-12-31 15:29:46,197:10:_control:212] Server response: <OK>
[2020-12-31 15:29:46,197:10:subscribe:351] Server response ---> <OK>
[2020-12-31 15:29:46,197:20:subscribe:353] Successfully subscribed
[2020-12-31 15:29:46,203:10:_receive:396] Received message ---> <2,1|10000.00>

[2020-12-31 15:29:46,203:10:_forward_update_message:381] Received update message ---> <2,1|10000.00>
[2020-12-31 15:29:46,203:20:on_account_update:177] balance: {'pos': 1, 'name': 'ACCOUNT:XXXXXX', 'values': {'AVAILABLE_CASH': '10000.00'}}

Any pointers would be greatly appretiated,

Kind Regards,


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • General Statistics

    • Total Topics
    • Total Posts
    • Total Members
    • Most Online
      10/06/21 10:53

    Newest Member
    Joined 18/01/22 11:14
  • Posts

    • Euro Breaking News: EUR/USD Dismisses Surprise ZEW Economic Sentiment Index Beat.   EUR/USD ANALYSIS: EU ZEW economic sentiment ACT: 49.4 U.S. Treasuries strengthen dollar. Bear flag poses downside threat to Euro bulls.   UNEXPECTED EURO AREA ZEW ECONOMIC SENTIMENT INDEX IMPROVEMENT The German ZEW economic sentiment advance (see economic calendar below) lead the way to the overall Euro area print shift to almost double the December release. The Euro responded marginally positive post-release but heavily weighed down by rising U.S. Treasury yields and a robust dollar. Source: DailyFX Economic Calendar   EURO FUNDAMENTAL BACKDROP Higher U.S. Treasury yields across the curve bolstered the greenback this morning giving the dollar leg of most USD crosses a lift. Soaring crude prices have added to a hawkish Fed as inflationary pressures may be rising after an attack in the UAE, which could hurt supply. Fears of Omicron in China have resulted in several lockdowns throughout the country adding to supply chain disruptions. These factors should give the dollar the upper hand in the near term against the Euro as the central bank divergence between the Fed and ECB remains. A sixth consecutive negative decline in European car sales registrations for the December period did not help the already fading Euro however, post-announcement price action reflects minimal price change on the pair leading up to the sentiment reading. TECHNICAL ANALYSIS EUR/USD DAILY CHART Chart prepared by Warren Venketas, IG The bear flag formation (blue) remains in play on the daily chart as EUR/USD prices continue to wade within the rising channel. The bear flag traditionally points to a bearish continuation but confirmation from a break below flag support (candle close) will be required to approve further downside. The Relative Strength Index (RSI) favors upside momentum and with the potential of a bullish crossover (20-day EMA crossing above 50-day EMA) in process, the 1.1500 psychological level could be next. This being said, fundamentals firmly encourage the U.S. dollar at this point in time and should come into fruition in due course. Resistance levels: 1.1500 100-day EMA (yellow) 1.1400 Support levels: 20/50-day EMA (purple/blue) 1.1186 IG CLIENT SENTIMENT DATA UNSURE IGCS shows retail traders are currently marginally long on EUR/USD, with 56% of traders currently holding long positions (as of this writing). At DailyFX we typically take a contrarian view to crowd sentiment but the fact that traders are positioned roughly equally, there is currently no preferred directional bias.   Jan 18, 2022 |  Warren Venketas, Analyst. DailyFX
    • FTSE 100, DAX and S&P 500 fall back in opening trading Indices have taken a sharp turn lower, with the DAX and S&P 500 in particular looking weak. Source: Bloomberg  Chris Beauchamp | Chief Market Analyst, London | Publication date: Tuesday 18 January 2022  FTSE 100 Early trading has seen the FTSE 100 head back to trendline support, reversing gains of the previous two sessions. A move below 7500 would break trendline support and put the price below Friday’s low, and would open the way to a more short-term bearish view. This may bring the 50-day simple moving average (SMA), currently 7335),into view. A bounce from the trendline would put this week’s highs into view, and then potentially suggest a move back towards 7700. Source: ProRealTime DAX Initial trading has resulted in sharp losses for the index, pushing it to the 100-day SMA (15,683). Crucially, the price is below the early December peak, and now the 200-day SMA at 15,613 comes into view. Trendline support from late November also beckons around the 200-day SMA. Source: ProRealTime S&P 500 The negative tone in this index continues with early losses as US markets return from their long weekend. Trendline support from late November is currently being tested, with further support around 4580 possible. Source: ProRealTime
  • Create New...