Expand description
Conversion functions that translate AX API schemas into Nautilus types.
Functionsยง
- ax_
timestamp_ ns_ to_ unix_ nanos - Converts an AX nanosecond timestamp to [
UnixNanos]. - ax_
timestamp_ s_ to_ unix_ nanos - Converts an AX epoch-seconds timestamp to [
UnixNanos]. - cid_
to_ client_ order_ id - Creates a [
ClientOrderId] from a cid value. - client_
order_ id_ to_ cid - Converts a [
ClientOrderId] to a 64-bit unsigned integer for AXcidfield. - deserialize_
decimal_ or_ zero - Deserializes a
Decimalfrom a string field that might be empty. - deserialize_
optional_ decimal_ from_ str - Deserializes an optional
Decimalfrom a string-only field. - deserialize_
optional_ decimal_ or_ zero - Deserializes a
Decimalfrom an optional string field, defaulting to zero. - deserialize_
optional_ decimal_ str - Deserializes an optional
Decimalfrom a string field. - map_
bar_ spec_ to_ candle_ width - Maps a Nautilus [
BarSpecification] to anAxCandleWidth. - parse_
decimal - Parses a string to
Decimal, returning an error if parsing fails. - parse_
optional_ decimal - Parses an optional string to
Decimal, returningNoneif the string isNoneor empty. - quantity_
to_ contracts - Converts a [
Quantity] to an i64 contract count for AX orders. - serialize_
decimal_ as_ str - Serializes a
Decimalas a string (lossless, no scientific notation). - serialize_
optional_ decimal_ as_ str - Serializes an optional
Decimalas a string.