---
title: "Agent Debate"
method: GET
path: "/api/agent-debate/{symbol}"
tags: ["Agent Debate"]
---

# Agent Debate

`GET /api/agent-debate/{symbol}`

## Request

- Base URL: `https://api.xfinlab.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.xfinlab.com/api/agent-debate/{symbol}`
- Auth: none declared

2026-07-20 fix: this endpoint used to take no token param at all and
never touched services/quota_middleware.py, so AI辯論 (4 sequential
LLM calls per run -- the most expensive single feature on the site)
rode completely outside the token-quota system anyone could hit it
for free, repeatedly, logged in or not. Wired into the same
check_token_budget()/record_ai_token_usage() pattern api/chat.py
already uses: paid tiers get billed the real (summed, not
fabricated) token cost of all 4 calls -- see
services/agent_debate_service.py's run_debate() docstring -- against
their existing monthly budget; free users still just earn a point
(same as every other AI feature), never hard-blocked.

## Path parameters

- `symbol` string, required

## Query parameters

- `token` string
- `lang` string

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/xfinlab/apis/xfinlab-api.md) · [All operations](https://skmtc.dev/xfinlab/apis/xfinlab-api/llms.txt) · [OpenAPI document](https://skmtc.dev/xfinlab/apis/xfinlab-api/revisions/205f85614bc6?raw)
