hootnot / oandapyV20-examples

Examples demonstrating the use of oandapyV20 (oanda-api-v20)
MIT License
147 stars 65 forks source link

Edit stoploss and takeprofit of open trade #19

Closed wybren84 closed 6 years ago

wybren84 commented 6 years ago

I use the code of contrib_mo_tp_sl.py more or less to place a market order with a stop loss and take profit order. I was wondering how to change stoploss and takeprofit of an open trade?

hootnot commented 6 years ago

http://developer.oanda.com/rest-live-v20/order-ep/ so from the endpoints you need TradeCRCDO, see example in http://oanda-api-v20.readthedocs.io/en/latest/examples.html at the end of the file