Jump to content
  • 0

'errorCode': 'invalid.request.timeInForce' when using Python


SharesFTW

Question

Hi does anyone know why this error occurs? I can open up a trade if ordertype is set to market, however recent experience has forced me to explore using a limit approach to opening positions as the IG API returns loss making opening positions that do not correspond with the streaming index values.  My API trading parameters are as follows:

{'epic': 'IX.D.FTSE.DAILY.IP'
 'expiry': 'DFB'
 'direction': 'SELL'
 'size': '1'
 'orderType': 'LIMIT'
 'timeInForce': 'FILL_OR_KILL'
 'level': '6200'
 'guaranteedStop': 'false'
 'stopLevel': None
 'stopDistance': '7'
 'forceOpen': 'true'
 'limitLevel': None
 'limitDistance': '3'
 'quoteId': None

 'currencyCode': 'GBP'}

 

any help would be much appreciated

Thanks

Link to comment

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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
×
×
  • Create New...
us