dydxprotocol/dydx-v3-python

Close an open position programmatically when a condition is met

crazyoptimist opened this issue · 1 comments

I've been trying to build a programmatic trading bot, and I'm stuck at this noob question.
I can create all kinds of orders using this python client. But, is there any way to make my open positions automatically closed when the index price crosses a certain value?
Here it says it's possible but I can't figure it out in practice: https://help.dydx.exchange/en/articles/4797992-perpetual-order-types

Stop limit orders can be used to limit losses on your positions by automatically closing them when the price falls below (for longs) or rises above (for shorts) the stop price.

Any help would be very appreciated!

Closing this, it was lack of trading concepts.