Expand description
Common parsing utilities for the Coinbase adapter.
Functionsยง
- bar_
type_ to_ granularity - Converts a Nautilus [
BarType] to aCoinbaseGranularity. - deserialize_
decimal_ from_ str - Deserializes a
Decimalfrom a JSON string. - deserialize_
decimal_ or_ zero - Deserializes a
Decimalfrom 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_typefield on historical orders. - deserialize_
optional_ decimal_ from_ str - Deserializes an optional
Decimalfrom 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
u64from a string field. - format_
rfc3339_ from_ nanos - Converts a [
UnixNanos] timestamp to an RFC 3339 string in UTC. - serialize_
decimal_ as_ str - Serializes a
Decimalas a string (lossless, no scientific notation). - serialize_
optional_ decimal_ as_ str - Serializes an optional
Decimalas a string.