{"openapi":"3.1.0","info":{"title":"Technical Analysis API","description":"Open, no-auth technical analysis: daily and weekly indicator study of one ticker over two date ranges, computed from Yahoo Finance data and written up by an LLM.\n\n## Quick start\n\nOne `POST`, no API key. Copy this, then change the ticker and the dates:\n\n```\ncurl -X POST https://ta.tigzig.com/v1/technical-analysis -H 'Content-Type: application/json' -d '{\"ticker\": \"AAPL\", \"daily_start_date\": \"2023-07-01\", \"daily_end_date\": \"2023-12-31\", \"weekly_start_date\": \"2022-01-01\", \"weekly_end_date\": \"2023-12-31\"}'\n```\n\n## What you send\n\n`POST /v1/technical-analysis` with a JSON body carrying `ticker`, `daily_start_date`, `daily_end_date`, `weekly_start_date` and `weekly_end_date`. The ticker follows the Yahoo Finance convention, so non-US listings carry an exchange suffix: RELIANCE.NS (India NSE), .BO (BSE), .L (London), .HK (Hong Kong), .T (Tokyo). Indices look like ^NSEI and FX like EURUSD=X. Broker, scheme or company names do not resolve. Dates are YYYY-MM-DD.\n\n**Dates are strings, not numbers.** All four date fields must be written as `YYYY-MM-DD`. A bare number is rejected rather than guessed at: it could be a unix timestamp or a spreadsheet date serial, and guessing wrong would produce a confidently incorrect analysis while spending a paid model call on it.\n\n## What you get back\n\n`200` returns two URLs, `pdf_url` and `html_url`, pointing at the generated report. The analysis itself lives in those documents, not in the JSON.\n\n## Public endpoints\n\n`/v1/technical-analysis`. `GET /v1/` returns the discovery block, including your remaining daily budget, and is deliberately NOT rate-limited, so you can check your budget without spending any of it.\n\n## Request limits\n\n- This endpoint runs a **paid model on every call**, so the per-IP budget is a small **daily** allowance rather than a per-minute one.\n- A run takes roughly **30 seconds**. Treat it as a slow call and set your client timeout accordingly.\n- Check `X-RateLimit-Remaining` before starting a batch. On a 429, `Retry-After` gives the exact seconds until your window resets - use it rather than retrying blind.\n\n## Errors\n\nEvery 4xx and 5xx returns `{error: {code, message}, help: {docs, openapi, catalog}}`.\n\nWhere the endpoint is known and the request shape is what failed, the body also carries an `example` - **a runnable curl** built from the request example in this spec. Copy it, run it, then adapt it.\n\nMore Tigzig tools: https://api.tigzig.com/.well-known/api-catalog","version":"1.1.0"},"servers":[{"url":"https://ta.tigzig.com"}],"paths":{"/v1/technical-analysis":{"post":{"summary":"Create Technical Analysis","description":"Generates comprehensive technical analysis reports for a specified stock ticker.\n\nPart of Tigzig: free interactive tools, open-source repos, APIs and MCP servers for\nanalytics and live data across global and Indian markets, macro indicators and\nfilings. Catalog: https://api.tigzig.com/.well-known/api-catalog\nGuide: https://www.tigzig.com/llms.txt\n\nThis endpoint performs detailed technical analysis including:\n- Price trend analysis on daily and weekly timeframes\n- Multiple technical indicators (EMAs, MACD, RSI, Bollinger Bands)\n- Support and resistance levels\n- Volume analysis\n- Pattern recognition\n- AI-powered market interpretation\n\nThe analysis is returned in two formats:\n- PDF report with detailed analysis and charts\n- Interactive HTML report for dynamic viewing\n\nThe analysis covers:\n- Daily timeframe analysis (short-term trends)\n- Weekly timeframe analysis (long-term trends)\n- Technical indicator signals\n- Volume profile analysis\n- Market structure assessment\n- Potential support/resistance zones\n\nExample request:\n{\n    \"ticker\": \"AAPL\",\n    \"daily_start_date\": \"2023-07-01\",\n    \"daily_end_date\": \"2023-12-31\",\n    \"weekly_start_date\": \"2022-01-01\",\n    \"weekly_end_date\": \"2023-12-31\"\n}","operationId":"create_technical_analysis","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalAnalysisRequest","description":"Technical analysis request parameters"},"example":{"ticker":"AAPL","daily_start_date":"2023-07-01","daily_end_date":"2023-12-31","weekly_start_date":"2022-01-01","weekly_end_date":"2023-12-31"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicalAnalysisResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Read Root","description":"Serve the technical analysis frontend UI","operationId":"read_root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"TechnicalAnalysisRequest":{"properties":{"ticker":{"type":"string","title":"Ticker","description":"The stock symbol to analyze (e.g., 'AAPL' for Apple, 'MSFT' for Microsoft). Must be a valid Yahoo Finance ticker symbol.","example":"AAPL"},"daily_start_date":{"type":"string","format":"date","title":"Daily Start Date","description":"Start date for daily price data analysis. Should be at least 6 months before daily_end_date for meaningful analysis. Format: YYYY-MM-DD","example":"2023-07-01"},"daily_end_date":{"type":"string","format":"date","title":"Daily End Date","description":"End date for daily price data analysis. Must be after daily_start_date and not in the future. Format: YYYY-MM-DD","example":"2023-12-31"},"weekly_start_date":{"type":"string","format":"date","title":"Weekly Start Date","description":"Start date for weekly price data analysis. Should be at least 1 year before weekly_end_date for meaningful analysis. Format: YYYY-MM-DD","example":"2022-01-01"},"weekly_end_date":{"type":"string","format":"date","title":"Weekly End Date","description":"End date for weekly price data analysis. Must be after weekly_start_date and not in the future. Format: YYYY-MM-DD","example":"2023-12-31"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Optional LLM model to use for analysis.\n\nIMPORTANT FOR AI AGENTS:\n1. DEFAULT BEHAVIOR: If not provided, always use \"openai/gpt-5.6-luna\" (GPT 5.6 Luna).\n\n2. WHEN TO USE: Only include this parameter if the user EXPLICITLY requests a specific model. Otherwise, omit it entirely to use the default.\n\n3. WHAT TO SHOW USERS: When user asks for model options, show ONLY the display names in a simple list:\n   - Gemini 2.5 Flash Lite\n   - GPT 5.6 Luna (default)\n   - Gemini 3.1 Flash Lite\n   - Gemini 3 Flash Preview\n   - Claude Haiku 4.5\n   - GPT 5.6 Terra\n   - Claude Sonnet 5\n   DO NOT show the JSON mapping or API names to users.\n\n4. DISPLAY NAMES vs API NAMES MAPPING (for internal use only - DO NOT show to users):\n{\n  \"Gemini 2.5 Flash Lite\": \"google/gemini-2.5-flash-lite\",\n  \"GPT 5.6 Luna\": \"openai/gpt-5.6-luna\",\n  \"Gemini 3.1 Flash Lite\": \"google/gemini-3.1-flash-lite\",\n  \"Gemini 3 Flash Preview\": \"google/gemini-3-flash-preview\",\n  \"Claude Haiku 4.5\": \"anthropic/claude-haiku-4.5\",\n  \"GPT 5.6 Terra\": \"openai/gpt-5.6-terra\",\n  \"Claude Sonnet 5\": \"anthropic/claude-sonnet-5\"\n}\n\n5. WHEN USER SELECTS A MODEL: After user chooses a display name, look up the corresponding API name from the mapping above and pass that API name value to this parameter. Never pass display names to this API - always use the API name.\n\nAllowed API values: google/gemini-2.5-flash-lite, openai/gpt-5.6-luna, google/gemini-3.1-flash-lite, google/gemini-3-flash-preview, anthropic/claude-haiku-4.5, openai/gpt-5.6-terra, anthropic/claude-sonnet-5","example":"openai/gpt-5.6-luna"}},"type":"object","required":["ticker","daily_start_date","daily_end_date","weekly_start_date","weekly_end_date"],"title":"TechnicalAnalysisRequest","description":"Request model for technical analysis generation.","example":{"daily_end_date":"2023-12-31","daily_start_date":"2023-07-01","ticker":"AAPL","weekly_end_date":"2023-12-31","weekly_start_date":"2022-01-01"}},"TechnicalAnalysisResponse":{"properties":{"pdf_url":{"type":"string","title":"Pdf Url"},"html_url":{"type":"string","title":"Html Url"}},"type":"object","required":["pdf_url","html_url"],"title":"TechnicalAnalysisResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}