Closed Frixoe closed 3 months ago
I don't think the sdk should change the values sent by the user. We could add a rounding example similar to the python sdk: https://github.com/hyperliquid-dex/hyperliquid-python-sdk/blob/master/examples/rounding.py
I don't think the sdk should change the values sent by the user. We could add a rounding example similar to the python sdk: https://github.com/hyperliquid-dex/hyperliquid-python-sdk/blob/master/examples/rounding.py
Any particular reason why we shouldn't? I just thought it would be a good addition because in my personal project I had to write a function to format the perp and the spot price before I placed the order because of the calculations I was doing on the prices
I think the end user should be aware of any rounding as it could make a meaningful difference to them. This also matches the behavior of the python sdk
https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/tick-and-lot-size
Add this to the ordering to make ordering much easier without the user having to think about these things.