go-binance icon indicating copy to clipboard operation
go-binance copied to clipboard

Encounter "invalid newOrderRespType" while testing NewCreateOrderService on FutureNet

Open ChaShanLiu0830 opened this issue 1 year ago • 0 comments

While I'm testing the example code on testnet.binancefuture.com/ order, err := client.NewCreateOrderService().Symbol("BNBETH"). Side(binance.SideTypeBuy).Type(binance.OrderTypeLimit). TimeInForce(binance.TimeInForceTypeGTC).Quantity("5"). Price("0.0030000").Do(context. Background())

I received the error <APIError> code=-1136, msg=Invalid newOrderRespType

To resolve the issue, I added the line NewOrderResponseType(binance_futures.NewOrderRespTypeRESULT) to the code and it works. Therefore, I kindly request adding NewOrderResponseType to the example code provided in the documentation for the benefit of Binance Futures Testnet users.

Best regards.

ChaShanLiu0830 avatar May 24 '23 04:05 ChaShanLiu0830