Skip to content
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

Not all parameters are supported for create_order/7 and cancel_order_by_order_id/3 #49

Open
edennis opened this issue Apr 26, 2021 · 1 comment

Comments

@edennis
Copy link
Contributor

edennis commented Apr 26, 2021

Hey @rupurt! The application I'm currently building makes use of the newClientOrderId parameter which allows the client to set a custom ID string for orders. These custom IDs can then later be used to query and cancel orders. Currently, there's no way to provide any other parameters to the New Order and Cancel Order endpoints. You also can't override the recvWindow or set stopPrice, quoteOrderQty, etc. This is not really an issue since it's now possible to just use the HTTPClient module and build the requests yourself. However, it would be nice to take advantage of the response parsing that you have implemented in CancelOrder and CreateOrder. Might you be open for changing the public interface for create_order/7 and cancel_order_by_order_id/3 to allow setting some of these other parameters? If so, I might be able to find time for a PR.

@rupurt
Copy link
Collaborator

rupurt commented Apr 26, 2021

Hey @edennis,

Thanks for plugging away on the lib!

You're right, the API kinda sucks atm. I've merged a PR that changes the create_order API so that it takes a request struct with the available fields or a map as an escape hatch https://github.com/fremantle-capital/ex_binance/pull/50/files#diff-87c252e0bbb241fca18fa32eed1cfbf0dfa3ea580f53106e6571ccce193ba850R27. If you want to make any other changes do you mind using that new pattern?

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

No branches or pull requests

2 participants