report

class whispertrades.report.BasicReportDetail(*, total_trades: int | None, winning_trades: int | None, losing_trades: int | None, win_percent: float | None)[source]

Bases: BaseModel

losing_trades : int | None
total_trades : int | None
win_percent : float | None
winning_trades : int | None
class whispertrades.report.BotReportDetail(*, total_trades: int | None, winning_trades: int | None, losing_trades: int | None, win_percent: float | None, name: str, number: str, average_entry_price: float, average_exit_price: float, average_profit_price: float, average_gain: float, average_win: float, average_loss: float, premium_collected: float, premium_retained: float, premium_retained_percent: float, total_profit: float)[source]

Bases: BasicBot, BasicReportDetail

average_entry_price : float
average_exit_price : float
average_gain : float
average_loss : float
average_profit_price : float
average_win : float
premium_collected : float
premium_retained : float
premium_retained_percent : float
total_profit : float
class whispertrades.report.Report(data: ReportResponse, client: WTClient, auto_refresh: bool)[source]

Bases: object

auto_refresh : bool

auto_refresh toggle inherited from WTClient

bot_position_tags : List[str | None]

Bot position tags

bot_statuses : List[Literal['Enabled', 'Disabled']]

Bot statuses

bot_tags : List[str | None]

Bot tags

bots : List[BasicBot | None]

Bots

brokers : List[BaseBrokerConnection] | None

Brokers

client : WTClient

the WTClient object that created this instance

completed_at : datetime | None

Completed at

daily_results : List[ResultByDay]

Daily results for this report Auth Required: Read Reports

end_date : date

End date

is_public : bool

Is public

property monthly_results : dict[date, ResultByTimeframe] | None

Monthly results for this report Auth Required: Read Reports

Returns:

Monthly results for this report in a dictionary with date as key and ResultByTimeframe as value

name : str

Report name

nlv_amount : float | None

NLV amount

nlv_source : Literal['Actual NLV', 'Percent of NLV', 'Fixed Balance', 'Specific Starting Balance']

NLV source

number : str

Report number

results : Results

Results

run()[source]

Run/refresh this report using its current configuration Auth Required: Write Reports

run_until_latest_date : bool

Run until latest date

start_date : date

Start date

status : Literal['Complete', 'Running', 'Draft']

Report status

symbol : str

Symbol

update(name: str = None, start_date: date = None, end_date: date = None, run_until_latest_date: bool = None) str[source]

Change a bot report name or date range Auth Required: Write Reports

Parameters:
name: str = None

new name of the report

start_date: date = None

new start date for the report

end_date: date = None

new end date for the report

run_until_latest_date: bool = None

whether to run the report until the latest date

Returns:

Update message from Whispertrades API

property yearly_results : dict[date, ResultByTimeframe] | None

Yearly results for this report Auth Required: Read Reports

Returns:

Yearly results for this report in a dictionary with date as key and ResultByTimeframe as value

class whispertrades.report.ReportResponse(*, number: str, name: str, status: 'Complete' | 'Running' | 'Draft', completed_at: datetime | None, start_date: date, end_date: date, run_until_latest_date: bool, is_public: bool, symbol: str, nlv_source: 'Actual NLV' | 'Percent of NLV' | 'Fixed Balance' | 'Specific Starting Balance', nlv_amount: float | None, bot_statuses: list['Enabled' | 'Disabled'], brokers: list[BaseBrokerConnection] | None, bots: list[BasicBot | None], bot_tags: list[str | None], bot_position_tags: list[str | None], results: Results)[source]

Bases: BaseModel

bot_position_tags : list[str | None]
bot_statuses : list[Literal['Enabled', 'Disabled']]
bot_tags : list[str | None]
bots : list[BasicBot | None]
brokers : list[BaseBrokerConnection] | None
completed_at : datetime | None
end_date : date
is_public : bool
name : str
nlv_amount : float | None
nlv_source : Literal['Actual NLV', 'Percent of NLV', 'Fixed Balance', 'Specific Starting Balance']
number : str
results : Results
run_until_latest_date : bool
start_date : date
status : Literal['Complete', 'Running', 'Draft']
symbol : str
class whispertrades.report.ResultByDay(*, date: date, current_drawdown_dollars: float, current_drawdown_percent: float, day_return_percent: float, profit: float, total_return_percent: float, underlying_current_drawdown_days: int, underlying_current_drawdown_percent: float, underlying_day_return_percent: float, underlying_total_return_percent: float)[source]

