Skip to main content

Module string_to_float

Module string_to_float 

Source
Expand description

Deserializes a string to an f64, handling empty strings and invalid formats.

Used for fields like prices (last_price, open_price) and quantities (size, open_interest) that are returned as strings to preserve precision but need to be converted to f64 for calculations. Bots should use this to ensure accurate numerical processing and handle edge cases like empty strings.

Functionsยง

deserialize
serialize