REST API リファレンス

FundaFX REST API を使って、AI が収集・検証した経済ファクト、指標データ、カレンダー、中央銀行情報にアクセスできます。すべてのレスポンスは JSON 形式です。

https://api.fundafx.link/api/v1

30秒で始める

APIキーを取得してコピペするだけで、すぐにデータを取得できます。

1

APIキーを取得

FundaFX モバイルアプリの 設定 > APIキー管理 から発行してください。fndx_ で始まるキーが表示されます。このキーがあなたの認証情報です。

2

以下をコピペして実行

YOUR_KEY の部分を、ステップ1で取得したキーに置き換えてください。

curl -- ターミナルにコピペして実行
curl -s "https://api.fundafx.link/api/v1/facts?limit=3&importance=high" \
  -H "X-API-Key: YOUR_KEY" | python3 -m json.tool
3

レスポンスの読み方

成功すると以下のような JSON が返ります。items 配列にファクト(経済ニュース)が入っています。

Response (HTTP 200)
{
  "items": [
    {
      "id": "6615a7ca-b2df-47c8-b038-c08bf260505a",   // ファクトの一意ID (UUID)
      "fact_type": "media_report",                    // 種別: institutional_release / official_speech / media_report
      "category": "geopolitical",                     // カテゴリ: monetary_policy / inflation / employment 等
      "importance": "high",                            // 重要度: high / medium / low
      "text": {
        "en": {
          "title": "Global markets to stay driven by West Asia conflict; Fed neutral guidance reflects uncertainty",
          "summary": "The Afghanistannews.net report states that global markets will remain driven by the West Asia conflict...",
          "detail": null,               // 詳細説明 (ある場合のみ)
          "quality_score": null          // テキスト品質スコア 0.0-1.0
        },
        "ja": {
          "title": "西アジア情勢が世界市場を引き続き動かす;FRBの中立的指針は不確実性を反映",
          "summary": "アフガニスタンニュースの報道によれば、西アジア情勢が世界市場を引き続き動かし...",
          "detail": null,
          "quality_score": null
        }
      },
      "currencies_affected": [             // このファクトが影響する通貨
        { "code": "USD" }
      ],
      "verification_details": {            // AI によるファクトチェック結果
        "sources_checked": 2,              // チェックしたソース数
        "sources_confirmed": 1,            // 確認できたソース数
        "confidence_score": 0.662,          // 信頼度スコア (0.0-1.0)
        "verified_at": "2026-03-21T05:30:36.860963",
        "notes": "Rule check: No numeric value to rule-check; deferring to LLM. | Original article title and content match..."
      },
      "source_urls": ["http://www.afghanistannews.net/news/278934978/..."],
      "source_name": "gdelt",               // データソース名
      "source_collector": "gdelt",            // 収集パイプライン名
      "stage": "published",                       // ステータス: published
      "context": null,                            // 補足情報 (ある場合のみ)
      "event_timestamp": "2026-03-21T04:15:00+00:00",  // イベント発生日時
      "published_at": "2026-03-20T20:38:06+00:00",    // 公開日時
      "created_at": "2026-03-20T20:38:06+00:00",      // 作成日時
      "updated_at": "2026-03-20T20:38:06+00:00"       // 更新日時
    }
  ],
  "count": 35,          // フィルタ条件に合致する総件数
  "limit": 3,           // 今回の取得件数上限
  "offset": 0,          // ページネーション オフセット
  "disclaimer": {      // 免責事項 (全レスポンスに付与)
    "en": "This information is AI-aggregated factual data and does not constitute investment advice...",
    "ja": "本情報はAIによる事実情報の収集・構造化データであり、投資助言ではありません..."
  }
}

認証

すべての API エンドポイントは認証が必要です(一部の公開エンドポイントを除く)。

APIキーの仕組み

1. 取得方法: FundaFX モバイルアプリの 設定 > APIキー管理 から発行できます。

2. キーの形式: fndx_ で始まる文字列です。サーバー側では SHA256 ハッシュとして保存されており、キー本文は発行時に一度だけ表示されます。紛失した場合は再発行してください。

3. リクエスト方法: リクエストヘッダーに X-API-Key を設定します。

