Hello I Try To Create An order by type STOP_MARKET in binance future It's My Code :
from binance.client import Client
api_key = '#'
api_secret = '#'
if __name__ == "__main__":
client = Client(api_key, api_secret)
price = round(float(client.get_avg_price(symbol='ETHUSDT')['price']), 2)
stop_percent = 5/20
target_percent = 15/20
stopPrice = round(price - (price * (stop_percent / 100)), 2)
result = client.futures_create_order(
symbol='ETHUSDT',
side='BUY',
type='STOP_MARKET',
quantity=0.04,
stopPrice=stopPrice,
)
print(f'result : {result}')
but I Get This Error :
APIError(code=-2021): Order would immediately trigger.
Simple Market Order By This Quantity And Client It's Working Please Help Me .