Initiate Analysis
initiate_analysisStart a full StockLens analysis of one company, only when the person asks for one. A new run may use one Analysis credit, or one Plus Analysis credit when depth is plus; Plus adds a written narrative and the result says if the person's plan does not include it. It returns an analysis_id at once and finishes asynchronously; fetch the result with fetch_analysis_result when the person asks for it. new_run_started and reused_existing say whether a recent matching analysis was reused. One ticker per call. It does not rank or compare companies, and does not trade or move money.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | Analysis depth: standard or plus. Standard consumes an Analysis credit (LENS_AI). Plus consumes a Plus Analysis credit (LENS_AI_PLUS) and may add AI narratives. Default standard. | |
| ticker | Yes | Stock ticker symbol (e.g. AAPL). Exactly one ticker per call. | |
| exchange | No | Exchange code (e.g. NASDAQ). Optional. Resolved automatically if omitted. | |
| time_range | No | Time horizon. It shapes which signals the analysis weighs most (shorter horizons favor price action, momentum and news; longer favor fundamentals and quality). Not a price forecast. One window per calibrated band: short_2_wk (Short-term), medium_1_mo (Medium-term), long_1_yr (Long-term). Default medium_1_mo. The legacy medium_2_mo and long_2_yr aliases are still accepted and resolve to medium_1_mo and long_1_yr respectively. | |
| risk_tolerance | No | Analysis focus. It reweights how much the analysis weighs downside/quality risk vs. growth/fundamentals. NOT a personal risk or suitability assessment, and it never changes the company's underlying facts. low=Defensive, medium=Balanced, high=Growth. Default medium. | |
| analysis_emphasis | No | Optional. RISK_EMPHASIS | BALANCED | FUNDAMENTAL_GROWTH_EMPHASIS. Must agree with the emphasis implied by risk_tolerance (low->RISK_EMPHASIS, medium->BALANCED, high->FUNDAMENTAL_GROWTH_EMPHASIS); a mismatch is rejected as a validation error before any credit is consumed. | |
| evidence_history_family | No | Optional. SHORT_HISTORY | MEDIUM_HISTORY | LONG_HISTORY. Must agree with the family implied by time_range (short_2_wk->SHORT_HISTORY, medium_1_mo/medium_2_mo->MEDIUM_HISTORY, long_1_yr/long_2_yr->LONG_HISTORY); a mismatch is rejected as a validation error before any credit is consumed. Does not select a representative range on its own. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| depth | Yes | ||
| scope | Yes | ||
| status | Yes | ||
| analysis_id | Yes | ||
| credit_type | Yes | ||
| new_run_started | Yes | ||
| reused_existing | Yes | ||
| estimated_seconds | Yes |