anchor-x402 Ledger API

The Ledger API from anchor-x402 — 3 operation(s) for ledger.

Operations 5

POST /v1/ledger/summary Summarize a wallet's ledger into accounting totals #
GET /v1/ledger/summary Summarize a wallet's ledger into accounting totals #
POST /v1/ledger/report Create a full accounting report job for a wallet ledger #
GET /v1/ledger/report Create a full accounting report job for a wallet ledger #
GET /v1/ledger/report/{job_id} Check a ledger report job and fetch the finished report #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/anchor-x402-ledger-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

anchor-x402-ledger-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: anchor-x402 Ledger API
  description: 18 pay-per-call x402 services for AI agents — on-chain anchoring & attestation, wallet/address security screening, Web3 data (tx & calldata decode, ENS, token prices), x402 spend accounting, content analysis, and verifiable randomness. No API keys or accounts; settle per request in USDC on Base or Solana. $0.001–$1.77 per call.
  version: 0.3.0
  x-guidance: Pay-per-call x402 services for AI agents — no API keys or accounts. Each paid route returns HTTP 402 with x402 payment requirements; pay in USDC on Base or Solana (select routes also settle JPYC on Polygon) and retry with the payment header. Prices are $0.001–$1.77 per call. POST routes take a JSON body per each operation's requestBody schema.
  contact:
    email: hypeprinter007@gmail.com
  x-logo:
    url: https://api.anchor-x402.com/icon.png
    altText: anchor-x402
tags:
- name: Ledger
paths:
  /v1/ledger/summary:
    post:
      summary: Summarize a wallet's ledger into accounting totals
      description: Categorized x402 spend for a wallet, computed at request time.
      operationId: ledger_summary_v1_ledger_summary_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LedgerSummaryRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Ledger Summary V1 Ledger Summary Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '402':
          description: Payment Required
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '0.010000'
        protocols:
        - x402: {}
      tags:
      - Ledger
    get:
      summary: Summarize a wallet's ledger into accounting totals
      operationId: ledger_summary_get_v1_ledger_summary_get
      parameters:
      - name: wallet
        in: query
        required: true
        schema:
          type: string
          title: Wallet
      - name: from
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: From
      - name: to
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: To
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Ledger Summary Get V1 Ledger Summary Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '402':
          description: Payment Required
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '0.010000'
        protocols:
        - x402: {}
      tags:
      - Ledger
  /v1/ledger/report:
    post:
      summary: Create a full accounting report job for a wallet ledger
      description: 'Accept payment, record job, async-dispatch the report build to this

        same Lambda (self-invoke — see the ledger_job branch in handler()).'
      operationId: ledger_report_dispatch_v1_ledger_report_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LedgerReportRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LedgerReportAccepted'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '402':
          description: Payment Required
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '0.350000'
        protocols:
        - x402: {}
      tags:
      - Ledger
    get:
      summary: Create a full accounting report job for a wallet ledger
      operationId: ledger_report_dispatch_get_v1_ledger_report_get
      parameters:
      - name: wallet
        in: query
        required: true
        schema:
          type: string
          title: Wallet
      - name: from
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: From
      - name: to
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: To
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LedgerReportAccepted'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '402':
          description: Payment Required
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '0.350000'
        protocols:
        - x402: {}
      tags:
      - Ledger
  /v1/ledger/report/{job_id}:
    get:
      summary: Check a ledger report job and fetch the finished report
      description: Poll endpoint — free, no x402 (deliberately omitted from x402_routes).
      operationId: ledger_report_status_v1_ledger_report__job_id__get
      parameters:
      - name: job_id
        in: path
        required: true
        schema:
          type: string
          title: Job Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LedgerReportStatus'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security: []
      tags:
      - Ledger
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    LedgerReportAccepted:
      properties:
        job_id:
          type: string
          title: Job Id
          description: Unique job id; poll /v1/ledger/report/{job_id}.
        status:
          type: string
          const: accepted
          title: Status
          default: accepted
        status_url:
          type: string
          title: Status Url
          description: Absolute URL to poll for completion.
        eta_seconds:
          type: integer
          title: Eta Seconds
          description: Approximate wait until DELIVERED.
          default: 120
      type: object
      required:
      - job_id
      - status_url
      title: LedgerReportAccepted
    LedgerReportStatus:
      properties:
        job_id:
          type: string
          title: Job Id
        status:
          type: string
          title: Status
          description: DISPATCHING | IN_PROGRESS | DELIVERED | FAILED | UNKNOWN
        deliverable:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Deliverable
          description: 'On DELIVERED: report URLs, sha256, eip191 signature, dual-chain anchor txs.'
        eta_seconds:
          anyOf:
          - type: integer
          - type: 'null'
          title: Eta Seconds
        error:
          anyOf:
          - type: string
          - type: 'null'
          title: Error
        refund_tx:
          anyOf:
          - type: string
          - type: 'null'
          title: Refund Tx
        refund_pending:
          anyOf:
          - type: string
          - type: 'null'
          title: Refund Pending
      type: object
      required:
      - job_id
      - status
      title: LedgerReportStatus
    LedgerReportRequest:
      properties:
        wallet:
          type: string
          title: Wallet
          description: EVM address (Base) whose x402 spend to reconstruct.
        from:
          anyOf:
          - type: string
          - type: 'null'
          title: From
          description: 'ISO date or datetime, start of range. Default: 30 days before `to`.'
        to:
          anyOf:
          - type: string
          - type: 'null'
          title: To
          description: 'ISO date or datetime, end of range. Default: now.'
        direction:
          type: string
          enum:
          - outbound
          - inbound
          - both
          title: Direction
          description: outbound = spend, inbound = revenue.
          default: outbound
        min_amount:
          anyOf:
          - type: string
          - type: number
          - type: 'null'
          title: Min Amount
          description: Minimum USDC per transfer, e.g. 0.001.
        group_by:
          type: string
          enum:
          - service
          - recipient
          - day
          title: Group By
          default: service
        include_unfiltered:
          type: boolean
          title: Include Unfiltered
          description: Include non-x402 USDC transfers as category=other_transfer.
          default: false
        format:
          type: string
          enum:
          - markdown
          - csv
          - both
          title: Format
          description: Which report files to produce. Default both.
          default: both
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
          description: Report title; appears in the markdown header.
        prepared_for:
          anyOf:
          - type: string
          - type: 'null'
          title: Prepared For
          description: Optional client name for the report header.
      type: object
      required:
      - wallet
      title: LedgerReportRequest
    LedgerSummaryRequest:
      properties:
        wallet:
          type: string
          title: Wallet
          description: EVM address (Base) whose x402 spend to reconstruct.
        from:
          anyOf:
          - type: string
          - type: 'null'
          title: From
          description: 'ISO date or datetime, start of range. Default: 30 days before `to`.'
        to:
          anyOf:
          - type: string
          - type: 'null'
          title: To
          description: 'ISO date or datetime, end of range. Default: now.'
        direction:
          type: string
          enum:
          - outbound
          - inbound
          - both
          title: Direction
          description: outbound = spend, inbound = revenue.
          default: outbound
        min_amount:
          anyOf:
          - type: string
          - type: number
          - type: 'null'
          title: Min Amount
          description: Minimum USDC per transfer, e.g. 0.001.
        group_by:
          type: string
          enum:
          - service
          - recipient
          - day
          title: Group By
          default: service
        include_unfiltered:
          type: boolean
          title: Include Unfiltered
          description: Include non-x402 USDC transfers as category=other_transfer.
          default: false
      type: object
      required:
      - wallet
      title: LedgerSummaryRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError