hyperliquid-dex / hyperliquid-rust-sdk

MIT License
68 stars 49 forks source link

Add helper functions to open and close market/limit orders #44

Closed Frixoe closed 2 months ago

Frixoe commented 4 months ago

This should help abstract away the need to know how to create the correct the order and also handle all the errors

spacecadet-jap commented 2 months ago

I can submit a PR for this as I've already implemented it by setting a limit order that aggresses the book. Just let me know if you would like me to submit it.

Frixoe commented 2 months ago

I can submit a PR for this as I've already implemented it by setting a limit order that aggresses the book. Just let me know if you would like me to submit it.

Yeah sure, go for it. I'll go through and let you know what I think.

spacecadet-jap commented 2 months ago

I'll submit a PR over the weekend

spacecadet-jap commented 2 months ago

I submitted PR #54 to create a market order. It would be nice to not include the current mid price but I don't want to create a latency-heavy call to get it if clients are already tracking it. I added it as a seperate function so you can easily incorporate it into the API as I don't want to break anything upstream.

mathdroid commented 2 months ago

Submitted PR #55 @Frixoe

mathdroid commented 2 months ago

when will the changes gets merged to the crate? @Frixoe @lmlmt

Screenshot 2024-09-09 at 14 35 27