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

Market Buy Workarounds: Limit buy with high price, only option? #114

Open
pigslayer12 opened this issue Dec 24, 2017 · 3 comments
Open

Market Buy Workarounds: Limit buy with high price, only option? #114

pigslayer12 opened this issue Dec 24, 2017 · 3 comments

Comments

@pigslayer12
Copy link

My apologies for posting another issue, but was hoping someone might have a better solution.

Right now I can only use V1.1 and emulate a market buy, by placing a limit order with the price higher than the ask.

Obviously this is a horrible way of doing it, any other work arounds would be greatly appreciated.

Thanks

@skyl
Copy link
Collaborator

skyl commented Dec 25, 2017

Why is this horrible? The matching engine should give you the best price it can. I'm not sure if there are other options.

@pigslayer12
Copy link
Author

pigslayer12 commented Dec 25, 2017

Because if I want to use my entire BTC balance for the order, well I can't, at least without placing multiple orders, and having to do other calculations and im forced to request my free BTC balance after the first order, which adds a few seconds, and that type of delay can cause me big problems.

Either that or make the price only slightly bigger than the best ask (to maximize the order quantity without it getting rejected for insufficient balance), but then I risk not having my entire order filled.

Hope that makes sense, my thoughts are a bit scrambled right now.

@slazarov
Copy link
Collaborator

The only workaround is to place an order that matches the top ASK or hike it slightly. Since the quotes are up to 8 decimals you can increase the price by some infinitesimal amount. The reason you might be requesting your balance multiple times is that you are not factoring the fees in your target quantity. Look at this issue, the calculation function will be useful for you #107.

I can write a workaround method and push it to some experimental branch but I reckon it defeats the idea of native bindings.

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

3 participants