Closed zansibal closed 9 months ago
hey @zansibal - best to keep it backwards compatible I think. We don't want to break anyone's code if they update to latest. Make it a named param with default of None, and only add it to the params
dict if it is not None
. Like in update_open_position()
Feature implemented
thanks for contributing
You should have the thanks, for maintaining 👍
The
create_open_position()
andclose_open_position()
do not have the timeInForce parameter implemented. I need it, and I would like to create a PR for it.https://labs.ig.com/rest-trading-api-reference/service-detail?id=678
Should I make the parameter positional (same as for other parameters) requiring the user to choose either
"EXECUTE_AND_ELIMINATE"
or"FILL_OR_KILL"
? This would not be backwards compatible. The other option would be to give it a default value None, and assume (and possibly verify) the same behaviour as today. Both have pros and cons.I believe the current implementation, by not sending the parameter at all, defaults to
"FILL_OR_KILL"
on IG.Any thoughts?