adshao / go-binance

A Go SDK for Binance API
MIT License
1.48k stars 664 forks source link

Encounter "invalid newOrderRespType" while testing NewCreateOrderService on FutureNet #491

Closed ChaShanLiu0830 closed 1 week ago

ChaShanLiu0830 commented 1 year ago

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.

xyq-c-cpp commented 1 week ago

No response for a long time, close this issue