adshao / go-binance

A Go SDK for Binance API
MIT License
1.54k stars 677 forks source link

add the return of failed requests in batch orders #443

Closed nogo6260 closed 1 year ago

adshao commented 1 year ago

hi @nogo6260 , could you please add unit test for the fix?

adshao commented 1 year ago

chatgpt

adshao commented 1 year ago

Code Review: The change is good because it adds a new type BatchOrderResponse, which contains either an Order or an Error. This makes it easier to distinguish between a successful order creation and an order creation with an error. The error message is also parsed and returned as part of the response. The change adds a test TestCreateBatchOrders, which tests the new functionality.