Skip to content

Support parameter "quoteOrderQty" for MARKET orders in create_order (WebSocket) #352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fpaincha opened this issue Sep 4, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@fpaincha
Copy link

fpaincha commented Sep 4, 2023

Is your feature request related to a problem? Please describe.

For MARKET orders, Binance supports a parameter called "quoteOrderQty" in order to specify the quantity of BTC to buy or sell by using an amount in the quote asset versus the base asset. Thus, for instance, one can order to market buy 1200 USDT worth of BTC on BTCUSDT. One does not need to convert 1200 USDT into BTC using the current BTC value, Binance does the conversion.

Ref: https://binance-docs.github.io/apidocs/websocket_api/en/#place-new-order-trade

The issue here is simply that the Unicorn library does not support that parameter.

Describe the solution you'd like.

The parameter should be added to create_order (in fact, it is even referenced in the method's documentation since it is a copy and paste of Binance's).

In the code, if quote_order_qty (new param) is 0.0, then quantity is used, else quote_order_qty is used.

Thanks!

Describe alternatives you've considered

No response

Additional context

No response

@fpaincha fpaincha added the enhancement New feature or request label Sep 4, 2023
@oliver-zehentleitner oliver-zehentleitner added this to the 2.1.0 milestone Oct 16, 2023
@oliver-zehentleitner
Copy link
Member

The update is also included here: 3a715ee

After extensive testing I will create new packages for the installation. I will let you know here as soon as they are available.

@oliver-zehentleitner
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants