-
Notifications
You must be signed in to change notification settings - Fork 27
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
openorders does not reflect partial fills #18
Comments
Update: I changed one line of code in markets.py as shown below (see the "for_sale" shown in bold). As expected, without any partial fill on an open order, this gives me the same output as before the change. When a partial fill has occurred, this change corrects the base asset, but not the quote asset. To fix the quote asset, it's simply a matter of dividing the "for_sale" amount (formerly the base asset) by the price on the order. Simple as that. This is probably dead simple for a python programmer to implement. Not so simple for me ;-) , but I'm going to give it a shot. I'll post an update when I'm done (unless someone beats me to it!) === @main.command() |
This is close: I changed this: To this: On a partial fill, the numbers are correct now, but the currency symbols on the quote side are backwards on the output (strange). So not quite there yet ... It would be nice if they had also implemented "to_buy" when they implemented "for_sale": Anyway, I'm almost there. The math works in my above change, but there is some symbol formatting thing that I'm not understanding. Can you finish this off? |
Can you send a pull request please? |
"uptick openorders some_account" reflects the original order amounts, rather than the current order amounts. In other words, when there is a partial fill the amounts do not update to reflect the amount remaining on the order.
I have looked at the code, but I am not quite knowledgeable enough to suggest the fix. Page 13 of this document may reference a related item (search for "for_sale" in that doc):
https://buildmedia.readthedocs.org/media/pdf/python-bitshares/develop/python-bitshares.pdf
The text was updated successfully, but these errors were encountered: