AlgoTrader
-
Posts
4 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Community Tutorials
Store
Posts posted by AlgoTrader
-
-
Is there any way to place market order using API?
I get this error when I follow IG-documentation on placing market order:currency_code = "USD" direction = "BUY" epic = "CS.D.BITCOIN.CFD.IP" order_type = "MARKET" expiry = "-" guaranteed_stop = False
---------------------------
error message:
raise IGException(response.text)
trading_ig.rest.IGException: {"errorCode":"invalid.request.type"}----------------------------
Is there something I'm missing here?
For me the only thing working is order_type = 'BUY'
-
Got the same issue. What did you use instead of 'DFB'?
currency_code = "GBP" direction = "BUY" epic = "IX.D.FTSE.CFD.IP" expiry = "DFB" guaranteed_stop = False # entering price level = 7402.0 # Pound per point size size = 1 time_in_force = "GOOD_TILL_CANCELLED" # limit orders are now called STOP order_type = "STOP" limit_distance = None stop_distance = level*0.99
----------------------------
'direction': 'BUY',
'epic': 'IX.D.FTSE.CFD.IP',
'expiry': None,
'guaranteedStop': False,
'level': None,
'limitDistance': None,
'limitLevel': None,
'profit': None,
'profitCurrency': None,
'reason': 'REJECT_SPREADBET_ORDER_ON_CFD_ACCOUNT',
'size': None,
'status': None,
'stopDistance': None,
'stopLevel': None,
'trailingStop': False} -
Got the same issue. Have you solved this?
Traling Stop on open market order
in IG Trading Support - Dealing Questions
Posted
Hi,
Trying to place MARKET open order with TrailingStop without luck.
Market order works but when changing Trailing_stop = True and increment to 50* or any other number I get error:
trading_ig.rest.IGException: {"errorCode":"validation.null-conditional-set-value.request»}
Trading on DEMO CFD account
Really appreciate the help
exapmle: