-
Notifications
You must be signed in to change notification settings - Fork 129
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
Adds method to make order values match the fractional actuality #512
base: devel
Are you sure you want to change the base?
Conversation
… match what is actually possible.
Just to clarify how the method works. Eventually we can expand the method so you can ask for price, quote, or base to be rounded down or up. For now, it just gets the closest possible fractional value and returns it as float |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few things.
- The name of the method is a bit confusing. perhaps " onchain price", as the word "fix" is non specific
- Can you provide an actual use case here with a unit test.
- returning 3 items or more, typically should be avoided, in general it would be better to return a datastructure like an arrayy, but clarification is needed in how would be used in a strategy. and if you actually need to return all 3 items.
|
Actually unit tests are the main priority at the moment. It might be of benefit to see how it actually works. I'll send you references via chat. |
Hi @MarkoPaasila, as the base.py methods for price handling have been moved to BitsharesOrderEngine and this pull has conflicts, would you kindly resubmit a pull with fresh updates? |
I suggest this is merged only once a strategy or two makes use of it.
Partial solution to #511.