Steps to reproduce:
1. See last order for BTC-POWER on the image below.
2. Notice how the LIMIT was 0.00002992 and the quantity is 99.903441.
- The actual order came in at 0.00002993.
- Multiplied together we get 0.002989111 BTC.
- However Bittrex reports a total of 0.0029901.
- The difference between 0.002989111 and 0.0029901 is 0.0000099 BTC.
So what is going on?
1. Bittrex is correctly returning the PricePerUnit (actual) as 0.00002992.
2. However you can't rely on this calculation: total price paid = PricePerUnit (actual) * total quantity.
- Why? Because the PricePerUnit (actual) is probably more like 0.0000299299 and the last 99 have been truncated to make 0.00002992.
- So 0.0000299299 * 99.903441 = 0.0029901 which is correct.
- However 0.00002992 * 99.903441 = 0.002989111 which is incorrect (because we lost decimal places 9 and 10).
What's the solution?
- 1) Take Bittrex's reported PricePerUnit (actual) which is correct to 8 d.p. but don't make any calculations with it.
- 2) Take Bittrex's Price field as correct and use that as your total price paid in BTC.
- 3) Take Bittrex's CommissionPaid field as correct.
In summary: Since Bittrex truncates to 8.dp. any calculations taken off Bittrex's unit figures will be incorrect. Better to rely on Bittrex's own reported Price and CommissionPaid fields and work back from there to get unit figures (if you want to see more than 8 d.p).
https://dzwonsemrish7.cloudfront.net/items/0t0b0H3n0m2C100W0S3c/CryptoFlip.jpg