> ## 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.

# クイックスタート

> 最初の Financial Context 市場データリクエストを送信する

Financial Context は `openapi.fcontext.com` から、認証済みの `/api/market-data/*` 市場データエンドポイントを公開しています。

## 1. 認証情報を作成する

[fcontext.com](https://fcontext.com) で Financial Context にサインインし、アカウント設定を開いて外部アクセス用の API key を作成します。

<Warning>
  API key は秘密にしてください。環境変数またはプラットフォームのシークレットマネージャーを使用してください。
</Warning>

## 2. クォートをリクエストする

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

レスポンス本文には、指定したシンボルのクォートデータが含まれます。現在の API は `.US` シンボルと `US` market フィルターをサポートしています。

## 3. コードから API を使う

```javascript theme={null}
const baseUrl = "https://openapi.fcontext.com";
const apiKey = process.env.FCONTEXT_API_KEY;

export async function getQuote(symbols) {
  const params = new URLSearchParams({ symbols: symbols.join(",") });
  const response = await fetch(`${baseUrl}/api/market-data/quote?${params}`, {
    headers: { "x-api-key": apiKey },
  });

  if (!response.ok) {
    throw new Error(`Financial Context request failed: ${response.status}`);
  }

  return response.json();
}
```

## 最初によく使うリクエスト

```bash theme={null}
# リアルタイムクォート
curl "https://openapi.fcontext.com/api/market-data/quote?symbols=AAPL.US" \
  -H "x-api-key: YOUR_FCONTEXT_API_KEY"

# 企業概要
curl "https://openapi.fcontext.com/api/market-data/fundamental/company?symbol=AAPL.US" \
  -H "x-api-key: YOUR_FCONTEXT_API_KEY"

# ニュース
curl "https://openapi.fcontext.com/api/market-data/content/news?symbol=AAPL.US" \
  -H "x-api-key: YOUR_FCONTEXT_API_KEY"

# スクリーナー
curl "https://openapi.fcontext.com/api/market-data/screener/search?market=US&conditions=pettm:10:50&count=20" \
  -H "x-api-key: YOUR_FCONTEXT_API_KEY"
```

## 対応メソッド

市場データエンドポイントは `GET` をサポートしています。フィルターやページネーションにはクエリパラメータを使用します。
