How to get the positionId in Python? OpenApi
Created at 28 Sep 2022, 11:05
JY
How to get the positionId in Python? OpenApi
28 Sep 2022, 11:05
I need to close positions, but it requires ids. I can't understand, how to get it while opening the position. The support also doesn't know.
PanagiotisCharalampous
28 Sep 2022, 11:12
Hi there,
This is a bit inaccurate :) I have explained to you in our email conversation that you can get the position Id by reading the ProtoOAExecutionEvent. ProtoOAExecutionEvent contains a ProtoOAPosition which has positionId as a property. If you need an Open API Python example on how to send and read Open API protobuf messages, you can find one here. Unfortunately, I am not a Python developer therefore I cannot write the exact code for you.
Best Regards,
Panagiotis
Join us on Telegram and Facebook
@PanagiotisCharalampous