4. 月次リセット: リクエスト回数カウンターは毎月1日にリセットされます。

リクエスト例
curl https://api.fundafx.link/api/v1/facts \
  -H "X-API-Key: fndx_your_api_key_here"

レート制限

APIキーのティアに応じてリクエスト数が制限されます。

ティア制限価格
Free100 リクエスト / 月無料
Pro5,000 リクエスト / 月¥980 / 月

現在の使用量は GET /auth/usage で確認できます。制限超過時は 429 Too Many Requests が返されます。

レスポンスヘッダー

すべての認証済みリクエストのレスポンスに以下のヘッダーが付与されます。

ヘッダー説明
X-RateLimit-Limit月間リクエスト上限100
X-RateLimit-Remaining今月の残りリクエスト数77
X-RateLimit-Resetカウンターリセットまでの秒数1728000

SDK サンプル

Python / JavaScript のコピペで動く完全なコード例です。

Python (requests)
import requests

API_KEY = "fndx_your_api_key_here"  # ここを自分のキーに置き換え
BASE    = "https://api.fundafx.link/api/v1"
HEADERS = {"X-API-Key": API_KEY}

# --- 1. USD関連の高重要度ファクトを取得 ---
resp = requests.get(
    f"{BASE}/facts",
    headers=HEADERS,
    params={"currency": "USD", "importance": "high", "limit": 5},
)
facts = resp.json()

print(f"USD関連の重要ファクト: {facts['count']}件")
for item in facts["items"]:
    title = item["text"]["ja"]["title"]
    score = item["verification_details"]["confidence_score"]
    print(f"  [{score:.2f}] {title}")

# --- 2. 今後1週間の重要イベント ---
calendar = requests.get(
    f"{BASE}/calendar",
    headers=HEADERS,
    params={"hours_ahead": 168, "importance": "high"},
).json()

print(f"\n今後1週間の重要イベント: {calendar['count']}件")
for ev in calendar["items"]:
    print(f"  {ev['scheduled_at'][:10]} | {ev['title_en']} ({ev['currency']})")

# --- 3. FEDの現在金利 ---
fed = requests.get(f"{BASE}/central-banks/FED", headers=HEADERS).json()
print(f"\nFED 政策金利: {fed['current_rate']}%")
print(f"次回FOMC: {fed['next_meeting_date']}")

# --- 4. EURUSD 為替レート (直近3日) ---
rates = requests.get(
    f"{BASE}/exchange-rates/EURUSD",
    headers=HEADERS,
    params={"days": 3},
).json()
for v in rates["values"][:3]:
    print(f"  {v['date']} | EURUSD = {v['close']}")
JavaScript (fetch)
const API_KEY = "fndx_your_api_key_here";  // ここを自分のキーに置き換え
const BASE    = "https://api.fundafx.link/api/v1";
const headers = { "X-API-Key": API_KEY };

// --- 1. USD関連の高重要度ファクトを取得 ---
const factsRes = await fetch(
  `${BASE}/facts?currency=USD&importance=high&limit=5`,
  { headers }
);
const facts = await factsRes.json();

console.log(`USD関連の重要ファクト: ${facts.count}件`);
facts.items.forEach(item => {
  const title = item.text.ja.title;
  const score = item.verification_details.confidence_score;
  console.log(`  [${score?.toFixed(2)}] ${title}`);
});

// --- 2. 今後1週間の重要イベント ---
const calendar = await fetch(
  `${BASE}/calendar?hours_ahead=168&importance=high`,
  { headers }
).then(r => r.json());

console.log(`\n今後1週間の重要イベント: ${calendar.count}件`);
calendar.items.forEach(ev => {
  console.log(`  ${ev.scheduled_at.slice(0, 10)} | ${ev.title_en} (${ev.currency})`);
});

// --- 3. FEDの現在金利 ---
const fed = await fetch(`${BASE}/central-banks/FED`, { headers }).then(r => r.json());
console.log(`\nFED 政策金利: ${fed.current_rate}%`);
console.log(`次回FOMC: ${fed.next_meeting_date}`);

