timestamp#

tradeexecutor.utils.timestamp Python module in Trading Strategy framework.

Module description#

Timestamp and timedelta helpers

Functions#

convert_and_validate_timestamp(timestamp)

Ensure the timestamp is converted to our internal state format.

convert_and_validate_timestamp_as_float(...)

Serialise timestamp as UNIX epoch seconds UTC.

convert_and_validate_timestamp_as_int(timestamp)

Serialise timestamp as UNIX epoch seconds UTC.

json_decode_timedelta(val)

Decode timestamp objects as number of seconds passed

json_encode_timedelta(val)

Encode timestamp objects as number of seconds passed