StrategySummary#
tradeexecutor.strategy.summary.StrategySummary Python class in Trading Strategy framework.
- class StrategySummary[source]#
Bases:
object
Strategy summary.
Helper class to render strategy tiles data
Contains mixture of static metadata, trade executor crash status, latest strategy performance stats and visualisation
Is not stored as the part of the strategy state. In the case of a restart, summary statistics are calculated again.
See /summary API endpoint where it is constructed before returning to the client
- __init__(name, short_description, long_description, icon_url, on_chain_data, started_at, executor_running, frozen_positions, summary_statistics=<factory>, error_message=None, backtest_available=False)#
- Parameters:
name (str) –
on_chain_data (OnChainData) –
started_at (float) –
executor_running (bool) –
frozen_positions (int) –
summary_statistics (StrategySummaryStatistics) –
backtest_available (bool) –
- Return type:
None
Methods
__init__
(name, short_description, ...[, ...])from_dict
(kvs, *[, infer_missing])from_json
(s, *[, parse_float, parse_int, ...])schema
(*[, infer_missing, only, exclude, ...])to_dict
([encode_json])to_json
(*[, skipkeys, ensure_ascii, ...])Attributes
Can the server server backtest files
Exception message from the run-time loop
Strategy name
1 sentence
Multiple paragraphs.
For <img src>
List of smart contracts and related web3 interaction information for this strategy.
When the instance was started last time
Is the executor main loop running or crashed.
Number of frozen positions this strategy has and need to manual intervention
Strategy statistics for summary tiles
- on_chain_data: OnChainData#
List of smart contracts and related web3 interaction information for this strategy.
- executor_running: bool#
Is the executor main loop running or crashed.
Use /status endpoint to get the full exception info.
Not really a part of metadata, but added here to make frontend queries faster. See also
tradeexecutor.state.executor_state.ExecutorState
.
- summary_statistics: StrategySummaryStatistics#
Strategy statistics for summary tiles
Helps rendering the web tiles.
- __init__(name, short_description, long_description, icon_url, on_chain_data, started_at, executor_running, frozen_positions, summary_statistics=<factory>, error_message=None, backtest_available=False)#
- Parameters:
name (str) –
on_chain_data (OnChainData) –
started_at (float) –
executor_running (bool) –
frozen_positions (int) –
summary_statistics (StrategySummaryStatistics) –
backtest_available (bool) –
- Return type:
None