madeinquant
-
Posts
3 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Community Tutorials
Store
Posts posted by madeinquant
-
-
I have already contact webapisupport@ig.com for help, they suggest to post the problem on this forum.
-
Stream API never response with these epics (HS50 CFD), Please feel free to comment.Thank you1. IX.D.HANGSENG.IFM.IP",2. IX.D.HANGSENG.IFD.IP",3. IX.D.HANGSENG.FWM3.IP",4. IX.D.HANGSENG.IFU.IP",There is a source code in python (trading_ig) for your reference.No response of stream data# A simple function acting as a Subscription listenerdef on_prices_update(item_update😞# print("price: %s " % item_update)print("{stock_name:<19}: Time {UPDATE_TIME:<8} - ""Bid {BID:>5} - Ask {OFFER:>5}".format(stock_name=item_update["name"], **item_update["values"]))ig_service = IGService(config.username,config.password,config.api_key,config.acc_type,acc_number=config.acc_number)ig_stream_service = IGStreamService(ig_service)ig_stream_service.create_session()subscription_prices = Subscription(mode="MERGE",items=["IX.D.HANGSENG.IFM.IP","IX.D.HANGSENG.IFD.IP","IX.D.HANGSENG.FWM3.IP","IX.D.HANGSENG.IFU.IP",], # sample spreadbet epicsfields=["UPDATE_TIME", "BID", "OFFER", "CHANGE", "MARKET_STATE"],)# Adding the "on_price_update" function to Subscriptionsubscription_prices.addlistener(on_prices_update)# Registering the Subscriptionsub_key_prices = ig_stream_service.ls_client.subscribe(subscription_prices)INFO:root:Creating new v2 session for user 'IGCFDEMO' at 'https://demo-api.ig.com/gateway/deal'INFO:root:POST '/session', resp 200INFO:trading_ig.stream:Starting connection with https://demo-apd.marketdatasystems.combalance: {'pos': 1, 'name': 'ACCOUNT:Z528CN', 'values': {'AVAILABLE_CASH': '19901.90'}}----------HIT CR TO UNSUBSCRIBE AND DISCONNECT FROM LIGHTSTREAMER-----------
Stream API never response with these epics (HS50 CFD)
in IG Technical Support - Platform and App Help
Posted
Solved, remove the leading "LI:" with epic when submit order. Thank you