1

I am coding up a python bot that helps for scalping. One of my functions, is that once a button is clicked a stop loss 0.04% below the market price will automatically be placed. However due to the closeness of the stop loss, it often gets executed straight away as a market order. On the Bybit user interface there is a post only option, which ensures orders will be processed as limit orders.

Is there a way to implement a function or attribute in my code that will enable me to achieve this functionality.

this function was created so I am able to quickly exit the trade with a limit order, less fees.

Current stoploss setting code

if option == 1:
    response = client.LinearPositions.LinearPositions_tradingStop(symbol="BTCUSDT", side=type, stop_loss=sl).result()
    check_for_errors_sl_tp(response)

1 Answers1

0

In create order parameters Set time_in_force ='PostOnly'

Abolfazl Rastgou
  • 655
  • 10
  • 13