Squareoff open positions using python

apind81
Hi

Can any one help me to code to achieve squareoff open positions using python.
I couldn't read the net quantity from open positions using - positions( )

Is there any function which can return the net quantity from positions.

Regards
Anil
  • Vivek
    @apind81 In positions response you get net quantity as field called quantity. Its negative if positions is short, positive if position is long and zero if its squared off.
  • apind81
    apind81 edited October 2016
    Thanks Vivek.
    I would like to know how can I store this value and pass to a function? I am new to Python.

    Regards
    Anil
  • Kailash
    @apind81 I'm afraid general programming questions are out of the scope of this discussion. We can only consider questions directly pertaining to our APIs.
This discussion has been closed.