jpskill.com
💼 ビジネス コミュニティ

bondterminal-x402

アルゼンチン国債のデータや分析、履歴などを、APIキー不要で1リクエストあたり0.01USDCの少額決済で取得するSkill。

📜 元の英語説明(参考)

Query BondTerminal API using x402 keyless payments. No API key needed — pay $0.01 USDC per request on Base mainnet. Use when users ask for Argentine bond data, analytics, cashflows, history, riesgo país, or ISIN/ticker lookups (e.g. AL30, GD30, US040114HS26). Supports automatic 402 → payment → retry.

🇯🇵 日本人クリエイター向け解説

一言でいうと

アルゼンチン国債のデータや分析、履歴などを、APIキー不要で1リクエストあたり0.01USDCの少額決済で取得するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-17
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

BondTerminal x402

x402の従量課金認証でBondTerminal APIにクエリを実行します。APIキーもサブスクリプションも不要です。リクエストごとに署名して支払うだけです。

費用: Baseメインネットで1リクエストあたり0.01 USDCです。

APIエンドポイント

ベースURL: https://bondterminal.com/api/v1

メソッド エンドポイント 説明 認証
GET /treasury-curve 米国債利回り曲線 無料
GET /bonds 全ての債券(60以上)をリスト表示 x402
GET /bonds/:id ISINまたはローカルティッカーによる債券詳細 x402
GET /bonds/:id/analytics 価格、YTM、デュレーション、スプレッド x402
GET /bonds/:id/cashflows キャッシュフロー・スケジュール x402
GET /bonds/:id/history 過去の価格/利回り/スプレッド x402
POST /calculate カスタム価格からの債券分析 x402
GET /riesgo-pais 現在のアルゼンチンカントリーリスク x402
GET /riesgo-pais/history 過去のriesgo paísシリーズ x402
POST /calculate/batch バッチ計算 Bearerのみ

識別子形式: ISIN (US040114HS26)、D/Cサフィックス付きローカルティッカー (AL30D, GD30D)。

完全なドキュメント: https://bondterminal.com/developers このスキルにおけるエンドポイントリファレンス: references/endpoints.md

x402の仕組み

  1. 認証なしでx402エンドポイントを呼び出す → サーバーはPAYMENT-REQUIREDヘッダー付きで402を返します。
  2. ヘッダー(base64 JSON)をデコードして、支払い要件(金額、資産、ネットワーク、payTo)を取得します。
  3. x402クライアントライブラリを介してEIP-3009 transferWithAuthorizationに署名します。
  4. PAYMENT-SIGNATUREヘッダー(v2)に署名済み支払いを付けてリクエストを再試行します。レガシーフォールバックとしてX-PAYMENTを使用します。
  5. サーバーはCoinbaseファシリテーターを介して支払いを検証し、データとPAYMENT-RESPONSEヘッダーを返します。

セットアップ

1. 依存関係のインストール

npm install @x402/core @x402/evm viem

注: コード例ではESモジュールを使用しています。.mjsファイル拡張子を使用するか、package.json"type": "module"を追加してください。

2. 署名者の設定

x402の支払いフローには、USDC残高を持つBaseメインネット上のEVM署名者が必要です。x402 EVMドキュメントに従って署名者を設定してください。

署名者は{ address, signTypedData }を実装している必要があります。viem互換のウォレットクライアント(ハードウェアウォレット、KMS、インジェクトされたプロバイダーなど)であればどれでも機能します。

完全な署名者設定の例については、references/signer-setup.mdを参照してください。

3. x402クライアントの登録

import { x402Client } from '@x402/core/client';
import { x402HTTPClient } from '@x402/core/http';
import { ExactEvmScheme } from '@x402/evm'; // exact export name

// signer = { address, signTypedData } — see references/signer-setup.md
const scheme = new ExactEvmScheme(signer);
const client = new x402Client();
client.register('eip155:8453', scheme); // Base mainnet
const httpClient = new x402HTTPClient(client);

債券データの取得

async function fetchBT(path) {
  const url = `https://bondterminal.com/api/v1${path}`;
  let res = await fetch(url);

  if (res.status === 402) {
    const paymentRequired = httpClient.getPaymentRequiredResponse(
      (name) => res.headers.get(name),
      await res.json()
    );
    const payload = await httpClient.createPaymentPayload(paymentRequired);

    // Preferred v2 header
    res = await fetch(url, {
      headers: httpClient.encodePaymentSignatureHeader(payload),
    });

    // Legacy fallback for servers still expecting X-PAYMENT
    if (res.status === 402) {
      const encoded = Buffer.from(JSON.stringify(payload)).toString('base64');
      res = await fetch(url, { headers: { 'X-PAYMENT': encoded } });
    }
  }

  if (!res.ok) {
    throw new Error(`BondTerminal request failed (${res.status})`);
  }

  return res.json();
}

// Examples
const bonds = await fetchBT('/bonds');
const analytics = await fetchBT('/bonds/AL30D/analytics');
const riesgo = await fetchBT('/riesgo-pais');

クイックテスト

無料フローと有料フローの両方を検証します。

await fetchBT('/treasury-curve'); // free route (no payment)
await fetchBT('/riesgo-pais');    // paid route (triggers x402 flow)

