> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fcontext.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 外部客户端

> 从工具、CLI 和 agent 中使用 Financial Context 市场数据

Financial Context 的外部市场数据 API 面向需要按账户计量访问行情和公司数据的工具。

## API Key 客户端

服务端到服务端集成请使用 API key：

```bash theme={null}
curl "https://openapi.fcontext.com/api/market-data/quote?symbols=AAPL.US" \
  -H "x-api-key: YOUR_FCONTEXT_API_KEY"
```

## OAuth 客户端

CLI、MCP 和 agent 集成可以使用 OAuth bearer token：

```bash theme={null}
curl "https://openapi.fcontext.com/api/market-data/content/news?symbol=AAPL.US" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

OAuth 凭证必须包含 `market_data` scope。

## 通用 GET 接口

支持的只读美股市场数据 `GET` 接口，可以把数据路径追加到 `/api/market-data` 之后访问：

```bash theme={null}
curl "https://openapi.fcontext.com/api/market-data/market/top_movers?market=US&count=10" \
  -H "x-api-key: YOUR_FCONTEXT_API_KEY"
```

请求会作为 Financial Context 数据请求计费，并出现在用量报表中。
