본문으로 건너뛰기
cccskills
무료GitHub에 공개

bondterminal-x402

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(4)

  • SKILL.md4.9 KB
  • _meta.json464 B
  • references/endpoints.md1.9 KB
  • references/signer-setup.md1.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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

MethodEndpointDescriptionAuth
GET/treasury-curveUS Treasury yield curveFree
GET/bondsList all bonds (60+)x402
GET/bonds/:idBond details by ISIN or local tickerx402
GET/bonds/:id/analyticsPrice, YTM, duration, spreadsx402
GET/bonds/:id/cashflowsCashflow schedulex402
GET/bonds/:id/historyHistorical price/yield/spreadx402
POST/calculateBond analytics from custom pricex402
GET/riesgo-paisCurrent Argentina country riskx402
GET/riesgo-pais/historyHistorical riesgo país seriesx402
POST/calculate/batchBatch calculationsBearer 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)

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

0protocol

무료

Agents can sign plugins, rotate credentials without losing identity, and publicly attest to behavior.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

johnalbertini14-glitch/openclaw-skills22026년 2월 26일 업데이트

0xarchive

무료

Query historical crypto market data from 0xArchive across Hyperliquid, Lighter.xyz, and HIP-3. Covers orderbooks, trades, candles, funding rates, open interest, liquidations, and data quality. Use when the user asks about crypto market data, orderbooks, trades, funding rates, or historical prices on Hyperliquid, Lighter.xyz, or HIP-3.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

johnalbertini14-glitch/openclaw-skills22026년 2월 26일 업데이트

Calculate ROI for AI-as-a-Service (managed AI agents). Estimates cost savings, efficiency gains, and payback period for deploying AI agents across business operations. Use when evaluating whether managed AI agents make financial sense for a company.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

johnalbertini14-glitch/openclaw-skills22026년 2월 26일 업데이트

Design, build, deploy, and operate production AI agent systems — single agents, multi-agent teams, and autonomous swarms. Complete methodology from agent architecture through orchestration, memory systems, safety guardrails, and operational excellence.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

johnalbertini14-glitch/openclaw-skills22026년 2월 26일 업데이트

Design, build, test, document, and secure production-grade APIs. Covers the full lifecycle from schema design through deployment, monitoring, and versioning. Use when designing new APIs, reviewing existing ones, generating OpenAPI specs, building test suites, or debugging production issues.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

johnalbertini14-glitch/openclaw-skills22026년 2월 26일 업데이트

Turn your AI agent into a business automation architect. Design, document, implement, and monitor automated workflows across sales, ops, finance, HR, and support — no n8n or Zapier required.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

johnalbertini14-glitch/openclaw-skills22026년 2월 26일 업데이트

johnalbertini14-glitch의 스킬 모두 보기

이 스킬의 문제 신고