Charts
API endpoints for chart image generation.
Provides endpoints for generating PNG chart images for round-trip trades, trade journeys, PnL summaries, and bar segments.
router = APIRouter(prefix='/api', tags=['charts'])
module-attribute
api_run_chart_image(run_id, symbol, start_ns, end_ns, direction, pnl, chart_type='c_bars', context=100)
async
Return a PNG chart image for a round-trip trade.
Source code in src/onesecondtrader/dashboard/routers/charts.py
api_trade_journey_chart(run_id, symbol=None)
async
Return a Trade Journey chart image for round-trip trades in a run, optionally filtered by symbol.
Source code in src/onesecondtrader/dashboard/routers/charts.py
api_pnl_summary_chart(run_id, symbol=None)
async
Return a PnL Summary chart image for round-trip trades in a run, optionally filtered by symbol.
Source code in src/onesecondtrader/dashboard/routers/charts.py
api_segment_chart_image(run_id, symbol, start_ns, end_ns, period_start_ns=None, period_end_ns=None, chart_type='c_bars', highlight_start_ns=None, highlight_end_ns=None)
async
Return a PNG chart image for a bar segment.