Bases: BaseModel

current_drawdown_dollars : float
current_drawdown_percent : float
date : date
day_return_percent : float
profit : float
total_return_percent : float
underlying_current_drawdown_days : int
underlying_current_drawdown_percent : float
underlying_day_return_percent : float
underlying_total_return_percent : float
class whispertrades.report.ResultByTimeframe(*, total_trades: int | None, winning_trades: int | None, losing_trades: int | None, win_percent: float | None, date: date, starting_net_liquidation_value: float, ending_net_liquidation_value: float, broker_fees: float, total_return_dollars: float, total_return_percent: float, max_drawdown_dollars: float, max_drawdown_percent: float, underlying_max_drawdown_percent: float, underlying_total_return_percent: float)[source]

Bases: BasicReportDetail

broker_fees : float
date : date
ending_net_liquidation_value : float
max_drawdown_dollars : float
max_drawdown_percent : float
starting_net_liquidation_value : float
total_return_dollars : float
total_return_percent : float
underlying_max_drawdown_percent : float
underlying_total_return_percent : float
class whispertrades.report.ResultByYear(*, total_trades: int | None, winning_trades: int | None, losing_trades: int | None, win_percent: float | None, date: date, starting_net_liquidation_value: float, ending_net_liquidation_value: float, broker_fees: float, total_return_dollars: float, total_return_percent: float, max_drawdown_dollars: float, max_drawdown_percent: float, underlying_max_drawdown_percent: float, underlying_total_return_percent: float, months: dict['January' | 'February' | 'March' | 'April' | 'May' | 'June' | 'July' | 'August' | 'September' | 'October' | 'November' | 'December', ResultByTimeframe])[source]

Bases: ResultByTimeframe

months : dict[Literal['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], ResultByTimeframe]
class whispertrades.report.Results(*, total_trades: int | None, winning_trades: int | None, losing_trades: int | None, win_percent: float | None, starting_net_liquidation_value: float, ending_net_liquidation_value: float, average_gain: float | None, average_win: float | None, average_loss: float | None, broker_fees: float | None, premium_collected: float | None, premium_retained: float | None, premium_retained_percent: float | None, total_return_dollars: float, total_return_percent: float, max_drawdown_dollars: float, max_drawdown_percent: float, max_drawdown_days: int, cagr: float, sharpe: float, sortino: float, mar: float, annualized_volatility: float, correlation: float, beta: float, underlying_total_return_percent: float, underlying_max_drawdown_percent: float, underlying_max_drawdown_days: int, underlying_cagr: float, underlying_sharpe: float, underlying_sortino: float, underlying_mar: float, underlying_annualized_volatility: float, bots: list[BotReportDetail] = None, years: dict[int, ResultByYear] = None, days: list[ResultByDay] = None)[source]

Bases: BasicReportDetail

annualized_volatility : float
average_gain : float | None
average_loss : float | None
average_win : float | None
beta : float
bots : list[BotReportDetail]
broker_fees : float | None
cagr : float
correlation : float
days : list[ResultByDay]
ending_net_liquidation_value : float
mar : float
max_drawdown_days : int
max_drawdown_dollars : float
max_drawdown_percent : float
premium_collected : float | None
premium_retained : float | None
premium_retained_percent : float | None
sharpe : float
sortino : float
starting_net_liquidation_value : float
total_return_dollars : float
total_return_percent : float
underlying_annualized_volatility : float
underlying_cagr : float
underlying_mar : float
underlying_max_drawdown_days : int
underlying_max_drawdown_percent : float
underlying_sharpe : float
underlying_sortino : float
underlying_total_return_percent : float
years : dict[int, ResultByYear]