I'm trying to place a conditional order using pybit
The purpose is to sell my current spot.
The code is taken from the example from official website:
from pybit import HTTP
session = HTTP("https://api.bybit.com",
api_key= apikey, api_secret= apisecret)
print(session.place_conditional_order(
symbol="BTCUSDT",
order_type="Limit",
side="Sell",
qty=1,
price=54100,
base_price=54192,
stop_px=54150,
time_in_force="GoodTillCancel"
))
But I got this error:
InvalidRequestError: Param validation for 'reduce_only' failed on the 'exists' tag (ErrCode: 10001) (ErrTime: 20:11:57).
Request → POST https://api.bybit.com/private/linear/stop-order/create: {'api_key': 'RByxmjeixs1q19mw8E', 'base_price': 54192, 'order_type': 'Limit', 'price': 54100, 'qty': 1, 'recv_window': 5000, 'side': 'Sell', 'stop_px': 54150, 'symbol': 'BTCUSDT', 'time_in_force': 'GoodTillCancel', 'timestamp': 1651695117335, 'sign': '52782a7eaf5c69ca161b070c5a67e45d3ea9e3c0839bdff624fc6249a3cddee6'}.
How do I solve this?