Why does OCO get's cancelled when the order is only partialy filled? IS that how it should work?
yes, anytime one order is "activated" it cancels the other orders. One cancels Others. So, it is a nice way to make sure you don't double down on buying or selling, if you want to have a stop loss AND a "take profit".
But that does not work if a partial fill cancels the whole other order. It is only reliable if a partial fill cancels the same part of the other order (assuming the two had the same size to begin with, which I guess is not guaranteed).
That would be good. Now let;s say i want to sell 100 btc 300 and put stop loss at 280 to avoid margin call at 250. Now the market moves to 300 but only 1 bitcoin is sold. My stop order gets canceled. Market moves down and i get margin called. That is nonsense