Open Gorgias26 opened 1 year ago
Hello @Gorgias26, That should be very easy to set, can you try to do something like this?
Example:
params = {
"stopLossPrice":38,
"takeProfitPrice":99
}
order = await bybit.create_order("LTC/USDT:USDT", "limit", "buy", 2.5, 40, params),
Thank you very much for the answer, I just tried it, but I have the impression that it does not put the SL and TP.
I think I should update my CCXT which is old if not. But on my other computer, I found that ccxt didn't work at all after the update. Even after uninstalling and restarting CCXT an old version of CCXT. I don't dare to do it again on this PC.
I'll try it on a virtual machine this afternoon.
thinks you agains for your answer !
well I did the ccxt update and solved several problems due to the update, but I still can't do the TP/SP.
When I use this, I have a price problem
params = {
"stopLossPrice":0.01,
"takeProfitPrice":0.1
}
order = bybit.create_order(symbol, "limit", "buy", 1, 0.02, params)
on the other hand when I put in shorts, it puts me a trigger order, and without TP/SL
Yet my numbers are good for being in a long and not in a short.
@Georgias
make sure the price is of the stopLossPrice is above the market price for a buy order
Hello all, I'm looking for a solution to put limit positions in queue with their integrated take profit.
It's been 5 hours that I'm trying things by searching on the internet, and impossible to get there.
Manually it's very easy to do : Image1
but impossible to reproduce this with CCXT.
The only thing I found was this:
params = {'stop_px': TP2, 'base_price':ticker}
but it doesn't do at all what I'm looking for: Image2
So if you have the solution to my problem, I will be eternally grateful ;)
good day all.