ウォレット要件

署名ウォレットには以下が必要です。

  • Base上のUSDC — 1リクエストあたり0.01ドルの支払い用

ガス代のためのETHは不要です。x402はEIP-3009(オフチェーン署名)を使用しており、オンチェーントランザクションではありません。

注意事項

  • POST /calculate/batchにはBearer APIキーのサブスクリプションが必要です。x402では利用できません。
  • ローカルティッカーにはD/Cサフィックスが必要です: AL30D (USD)、AL30C (ARS) — AL30ではありません。
  • 決済はオンチェーンで行われます。有料の呼び出しごとに検証可能なトランザクションハッシュが生成されます。
  • PAYMENT-RESPONSEヘッダーには決済メタデータ(支払い者、トランザクションハッシュ、ネットワーク)が含まれます。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

BondTerminal x402

Query the BondTerminal API with x402 pay-per-call auth. No API key, no subscription — just sign and pay per request.

Cost: $0.01 USDC per request on Base mainnet.

API Endpoints

Base URL: https://bondterminal.com/api/v1

Method Endpoint Description Auth
GET /treasury-curve US Treasury yield curve Free
GET /bonds List all bonds (60+) x402
GET /bonds/:id Bond details by ISIN or local ticker x402
GET /bonds/:id/analytics Price, YTM, duration, spreads x402
GET /bonds/:id/cashflows Cashflow schedule x402
GET /bonds/:id/history Historical price/yield/spread x402
POST /calculate Bond analytics from custom price x402
GET /riesgo-pais Current Argentina country risk x402
GET /riesgo-pais/history Historical riesgo país series x402
POST /calculate/batch Batch calculations Bearer only

Identifier formats: ISIN (US040114HS26), local ticker with D/C suffix (AL30D, GD30D).

Full docs: https://bondterminal.com/developers Endpoint reference in this skill: references/endpoints.md

How x402 Works

  1. Call any x402 endpoint without auth → server returns 402 with PAYMENT-REQUIRED header
  2. Decode the header (base64 JSON) to get payment requirements (amount, asset, network, payTo)
  3. Sign an EIP-3009 transferWithAuthorization via the x402 client library
  4. Retry the request with the signed payment in the PAYMENT-SIGNATURE header (v2), with X-PAYMENT as legacy fallback
  5. Server verifies payment via Coinbase facilitator, returns data + PAYMENT-RESPONSE header

Setup

1. Install dependencies

npm install @x402/core @x402/evm viem

Note: The code examples use ES modules. Use .mjs file extension or add "type": "module" to your package.json.

2. Configure a signer

The x402 payment flow requires an EVM signer on Base mainnet with USDC balance. Configure your signer following the x402 EVM documentation.

The signer must implement { address, signTypedData } — any viem-compatible wallet client works (hardware wallet, KMS, injected provider, etc).

See references/signer-setup.md for a complete signer configuration example.

3. Register the x402 client

import { x402Client } from '@x402/core/client';
import { x402HTTPClient } from '@x402/core/http';
import { ExactEvmScheme } from '@x402/evm'; // exact export name

// signer = { address, signTypedData } — see references/signer-setup.md
const scheme = new ExactEvmScheme(signer);
const client = new x402Client();
client.register('eip155:8453', scheme); // Base mainnet
const httpClient = new x402HTTPClient(client);

Fetching Bond Data

async function fetchBT(path) {
  const url = `https://bondterminal.com/api/v1${path}`;
  let res = await fetch(url);

  if (res.status === 402) {
    const paymentRequired = httpClient.getPaymentRequiredResponse(
      (name) => res.headers.get(name),
      await res.json()
    );
    const payload = await httpClient.createPaymentPayload(paymentRequired);

    // Preferred v2 header
    res = await fetch(url, {
      headers: httpClient.encodePaymentSignatureHeader(payload),
    });

    // Legacy fallback for servers still expecting X-PAYMENT
    if (res.status === 402) {
      const encoded = Buffer.from(JSON.stringify(payload)).toString('base64');
      res = await fetch(url, { headers: { 'X-PAYMENT': encoded } });
    }
  }

  if (!res.ok) {
    throw new Error(`BondTerminal request failed (${res.status})`);
  }

  return res.json();
}

// Examples
const bonds = await fetchBT('/bonds');
const analytics = await fetchBT('/bonds/AL30D/analytics');
const riesgo = await fetchBT('/riesgo-pais');

Quick Test

Validate both free and paid flows:

await fetchBT('/treasury-curve'); // free route (no payment)
await fetchBT('/riesgo-pais');    // paid route (triggers x402 flow)

Wallet Requirements

The signing wallet needs:

  • USDC on Base — for the $0.01 payment per request

No ETH for gas is required — x402 uses EIP-3009 (off-chain signature), not on-chain transactions.

Notes

  • POST /calculate/batch requires a Bearer API key subscription — not available via x402
  • Local tickers require D/C suffix: AL30D (USD), AL30C (ARS) — not AL30
  • Settlement is on-chain: each paid call produces a verifiable transaction hash
  • The PAYMENT-RESPONSE header contains settlement metadata (payer, tx hash, network)