binance-java-api is a lightweight Java library for the Binance API, supporting synchronous and asynchronous requests, as well as event streaming using WebSockets.
Placing a new margin order BinanceApiMarginRestClient.newOrder
Any background context you want to provide?
The reason I went with separate classes for MarginNewOrder and MarginNewOrderResponse is because adding the new properties to NewOrder and NewOrderResponse would have made they usage confusing. Besides sideEffectType, the MarginNewOrder should also have the isIsolated property, which is currently not implemented. The same holds for MarginNewOrderResponse. I did not inherit MarginNewOrder from NewOrder and MarginNewOrderResponse from NewOrderResponse since it's not clear that this is the relationship between those. I could have extracted the common properties to a base class, but did not really see the benefit.
What does this PR do?
Where should the reviewer start?
How should this be manually tested?
Any background context you want to provide?
The reason I went with separate classes for MarginNewOrder and MarginNewOrderResponse is because adding the new properties to NewOrder and NewOrderResponse would have made they usage confusing. Besides sideEffectType, the MarginNewOrder should also have the isIsolated property, which is currently not implemented. The same holds for MarginNewOrderResponse. I did not inherit MarginNewOrder from NewOrder and MarginNewOrderResponse from NewOrderResponse since it's not clear that this is the relationship between those. I could have extracted the common properties to a base class, but did not really see the benefit.
See the documentation change log for when the change was done: