AINumbers.co Uniswap API

The uniswap API from AINumbers.co — 2 operation(s) for uniswap.

Operations 2

POST /v1/tools/reconcile_v4_hook_permissions V4 Hook Permission Reconciler #
POST /v1/tools/check_v4_hook_fee_conformance V4 Hook Fee Conformance #

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/ainumbers-co:ainumbers-co-uniswap-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

ainumbers-co-uniswap-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: AINumbers.co Fintech Intelligence Suite Uniswap API
  version: 1.0.0
  description: '**1255 fintech intelligence tools** covering ISO 20022, A2A payments, CFPB §1033, EU AI Act, DORA, MiCA, AML/KYC, BaaS, DLT/tokenization, ESG/climate finance, agentic payments (AP2, ACP, x402, Visa TAP, Mastercard Agent Pay), PQC migration, sanctions screening, and OpenChainGraph v0.4 computation chains.


    ## Transport


    > **The live transport is MCP JSON-RPC 2.0 at `https://mcp.ainumbers.co/mcp` — not REST.**

    >

    > This OpenAPI file is a **descriptive data-room artifact** — a machine-readable index of all tools and their input/output schemas. The REST paths (`POST /v1/tools/{name}`) described here are a projection; they become functional only if the optional REST shim (Area 2 Path B) is deployed.

    >

    > To call tools today, connect via the official MCP client SDKs. TypeScript: `@modelcontextprotocol/sdk`. Python: `mcp`.


    ## Architecture


    All tools run **entirely client-side** (browser JavaScript). Zero PII. Zero server calls after page load. Deterministic, reproducible outputs. Licensed CC BY 4.0.


    OpenChainGraph v0.4 compute-binding nodes additionally run **server-side on the MCP Worker** and emit verifiable artifacts with `execution_hash` (WebCrypto SHA-256 over RFC 8785 canonical JSON).'
  contact:
    name: Post Oak Labs
    url: https://postoaklabs.com
    email: tim@postoaklabs.com
  license:
    name: CC BY 4.0
    url: https://creativecommons.org/licenses/by/4.0/
servers:
- url: https://ainumbers.co
  description: Static browser-based tool host (DreamHost). Tools run client-side — no REST gateway is active on this origin. See x-mcp for the live MCP endpoint.
tags:
- name: uniswap
paths:
  /v1/tools/reconcile_v4_hook_permissions:
    post:
      operationId: reconcile_v4_hook_permissions
      summary: V4 Hook Permission Reconciler
      description: 'Decodes a Uniswap v4 hook address''s 14 permission bits against a caller-declared callback set, replicates v4-core''s isValidHookAddress rule (including the dynamic-fee escape), and reconciles a hooklist dynamicFee declaration with the pool fee.


        **Tool URL:** https://ainumbers.co/chaingraph/art-708-v4-hook-permission-reconciler.html

        **AP2/Policy Mandate export:** yes'
      tags:
      - uniswap
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - hook_address
              - declared_permissions
              properties:
                hook_address:
                  type: string
                  description: 0x-prefixed 40-hex-digit Uniswap v4 hook address; checksum not required, normalised to lowercase. Its low 14 bits are the permission bitmap.
                declared_permissions:
                  type: object
                  description: All 14 callback booleans, required, never defaulted; a missing key is refused. A Uniswap hooklist entry { hook, flags, properties } also accepted.
                  properties:
                    beforeInitialize:
                      type: boolean
                    afterInitialize:
                      type: boolean
                    beforeAddLiquidity:
                      type: boolean
                    afterAddLiquidity:
                      type: boolean
                    beforeRemoveLiquidity:
                      type: boolean
                    afterRemoveLiquidity:
                      type: boolean
                    beforeSwap:
                      type: boolean
                    afterSwap:
                      type: boolean
                    beforeDonate:
                      type: boolean
                    afterDonate:
                      type: boolean
                    beforeSwapReturnDelta:
                      type: boolean
                    afterSwapReturnDelta:
                      type: boolean
                    afterAddLiquidityReturnDelta:
                      type: boolean
                    afterRemoveLiquidityReturnDelta:
                      type: boolean
                pool_fee:
                  type: integer
                  description: Optional uint24 pool fee; the fee is dynamic iff pool_fee & 0x800000 (8388608).
                declaration_source:
                  type: string
                  description: Optional free text naming where the declaration comes from, e.g. a registry entry or notice item; emitted unchanged in the output.
      responses:
        '200':
          description: Successful tool execution result
          content:
            application/json:
              schema:
                type: object
                properties:
                  hook_address:
                    type: string
                  decoded_bits:
                    type: string
                  flags:
                    type: array
                    items:
                      type: object
                      properties:
                        flag:
                          type: string
                        bit:
                          type: integer
                        declared:
                          type: boolean
                        actual:
                          type: boolean
                        status:
                          type: string
                          enum:
                          - MATCH
                          - DECLARED_NOT_SET
                          - SET_NOT_DECLARED
                  mismatches:
                    type: array
                    items:
                      type: object
                  mismatch_count:
                    type: integer
                  valid_hook_address:
                    type:
                    - boolean
                    - 'null'
                  failing_rule:
                    type:
                    - string
                    - 'null'
                  pool_fee:
                    type:
                    - integer
                    - 'null'
                  v4_core_commit:
                    type: string
                  declaration_source:
                    type:
                    - string
                    - 'null'
                  dynamic_fee_declaration:
                    type:
                    - object
                    - 'null'
                  assumptions:
                    type: array
                    items:
                      type: string
                  error:
                    type: string
                  detail:
                    type: string
                  domain_errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        text:
                          type: string
      x-mcp-tool-name: reconcile_v4_hook_permissions
      x-tool-url: https://ainumbers.co/chaingraph/art-708-v4-hook-permission-reconciler.html
      x-source: manifest
      x-ap2-export: true
  /v1/tools/check_v4_hook_fee_conformance:
    post:
      operationId: check_v4_hook_fee_conformance
      summary: V4 Hook Fee Conformance
      description: 'Recomputes a Uniswap v4 pool’s per-swap fee from v4-core’s own rules at pinned a7cf038cd568801a79a9b4cf92cd5b52c95c8585 (calculateSwapFee composition), validates the packed protocol fee and LP-fee bounds, decodes the 0x400000 override, and checks each emitted fee: CONFORMS, OUT_OF_BOUNDS, FEE_MISMATCH, or INDETERMINATE. Accrues the declared hook charge in integer arithmetic with remainders reported; LP revenue reported separately, never netted. Evidence only; zero network.


        **Tool URL:** https://ainumbers.co/chaingraph/art-709-v4-hook-fee-conformance.html

        **AP2/Policy Mandate export:** yes'
      tags:
      - uniswap
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - protocol_fee
              - pool_fee
              - declared_lp_fee_bounds
              - declared_hook_charge
              - swaps
              properties:
                protocol_fee:
                  type: integer
                  description: 'uint24, both directions packed as v4 stores it: low 12 bits zeroForOne, bits 12-23 oneForZero; each direction <= 1000 pips (isValidProtocolFee).'
                pool_fee:
                  type: integer
                  description: 'uint24: static LP fee in pips, or 0x800000 (8388608) for a dynamic-fee pool.'
                declared_lp_fee_bounds:
                  type: object
                  description: '{ min_pips, max_pips }: the LP-fee band the declared story permits (0..1000000).'
                declared_total_fee_cap_pips:
                  type: integer
                  description: Optional total cap in pips; the composed swap fee plus the hook-charge rate is checked against it.
                declared_hook_charge:
                  type: object
                  description: '{ rate_pips, splits: [{ recipient_label, share_bps }] }: the separately declared hook charge; shares reported as declared, never coerced.'
                swaps:
                  type: array
                  description: 'Each swap: { index, zero_for_one, amount_in, emitted_fee_pips, lp_fee_override? (raw uint24 incl. the 0x400000 flag), exact_out? }.'
      responses:
        '200':
          description: Successful tool execution result
          content:
            application/json:
              schema:
                type: object
                properties:
                  assumptions:
                    type: array
                    items:
                      type: string
                  counts:
                    type: object
                    properties:
                      conforms:
                        type: number
                      fee_mismatch:
                        type: number
                      indeterminate:
                        type: number
                      out_of_bounds:
                        type: number
                      swaps:
                        type: number
                    required:
                    - conforms
                    - fee_mismatch
                    - indeterminate
                    - out_of_bounds
                    - swaps
                    additionalProperties: false
                  declared_hook_charge:
                    type: object
                    properties:
                      rate_pips:
                        type: number
                      splits:
                        type: array
                        items:
                          type: object
                          properties:
                            recipient_label:
                              type: string
                              enum:
                              - lp_side_pool
                              - treasury
                            share_bps:
                              type: number
                          required:
                          - recipient_label
                          - share_bps
                          additionalProperties: false
                    required:
                    - rate_pips
                    - splits
                    additionalProperties: false
                  declared_lp_fee_bounds:
                    type: object
                    properties:
                      max_pips:
                        type: number
                      min_pips:
                        type: number
                    required:
                    - max_pips
                    - min_pips
                    additionalProperties: false
                  declared_total_fee_cap_pips:
                    type:
                    - 'null'
                    - number
                  detail:
                    type: string
                  domain_errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                          - HOOK_CHARGE_SPLITS_INVALID
                          - LP_FEE_BOUNDS_INVALID
                          - SWAPS_INVALID
                        text:
                          type: string
                      required:
                      - code
                      - text
                      additionalProperties: false
                  error:
                    type: string
                    enum:
                    - hook_charge_splits_invalid
                    - lp_fee_bounds_invalid
                    - swaps_invalid
                  fee_story_explained:
                    type: boolean
                    enum:
                    - false
                    - true
                  per_swap:
                    type: array
                    items:
                      type: object
                      properties:
                        amount_in:
                          type: number
                        cap_check:
                          type:
                          - 'null'
                          - object
                        emitted_fee_pips:
                          type: number
                        hook_charge_amount:
                          type: number
                        hook_charge_per_recipient:
                          type: object
                          properties:
                            lp_side_pool:
                              type: object
                              properties:
                                amount:
                                  type: number
                                remainder:
                                  type: number
                              required:
                              - amount
                              - remainder
                              additionalProperties: false
                            treasury:
                              type: object
                              properties:
                                amount:
                                  type: number
                                remainder:
                                  type: number
                              required:
                              - amount
                              - remainder
                              additionalProperties: false
                          required: []
                          additionalProperties: false
                        hook_charge_remainder:
                          type: number
                        indeterminate_reason:
                          type:
                          - 'null'
                          - string
                        index:
                          type: number
                        lp_fee_pips:
                          type:
                          - number
                          - 'null'
                        lp_fee_source:
                          type:
                          - string
                          - 'null'
                          enum:
                          - override
                          - pool_static
                          - null
                        lp_fee_within_declared_bounds:
                          type:
                          - boolean
                          - 'null'
                          enum:
                          - false
                          - true
                          - null
                        lp_revenue_amount:
                          type: number
                        protocol_fee_direction_pips:
                          type: number
                        protocol_revenue_amount:
                          type: number
                        status:
                          type: string
                          enum:
                          - CONFORMS
                          - FEE_MISMATCH
                          - INDETERMINATE
                          - OUT_OF_BOUNDS
                        swap_fee_pips:
                          type:
                          - number
                          - 'null'
                        zero_for_one:
                          type: boolean
                          enum:
                          - false
                          - true
                      required:
                      - amount_in
                      - cap_check
                      - emitted_fee_pips
                      - hook_charge_amount
                      - hook_charge_per_recipient
                      - hook_charge_remainder
                      - indeterminate_reason
                      - index
                      - lp_fee_pips
                      - lp_fee_source
                      - lp_fee_within_declared_bounds
                      - lp_revenue_amount
                      - protocol_fee_direction_pips
                      - protocol_revenue_amount
                      - status
                      - swap_fee_pips
                      - zero_for_one
                      additionalProperties: false
                  pool_fee:
                    type: number
                  pool_fee_is_dynamic:
                    type: boolean
                    enum:
                    - false
                    - true
                  protocol_fee:
                    type: number
                  protocol_fee_one_for_zero_pips:
                    type: number
                  protocol_fee_valid:
                    type:
                    - boolean
                    - 'null'
                  protocol_fee_zero_for_one_pips:
                    type: number
                  splits_ok:
                    type: boolean
                    enum:
                    - false
                    - true
                  splits_sum_bps:
                    type: number
                  total_cap_ok:
                    type:
                    - 'null'
                    - boolean
                  totals:
                    type:
                    - object
                    - 'null'
                  v4_core_commit:
                    type: string
                required:
                - assumptions
                - per_swap
                - protocol_fee_valid
                - totals
                - v4_core_commit
                additionalProperties: false
      x-mcp-tool-name: check_v4_hook_fee_conformance
      x-tool-url: https://ainumbers.co/chaingraph/art-709-v4-hook-fee-conformance.html
      x-source: manifest
      x-ap2-export: true
x-mcp:
  transport: MCP JSON-RPC 2.0 (streamable HTTP)
  endpoint: https://mcp.ainumbers.co/mcp
  protocol_version: '2025-11-25'
  authentication: none
  registry: co.ainumbers/tools (official MCP registry)
  note: Connect any MCP-compatible client (Claude, ChatGPT, custom agent) directly to this endpoint. The REST paths in this file are descriptive only — they do not exist on the live server unless the REST shim is deployed.