Using orderQuoteQty in market orders
dorak88783 opened this issue · comments
If you look at the API docs (https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md#new-order--trade) for the MARKET
order, one can specify either quantity
or quoteOrderQty
. The latter seems not to be implemented.
How can I do this in a nice way? My only way was to duplicate pub fn market_buy
into a pub fn market_buy_using_quote_quantity
which uses a OrderQuoteQuantityRequest
iso a OrderRequest
and a duplicated self.build_quote_quantity_order(buy)
iso build_order(buy)
. This works but duplicates a lot of code... I guess there must be a nicer way in Rust to make this.
Closed in #73.