// --- 4. EURUSD 為替レート (直近3日) ---
const rates = await fetch(
  `${BASE}/exchange-rates/EURUSD?days=3`,
  { headers }
).then(r => r.json());
rates.values.slice(0, 3).forEach(v => {
  console.log(`  ${v.date} | EURUSD = ${v.close}`);
});
-- エンドポイント一覧に戻る

Auth

APIキーの使用量確認。残りリクエスト数を確認してレート制限を管理できます。

GET /auth/usage 認証必須

現在の APIキーのレート制限使用状況を返します。月間の残りリクエスト数と利用ティアを確認できます。

実用例: 残りリクエスト数を確認

アプリケーションの起動時やバッチ処理の前に、残りリクエスト数を確認してからデータ取得を行うのがおすすめです。

curl
curl -s https://api.fundafx.link/api/v1/auth/usage \
  -H "X-API-Key: YOUR_KEY"
Response 200
{
  "api_key_id": 1,                  // APIキーの内部ID
  "requests_this_month": 0,         // 今月のリクエスト数
  "rate_limit_per_month": 100,      // 月間上限 (Free: 100, Pro: 5000)
  "tier": "free"                    // ティア: "free" または "pro"
}
-- エンドポイント一覧に戻る

Facts

為替市場に影響するファンダメンタル・ファクト(経済指標発表、金融政策決定、要人発言、報道など)。AI パイプラインで収集・検証・翻訳されたデータです。

GET /facts 認証必須

ファクト一覧を取得します。フィルタ条件を指定して絞り込みが可能です。新しいイベント順にソートされます。

Query Parameters

パラメータ説明
fact_typestringファクト種別: institutional_release(公的機関の発表), official_speech(要人発言), media_report(報道)
categorystringカテゴリ: monetary_policy, employment, inflation, gdp_growth, fiscal_policy, geopolitical
currencystring影響通貨コード: USD, EUR, JPY, GBP, AUD, CAD, CHF, NZD, CNY
importancestring重要度: high, medium, low
source_collectorstring収集元: ecb, cb_rss, gdelt, twitter, news_rss, frb_rss
date_fromdatetime開始日時 (ISO 8601) 例: 2026-03-01T00:00:00Z
date_todatetime終了日時 (ISO 8601)
limitint取得件数 (1-200, デフォルト 50)
offsetintページネーション オフセット (デフォルト 0)

実用例: USD関連の高重要度ニュースを直近1週間で取得

curl
curl -s "https://api.fundafx.link/api/v1/facts?currency=USD&importance=high&limit=5&date_from=2026-03-15T00:00:00Z" \
  -H "X-API-Key: YOUR_KEY"
Response 200
{
  "items": [
    {
      "id": "6615a7ca-b2df-47c8-b038-c08bf260505a",
      "fact_type": "media_report",
      "category": "geopolitical",
      "importance": "high",
      "stage": "published",
      "text": {
        "en": {
          "title": "Global markets to stay driven by West Asia conflict; Fed neutral guidance reflects uncertainty",
          "summary": "The Afghanistannews.net report states that global markets will remain driven by the West Asia conflict, and that Federal Reserve neutral guidance reflects uncertainty.",
          "detail": null,
          "quality_score": null
        },
        "ja": {
          "title": "西アジア情勢が世界市場を引き続き動かす;FRBの中立的指針は不確実性を反映",
          "summary": "アフガニスタンニュースの報道によれば、西アジア情勢が世界市場を引き続き動かし、連邦準備制度の中立的なガイダンスが不確実性を反映している。",
          "detail": null,
          "quality_score": null
        }
      },
      "currencies_affected": [
        { "code": "USD" }
      ],
      "context": {
        "related_facts": [
          {
            "id": "2f9c4bd9-7e5f-4243-b97e-9253b0fe31b6",
            "title": "Bureau of Labor Statistics posted about employment data on X",
            "fact_type": "institutional_release",
            "event_timestamp": "2026-03-20T14:08:02+00:00"
          }
        ],
        "currency_context": {
          "USD": {
            "dominant_category": "gdp_growth",
            "recent_fact_count": 32
          }
        }
      },
      "verification_details": {
        "sources_checked": 2,
        "sources_confirmed": 1,
        "confidence_score": 0.662,
        "verified_at": "2026-03-21T05:30:36.860963",
        "notes": "Rule check: No numeric value to rule-check; deferring to LLM..."
      },
      "source_urls": ["http://www.afghanistannews.net/news/278934978/..."],
      "source_name": "gdelt",
      "source_collector": "gdelt",
      "event_timestamp": "2026-03-21T04:15:00+00:00",
      "created_at": "2026-03-20T20:30:42.740844+00:00",
      "updated_at": "2026-03-20T20:30:42.740844+00:00",
      "published_at": "2026-03-20T20:30:42.740844+00:00"
    }
  ],
  "count": 35,
  "limit": 5,
  "offset": 0,
  "disclaimer": {
    "en": "This information is AI-aggregated factual data and does not constitute investment advice. Past statistics do not guarantee future results. All investment decisions are made at your own risk and responsibility.",
    "ja": "本情報はAIによる事実情報の収集・構造化データであり、投資助言ではありません。過去の統計は将来の結果を保証するものではなく、最終的な投資判断は必ずご自身の責任で行ってください。"
  }
}

レスポンスフィールド詳細

text

言語別のローカライズテキスト。キーは言語コード(en = 英語, ja = 日本語)。

フィールド説明
titlestring短い見出し(1行)
summarystring要約文(1-3文)
detailstring | null詳細な説明(ある場合のみ)
quality_scorefloat | nullテキスト品質スコア(0.0-1.0, AI が自動評価)

currencies_affected

このファクトが影響する通貨の配列。

フィールド説明
codestringISO 通貨コード: USD, EUR, JPY, GBP, AUD, CAD, CHF, NZD, CNY

verification_details

AIパイプラインによるファクトチェック結果。

フィールド説明
sources_checkedint検証のためにチェックされたソース数
sources_confirmedint内容を確認できたソース数
confidence_scorefloat信頼度スコア(0.0-1.0)
verified_atdatetime | null検証完了日時 (ISO 8601)
notesstring | null検証時の補足メモ(AI が生成)

context

ファクトの文脈情報。関連ファクトや通貨の直近状況を提供します。

フィールド説明
related_factsarray | null関連するファクトの一覧(id, title, fact_type, event_timestamp)
currency_contextobject | null通貨別の概況(dominant_category, recent_fact_count)
GET /facts/{fact_id} 認証必須

UUID を指定してファクトの詳細を取得します。レスポンスのフィールドは GET /facts の各アイテムと同一です。

Path Parameters

パラメータ説明
fact_iduuid 必須ファクトの UUID (例: 6615a7ca-b2df-47c8-b038-c08bf260505a)
curl
curl -s "https://api.fundafx.link/api/v1/facts/6615a7ca-b2df-47c8-b038-c08bf260505a" \
  -H "X-API-Key: YOUR_KEY"
-- エンドポイント一覧に戻る

Indicators

経済指標(GDP、CPI、雇用統計など)のメタデータと時系列データ。

GET /indicators 認証必須

経済指標の一覧を取得します。国コード・カテゴリで絞り込みが可能です。

Query Parameters

パラメータ説明
country_codestringISO国コード: US, JP, DE, GB, AU
categorystringカテゴリ: inflation, employment, gdp_growth, monetary_policy

実用例: 米国の経済指標一覧を取得

curl
curl -s "https://api.fundafx.link/api/v1/indicators?country_code=US" \
  -H "X-API-Key: YOUR_KEY"
Response 200
{
  "items": [
    {
      "id": 2,
      "code": "US_CPI",
      "name_en": "US Consumer Price Index",
      "name_ja": "米国消費者物価指数",
      "country_code": "US",
      "currency": "USD",
      "category": "inflation",
      "importance": "high",
      "unit": "Index",
      "frequency": "monthly",
      "source_api": "FRED",
      "source_series_id": "CPIAUCSL",
      "description": null
    },
    {
      "id": 1,
      "code": "US_GDP",
      "name_en": "US Gross Domestic Product",
      "name_ja": "米国GDP",
      "country_code": "US",
      "currency": "USD",
      "category": "gdp_growth",
      "importance": "high",
      "unit": "Billions USD",
      "frequency": "quarterly",
      "source_api": "FRED",
      "source_series_id": "GDP",
      "description": null
    },
    {
      "id": 3,
      "code": "US_NFP",
      "name_en": "US Nonfarm Payrolls",
      "name_ja": "米国非農業部門雇用者数",
      "country_code": "US",
      "currency": "USD",
      "category": "employment",
      "importance": "high",
      "unit": "Thousands",
      "frequency": "monthly",
      "source_api": "FRED",
      "source_series_id": "PAYEMS",
      "description": null
    }
  ],
  "count": 6,
  "disclaimer": { "en": "...", "ja": "..." }
}
GET /indicators/{indicator_id} 認証必須

