openapi: 3.2.0 info: title: LEGIT Leaderboard API description: Trust-check any x402 merchant or agent address on Algorand, Base, Solana, or 17 other chains before routing a payment. version: 0.1.0 contact: name: GONNA url: https://gonna.bond/gonnaverse/ email: legit@gonna.bond x-logo: url: https://legit.gonna.bond/favicon.png x-guidance: 'LEGIT is the trust and routing layer for the x402 agentic economy. Trust-check any x402 merchant address on Algorand, Base, Solana or 17 other chains before routing a payment: grades (A+ to F) and scores (0-100) come from live uptime, latency and payment-coherence probes, never self-reported data. Run as a pre-payment trust check: call GET /v1/check/{address} before any x402 payment to an address you have not paid before. Start FREE: GET /v1/check/{address} (full trust report), /v1/leaderboard (ranked shortlist), /v1/trending, /v1/pulse, /v1/arena/preview. Paid per call in USDC over x402: GET /v1/compare (2-5 merchants head-to-head), /v1/arena (24h cross-chain settlement benchmark, ?network= filter), /v1/history?address=... (30-day trust trend), POST /v1/watch (7- or 30-day change sentinel, webhook-armed), POST /v1/deep-check (due diligence, up to 10 addresses). How to pay: call a paid endpoint without paying and it answers 402 with a PaymentRequired document listing every active rail; pay one rail and retry with the PAYMENT-SIGNATURE header. Rails cheapest first: algorand-mainnet $0.004, base-mainnet and solana-mainnet $0.005 per call. Watch companions GET /v1/watches/{watch_id} and /v1/watches/{watch_id}/events are FREE: the watch id is the bearer capability for status and the event feed. Webhook payload anatomy: /docs; agent manifest: /llms.txt. Use LEGIT before sending an x402 payment to an unknown merchant, before accepting a counterparty in agent-to-agent settlement, or to monitor a critical upstream for trust degradation.' tags: - name: Leaderboard paths: /v1/leaderboard: get: summary: Query the ranked merchant leaderboard to shortlist counterparties description: 'Leaderboard with optional ?network= filter (SPEC_V2, Module A). ``networks`` always lists the distinct networks present BEFORE filtering so clients can build filter chips; backwards compatible with Wave 1. Wave 16 (Instant Speed): cacheable for 30s. ``view=trimmed`` is the dashboard''s diet variant: null optional fields are omitted entirely (the dashboard treats absent and null identically), which removes hundreds of ``"field":null`` pairs from a large board. The default view is byte-for-byte the public contract it always was. Wave 18 (The Instant Doctrine): opt-in server pagination via ``page``/``size`` (25/50/100) plus a ``q`` name/address substring filter, sliced AFTER the existing filter+sort+rank logic so ranks stay global; the paged payload also carries ``counts`` (cheap per-network tallies for the dashboard chips). A 30s in-process TTL cache (keyed by the full query string) fronts every variant; the rate limiter still sees every request. Wave 40 (La Voce): testnet networks and dormant merchants (no measurement inside LEGIT_ACTIVE_WINDOW_DAYS, default 7 days) are out of the default view; ``?include_testnet=true`` and ``?include_dormant=true`` restore them, dormant entries flagged ``dormant: true``. Wave 41 (La Bellezza, W0): ``rank`` is the consecutive position in the returned view (post testnet/dormant policy): 1,2,3 with no holes. The additive ``rank_global`` preserves the absolute pre-filter rank; with both opt-ins active, rank == rank_global.' operationId: leaderboard_v1_leaderboard_get parameters: - name: network in: query required: false schema: anyOf: - type: string minLength: 1 maxLength: 32 pattern: ^[a-z0-9-]+$ - type: 'null' description: Optional exact-match network filter (e.g. base-mainnet) title: Network description: Optional exact-match network filter (e.g. base-mainnet) - name: view in: query required: false schema: anyOf: - type: string pattern: ^(full|trimmed)$ - type: 'null' description: 'Optional payload diet. ''trimmed'' omits null-valued optional fields (additive contract: absent instead of null); the default keeps the full Wave 1 shape.' title: View description: 'Optional payload diet. ''trimmed'' omits null-valued optional fields (additive contract: absent instead of null); the default keeps the full Wave 1 shape.' - name: page in: query required: false schema: anyOf: - type: integer minimum: 1 - type: 'null' description: 'Wave 18: optional 1-based server page. When page and/or size are given the response becomes the paged shape {generated_at, total, page, size, entries} sliced AFTER the global rank/filter logic, so ranks stay global.' title: Page description: 'Wave 18: optional 1-based server page. When page and/or size are given the response becomes the paged shape {generated_at, total, page, size, entries} sliced AFTER the global rank/filter logic, so ranks stay global.' - name: size in: query required: false schema: anyOf: - type: integer - type: 'null' description: 'Wave 18: page size, one of 25, 50, 100 (default 50 when paging).' title: Size description: 'Wave 18: page size, one of 25, 50, 100 (default 50 when paging).' - name: q in: query required: false schema: anyOf: - type: string minLength: 1 maxLength: 100 - type: 'null' description: 'Wave 18: optional name/address substring filter.' title: Q description: 'Wave 18: optional name/address substring filter.' - name: include_testnet in: query required: false schema: type: boolean description: 'Wave 40: testnet/devnet/amoy/sepolia networks are excluded by default; pass ?include_testnet=true to restore them (same entry shape).' default: false title: Include Testnet description: 'Wave 40: testnet/devnet/amoy/sepolia networks are excluded by default; pass ?include_testnet=true to restore them (same entry shape).' - name: include_dormant in: query required: false schema: type: boolean description: 'Wave 40: the default view shows only merchants with a measurement inside the active window (LEGIT_ACTIVE_WINDOW_DAYS, default 7 days); pass ?include_dormant=true for the full view, with dormant entries flagged dormant=true.' default: false title: Include Dormant description: 'Wave 40: the default view shows only merchants with a measurement inside the active window (LEGIT_ACTIVE_WINDOW_DAYS, default 7 days); pass ?include_dormant=true for the full view, with dormant entries flagged dormant=true.' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Leaderboard' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: [] tags: - Leaderboard components: schemas: LeaderboardEntry: properties: rank: type: integer title: Rank rank_global: anyOf: - type: integer - type: 'null' title: Rank Global address: type: string title: Address name: anyOf: - type: string - type: 'null' title: Name display_name: anyOf: - type: string - type: 'null' title: Display Name score: type: number title: Score grade: type: string title: Grade latency_p50_ms: type: number title: Latency P50 Ms uptime_pct: type: number title: Uptime Pct sample_size: type: integer title: Sample Size network: type: string title: Network source: type: string title: Source default: goplausible settle_count: type: integer title: Settle Count default: 0 verify_count: type: integer title: Verify Count default: 0 adoption: type: number title: Adoption default: 0.0 payments_observed: type: boolean title: Payments Observed default: false provisional: type: boolean title: Provisional default: false explorer_url: anyOf: - type: string - type: 'null' title: Explorer Url external_calls_30d: anyOf: - type: integer - type: 'null' title: External Calls 30D external_payers_30d: anyOf: - type: integer - type: 'null' title: External Payers 30D external_demand_source: anyOf: - type: string - type: 'null' title: External Demand Source intel_avg_ticket: anyOf: - type: number - type: 'null' title: Intel Avg Ticket intel_verifies: anyOf: - type: integer - type: 'null' title: Intel Verifies intel_first_seen: anyOf: - type: integer - type: 'null' title: Intel First Seen intel_last_seen: anyOf: - type: integer - type: 'null' title: Intel Last Seen intel_source: anyOf: - type: string - type: 'null' title: Intel Source domain: anyOf: - type: string - type: 'null' title: Domain logo_url: anyOf: - type: string - type: 'null' title: Logo Url settles_7d: anyOf: - type: integer - type: 'null' title: Settles 7D volume_7d: anyOf: - type: number - type: 'null' title: Volume 7D demo: type: boolean title: Demo default: false dormant: type: boolean title: Dormant default: false type: object required: - rank - address - score - grade - latency_p50_ms - uptime_pct - sample_size - network title: LeaderboardEntry Leaderboard: properties: generated_at: type: string title: Generated At entries: items: $ref: '#/components/schemas/LeaderboardEntry' type: array title: Entries networks: items: type: string type: array title: Networks demo: type: boolean title: Demo default: false type: object required: - generated_at - entries title: Leaderboard ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type type: object required: - loc - msg - type title: ValidationError HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError