Uptime#

tradeexecutor.state.uptime.Uptime Python class in Trading Strategy framework.

class Uptime[source]#

Bases: object

Update statistics of past trade execution.

__init__(uptime_checks=<factory>, cycles_completed_at=<factory>)#
Parameters:
Return type:

None

Methods

__init__([uptime_checks, cycles_completed_at])

from_dict(kvs, *[, infer_missing])

from_json(s, *[, parse_float, parse_int, ...])

record_cycle_complete(cycle_number[, now_])

Mark the execution cycle successfully completed

schema(*[, infer_missing, only, exclude, ...])

to_dict([encode_json])

to_json(*[, skipkeys, ensure_ascii, ...])

Attributes

uptime_checks

cycles_completed_at

When a strategy cycle was complete

cycles_completed_at: Dict[int, datetime]#

When a strategy cycle was complete

Contains strategy cycle number -> UTC wall clock time when a cycle was completed

record_cycle_complete(cycle_number, now_=None)[source]#

Mark the execution cycle successfully completed

Parameters:
__init__(uptime_checks=<factory>, cycles_completed_at=<factory>)#
Parameters:
Return type:

None