Hello! So from what I’ve read for the Algo Orders(OCO, StopLimit, etc etc) The max number you can have at the same time for Symbol is 10(5 OCO).
So we we create algo order for Example:
My Account have:
USDT = 30k
BTC = 0
I want to buy 1 BTC on market order (Current Price is 30k USDT).
Then Create OCO(One cancle the other)
I create 2 orders:
First order → with Target Price. I will Sell 1 BTC when the price Reach 31k USDT
Second order → with Stop Price. I will Sell 1 BTC When the price drop 29k USDT
We can create 5 of these pairs Which I call Positions. This one is Long.
After this Order I will have in My Account USDT = 0 and BTC = 0, because I have my 1 btc that I bought locked for the OCO Order.
Now Is there a way I could do this without alog Order.
For Example:
I will buy 1 BTC with marked order for 30k
My Account will have:
USDT = 0
BTC = 1
And I will have code in C# that will have the logic for:
I will Sell 1 BTC when the price Reach 31k USDT
I will Sell 1 BTC When the price drop 29k USDT
But the problem is my account will have USDT = 0 and BTC = 1.
Is there a way I can lock this BTC like in the algo order and unlock it when the price reach the point for target or stoploss and then sell it.
Because if I don’t lock it and I want to create Short Position which is:
I want to sell 1 BTC at market Price for 30k
I will Buy 1 BTC when the price drop 28.5k USDT
I will Buy 1 BTC When the price reach 31.5k USDT
and if I do that It will sell the BTC I have and if the first Position I create reach the target or stoploss won’t have the btc to sell .
The idea of the lock is not to sell the BTC I user for the first Position, but to Borrow If I don’t have any.
So is there any way I can mimic the OCO Orders with C# Code using the api and therefore have more then 5 OCO
I believe I only need the part where I can lock and unlock USDT or BTC when I create Market orders. I already have the logic for sell at target or stoploss price.