指標の詳細メタデータと時系列データ(values配列)を取得します。

Parameters

パラメータ説明
indicator_idint 必須指標ID (path) -- GET /indicators で取得した id を指定
limitint時系列データの取得件数 (1-500, デフォルト 50)

実用例: 米国GDPの詳細と時系列データを取得

curl
curl -s "https://api.fundafx.link/api/v1/indicators/1" \
  -H "X-API-Key: YOUR_KEY"
Response 200
{
  "id": 1,
  "code": "US_GDP",
  "name_en": "US Gross Domestic Product",
  "name_ja": "米国GDP",
  "country_code": "US",
  "currency": "USD",
  "category": "gdp_growth",
  "importance": "high",
  "unit": "Billions USD",
  "frequency": "quarterly",
  "source_api": "FRED",
  "source_series_id": "GDP",
  "description": null,
  "values": []  // 時系列データ (value, previous_value, expected_value, period, release_date)
}
GET /indicators/{indicator_id}/latest 認証必須

指標の最新値のみを取得します。時系列データが不要で最新値だけ必要な場合に便利です。

GET /indicators/rate-trends 認証必須

政策金利トレンドの統合データ。中央銀行情報・指標値・関連ファクトを一括取得します。金利チャート表示に最適です。

Query Parameters

パラメータ説明
currenciesstring通貨コード(カンマ区切り): USD,EUR,JPY
daysint取得期間(日数, 1-3650, デフォルト 365)
-- エンドポイント一覧に戻る

Calendar

経済カレンダー。今後の指標発表・政策会合・スピーチ等のスケジュールと予想値・前回値。

GET /calendar 認証必須

今後N時間以内に予定されている経済イベントを取得します。予想値・前回値が利用可能な場合は含まれます。

Query Parameters

パラメータ説明
hours_aheadint先読み時間 (1-168, デフォルト 24)。168 = 1週間先まで
currencystring通貨コード: USD, EUR, JPY
importancestringhigh, medium, low

実用例: 今週の重要イベント一覧

curl
curl -s "https://api.fundafx.link/api/v1/calendar?hours_ahead=168&importance=high" \
  -H "X-API-Key: YOUR_KEY"
Response 200
{
  "items": [
    {
      "id": 469,
      "indicator_id": null,
      "title_en": "S&P Global Manufacturing PMI  (Mar)",
      "title_ja": null,
      "country_code": "US",
      "currency": "USD",
      "importance": "high",
      "scheduled_at": "2026-03-24T13:45:00+00:00",  // 発表予定日時 (UTC)
      "actual_value": null,             // 実績値 (発表後に設定)
      "expected_value": null,           // 市場予想値
      "previous_value": 51.6,            // 前回値
      "is_released": false,              // 発表済みか
      "released_at": null,              // 実際の発表日時
      "source": "investing.com",
      "metadata": {
        "source_event_id": "eventRowId_543534"
      }
    },
    {
      "id": 495,
      "title_en": "CPI (YoY)  (Feb)",
      "title_ja": null,
      "country_code": "GB",
      "currency": "GBP",
      "importance": "high",
      "scheduled_at": "2026-03-25T07:00:00+00:00",
      "actual_value": null,
      "expected_value": null,
      "previous_value": 3.0,
      "is_released": false,
      "released_at": null,
      "source": "investing.com",
      "metadata": { "source_event_id": "eventRowId_543614" }
    }
  ],
  "count": 4,
  "disclaimer": {
    "en": "This information is AI-aggregated factual data and does not constitute investment advice...",
    "ja": "本情報はAIによる事実情報の収集・構造化データであり..."
  }
}
GET /calendar/{date} 認証必須

