你好,我尝试在币安未来创建一个类型为 STOP_MARKET 的订单这是我的代码:
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}')
但我收到此错误:
APIError(code=-2021): Order would immediately trigger.
这个数量和客户的简单市场订单它正在工作,请帮助我。