Adds method to make order values match the fractional actuality#512
Adds method to make order values match the fractional actuality#512MarkoPaasila wants to merge 2 commits intoCodaone:develfrom
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 |
thehapax
left a comment
There was a problem hiding this comment.
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.