指定日のイベント一覧を取得します。過去の日付を指定すれば、実績値 (actual_value) が含まれたデータも取得できます。

Path Parameters

パラメータ説明
datedate 必須日付 (YYYY-MM-DD) 例: 2026-03-24
curl
curl -s "https://api.fundafx.link/api/v1/calendar/2026-03-24" \
  -H "X-API-Key: YOUR_KEY"
-- エンドポイント一覧に戻る

Central Banks

主要8中央銀行の情報(政策金利、次回会合、総裁名)と金利差マトリクス。

GET /central-banks 認証必須

すべてのアクティブな中央銀行を返します。現在の政策金利・次回会合日・総裁名を含みます。

curl
curl -s "https://api.fundafx.link/api/v1/central-banks" \
  -H "X-API-Key: YOUR_KEY"
Response 200
{
  "items": [
    {
      "id": 1,
      "code": "FED",
      "name_en": "Federal Reserve",
      "name_ja": "米連邦準備制度理事会",
      "country_code": "US",
      "currency": "USD",
      "institution_type": "central_bank",
      "website_url": "https://www.federalreserve.gov",
      "current_rate": 4.5,
      "next_meeting_date": "2026-03-18",
      "governor_name": "Jerome Powell",
      "is_active": true,
      "metadata": {}
    },
    {
      "id": 2,
      "code": "ECB",
      "name_en": "European Central Bank",
      "name_ja": "欧州中央銀行",
      "country_code": "EU",
      "currency": "EUR",
      "current_rate": 3.15,
      "next_meeting_date": "2026-03-06",
      "governor_name": "Christine Lagarde"
    },
    { "code": "BOJ", "name_ja": "日本銀行", "current_rate": 0.5, "governor_name": "Kazuo Ueda" },
    { "code": "BOE", "name_ja": "イングランド銀行", "current_rate": 4.5, "governor_name": "Andrew Bailey" },
    { "code": "RBA", "name_ja": "オーストラリア準備銀行", "current_rate": 4.1, "governor_name": "Michele Bullock" },
    { "code": "BOC", "name_ja": "カナダ銀行", "current_rate": 3.25, "governor_name": "Tiff Macklem" },
    { "code": "SNB", "name_ja": "スイス国立銀行", "current_rate": 0.5, "governor_name": "Martin Schlegel" },
    { "code": "RBNZ", "name_ja": "ニュージーランド準備銀行", "current_rate": 3.75, "governor_name": "Adrian Orr" }
  ],
  "count": 8
}
GET /central-banks/rate-matrix 認証必須

全中央銀行間の金利差マトリクスを返します。キャリートレード分析に有用です。行 - 列 = 金利差 (%) で表されます。

Response 200 (抜粋)
{
  "institutions": [
    { "code": "FED", "currency": "USD", "current_rate": 4.5 },
    { "code": "ECB", "currency": "EUR", "current_rate": 3.15 },
    { "code": "BOJ", "currency": "JPY", "current_rate": 0.5 }
  ],
  "matrix": {
    "FED": { "ECB": 1.35, "BOJ": 4.0, "BOE": 0.0, "RBA": 0.4 },  // FED金利 - 相手金利
    "ECB": { "FED": -1.35, "BOJ": 2.65, "BOE": -1.35 },
    "BOJ": { "FED": -4.0, "ECB": -2.65, "BOE": -4.0 }
  }
}
GET /central-banks/{code} 認証必須

コード指定で中央銀行の詳細を取得します。

Path Parameters

パラメータ説明
codestring 必須FED, ECB, BOJ, BOE, RBA, BOC, SNB, RBNZ

実用例: FEDの現在の金利と次回会合日

curl
curl -s "https://api.fundafx.link/api/v1/central-banks/FED" \
  -H "X-API-Key: YOUR_KEY"
