Skip to content

fix: reject Hyperliquid prices that format to zero#4

Open
santhreal wants to merge 1 commit into
VibeTradingLabs:mainfrom
santhreal:fix/hyperliquid-price-rounds-to-zero
Open

fix: reject Hyperliquid prices that format to zero#4
santhreal wants to merge 1 commit into
VibeTradingLabs:mainfrom
santhreal:fix/hyperliquid-price-rounds-to-zero

Conversation

@santhreal

Copy link
Copy Markdown

format_hyperliquid_price() can round a tiny positive price to 0.0, which Hyperliquid cannot represent. Raise ValueError when the formatted result is not positive.

Very small positive prices (e.g. 1e-20) rounded to 0.0 after
significant-figure formatting, violating the positive-price contract.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant