not exactly "wrong" for numbers such as 0.001, it rounds as stated, but you might not have that extra 0.4 coins when creating orders. also it won't work with anything else than powers of 0.1:
>>> round_step_size(55.3, 0.2)
55.3
this one properly rounds to step size, even with floats such as 0.003:
original one returns wrong:
not exactly "wrong" for numbers such as 0.001, it rounds as stated, but you might not have that extra 0.4 coins when creating orders. also it won't work with anything else than powers of 0.1:
this one properly rounds to step size, even with floats such as 0.003:
decided to contribute this after a few hours of floating point nightmare