1
Technical Support / Re: Computing real world exchange rates from asset publish feed operations
« on: August 27, 2020, 04:49:40 pm »
Ok, maybe I got a little close to the solution. The asset precision seems to play some role here, like describes in this example: https://dev.bitshares.works/en/master/bts_guide/tutorials/publish-feed.html
So the price for the asset publish feed operation is computed via
which would match the factor 10 as the precision field for BTS is 5 and for EUR it's 4. But I cannot find information about how the asset precision is handled in general. Neither in the bitshares-core source code nor in the documentation. Is there a hint to learn more about that particular topic ? What role does the asset precision play here ?
Best regards.
So the price for the asset publish feed operation is computed via
Code: [Select]
...
price = price * 10 ** asset["precision"] / 10 ** base["precision"]
...
which would match the factor 10 as the precision field for BTS is 5 and for EUR it's 4. But I cannot find information about how the asset precision is handled in general. Neither in the bitshares-core source code nor in the documentation. Is there a hint to learn more about that particular topic ? What role does the asset precision play here ?
Best regards.