fugazi Method API

API

fugazi exposes a paid JSON API for programmatic access to the same valuations shown in the web UI. Access requires payment per request via the x402 protocol (docs) — an HTTP-native micro-payment standard built around the 402 Payment Required status code. No accounts, no API keys.

Endpoint

GET /api/stock/{ticker}

Returns intrinsic value, grades, and metrics for one ticker, computed from SEC filings with the same engine the web UI uses:

Payment (x402)

Requests without payment receive a 402 Payment Required response carrying a payment challenge (accepts Solana USDC; $0.01 per request by default). The standard x402 client flow:

  1. GET /api/stock/AAPL402 with the challenge in the response body/headers
  2. Build the payment payload with an x402 client and settle USDC through the facilitator
  3. Retry the request with the Payment-Signature header → 200 with the JSON document

Error codes are returned before any payment is requested: 400 invalid_ticker (malformed), 404 unknown_ticker (not in the ledger). Only tickers already present in the global table are served; adding new tickers is a web-UI operation (first 10 per IP free, then $0.10 each via the same x402 gate).

Self-hosting? The paid API is opt-in: see .env.example (X402_* vars) and cmd/server/x402.go.

Loading…