CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. 66 % of retail investor accounts lose money when trading CFDs with this provider. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money.

Conditional orders from current positions

I’ve been checking and I cannot find conditional orders from current positions.

1.- I buy a DARWIN with SL/TP
2.- I want to modify those SL/TP associated with the current investment.

To execute 2 I would:
a) Directly modify the SL/TP through a PUT call
b) Remove those SL/TP through a DELETE call and then POST new SL/TPs

Could you please advise whether and how a or b can be done?

Hi mireigon,

Stop Loss / Take Profits are considered Conditional Orders in terms of API. Once these conditional orders have been requested, they are established for the investor account in status PENDING. A query to GET /investoraccounts/{investorAccountId}/conditionalorders/pending (InvestorAccountInfoAPI) should provide you the details of these conditional orders. Once you have the conditionalOrderIds from this call, the DarwinTradingAPI can be used to update or cancel these conditional orders. There is a PUT and DELETE method for conditional orders in this API.
Notice that once a conditional order has been updated with new details, a new conditional order is really raised with the new details, in status PENDING and a new conditionalOrderId. The original conditional order changes its status to “EDITED” and it’s not available anymore.


State diagram of the conditional orders:

At the moment, we allowed to raise the following types of conditional orders: Buy Limit / Stop Loss / Take Profit. Buy Stop might be allowed in the future.


Thanks! That sorts it out.