Open paulc1983 opened 2 years ago
You could probably incorporate fixes for both STOP_LOSS
and STOP_LOSS_LIMIT
. First, do a refactor rename to the enum OrderType
.Stop
to StopMarket
. Then, add another enum member OrderType
.StopLimit
. And then you can make the fixes you proposed above, as well as likely editing the line where timeInForce
is set.
Go ahead send a PR and we'll get it merged.
hi
i get this error submitting a stop order or binance.: Parameter 'timeInForce' sent when not required.
that is submitting it as stop with isBuy = false.
I have looked at the code and set ispostonly = true , or modified the code to prevent the time in force param being added and get: Binance stop order : ExchangeSharp.APIException: {"code":-1106,"msg":"Parameter 'price' sent when not required."}
whats the correct way to set a stop loss in binance?
I modified the code to change the type of order to 'STOP_LOSS_LIMIT' and added : if (order.OrderType == OrderType.Stop) payload["stopPrice"] = order.StopPrice;
this works. should i create a branch with these changes and raise a pr or is there a better way to do this using the existing 'STOP_LOSS' type?