Skip to content

Close position in OMSType.HEDGING #538

Answered by cjdsellers
sidnvy asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @sidnvy

You're very close to having that working by the sounds of it. You're correct that this dualSidePosition option is just another term for a hedging account type or OMSType.HEDGING.

We're currently working on docs and so some of this could be much clearer, however something to highlight is that the only responsibility of the OrderFactory is to instantiate orders in an easier way than if you had to pass every parameter into the order classes themselves.

The orders however have no knowledge of positions, even though by consequence they result in changes to positions when executed.

Solution
So what you'd need to do is once you have your desired order from the factory, pass a position_id

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@sidnvy
Comment options

@cjdsellers
Comment options

Answer selected by sidnvy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants