-
Notifications
You must be signed in to change notification settings - Fork 30
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 Orders - insufficient funds? #78
Comments
Actually, could this be a timing thing? I wait for the prior order to be FullyMatched before proceeding, and so assume that the balance is available for immediate re-spend. But is it possible that the order status says matched, but the balance isn't yet visible for a new order to make use of? |
Yes, we encounted the same problem in our app, where a withdrawal would occur immediately after purchase and we'd get that error. Basically it's a result of BTCMarkets not being ready to give you those funds. We found that reversing the order of things gave BTCMarkets enough time. |
Thanks for sharing your experience. |
OK, so it's not that. I've had a few LTC credited for weeks now, and the account API shows 22110844 LTC available. I now post an order (that will never get filled due to outrageous price, but should still rest on the book):
So it's not time related. Doing the same thing via the web seems to work differently: If I click to sell "all" my 0.22110844 LTC, it pre-fills the field as selling 0.22062306 LTC.
Presumably would this match, I would still be left with So, this appears to be a dup of #81. |
yeah - if I have some amount of LTC, I can only sell 99.78% of that, since the fee is taken on top of what is specified in the order and I need to be able to cover it. I had expected to be able to sell all my LTC, and simply receive 0.22% less BTC, which seems would have made sense since that what happens when you sell LTC for AUD ... |
So I used the API to buy some BCH:
{"currency":"AUD","instrument":"BCH","price":1,"volume":2026972,"orderSide":"Bid","ordertype":"Market","clientRequestId":"test"}
And eventually I saw that get Placed and then Fully Placed. So far so good.
Later I wanted to sell that BCH for BTC:
{"currency":"BTC","instrument":"BCH","price":1,"volume":2026972,"orderSide":"Ask","ordertype":"Market","clientRequestId":"test2"}
Yet this fails:
{"success":false,"errorCode":3,"errorMessage":"Insufficient funds.", "id":0, "clientRequestId":"test2"}
But I do have funds, and it's not some rounding error on my side: Both the webpage says so, as does the account api:
{"balance":2026972,"pendingFunds":0,"currency":"BCH"}
so I should be able to sell 2026972 (/ 100000000.0) BCH, no?Is the error message not correct and it's something unrelated to balance?
What am I missing
The text was updated successfully, but these errors were encountered: