fluidex/dingir-exchange

bug: order amount/price inconsistent

Closed this issue · 1 comments

lispc commented

This is a response of 'restapi/ordertrades/ETH_USDT/309929'

{"trades":[{"time":1614235676,"amount":3.0605,"quote_amount":4870.3574,"price":1591.36,"fee":0.0}]}

quote amount should be equal to amount * price? But 3.060500 * 1591.360000 = 4870.35728 != 4870.3574

Maybe incorrect float precision

Anyway, for a financial app, we should use decimal(string), at least f64, never f32.

I will recheck this after #82

lispc commented

fixed by #82