Hi, I do work with the data from the api, it works pretty nice and is useful to me. But one thing I noticed is that the prices do not have a logical behavior. Look for example at those two pairs against BTC.
One pair is (compared to the wavesdex) divided by 8 zeros and the other pair is even divided by 12 zeros to get the same price on the DEX. But how I can get this information from this pages. Because now its hard to program something which I can use uniformly.
In the process of issuing a token, the issuer chooses the number of decimal places. When you receive a response for an API request, you need to divide the received value by 100,000,000, if the decimal places were 8; 10,000,000, if the decimal places were 7 and so on.
This is wrong for trades…
The amount of digits belong on a mathemetical combination from the 2 pairs there digits substracted with eachother and multiplied, I have to look up the formule for this, will come back later today/this week with the formule
Thank you, actually this code is working. Before I used it incorrectly I think. One thing though. If instead using the Decimals for WAVES using it for another currency I think is showing wrong decimal numbers.
This is a bit of thread necro but can anyone confirm if these price calculations are working with the latest pywaves? The internal code for calculating the price submitted to the matcher changed in August.