Response 200
{
  "id": 1,
  "code": "FED",
  "name_en": "Federal Reserve",
  "name_ja": "米連邦準備制度理事会",
  "country_code": "US",
  "currency": "USD",
  "institution_type": "central_bank",
  "website_url": "https://www.federalreserve.gov",
  "current_rate": 4.5,                    // 現在の政策金利 (%)
  "next_meeting_date": "2026-03-18",       // 次回会合日
  "governor_name": "Jerome Powell",        // 総裁名
  "is_active": true,
  "metadata": {}
}
-- エンドポイント一覧に戻る

Exchange Rates

ECBベースの日次為替レート時系列データ。EURベースのペアのみ対応しています。

GET /exchange-rates/{pair} 認証必須

通貨ペアの日次レートを取得します。EURベースのペアのみ対応EURUSD, EURJPY, EURGBP 等)。EURベース以外のペア(例: USDJPY)はエラーになります。

Parameters

パラメータ説明
pairstring 必須通貨ペア (path): EURUSD, EURJPY, EURGBP, EURAUD, EURCAD, EURCHF, EURNZD
daysint取得期間(日数, 1-3650, デフォルト 365)

実用例: EURUSD の直近3日間のレート

curl
curl -s "https://api.fundafx.link/api/v1/exchange-rates/EURUSD?days=3" \
  -H "X-API-Key: YOUR_KEY"
Response 200
{
  "pair": "EURUSD",
  "base_currency": "EUR",
  "quote_currency": "USD",
  "values": [
    { "date": "2026-03-19", "close": 1.1489 },
    { "date": "2026-03-18", "close": 1.15 },
    { "date": "2026-03-17", "close": 1.1531 }
  ],
  "count": 3,
  "disclaimer": {
    "en": "This information is AI-aggregated factual data...",
    "ja": "本情報はAIによる事実情報の収集・構造化データであり..."
  }
}

EURベース以外のペアはエラーになります

例えば USDJPY を指定した場合:

Error Response (USDJPY)
{
  "detail": "Exchange rate data not available for pair 'USDJPY'. Only EUR-based pairs are currently supported."
}
-- エンドポイント一覧に戻る

Sources

FundaFX が収集するデータソースとモニタリングアカウントの一覧。ソースのライセンス情報も確認できます。

GET /sources 認証必須

全データソース(ECB、FRB、e-Stat等)とモニタリング対象のXアカウント一覧を返します。

curl
curl -s "https://api.fundafx.link/api/v1/sources" \
  -H "X-API-Key: YOUR_KEY"
Response 200 (抜粋)
{
  "data_sources": [
    {
      "name": "ecb",
      "display_name_en": "ECB Statistical Data",
      "display_name_ja": "ECB統計データ",
      "category": "central_bank",
      "is_active": true,
      "license": "Free use with attribution (Source: ECB statistics.)",
      "url": "https://data.ecb.europa.eu"
    },
    {
      "name": "estat",
      "display_name_en": "e-Stat (Japan Statistics)",
      "display_name_ja": "e-Stat(政府統計)",
      "category": "government",
      "is_active": true,
      "license": "CC-BY 4.0",
      "url": "https://www.e-stat.go.jp"
    }
  ],
  "monitoring_accounts": [
    { "username": "FederalReserve", "display_name": "Federal Reserve" }
  ]
}
-- エンドポイント一覧に戻る

エラーコード

すべてのエラーレスポンスは JSON 形式で返されます。detail フィールドにエラー内容が記載されます。

コード説明対処法
400 リクエストパラメータが不正 パラメータの型・値を確認。例: importance は high / medium / low のみ
401 APIキーが無効または未指定 X-API-Key ヘッダーを確認。紛失した場合はアプリで再発行
404 リソースが見つからない 指定した ID やコードの存在を確認
429 レート制限超過 GET /auth/usage で残量確認。Pro にアップグレードするか翌月まで待機
500 サーバー内部エラー 一時的な問題の可能性あり。しばらく待ってリトライ

エラーレスポンスの例

401 -- APIキー未指定
{
  "detail": "Authentication required. Provide X-App-Token or X-API-Key header."
}
401 -- 無効なAPIキー
{
  "detail": "Invalid or inactive API key"
}
非対応パラメータ (exchange-rates の例)
{
  "detail": "Exchange rate data not available for pair 'USDJPY'. Only EUR-based pairs are currently supported."
}
-- エンドポイント一覧に戻る