Skip to main content

Module parse

Module parse 

Source
Expand description

Common parsing utilities for the Coinbase adapter.

Functionsยง

bar_type_to_granularity
Converts a Nautilus [BarType] to a CoinbaseGranularity.
deserialize_decimal_from_str
Deserializes a Decimal from a JSON string.
deserialize_decimal_or_zero
Deserializes a Decimal from a string field that might be empty.
deserialize_empty_string_to_none
Deserializes an optional value where Coinbase uses an empty string for None.
deserialize_margin_type_or_none
Deserializes the optional margin_type field on historical orders.
deserialize_optional_decimal_from_str
Deserializes an optional Decimal from a string-only field.
deserialize_product_type_or_unknown
Deserializes a Coinbase product type and falls back to Unknown.
deserialize_string_to_u64
Deserializes a u64 from a string field.
format_rfc3339_from_nanos
Converts a [UnixNanos] timestamp to an RFC 3339 string in UTC.
serialize_decimal_as_str
Serializes a Decimal as a string (lossless, no scientific notation).
serialize_optional_decimal_as_str
Serializes an optional Decimal as a string.