> ## 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 資料請求計費，並出現在用量報表中。
