简体   繁体   中英

python-binance i can create a reduceonly order

i have 1 binance account with humen activity (with hedge mood) and 1 more biance account listening to the humen account and try copy all order is make.

when a humen create a order, the bot account make it to.

but, when humen create a reduceOnly order and bot try to copy it, the bot get an error like this APIError(code=-1106) Parameter 'reduceOnly' sent when not required.

the code is like this:

result = self.client.futures_create_order(
symbol=symbol,
side  =side,
positionSide=positionSide,
type  =Ttype,
timeInForce=timeInForce,
reduceOnly=True,
quantity=float(quantity), # with max 3 number after the point
price=price

)

something is worng, how is possible the humen can create a "reduceOnly order" and the bot c'anot?

Make sure your side and positionSide are appropriate for the order.


I haven't used it in a while because I just didn't like the way it was implemented like the problems you face so I am doing this mostly from memory.

Check your hedge mode settings, I think as a user in GUI you have set hedge mode but I think there might be an API setting or push to make your trades via API in hedgemode

Some other possibilities: Order type. Market/Limit Market type? if you call it that. Spot/Futures? Check API permissions

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM