{
  "components": {
    "schemas": {
      "AddressCode": {
        "description": "What an address's code says about who controls it.",
        "enum": [
          "contract",
          "safe_multisig",
          "delegated_wallet"
        ],
        "type": "string"
      },
      "AddressContractOut": {
        "description": "An address that is a contract, with its `contract` object.",
        "properties": {
          "address": {
            "type": "string"
          },
          "contract": {
            "$ref": "#/components/schemas/ContractOut"
          }
        },
        "required": [
          "address",
          "contract"
        ],
        "type": "object"
      },
      "AddressLabelOut": {
        "description": "An address's label as firms see it: whose wallet it is, nothing about\nwhere Cactonus learnt it.",
        "properties": {
          "entity_id": {
            "format": "int64",
            "type": "integer"
          },
          "entity_kind": {
            "description": "exchange, bridge, payment_processor, otc_desk, custodian, other_service,\ncfd_broker, dex, aggregator, lending, multisig, contract or token.",
            "type": "string"
          },
          "entity_logo_url": {
            "description": "The entity's logo (a token's or a CFD broker's), a 64×64 `image/webp` served by Cactonus;\nnull when it has none.",
            "example": "/v1/labels/entities/812/logo?v=3f2a9c0d1e4b5a6c7d8e9f01",
            "type": [
              "string",
              "null"
            ]
          },
          "entity_name": {
            "example": "Binance",
            "type": "string"
          },
          "role": {
            "description": "hot_wallet, cold_wallet, reserve_wallet, custody_wallet, deposit_address,\nwithdrawal_wallet, contract or service.",
            "example": "hot_wallet",
            "type": "string"
          }
        },
        "required": [
          "entity_id",
          "entity_name",
          "entity_kind",
          "role"
        ],
        "type": "object"
      },
      "AlertPayload": {
        "properties": {
          "chain": {
            "$ref": "#/components/schemas/ChainPayload"
          },
          "freeze": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FreezePayload",
                "description": "Set for `alert.freeze`."
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "reasons": {
            "description": "Why it fired, as the alert history says it.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "risk_check": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RiskCheckPayload",
                "description": "The automatic risk check of the counterparty, when the rule has one."
              },
              {
                "type": "null"
              }
            ]
          },
          "rule": {
            "$ref": "#/components/schemas/RulePayload"
          },
          "severity": {
            "description": "`info`, `warning` or `critical`.",
            "type": "string"
          },
          "token": {
            "$ref": "#/components/schemas/TokenPayload"
          },
          "transfer": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TransferPayload",
                "description": "Set for `alert.transfer`."
              },
              {
                "type": "null"
              }
            ]
          },
          "url": {
            "description": "The alert in Cactonus.",
            "type": [
              "string",
              "null"
            ]
          },
          "watch": {
            "$ref": "#/components/schemas/WatchPayload"
          }
        },
        "required": [
          "id",
          "severity",
          "reasons",
          "rule",
          "watch",
          "chain",
          "token"
        ],
        "type": "object"
      },
      "ApiKey": {
        "description": "One of your API keys. The secret itself is shown only when it is created.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "expires_at": {
            "description": "`null`: the key works until it is revoked. A key past this time is\nrefused but stays listed until revoked.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "example": 42,
            "format": "int64",
            "type": "integer"
          },
          "last_used_at": {
            "description": "When the key was last used, accurate to about a minute; `null` if never.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "example": "Claude agent",
            "type": "string"
          },
          "prefix": {
            "description": "`ck_` and the first eight hex digits of the secret, to tell keys\napart; `null` for keys issued before 23 November 2026.",
            "example": "ck_1a2b3c4d",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "created_at"
        ],
        "type": "object"
      },
      "ApiKeyList": {
        "properties": {
          "items": {
            "description": "Your keys that are not revoked, newest first; at most 25.",
            "items": {
              "$ref": "#/components/schemas/ApiKey"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "AssociationInput": {
        "additionalProperties": false,
        "properties": {
          "chain": {
            "description": "CAIP-2 chain. Searches all registered tokens on this chain.",
            "example": "eip155:1",
            "type": "string"
          },
          "from": {
            "description": "Inclusive UTC start.",
            "example": "2026-11-10T21:51:00Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "hops": {
            "default": 1,
            "format": "int32",
            "maximum": 3,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "source": {
            "description": "Starting wallet. Direction is source -> target; swap to check the reverse.",
            "example": "0x643d634544a1dde9f5bc8ae3e1ddfb8e1637951b",
            "type": "string"
          },
          "target": {
            "example": "0xf9307ad6cf0406a241d79e661d07044445194a7a",
            "type": "string"
          },
          "to": {
            "description": "Inclusive UTC end.",
            "example": "2026-11-10T21:51:11Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "chain",
          "source",
          "target"
        ],
        "type": "object"
      },
      "AssociationResponse": {
        "properties": {
          "association": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SearchMatch",
                "description": "One shortest discovered chronological, same-token path from source to target.\nNull with no_match or inconclusive. Does not enumerate all possible paths."
              },
              {
                "type": "null"
              }
            ]
          },
          "chain": {
            "type": "string"
          },
          "complete": {
            "type": "boolean"
          },
          "coverage": {
            "items": {
              "$ref": "#/components/schemas/Coverage"
            },
            "type": "array"
          },
          "hops": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "outcome": {
            "$ref": "#/components/schemas/Outcome"
          },
          "reasons": {
            "items": {
              "$ref": "#/components/schemas/IncompleteReason"
            },
            "type": "array"
          },
          "shortest_path_proven": {
            "type": "boolean"
          },
          "source": {
            "type": "string"
          },
          "stopped_at_infrastructure": {
            "description": "Exchange and protocol wallets the search did not walk through.",
            "minimum": 0,
            "type": "integer"
          },
          "target": {
            "type": "string"
          },
          "window": {
            "$ref": "#/components/schemas/Window"
          }
        },
        "required": [
          "chain",
          "source",
          "target",
          "hops",
          "window",
          "outcome",
          "complete",
          "reasons",
          "shortest_path_proven",
          "coverage",
          "stopped_at_infrastructure"
        ],
        "type": "object"
      },
      "Balance": {
        "properties": {
          "amount": {
            "description": "Null means unavailable, never an inferred zero.",
            "type": [
              "string",
              "null"
            ]
          },
          "checked_at": {
            "format": "date-time",
            "type": "string"
          },
          "decimals": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "symbol": {
            "type": [
              "string",
              "null"
            ]
          },
          "token": {
            "type": "string"
          },
          "token_id": {
            "format": "int64",
            "type": "integer"
          },
          "wallet": {
            "type": "string"
          }
        },
        "required": [
          "wallet",
          "token_id",
          "token",
          "checked_at"
        ],
        "type": "object"
      },
      "BalancesInput": {
        "additionalProperties": false,
        "properties": {
          "chain": {
            "example": "eip155:1",
            "type": "string"
          },
          "token_ids": {
            "example": [
              1
            ],
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "wallets": {
            "example": [
              "0xf9307ad6cf0406a241d79e661d07044445194a7a"
            ],
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "chain",
          "wallets",
          "token_ids"
        ],
        "type": "object"
      },
      "BlacklistEntry": {
        "properties": {
          "address": {
            "type": "string"
          },
          "category": {
            "example": "scam",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "severity": {
            "example": "high",
            "type": "string"
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "address",
          "category",
          "severity",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "BlacklistMutation": {
        "properties": {
          "added": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "removed": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "total": {
            "description": "Total entries across all chains for this user's firm.",
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "added",
          "removed",
          "total"
        ],
        "type": "object"
      },
      "BlacklistPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/BlacklistEntry"
            },
            "type": "array"
          },
          "next_after": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "CatalogPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TokenCatalogEntry"
            },
            "type": "array"
          },
          "next_after": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "ChainCheck": {
        "properties": {
          "address": {
            "description": "The checked address in this chain's native format.",
            "type": "string"
          },
          "chain": {
            "example": "eip155:1",
            "type": "string"
          },
          "chain_name": {
            "example": "Ethereum mainnet",
            "type": "string"
          },
          "complete": {
            "description": "Whether indexed history covers the whole window and the search finished.",
            "type": "boolean"
          },
          "contract": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ContractOut",
                "description": "Present when the checked address is a contract or a delegated wallet\nwhose code was known when the check ran."
              },
              {
                "type": "null"
              }
            ]
          },
          "coverage": {
            "items": {
              "$ref": "#/components/schemas/Coverage"
            },
            "type": "array"
          },
          "covered_to": {
            "description": "The check covers transfers up to this time: the newest second every\ntoken had indexed, at most `window.to`. Null when the search did not run.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "indexing_behind_seconds": {
            "description": "How many seconds indexing trailed the finalized head, when more than a\nfew minutes (5 by default); null within that.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "label": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AddressLabelOut",
                "description": "The checked address's label: whose wallet it is."
              },
              {
                "type": "null"
              }
            ]
          },
          "lifted_flags": {
            "description": "Flags that held once and were lifted (a freeze the issuer undid).\nShown beside the verdict; never changes it.",
            "items": {
              "$ref": "#/components/schemas/RiskFlagOut"
            },
            "type": "array"
          },
          "listed": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BlacklistEntry",
                "description": "The checked address's own entry on the firm's risk list."
              },
              {
                "type": "null"
              }
            ]
          },
          "matches": {
            "items": {
              "$ref": "#/components/schemas/CheckMatch"
            },
            "type": "array"
          },
          "matches_found": {
            "description": "Total listed wallets found. The verdict weighs all of them; `matches`\nshows at most 100, the most severe entry first, then the fewest hops.",
            "minimum": 0,
            "type": "integer"
          },
          "message": {
            "description": "What `status` means for this network, in words, such as \"History\nbefore 13 Nov 2025 is still loading for BNB Smart Chain. Try again\nlater.\"; on a completed check, how far behind indexing was when that\nis worth saying. Null otherwise.",
            "type": [
              "string",
              "null"
            ]
          },
          "path_contracts": {
            "description": "The other addresses on `matches` paths (listed wallets and hops) that\nare contracts, as known when the check ran.",
            "items": {
              "$ref": "#/components/schemas/AddressContractOut"
            },
            "type": "array"
          },
          "reasons": {
            "description": "Why the result is incomplete or not completed, such as\n`missing_history`, `still_indexing`, `still_catching_up`,\n`search_busy` or `token_not_searched`.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "risk_flags": {
            "description": "Sanctioned or frozen. Shown beside the verdict; never changes it.",
            "items": {
              "$ref": "#/components/schemas/RiskFlagOut"
            },
            "type": "array"
          },
          "searched": {
            "description": "Whether the check completed (`status` is `completed`): the search\nfinished over every token's whole history, indexed at most an hour\n(by default) behind the finalized head. Only a completed check can be\nclear.",
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/CheckStatus",
            "description": "Whether the check completed, and if not, why: history still loading,\nindexing catching up, or a search or read that failed. A check that\ndid not complete is inconclusive unless what could be read already\ngives review or blocked, and an inconclusive one is not charged."
          },
          "stopped_at_infrastructure": {
            "description": "Exchange and protocol wallets (by their labels) the search\nreached and did not walk through. A caveat, not a gap: a transfer from\na listed one still counts; paths through them are not followed.",
            "minimum": 0,
            "type": "integer"
          },
          "verdict": {
            "$ref": "#/components/schemas/Verdict"
          },
          "window": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Window"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "chain",
          "chain_name",
          "address",
          "verdict",
          "matches",
          "matches_found",
          "complete",
          "searched",
          "status",
          "reasons",
          "coverage",
          "stopped_at_infrastructure",
          "risk_flags",
          "lifted_flags"
        ],
        "type": "object"
      },
      "ChainPayload": {
        "properties": {
          "id": {
            "description": "CAIP-2.",
            "example": "tron:728126428",
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": "object"
      },
      "CheckInput": {
        "additionalProperties": false,
        "properties": {
          "addresses": {
            "description": "1–10 EVM (0x…) or Tron (T…) addresses. Each is checked on every indexed\nnetwork that accepts its format.",
            "example": [
              "0xf9307ad6cf0406a241d79e661d07044445194a7a"
            ],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "hops": {
            "default": 1,
            "description": "How many transfers away a risk-list wallet may be.",
            "format": "int32",
            "maximum": 3,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "addresses"
        ],
        "type": "object"
      },
      "CheckMatch": {
        "description": "A risk-list wallet with a path of incoming transfers into the checked address.",
        "properties": {
          "entry": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BlacklistEntry",
                "description": "The firm's entry for the wallet; null if it was removed during the check."
              },
              {
                "type": "null"
              }
            ]
          },
          "hops": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "token": {
            "type": "string"
          },
          "transfers": {
            "description": "Ordered transfers from the listed wallet to the checked address.",
            "items": {
              "$ref": "#/components/schemas/TransferEvidence"
            },
            "type": "array"
          },
          "wallet": {
            "type": "string"
          }
        },
        "required": [
          "wallet",
          "hops",
          "token",
          "transfers"
        ],
        "type": "object"
      },
      "CheckPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CheckSummary"
            },
            "type": "array"
          },
          "next_before": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "CheckResult": {
        "properties": {
          "addresses": {
            "items": {
              "$ref": "#/components/schemas/CheckedAddress"
            },
            "type": "array"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "hops": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "id": {
            "example": "8d0f6c9e-6a53-4a43-b1d3-5b0c7f0a8f11",
            "type": "string"
          },
          "verdict": {
            "$ref": "#/components/schemas/Verdict"
          }
        },
        "required": [
          "id",
          "created_at",
          "hops",
          "verdict",
          "addresses"
        ],
        "type": "object"
      },
      "CheckStatus": {
        "description": "Whether a check on one network completed. Every status but `completed`\nis Cactonus's own state, never the data's: an inconclusive check is\nrefunded and can be run again.",
        "enum": [
          "completed",
          "still_indexing",
          "still_catching_up",
          "failed"
        ],
        "type": "string"
      },
      "CheckSummary": {
        "properties": {
          "addresses": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "hops": {
            "format": "int32",
            "type": "integer"
          },
          "id": {
            "example": "8d0f6c9e-6a53-4a43-b1d3-5b0c7f0a8f11",
            "type": "string"
          },
          "mine": {
            "description": "Whether the signed-in user ran this check and may delete it.",
            "type": "boolean"
          },
          "verdict": {
            "example": "review",
            "type": "string"
          }
        },
        "required": [
          "id",
          "created_at",
          "verdict",
          "hops",
          "addresses",
          "mine"
        ],
        "type": "object"
      },
      "CheckedAddress": {
        "properties": {
          "chains": {
            "description": "One entry per indexed network whose address format matches.",
            "items": {
              "$ref": "#/components/schemas/ChainCheck"
            },
            "type": "array"
          },
          "input": {
            "description": "The address as entered.",
            "type": "string"
          },
          "not_covered": {
            "description": "Set when no indexed network accepts this address format.",
            "type": "boolean"
          },
          "verdict": {
            "$ref": "#/components/schemas/Verdict"
          }
        },
        "required": [
          "input",
          "verdict",
          "chains",
          "not_covered"
        ],
        "type": "object"
      },
      "Cleared": {
        "properties": {
          "deleted": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "deleted"
        ],
        "type": "object"
      },
      "CodeTypeOut": {
        "description": "A known code, from Cactonus's code library.",
        "properties": {
          "category": {
            "description": "dex, aggregator, bridge, lending, multisig, contract or contract_type.",
            "type": "string"
          },
          "name": {
            "example": "Safe",
            "type": "string"
          },
          "source": {
            "description": "Where the code was published: the project's docs or repository.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "category",
          "source"
        ],
        "type": "object"
      },
      "Connection": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ConnectionCounts"
          },
          {
            "properties": {
              "address_a": {
                "description": "Canonical endpoint ordering: address_a < address_b, independent of transfer direction.",
                "type": "string"
              },
              "address_b": {
                "type": "string"
              },
              "first_activity": {
                "format": "date-time",
                "type": "string"
              },
              "last_activity": {
                "format": "date-time",
                "type": "string"
              },
              "tokens": {
                "items": {
                  "$ref": "#/components/schemas/ConnectionToken"
                },
                "type": "array"
              }
            },
            "required": [
              "address_a",
              "address_b",
              "tokens",
              "first_activity",
              "last_activity"
            ],
            "type": "object"
          }
        ]
      },
      "ConnectionCounts": {
        "properties": {
          "a_to_b_transaction_count": {
            "format": "int64",
            "type": "integer"
          },
          "b_to_a_transaction_count": {
            "format": "int64",
            "type": "integer"
          },
          "transaction_count": {
            "description": "Distinct transaction hashes across both directions and all applicable tokens.",
            "format": "int64",
            "type": "integer"
          },
          "transfer_count": {
            "description": "Positive ERC-20 Transfer events, which can exceed the distinct transaction count.",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "transaction_count",
          "a_to_b_transaction_count",
          "b_to_a_transaction_count",
          "transfer_count"
        ],
        "type": "object"
      },
      "ConnectionCoverage": {
        "properties": {
          "chain": {
            "type": "string"
          },
          "complete": {
            "description": "Indexed-history completeness, independently of pagination. False means counts and\namounts may be lower bounds, and isolated wallets may have unindexed connections.",
            "type": "boolean"
          },
          "coverage": {
            "items": {
              "$ref": "#/components/schemas/Coverage"
            },
            "type": "array"
          },
          "reasons": {
            "items": {
              "$ref": "#/components/schemas/IncompleteReason"
            },
            "type": "array"
          },
          "window": {
            "$ref": "#/components/schemas/Window"
          }
        },
        "required": [
          "chain",
          "window",
          "complete",
          "reasons",
          "coverage"
        ],
        "type": "object"
      },
      "ConnectionToken": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ConnectionCounts"
          },
          {
            "properties": {
              "a_to_b_amount": {
                "description": "Exact smallest-unit integer string. No USD conversion or cross-token addition.",
                "type": "string"
              },
              "b_to_a_amount": {
                "type": "string"
              },
              "decimals": {
                "format": "int32",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "symbol": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "token": {
                "type": "string"
              },
              "token_id": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "token_id",
              "token",
              "a_to_b_amount",
              "b_to_a_amount"
            ],
            "type": "object"
          }
        ]
      },
      "ConnectionTransaction": {
        "properties": {
          "block_number": {
            "format": "int64",
            "type": "integer"
          },
          "timestamp": {
            "format": "date-time",
            "type": "string"
          },
          "transaction_hash": {
            "type": "string"
          },
          "transaction_index": {
            "format": "int32",
            "type": "integer"
          },
          "transfers": {
            "description": "Only the positive transfers between the two requested wallets, across indexed tokens.",
            "items": {
              "$ref": "#/components/schemas/ConnectionTransfer"
            },
            "type": "array"
          }
        },
        "required": [
          "transaction_hash",
          "block_number",
          "transaction_index",
          "timestamp",
          "transfers"
        ],
        "type": "object"
      },
      "ConnectionTransactionsResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ConnectionCoverage"
          },
          {
            "properties": {
              "address_a": {
                "type": "string"
              },
              "address_b": {
                "type": "string"
              },
              "next_after": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "transactions": {
                "items": {
                  "$ref": "#/components/schemas/ConnectionTransaction"
                },
                "type": "array"
              }
            },
            "required": [
              "address_a",
              "address_b",
              "transactions"
            ],
            "type": "object"
          }
        ]
      },
      "ConnectionTransfer": {
        "properties": {
          "amount": {
            "type": "string"
          },
          "decimals": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "event_index": {
            "format": "int32",
            "type": "integer"
          },
          "from": {
            "type": "string"
          },
          "symbol": {
            "type": [
              "string",
              "null"
            ]
          },
          "to": {
            "type": "string"
          },
          "token": {
            "type": "string"
          },
          "token_id": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "token_id",
          "token",
          "from",
          "to",
          "amount",
          "event_index"
        ],
        "type": "object"
      },
      "ConnectionsResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ConnectionCoverage"
          },
          {
            "properties": {
              "blacklisted_wallets": {
                "description": "Blacklisted endpoints on this page, from the authenticated user's blacklist only.\nNull outside blacklist mode; input wallets can also be blacklisted.",
                "items": {
                  "type": "string"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "connections": {
                "items": {
                  "$ref": "#/components/schemas/Connection"
                },
                "type": "array"
              },
              "contracts": {
                "description": "The wallets and counterparties on this page that are contracts or\ndelegated wallets, as far as their code is known.",
                "items": {
                  "$ref": "#/components/schemas/AddressContractOut"
                },
                "type": "array"
              },
              "next_after": {
                "description": "Live keyset continuation. Repeat the same request with after=next_after.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "risk_listed": {
                "description": "The firm's risk-list entry for each of `blacklisted_wallets`, in the same order.\nNull outside blacklist mode.",
                "items": {
                  "$ref": "#/components/schemas/RiskListedWallet"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "snapshot": {
                "description": "Frozen ranked wallet/group query for continuation and details; expires after five minutes.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "topology": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/GroupTopology",
                    "description": "Present only for group queries. Subject to the response's history completeness."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "wallets": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "required": [
              "wallets",
              "connections"
            ],
            "type": "object"
          }
        ]
      },
      "ContractKindOut": {
        "description": "What an address is, for a hover that explains it.",
        "enum": [
          "contract",
          "delegated_wallet"
        ],
        "type": "string"
      },
      "ContractOut": {
        "description": "A contract or delegated wallet: what its code is and who runs it.",
        "properties": {
          "code": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CodeTypeOut",
                "description": "What the code is, when it matches a known code; null when unknown.\nA match proves the type of contract, never who deployed it."
              },
              {
                "type": "null"
              }
            ]
          },
          "delegate": {
            "description": "The contract a delegated wallet runs; null for a contract.",
            "type": [
              "string",
              "null"
            ]
          },
          "implementation": {
            "description": "The contract a proxy forwards to; null when it is not a proxy.",
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "$ref": "#/components/schemas/ContractKindOut"
          },
          "looks_like": {
            "description": "What the code looks like from its bytes (with a proxy's\nimplementation's): erc20, erc721, erc1155, erc1967_proxy (upgradeable),\neip1167_clone, ownable, pausable or safe_multisig. A hint, never a\nlabel: anyone can write code that looks like this. Empty when nothing\nstandard shows or the code was read before these were recorded.",
            "example": [
              "erc20",
              "erc1967_proxy",
              "ownable"
            ],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "owner": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ContractOwnerOut",
                "description": "Who runs it, from labels; null when unknown."
              },
              {
                "type": "null"
              }
            ]
          },
          "same_code": {
            "description": "Other addresses on this chain seen running the same code (a proxy's:\nits implementation's).",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "kind",
          "same_code",
          "looks_like"
        ],
        "type": "object"
      },
      "ContractOwnerOut": {
        "description": "Who runs a contract, from its label.",
        "properties": {
          "name": {
            "example": "Coinbase",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "Coverage": {
        "properties": {
          "available_from": {
            "format": "date-time",
            "type": "string"
          },
          "available_to": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "complete": {
            "type": "boolean"
          },
          "end_inclusive": {
            "type": "boolean"
          },
          "ranges": {
            "items": {
              "$ref": "#/components/schemas/IndexedRange"
            },
            "type": "array"
          },
          "since_creation": {
            "description": "History starts at or before the contract's creation, so no transfer\nprecedes `available_from`: a window starting earlier is still covered.",
            "type": "boolean"
          },
          "start_inclusive": {
            "type": "boolean"
          },
          "token": {
            "type": "string"
          },
          "verified": {
            "type": "boolean"
          }
        },
        "required": [
          "ranges",
          "token",
          "available_from",
          "start_inclusive",
          "end_inclusive",
          "since_creation",
          "complete",
          "verified"
        ],
        "type": "object"
      },
      "CurrentUser": {
        "properties": {
          "avatar_url": {
            "description": "Your picture, 256×256 WebP; `null` when you have none.",
            "example": "/v1/users/1/avatar?v=3f2a9c0d1e4b5a6c7d8e9f01",
            "type": [
              "string",
              "null"
            ]
          },
          "date_format": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DateFormat",
                "description": "How you want dates written; `null` means the browser's."
              },
              {
                "type": "null"
              }
            ]
          },
          "email": {
            "type": "string"
          },
          "firm_id": {
            "format": "int64",
            "type": "integer"
          },
          "firm_name": {
            "type": "string"
          },
          "firm_role": {
            "$ref": "#/components/schemas/FirmRole",
            "description": "Your role inside your firm."
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "description": "`admin` for Cactonus staff, otherwise `user`.",
            "type": "string"
          },
          "time_zone": {
            "description": "Your IANA time zone; `null` means the browser's.",
            "example": "Europe/Athens",
            "type": [
              "string",
              "null"
            ]
          },
          "two_factor_enabled": {
            "type": "boolean"
          },
          "two_factor_required_by_firm": {
            "description": "Your firm requires two-factor sign-in. Until you turn it on, every\nroute except `/v1/me` and `/v1/me/2fa/*` answers 403\n`two_factor_required_by_firm`.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "email",
          "name",
          "role",
          "firm_role",
          "firm_id",
          "firm_name",
          "two_factor_enabled",
          "two_factor_required_by_firm"
        ],
        "type": "object"
      },
      "DateFormat": {
        "description": "How the web app writes dates.",
        "enum": [
          "dmy",
          "mdy",
          "ymd"
        ],
        "type": "string"
      },
      "ErrorResponse": {
        "properties": {
          "code": {
            "example": "invalid_credentials",
            "type": "string"
          },
          "message": {
            "example": "Credentials or session are invalid or expired",
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "EventType": {
        "description": "What a webhook announces.",
        "enum": [
          "alert.transfer",
          "alert.freeze",
          "webhook.test"
        ],
        "type": "string"
      },
      "Evidence": {
        "description": "One piece of evidence behind a link.",
        "properties": {
          "entity_logo_url": {
            "description": "The exchange's logo; null when it has none.",
            "type": [
              "string",
              "null"
            ]
          },
          "entity_name": {
            "description": "same_deposit_address: the exchange the deposit address belongs to.",
            "type": [
              "string",
              "null"
            ]
          },
          "transfers": {
            "description": "The transfers that make up the evidence.",
            "items": {
              "$ref": "#/components/schemas/EvidenceTransfers"
            },
            "type": "array"
          },
          "type": {
            "$ref": "#/components/schemas/EvidenceType"
          },
          "via": {
            "description": "The address the evidence went through (the deposit address, first\nfunder, cash-out wallet or pass-through destination); null for\ndirect_transfer.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "type",
          "transfers"
        ],
        "type": "object"
      },
      "EvidenceTransfers": {
        "description": "USDT moved one way between two addresses within the search window. Open\nthe transfers with `GET /v1/connections/transactions?address_a=from&address_b=to`.",
        "properties": {
          "amount": {
            "description": "The exact amount in raw token units, as a decimal string (ADR 0001);\ndivide by 10^`decimals` for whole USDT. Null in a search cached\nbefore exact amounts were kept.",
            "example": "1250000000",
            "type": [
              "string",
              "null"
            ]
          },
          "count": {
            "description": "Transfers seen; a wallet with more than 5,000 transfers each way is\nread only in part.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "decimals": {
            "description": "The token's decimals, the scale of `amount`.",
            "example": 6,
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "usdt": {
            "deprecated": true,
            "description": "Whole USDT, rounded. Deprecated: use `amount` and `decimals`.",
            "format": "double",
            "type": "number"
          }
        },
        "required": [
          "from",
          "to",
          "count",
          "usdt"
        ],
        "type": "object"
      },
      "EvidenceType": {
        "description": "One kind of evidence that two wallets share an owner.",
        "enum": [
          "same_deposit_address",
          "same_first_funder",
          "same_cash_out",
          "direct_transfer",
          "pass_through"
        ],
        "type": "string"
      },
      "Features": {
        "additionalProperties": false,
        "description": "Which features are on.",
        "properties": {
          "api_access": {
            "type": "boolean"
          },
          "clustering": {
            "type": "boolean"
          },
          "connections": {
            "type": "boolean"
          },
          "contract_check": {
            "type": "boolean"
          },
          "graph_export": {
            "type": "boolean"
          },
          "labels": {
            "type": "boolean"
          },
          "risk_check": {
            "type": "boolean"
          },
          "wallet_explore": {
            "type": "boolean"
          }
        },
        "required": [
          "risk_check",
          "wallet_explore",
          "connections",
          "graph_export",
          "clustering",
          "labels",
          "api_access",
          "contract_check"
        ],
        "type": "object"
      },
      "FirmLimits": {
        "description": "The limits a firm admin sees: every limit but credits, which customers\nnever see.",
        "properties": {
          "api_keys": {
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "checks_per_month": {
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "max_hops": {
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "risk_list_entries": {
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "seats": {
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "watched_wallets": {
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "FirmOverview": {
        "description": "The caller's firm, as `GET /v1/firm` shows it.",
        "properties": {
          "entitlements": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FirmTerms",
                "description": "What the plan, with the firm's overrides, allows. Shown to firm admins\nand Cactonus staff; `null` for members."
              },
              {
                "type": "null"
              }
            ]
          },
          "firm_role": {
            "$ref": "#/components/schemas/FirmRole",
            "description": "The caller's own role in this firm."
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "logo_url": {
            "description": "The firm's logo, 256×256 WebP; `null` when it has none.",
            "type": [
              "string",
              "null"
            ]
          },
          "member_count": {
            "description": "Enabled members, firm admins included.",
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "plan": {
            "$ref": "#/components/schemas/PlanRef"
          },
          "require_two_factor": {
            "description": "Members must turn on two-factor sign-in (API keys and Cactonus staff\nare exempt).",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "firm_role",
          "member_count",
          "plan",
          "require_two_factor"
        ],
        "type": "object"
      },
      "FirmPayload": {
        "properties": {
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": "object"
      },
      "FirmRole": {
        "description": "A person's role inside their own firm. Cactonus staff is a separate, global\nrole ([`crate::identity::StaffRole`]).",
        "enum": [
          "admin",
          "member"
        ],
        "type": "string"
      },
      "FirmTerms": {
        "description": "What a firm admin sees of the firm's effective plan.",
        "properties": {
          "features": {
            "$ref": "#/components/schemas/Features"
          },
          "limits": {
            "$ref": "#/components/schemas/FirmLimits"
          }
        },
        "required": [
          "features",
          "limits"
        ],
        "type": "object"
      },
      "FreezePayload": {
        "properties": {
          "block": {
            "format": "int64",
            "type": "integer"
          },
          "block_time": {
            "format": "date-time",
            "type": "string"
          },
          "change": {
            "description": "`frozen` or `unfrozen`.",
            "type": "string"
          },
          "log_index": {
            "format": "int64",
            "type": "integer"
          },
          "tx_hash": {
            "type": "string"
          }
        },
        "required": [
          "change",
          "tx_hash",
          "block",
          "log_index",
          "block_time"
        ],
        "type": "object"
      },
      "FreezeTransactionOut": {
        "description": "The on-chain transaction behind a freeze.",
        "properties": {
          "at": {
            "description": "When the block was produced.",
            "format": "date-time",
            "type": "string"
          },
          "block": {
            "example": 21904512,
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "hash": {
            "description": "The transaction hash, `0x` and 64 hexadecimal digits on every chain.",
            "example": "0x5f0e7c3d2a1b4c6d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d",
            "type": "string"
          }
        },
        "required": [
          "hash",
          "block",
          "at"
        ],
        "type": "object"
      },
      "GroupInput": {
        "additionalProperties": false,
        "properties": {
          "after": {
            "description": "next_after from the previous page; repeat the same wallets and time bounds.",
            "type": [
              "string",
              "null"
            ]
          },
          "chain": {
            "example": "eip155:1",
            "type": "string"
          },
          "from": {
            "description": "Inclusive UTC bounds. Omit to use indexed history.",
            "example": "2026-11-10T21:51:00Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "limit": {
            "default": 50,
            "format": "int32",
            "maximum": 100,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "to": {
            "example": "2026-11-10T21:51:11Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "wallets": {
            "description": "1–50 input addresses (group mode requires at least two distinct addresses).\nNormalized and deduplicated before querying. No saved group is created.",
            "example": [
              "0x643d634544a1dde9f5bc8ae3e1ddfb8e1637951b",
              "0xf9307ad6cf0406a241d79e661d07044445194a7a"
            ],
            "items": {
              "type": "string"
            },
            "maxItems": 50,
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "chain",
          "wallets"
        ],
        "type": "object"
      },
      "GroupTopology": {
        "properties": {
          "clusters": {
            "description": "Groups of at least two wallets joined by direct transfers, ignoring edge direction. Includes all observed\ngroup edges, not only the current page. A group is not an additional transfer path.",
            "items": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "type": "array"
          },
          "isolated_wallets": {
            "description": "Submitted wallets with no observed direct edge to another submitted wallet.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "clusters",
          "isolated_wallets"
        ],
        "type": "object"
      },
      "HubReason": {
        "enum": [
          "label",
          "counterparties",
          "volume",
          "contract"
        ],
        "type": "string"
      },
      "IncompleteReason": {
        "enum": [
          "no_tokens",
          "missing_head",
          "stale_head",
          "missing_history",
          "deadline",
          "candidate_limit",
          "frontier_limit",
          "memory_limit",
          "unverified_history",
          "recent_only"
        ],
        "type": "string"
      },
      "IndexedRange": {
        "properties": {
          "end_block": {
            "description": "Exclusive block boundary.",
            "format": "int64",
            "type": "integer"
          },
          "end_inclusive": {
            "type": "boolean"
          },
          "end_timestamp": {
            "format": "date-time",
            "type": "string"
          },
          "start_block": {
            "format": "int64",
            "type": "integer"
          },
          "start_inclusive": {
            "type": "boolean"
          },
          "start_timestamp": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "start_block",
          "end_block",
          "start_timestamp",
          "end_timestamp",
          "start_inclusive",
          "end_inclusive"
        ],
        "type": "object"
      },
      "LabelPayload": {
        "properties": {
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "kind"
        ],
        "type": "object"
      },
      "LeftOutService": {
        "description": "A service the searched wallets used, left out because using the same\nservice says nothing about who owns a wallet: exchanges and other\nlabelled services, unlabelled wallets with very many counterparties or\nvolume, and contracts (DEX pools, routers, tokens). Safes and delegated\nwallets are people's wallets and never left out.",
        "properties": {
          "address": {
            "type": "string"
          },
          "amount": {
            "description": "volume: the exact USDT moved in raw token units, as a decimal string\n(ADR 0001). Null otherwise, or in a search cached before exact\namounts were kept.",
            "type": [
              "string",
              "null"
            ]
          },
          "counterparties": {
            "description": "counterparties: the distinct counterparties that caught it.",
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "decimals": {
            "description": "The token's decimals, the scale of `amount`.",
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "entity_kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "entity_logo_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "entity_name": {
            "description": "The service's name; null for an unlabelled service or a contract.",
            "type": [
              "string",
              "null"
            ]
          },
          "reason": {
            "$ref": "#/components/schemas/HubReason",
            "description": "label (a named service), counterparties or volume (an unlabelled\nservice), or contract."
          },
          "used_by": {
            "description": "The searched wallets that used it: \"used by N of M\" is\n`used_by.len()` of `wallet_count`.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "value": {
            "deprecated": true,
            "description": "counterparties: distinct counterparties; volume: USDT moved, rounded.\nDeprecated: use `counterparties`, or `amount` and `decimals`.",
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "address",
          "reason",
          "used_by"
        ],
        "type": "object"
      },
      "LinkedGroup": {
        "description": "Wallets linked to each other, directly or through other members.",
        "properties": {
          "id": {
            "description": "g1, g2… by size, largest first; stable within one response only.",
            "type": "string"
          },
          "links": {
            "description": "Every linked pair within the group.",
            "items": {
              "$ref": "#/components/schemas/LinkedPair"
            },
            "type": "array"
          },
          "wallets": {
            "items": {
              "$ref": "#/components/schemas/LinkedWallet"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "wallets",
          "links"
        ],
        "type": "object"
      },
      "LinkedInput": {
        "additionalProperties": false,
        "properties": {
          "chain": {
            "example": "eip155:1",
            "type": "string"
          },
          "wallets": {
            "description": "2–50 wallets on the chain. EVM addresses are matched\ncase-insensitively; duplicates are removed.",
            "example": [
              "0x643d634544a1dde9f5bc8ae3e1ddfb8e1637951b",
              "0xf9307ad6cf0406a241d79e661d07044445194a7a"
            ],
            "items": {
              "type": "string"
            },
            "maxItems": 50,
            "minItems": 2,
            "type": "array"
          }
        },
        "required": [
          "chain",
          "wallets"
        ],
        "type": "object"
      },
      "LinkedLabel": {
        "description": "What a wallet's label says: whose wallet it is.",
        "properties": {
          "entity_kind": {
            "description": "As `entity_kind` of `/v1/labels/resolve`.",
            "type": [
              "string",
              "null"
            ]
          },
          "entity_logo_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "entity_name": {
            "type": "string"
          }
        },
        "required": [
          "entity_name"
        ],
        "type": "object"
      },
      "LinkedPair": {
        "description": "Two wallets probably controlled by the same person or group.",
        "properties": {
          "a": {
            "type": "string"
          },
          "b": {
            "type": "string"
          },
          "evidence": {
            "items": {
              "$ref": "#/components/schemas/Evidence"
            },
            "type": "array"
          }
        },
        "required": [
          "a",
          "b",
          "evidence"
        ],
        "type": "object"
      },
      "LinkedResponse": {
        "properties": {
          "cached": {
            "description": "True when answered from the same search in the last 24 hours (not charged).",
            "type": "boolean"
          },
          "chain": {
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "fetched_at": {
            "format": "date-time",
            "type": "string"
          },
          "groups": {
            "description": "Groups of two or more linked wallets, largest first.",
            "items": {
              "$ref": "#/components/schemas/LinkedGroup"
            },
            "type": "array"
          },
          "left_out": {
            "description": "Services the wallets used, left out of the evidence, most used first.",
            "items": {
              "$ref": "#/components/schemas/LeftOutService"
            },
            "type": "array"
          },
          "partial": {
            "description": "Some wallets or transfers were not read (limits, time); the groups\nfound so far are still returned.",
            "type": "boolean"
          },
          "partial_reasons": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "search_id": {
            "description": "The fetched neighbourhood, kept 24 hours.",
            "type": "string"
          },
          "unlinked": {
            "description": "Searched wallets linked to no other.",
            "items": {
              "$ref": "#/components/schemas/LinkedWallet"
            },
            "type": "array"
          },
          "wallet_count": {
            "description": "Distinct wallets searched (M in \"used by N of M\").",
            "minimum": 0,
            "type": "integer"
          },
          "warnings": {
            "description": "A searched wallet is a contract or looks like a service.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "search_id",
          "cached",
          "fetched_at",
          "expires_at",
          "chain",
          "wallet_count",
          "groups",
          "unlinked",
          "left_out",
          "partial",
          "partial_reasons",
          "warnings"
        ],
        "type": "object"
      },
      "LinkedWallet": {
        "description": "A searched wallet.",
        "properties": {
          "address": {
            "type": "string"
          },
          "code": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AddressCode",
                "description": "What its code says: contract (never linked), safe_multisig or\ndelegated_wallet (people's wallets, linked as any other); null for a\nplain wallet or code not read yet. Code proves the type, never the owner."
              },
              {
                "type": "null"
              }
            ]
          },
          "label": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LinkedLabel"
              },
              {
                "type": "null"
              }
            ]
          },
          "risk_listed": {
            "description": "On the firm's own risk list.",
            "type": "boolean"
          }
        },
        "required": [
          "address",
          "risk_listed"
        ],
        "type": "object"
      },
      "MutateBlacklist": {
        "additionalProperties": false,
        "properties": {
          "add": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "chain": {
            "description": "CAIP-2 ID, e.g. eip155:1.",
            "type": "string"
          },
          "details": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RiskDetailsInput",
                "description": "Details applied to every added address; existing entries are updated too."
              },
              {
                "type": "null"
              }
            ]
          },
          "remove": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "chain"
        ],
        "type": "object"
      },
      "Outcome": {
        "enum": [
          "matched",
          "no_match",
          "inconclusive"
        ],
        "type": "string"
      },
      "PlanRef": {
        "description": "A plan as a firm shows it.",
        "properties": {
          "key": {
            "example": "pilot",
            "type": "string"
          },
          "name": {
            "example": "Pilot",
            "type": "string"
          }
        },
        "required": [
          "key",
          "name"
        ],
        "type": "object"
      },
      "RankedGroupInput": {
        "additionalProperties": false,
        "properties": {
          "after": {
            "description": "next_after from the previous page; repeat the same wallets and time bounds.",
            "type": [
              "string",
              "null"
            ]
          },
          "chain": {
            "example": "eip155:1",
            "type": "string"
          },
          "from": {
            "description": "Inclusive UTC bounds. Omit to use indexed history.",
            "example": "2026-11-10T21:51:00Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "limit": {
            "default": 50,
            "format": "int32",
            "maximum": 100,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "sort_by": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/WalletSort",
                "description": "Global ranking; defaults to most transactions."
              },
              {
                "type": "null"
              }
            ]
          },
          "sort_order": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SortOrder"
              },
              {
                "type": "null"
              }
            ]
          },
          "to": {
            "example": "2026-11-10T21:51:11Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "token_id": {
            "description": "Required for total_amount; restricts results to this token.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "wallets": {
            "description": "2–50 distinct input wallets.\nNormalized and deduplicated before querying. No saved group is created.",
            "example": [
              "0x643d634544a1dde9f5bc8ae3e1ddfb8e1637951b",
              "0xf9307ad6cf0406a241d79e661d07044445194a7a"
            ],
            "items": {
              "type": "string"
            },
            "maxItems": 50,
            "minItems": 2,
            "type": "array"
          }
        },
        "required": [
          "chain",
          "wallets"
        ],
        "type": "object"
      },
      "ResolveBody": {
        "additionalProperties": false,
        "properties": {
          "addresses": {
            "description": "1 to 200 addresses; answered in the same order.",
            "example": [
              "0x28c6c06298d514db089934071355e5743bf21d60"
            ],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "chain": {
            "example": "eip155:1",
            "type": "string"
          }
        },
        "required": [
          "chain",
          "addresses"
        ],
        "type": "object"
      },
      "ResolvedAddressOut": {
        "description": "What a firm sees for one address.",
        "properties": {
          "address": {
            "type": "string"
          },
          "contract": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ContractOut",
                "description": "Present when the address is a contract or a delegated wallet. Left out\nwhile its code has not been read yet."
              },
              {
                "type": "null"
              }
            ]
          },
          "label": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AddressLabelOut"
              },
              {
                "type": "null"
              }
            ]
          },
          "lifted_flags": {
            "description": "Flags that held once and were lifted, such as a freeze the issuer\nundid (\"USDT frozen by Tether on 3 Mar 2025, unfrozen on 5 Apr 2025\").\nInformational, like `risk_flags`.",
            "items": {
              "$ref": "#/components/schemas/RiskFlagOut"
            },
            "type": "array"
          },
          "risk_flags": {
            "items": {
              "$ref": "#/components/schemas/RiskFlagOut"
            },
            "type": "array"
          }
        },
        "required": [
          "address",
          "risk_flags",
          "lifted_flags"
        ],
        "type": "object"
      },
      "ResolvedPage": {
        "properties": {
          "chain": {
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ResolvedAddressOut"
            },
            "type": "array"
          }
        },
        "required": [
          "chain",
          "items"
        ],
        "type": "object"
      },
      "RiskCategory": {
        "description": "Why an address is on a risk list.",
        "enum": [
          "sanctions",
          "scam",
          "hack",
          "mixer",
          "darknet",
          "ransomware",
          "fraud_report",
          "internal",
          "other"
        ],
        "type": "string"
      },
      "RiskCheckPayload": {
        "properties": {
          "check_id": {
            "description": "The saved check in Cactonus.",
            "type": [
              "string",
              "null"
            ]
          },
          "skipped": {
            "description": "`out_of_credits`, `daily_limit` or `not_in_plan` when skipped.",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "`ran` or `skipped`.",
            "type": "string"
          },
          "verdict": {
            "description": "`clear`, `review`, `blocked` or `inconclusive` when it ran.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "RiskDetailsInput": {
        "additionalProperties": false,
        "properties": {
          "category": {
            "$ref": "#/components/schemas/RiskCategory"
          },
          "label": {
            "description": "Short name shown wherever the address appears.",
            "example": "Fake exchange support",
            "type": [
              "string",
              "null"
            ]
          },
          "reason": {
            "description": "Why the address is listed.",
            "type": [
              "string",
              "null"
            ]
          },
          "severity": {
            "$ref": "#/components/schemas/Severity"
          },
          "source": {
            "description": "Where the information came from, such as a report link.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "RiskFlagOut": {
        "properties": {
          "flag": {
            "description": "sanctioned or frozen.",
            "type": "string"
          },
          "freeze_transaction": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FreezeTransactionOut",
                "description": "For a freeze: the issuer's transaction that froze the address (its\nlatest freeze), to verify on the chain's explorer. Left out for a\nsanction."
              },
              {
                "type": "null"
              }
            ]
          },
          "list_published_on": {
            "type": [
              "string",
              "null"
            ]
          },
          "listed_since": {
            "description": "First seen by Cactonus.",
            "example": "2026-11-22",
            "type": "string"
          },
          "removed_on": {
            "description": "When the flag was lifted (a freeze undone); `None` while it holds. Only\n`lifted_flags` carry one.",
            "example": "2025-04-05",
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "example": "ofac_sdn",
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "summary": {
            "example": "Sanctioned by OFAC (SDN list): GARANTEX EUROPE OU",
            "type": "string"
          }
        },
        "required": [
          "flag",
          "source",
          "subject",
          "summary",
          "listed_since"
        ],
        "type": "object"
      },
      "RiskListedWallet": {
        "description": "A connection endpoint on the firm's risk list, with how the firm names it.",
        "properties": {
          "address": {
            "type": "string"
          },
          "category": {
            "$ref": "#/components/schemas/RiskCategory"
          },
          "label": {
            "description": "The entry's label, such as an entity name; null when the firm gave none.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "address",
          "category"
        ],
        "type": "object"
      },
      "RulePayload": {
        "properties": {
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "description": "Its name when it fired.",
            "type": "string"
          },
          "trigger": {
            "description": "`incoming_transfer`, `outgoing_transfer` or `watched_wallet_frozen`.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "trigger"
        ],
        "type": "object"
      },
      "SearchInput": {
        "additionalProperties": false,
        "properties": {
          "address": {
            "description": "Wallet receiving transfers, in the selected chain’s native format.",
            "example": "0xf9307ad6cf0406a241d79e661d07044445194a7a",
            "type": "string"
          },
          "chain": {
            "description": "CAIP-2 chain identifier. All registered tokens on this chain are searched.",
            "example": "eip155:1",
            "type": "string"
          },
          "from": {
            "description": "Inclusive UTC start.",
            "example": "2026-11-10T21:51:00Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "hops": {
            "default": 1,
            "format": "int32",
            "maximum": 3,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "to": {
            "description": "Inclusive UTC end.",
            "example": "2026-11-10T21:51:11Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "chain",
          "address"
        ],
        "type": "object"
      },
      "SearchMatch": {
        "properties": {
          "hops": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "token": {
            "type": "string"
          },
          "transfers": {
            "items": {
              "$ref": "#/components/schemas/TransferEvidence"
            },
            "type": "array"
          },
          "wallet": {
            "type": "string"
          }
        },
        "required": [
          "wallet",
          "token",
          "hops",
          "transfers"
        ],
        "type": "object"
      },
      "SearchResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SearchSummary"
          },
          {
            "properties": {
              "matches": {
                "items": {
                  "$ref": "#/components/schemas/SearchMatch"
                },
                "type": "array"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "matches"
            ],
            "type": "object"
          }
        ]
      },
      "SearchSummary": {
        "properties": {
          "address": {
            "type": "string"
          },
          "candidates_examined": {
            "minimum": 0,
            "type": "integer"
          },
          "chain": {
            "type": "string"
          },
          "complete": {
            "type": "boolean"
          },
          "coverage": {
            "items": {
              "$ref": "#/components/schemas/Coverage"
            },
            "type": "array"
          },
          "hops": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "matches_found": {
            "minimum": 0,
            "type": "integer"
          },
          "outcome": {
            "$ref": "#/components/schemas/Outcome"
          },
          "reasons": {
            "items": {
              "$ref": "#/components/schemas/IncompleteReason"
            },
            "type": "array"
          },
          "shortest_paths_proven": {
            "description": "Shortest hop counts in the requested window are proven only with complete coverage.\nEqual-hop witness selection may be partial when enumeration is incomplete.",
            "type": "boolean"
          },
          "stopped_at_infrastructure": {
            "description": "Exchange and protocol wallets (verified or likely labels) a path reached\nand did not walk through. A transfer from one is still a match; paths\nthrough one are not followed, by design rather than as a gap.",
            "minimum": 0,
            "type": "integer"
          },
          "target_blacklisted": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "window": {
            "$ref": "#/components/schemas/Window"
          }
        },
        "required": [
          "chain",
          "address",
          "hops",
          "window",
          "outcome",
          "complete",
          "reasons",
          "shortest_paths_proven",
          "coverage",
          "matches_found",
          "candidates_examined",
          "stopped_at_infrastructure"
        ],
        "type": "object"
      },
      "SenderTokenTotal": {
        "properties": {
          "decimals": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "symbol": {
            "type": [
              "string",
              "null"
            ]
          },
          "token": {
            "type": "string"
          },
          "token_id": {
            "format": "int64",
            "type": "integer"
          },
          "total_received": {
            "description": "Exact sum in the token's smallest units. Never a float or a cross-token sum.",
            "example": "15000000",
            "type": "string"
          },
          "transfer_count": {
            "description": "Number of positive Transfer events, not distinct transactions.",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "token_id",
          "token",
          "transfer_count",
          "total_received"
        ],
        "type": "object"
      },
      "SenderTotal": {
        "properties": {
          "address": {
            "type": "string"
          },
          "tokens": {
            "items": {
              "$ref": "#/components/schemas/SenderTokenTotal"
            },
            "type": "array"
          }
        },
        "required": [
          "address",
          "tokens"
        ],
        "type": "object"
      },
      "SendersResponse": {
        "properties": {
          "address": {
            "type": "string"
          },
          "chain": {
            "type": "string"
          },
          "complete": {
            "description": "Whether indexed history covers the requested window, not whether this is the last page.",
            "type": "boolean"
          },
          "coverage": {
            "items": {
              "$ref": "#/components/schemas/Coverage"
            },
            "type": "array"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/SenderTotal"
            },
            "type": "array"
          },
          "next_after": {
            "description": "Pass as `after` with the same query parameters for the next page.\nEach page is a fresh database snapshot; indexing can change totals between requests.",
            "type": [
              "string",
              "null"
            ]
          },
          "reasons": {
            "items": {
              "$ref": "#/components/schemas/IncompleteReason"
            },
            "type": "array"
          },
          "window": {
            "$ref": "#/components/schemas/Window"
          }
        },
        "required": [
          "chain",
          "address",
          "window",
          "complete",
          "reasons",
          "coverage",
          "items"
        ],
        "type": "object"
      },
      "Severity": {
        "description": "How strongly a risk-list entry should affect a verdict. Ordered low to high.",
        "enum": [
          "low",
          "medium",
          "high"
        ],
        "type": "string"
      },
      "SortOrder": {
        "enum": [
          "asc",
          "desc"
        ],
        "type": "string"
      },
      "Terminal": {
        "description": "A wallet where tracing stops, and how to name it.",
        "properties": {
          "name": {
            "description": "How to show it: the service's name, \"<Exchange> deposit\", or the\ncontract code's name; null when unknown.",
            "example": "Binance deposit",
            "type": [
              "string",
              "null"
            ]
          },
          "reason": {
            "$ref": "#/components/schemas/TerminalReason"
          }
        },
        "required": [
          "reason"
        ],
        "type": "object"
      },
      "TerminalReason": {
        "description": "Why the web app offers no further expansion through a wallet.",
        "enum": [
          "service",
          "deposit",
          "contract"
        ],
        "type": "string"
      },
      "TokenCatalogEntry": {
        "properties": {
          "address": {
            "type": "string"
          },
          "chain": {
            "type": "string"
          },
          "decimals": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "symbol": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "chain",
          "address"
        ],
        "type": "object"
      },
      "TokenPayload": {
        "properties": {
          "address": {
            "type": "string"
          },
          "decimals": {
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "symbol": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "address"
        ],
        "type": "object"
      },
      "TraceCounterparty": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TraceWallet"
          },
          {
            "properties": {
              "first_activity": {
                "format": "date-time",
                "type": "string"
              },
              "last_activity": {
                "format": "date-time",
                "type": "string"
              },
              "rank": {
                "description": "Its best place among the tokens' rankings, from 1: the page takes turns\nbetween tokens, each token's biggest first.",
                "format": "int64",
                "type": "integer"
              },
              "tokens": {
                "description": "One entry per token moved, by token ID.",
                "items": {
                  "$ref": "#/components/schemas/TraceTokenTotal"
                },
                "type": "array"
              }
            },
            "required": [
              "rank",
              "first_activity",
              "last_activity",
              "tokens"
            ],
            "type": "object"
          }
        ],
        "description": "One counterparty of an expanded wallet."
      },
      "TraceDirection": {
        "description": "Which way the money is followed from an expanded wallet.",
        "enum": [
          "out",
          "in"
        ],
        "type": "string"
      },
      "TraceExpansion": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TraceWallet"
          },
          {
            "$ref": "#/components/schemas/ConnectionCoverage"
          },
          {
            "properties": {
              "counterparties": {
                "description": "Ranked: each token's biggest counterparty first, taking turns between tokens.",
                "items": {
                  "$ref": "#/components/schemas/TraceCounterparty"
                },
                "type": "array"
              },
              "expanded": {
                "description": "False when the request's deadline ran out before this wallet was\nread: `reasons` holds `deadline`; expand it again.",
                "type": "boolean"
              },
              "next_after": {
                "description": "Pass as `after`, with this address alone and the same other fields, for more.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "snapshot": {
                "description": "Frozen five minutes for `after` and for\n`GET /v1/connections/transactions?snapshot=…`; null when nothing was read.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "expanded",
              "counterparties"
            ],
            "type": "object"
          }
        ],
        "description": "One expanded wallet and a page of its counterparties."
      },
      "TraceInput": {
        "additionalProperties": false,
        "properties": {
          "addresses": {
            "description": "1–10 wallets on the chain to expand; duplicates count once. With\n`after`, the one wallet whose expansion continues.",
            "example": [
              "0xf9307ad6cf0406a241d79e661d07044445194a7a"
            ],
            "items": {
              "type": "string"
            },
            "maxItems": 10,
            "minItems": 1,
            "type": "array"
          },
          "after": {
            "description": "An expansion's `next_after`, with its wallet alone in `addresses` and\nthe same direction and token. Its window stays the first page's.",
            "type": [
              "string",
              "null"
            ]
          },
          "chain": {
            "example": "eip155:1",
            "type": "string"
          },
          "direction": {
            "$ref": "#/components/schemas/TraceDirection",
            "description": "`out`: where the money went (recipients). `in`: where it came from (senders)."
          },
          "from": {
            "description": "Inclusive UTC bounds. Omit to use indexed history.",
            "example": "2026-11-01T00:00:00Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "limit": {
            "default": 20,
            "description": "Counterparties per wallet.",
            "format": "int32",
            "maximum": 50,
            "minimum": 1,
            "type": [
              "integer",
              "null"
            ]
          },
          "to": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "token_id": {
            "description": "Only this indexed token.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "chain",
          "addresses",
          "direction"
        ],
        "type": "object"
      },
      "TraceResponse": {
        "properties": {
          "chain": {
            "type": "string"
          },
          "complete": {
            "description": "Every expansion was read and covers indexed history.",
            "type": "boolean"
          },
          "direction": {
            "$ref": "#/components/schemas/TraceDirection"
          },
          "expansions": {
            "description": "One per distinct address, in the order given.",
            "items": {
              "$ref": "#/components/schemas/TraceExpansion"
            },
            "type": "array"
          }
        },
        "required": [
          "chain",
          "direction",
          "complete",
          "expansions"
        ],
        "type": "object"
      },
      "TraceRiskEntry": {
        "description": "The firm's risk-list entry for a wallet.",
        "properties": {
          "category": {
            "$ref": "#/components/schemas/RiskCategory"
          },
          "label": {
            "description": "The entry's label; null when the firm gave none.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "category"
        ],
        "type": "object"
      },
      "TraceTokenTotal": {
        "description": "What the expanded wallet moved with one counterparty in one token.",
        "properties": {
          "amount": {
            "description": "Exact smallest-unit integer in the direction traced. No USD\nconversion or cross-token addition.",
            "type": "string"
          },
          "decimals": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "first_activity": {
            "format": "date-time",
            "type": "string"
          },
          "last_activity": {
            "format": "date-time",
            "type": "string"
          },
          "rank": {
            "description": "The counterparty's place in this token's ranking by amount, from 1.",
            "format": "int64",
            "type": "integer"
          },
          "symbol": {
            "type": [
              "string",
              "null"
            ]
          },
          "token": {
            "type": "string"
          },
          "token_id": {
            "format": "int64",
            "type": "integer"
          },
          "transaction_count": {
            "description": "Distinct transactions holding them.",
            "format": "int64",
            "type": "integer"
          },
          "transfer_count": {
            "description": "Positive Transfer events.",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "token_id",
          "token",
          "rank",
          "amount",
          "transfer_count",
          "transaction_count",
          "first_activity",
          "last_activity"
        ],
        "type": "object"
      },
      "TraceWallet": {
        "description": "A wallet as the trace draws it: who it is, as far as the firm can see.",
        "properties": {
          "address": {
            "type": "string"
          },
          "contract": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ContractOut",
                "description": "Present when the address is a contract or a delegated wallet and its\ncode was read. Code proves the type of contract, never its owner."
              },
              {
                "type": "null"
              }
            ]
          },
          "label": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AddressLabelOut",
                "description": "The address's label: whose wallet it is."
              },
              {
                "type": "null"
              }
            ]
          },
          "risk_listed": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TraceRiskEntry",
                "description": "The firm's risk-list entry; null when it is not listed."
              },
              {
                "type": "null"
              }
            ]
          },
          "terminal": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Terminal",
                "description": "Null when the web app may expand it further."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "address"
        ],
        "type": "object"
      },
      "TransferEvidence": {
        "properties": {
          "amount": {
            "type": "string"
          },
          "block_number": {
            "format": "int64",
            "type": "integer"
          },
          "event_index": {
            "format": "int32",
            "type": "integer"
          },
          "from": {
            "type": "string"
          },
          "timestamp": {
            "format": "date-time",
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "transaction_hash": {
            "type": "string"
          },
          "transaction_index": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "from",
          "to",
          "amount",
          "transaction_hash",
          "block_number",
          "transaction_index",
          "event_index",
          "timestamp"
        ],
        "type": "object"
      },
      "TransferPayload": {
        "properties": {
          "amount": {
            "description": "Base units, exact.",
            "example": "1250500000",
            "type": "string"
          },
          "amount_decimal": {
            "description": "Whole tokens, exact; null when the token's decimals are unknown.",
            "example": "1250.5",
            "type": [
              "string",
              "null"
            ]
          },
          "block": {
            "format": "int64",
            "type": "integer"
          },
          "block_time": {
            "format": "date-time",
            "type": "string"
          },
          "counterparty": {
            "description": "The other side: `from` of a deposit, `to` of a withdrawal.",
            "type": "string"
          },
          "counterparty_label": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LabelPayload",
                "description": "The firm's own or a verified Cactonus label of the counterparty."
              },
              {
                "type": "null"
              }
            ]
          },
          "direction": {
            "description": "`in` (the watched wallet received) or `out`.",
            "type": "string"
          },
          "from": {
            "type": "string"
          },
          "log_index": {
            "format": "int64",
            "type": "integer"
          },
          "to": {
            "type": "string"
          },
          "tx_hash": {
            "type": "string"
          }
        },
        "required": [
          "direction",
          "amount",
          "from",
          "to",
          "counterparty",
          "tx_hash",
          "block",
          "log_index",
          "block_time"
        ],
        "type": "object"
      },
      "UpdateEntry": {
        "allOf": [
          {
            "$ref": "#/components/schemas/RiskDetailsInput"
          },
          {
            "properties": {
              "address": {
                "type": "string"
              },
              "chain": {
                "description": "CAIP-2 ID, e.g. eip155:1.",
                "type": "string"
              }
            },
            "required": [
              "chain",
              "address"
            ],
            "type": "object"
          }
        ]
      },
      "Verdict": {
        "description": "Ordered from least to most severe; the overall verdict is the maximum.",
        "enum": [
          "clear",
          "inconclusive",
          "review",
          "blocked"
        ],
        "type": "string"
      },
      "WalletFeed": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ConnectionCoverage"
          },
          {
            "properties": {
              "next_after": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "transactions": {
                "items": {
                  "$ref": "#/components/schemas/ConnectionTransaction"
                },
                "type": "array"
              }
            },
            "required": [
              "transactions"
            ],
            "type": "object"
          }
        ]
      },
      "WalletSnapshot": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ConnectionCoverage"
          },
          {
            "properties": {
              "address": {
                "type": "string"
              },
              "contract": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ContractOut",
                    "description": "Present when the wallet is a contract or a delegated wallet."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "snapshot": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "address"
            ],
            "type": "object"
          }
        ]
      },
      "WalletSort": {
        "enum": [
          "transaction_count",
          "total_amount",
          "last_activity"
        ],
        "type": "string"
      },
      "WalletStats": {
        "properties": {
          "counterparty_count": {
            "format": "int64",
            "type": "integer"
          },
          "first_activity": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "last_activity": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "tokens": {
            "items": {
              "$ref": "#/components/schemas/WalletTokenTotal"
            },
            "type": "array"
          },
          "transaction_count": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "transaction_count",
          "counterparty_count",
          "tokens"
        ],
        "type": "object"
      },
      "WalletSummary": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ConnectionCoverage"
          },
          {
            "$ref": "#/components/schemas/WalletStats"
          },
          {
            "properties": {
              "address": {
                "type": "string"
              },
              "contract": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ContractOut",
                    "description": "Present when the wallet is a contract or a delegated wallet."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "snapshot": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "address"
            ],
            "type": "object"
          }
        ]
      },
      "WalletTokenTotal": {
        "properties": {
          "decimals": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "incoming_amount": {
            "type": "string"
          },
          "outgoing_amount": {
            "type": "string"
          },
          "symbol": {
            "type": [
              "string",
              "null"
            ]
          },
          "token": {
            "type": "string"
          },
          "token_id": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "token_id",
          "token",
          "incoming_amount",
          "outgoing_amount"
        ],
        "type": "object"
      },
      "WatchPayload": {
        "properties": {
          "address": {
            "description": "As the chain writes it: 0x… or T….",
            "type": "string"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "description": "The firm's name for the wallet.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "address"
        ],
        "type": "object"
      },
      "WebhookEvent": {
        "description": "One webhook request's body, version 1. The same `id` comes with every\nretry of one event (and in `Cactus-Event-Id`): receivers drop repeats by it.",
        "properties": {
          "alert": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AlertPayload",
                "description": "The alert; null for `webhook.test`."
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "description": "When the alert was raised (for a test, when it was sent).",
            "format": "date-time",
            "type": "string"
          },
          "firm": {
            "$ref": "#/components/schemas/FirmPayload"
          },
          "id": {
            "description": "`evt_…`, unique per event and destination, the same on every retry.",
            "example": "evt_4821",
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/EventType"
          },
          "version": {
            "description": "Always 1 in this format.",
            "example": 1,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "version",
          "id",
          "type",
          "created_at",
          "firm"
        ],
        "type": "object"
      },
      "Window": {
        "properties": {
          "from": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "to": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearer": {
        "bearerFormat": "ck_ API key",
        "description": "An API key from the Cactonus web app: `ck_` and 64 hex digits, sent as `Authorization: Bearer ck_…`. It acts as the person who created it.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Risk checks, wallet exploration, counterparty connections, linked wallets, trace, labels and your firm's risk list, over the USDT and USDC transfers Cactonus indexes, and signed webhooks for your deposit alerts.\n\n## Authentication\n\nCreate an API key in the Cactonus web app. A key starts with `ck_`, acts as you with your access, and works until you revoke it unless you gave it an end. Send it on every request:\n\n```\nAuthorization: Bearer ck_…\n```\n\nKeep keys in an environment variable or a secret store, never in code or prompts. A missing, malformed, revoked or expired key answers 401 `unauthorized`. Creating keys needs the web app; a key can list and revoke keys.\n\n## Errors\n\nEvery error is JSON with a stable, machine-readable `code` and a `message` for people, which may change:\n\n```json\n{\"code\": \"invalid_request\", \"message\": \"limit must be 1..=200\"}\n```\n\n| Status | Codes | What to do |\n| --- | --- | --- |\n| 400 | `invalid_request`, `unsupported_chain` | Fix the request; the message names the field. |\n| 401 | `unauthorized` | Check the key. |\n| 403 | `feature_not_in_plan`, `plan_limit_reached` | Your firm's plan does not allow this. |\n| 404 | `not_found` | Unknown or not yours. |\n| 410 | `search_expired` | A search result expired; search again. |\n| 413 | `invalid_request` | The body is over 128 KiB. |\n| 429 | `search_busy`, `balance_busy`, `auth_rate_limited` | Wait and retry (see below). |\n| 503 | `search_timeout`, `search_capacity` | The query is too large; narrow the dates. |\n| 503 | `search_unavailable`, `balance_timeout`, `balance_unavailable`, `service_unavailable` | Retry later. |\n\n## Rate limits\n\nThere is no fixed request quota per key. Searches, balances and linked-wallet searches share the service's capacity; when it is full the API answers 429 `search_busy` or `balance_busy`. Retry with backoff: wait 1 second, double each time, at most 30 seconds. A 429 with a `Retry-After` header says how many seconds to wait. Run requests one after another rather than many at once.\n\n## Pages\n\nLists return a cursor such as `next_after`, `next_before` or `next_cursor`; send it back as `after`, `before` or `cursor` for the next page. `null` means there are no more pages.\n\n## Chains and addresses\n\nChains are CAIP-2 IDs, such as `eip155:1` for Ethereum and `tron:728126428` for Tron. `GET /v1/tokens` lists the chains and tokens Cactonus indexes.\n\n## Webhooks\n\nA firm admin can send alerts to an HTTPS endpoint as well as to Telegram: in the web app, Alerts → Destinations → Add webhook. Cactonus POSTs each alert of the rules that send there as JSON (the `WebhookEvent` schema, `\"version\": 1`, under `webhooks` in this document), one request per alert, as soon as it is raised.\n\nWhen you add the webhook, Cactonus shows its signing secret (`whsec_…`) once. Every request carries:\n\n```\nContent-Type: application/json\nCactus-Event-Id: evt_4821\nCactus-Event-Type: alert.transfer\nCactus-Signature: t=1800000000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd\n```\n\n`v1` is the hex HMAC-SHA256 of `\"<t>.<raw body>\"` with the secret, exactly as shown, as the key. Verify it against the raw bytes you received (not re-encoded JSON), refuse a `t` more than 300 seconds from your clock, and compare in constant time. After you rotate the secret, requests carry a second `v1=` signed with the previous secret for 24 hours, so either secret verifies. Then answer any 2xx quickly and do the work afterwards. A retry carries the same `Cactus-Event-Id`: drop an event you already handled.\n\nPython:\n\n```python\nimport hashlib\nimport hmac\nimport time\n\n\ndef verify(secret: str, header: str, body: bytes, tolerance: int = 300) -> bool:\n    \"\"\"True when `body` (the raw request bytes) was signed by Cactonus with `secret`.\"\"\"\n    fields = [part.split(\"=\", 1) for part in header.split(\",\") if \"=\" in part]\n    timestamps = [value for key, value in fields if key == \"t\"]\n    if len(timestamps) != 1 or not timestamps[0].isdigit():\n        return False\n    if abs(time.time() - int(timestamps[0])) > tolerance:\n        return False\n    signed = timestamps[0].encode() + b\".\" + body\n    expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()\n    return any(hmac.compare_digest(expected, value) for key, value in fields if key == \"v1\")\n```\n\nNode:\n\n```js\nconst crypto = require(\"node:crypto\");\n\n// True when `body` (the raw request bytes, a Buffer) was signed by Cactonus with `secret`.\nfunction verify(secret, header, body, tolerance = 300) {\n  const fields = header.split(\",\").map((part) => part.split(\"=\", 2));\n  const timestamps = fields.filter(([key]) => key === \"t\").map(([, value]) => value);\n  if (timestamps.length !== 1 || !/^\\d+$/.test(timestamps[0])) return false;\n  if (Math.abs(Date.now() / 1000 - Number(timestamps[0])) > tolerance) return false;\n  const expected = crypto\n    .createHmac(\"sha256\", secret)\n    .update(`${timestamps[0]}.`)\n    .update(body)\n    .digest();\n  return fields.some(\n    ([key, value]) =>\n      key === \"v1\" &&\n      /^[0-9a-f]{64}$/.test(value) &&\n      crypto.timingSafeEqual(expected, Buffer.from(value, \"hex\")),\n  );\n}\n```\n\nAnswers other than 2xx: 408, 429, 5xx and no answer within 10 seconds are retried with backoff (30 seconds, doubling to an hour, honouring a `Retry-After` in seconds) for 24 hours; any other status, redirects included, gives up that event. After 20 failed requests in a row over at least an hour Cactonus turns the webhook off and tells your firm's Telegram chats; a firm admin turns it on again. The web app shows each webhook's last 100 requests. Cactonus only connects to the endpoint's public addresses over HTTPS and never follows redirects.\n\n## MCP for AI agents\n\nThe same key connects AI agents such as Claude Code, Codex and Cursor through the Model Context Protocol (Streamable HTTP) at `/v1/mcp` on this server:\n\n```\nclaude mcp add --transport http cactonus <server>/v1/mcp --header \"Authorization: Bearer $CACTUS_API_KEY\"\n```\n\nRemote agents such as claude.ai and ChatGPT connect to the same URL without a key: add it as a connector, then sign in to Cactonus and approve. Your firm admins see and can disconnect every connected app.\n\nIts tools are `risk_check`, `get_check`, `list_checks`, `explore_wallet`, `wallet_transactions`, `connections`, `lookup_labels`, `linked_wallets` and `trace`. They follow the same rules as the operations here: your firm's data and plan, the same limits, and `risk_check`, `explore_wallet`, `connections`, `linked_wallets` and `trace` count as usage like their operations. Only `risk_check` creates something, a saved check; no tool changes your risk list. Text written by people or outside sources, such as label names and risk-list reasons, is returned as `{\"untrusted_text\": \"…\"}`.\n",
    "title": "Cactonus API",
    "version": "0.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/associations": {
      "post": {
        "description": "Find a directed transfer path between two wallets. No blacklist is required.",
        "operationId": "associate",
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "direct_USDT": {
                  "summary": "79.7 USDT from sender to recipient",
                  "value": {
                    "chain": "eip155:1",
                    "from": "2026-11-10T21:51:00Z",
                    "hops": 1,
                    "source": "0x643d634544a1dde9f5bc8ae3e1ddfb8e1637951b",
                    "target": "0xf9307ad6cf0406a241d79e661d07044445194a7a",
                    "to": "2026-11-10T21:51:11Z"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/AssociationInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssociationResponse"
                }
              }
            },
            "description": "A transfer path or no match"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "invalid_request: invalid/unsupported chain, address, identical endpoints, hops or window"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "unauthorized: valid JWT or API key required"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "search_expired: token scope changed during evidence publication; retry"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "search_busy: shared query capacity is full"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "search_timeout, search_capacity, search_unavailable or service_unavailable"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Find a transfer path between two wallets",
        "tags": [
          "explore"
        ]
      }
    },
    "/v1/blacklist": {
      "get": {
        "operationId": "list_blacklist",
        "parameters": [
          {
            "description": "CAIP-2 ID, e.g. eip155:1.",
            "in": "query",
            "name": "chain",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Exclusive address continuation from next_after.",
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "format": "int32",
              "maximum": 1000,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlacklistPage"
                }
              }
            },
            "description": "Own entries in ascending address order; live keyset pagination"
          },
          "400": {
            "description": "Invalid query"
          },
          "401": {
            "description": "Invalid key"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "List your risk list",
        "tags": [
          "blacklist"
        ]
      },
      "patch": {
        "description": "Modify your private blacklist. The examples add or remove the sender used by the USDT search examples.",
        "operationId": "mutate_blacklist",
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "add_sample_sender": {
                  "summary": "Add sample sender (changes your blacklist)",
                  "value": {
                    "add": [
                      "0x643d634544a1dde9f5bc8ae3e1ddfb8e1637951b"
                    ],
                    "chain": "eip155:1",
                    "remove": []
                  }
                },
                "remove_sample_sender": {
                  "summary": "Remove sample sender",
                  "value": {
                    "add": [],
                    "chain": "eip155:1",
                    "remove": [
                      "0x643d634544a1dde9f5bc8ae3e1ddfb8e1637951b"
                    ]
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/MutateBlacklist"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlacklistMutation"
                }
              }
            },
            "description": "Atomic, idempotent mutation; 1000 input addresses maximum"
          },
          "400": {
            "description": "Invalid addresses, overlap, or batch size"
          },
          "401": {
            "description": "Invalid key"
          },
          "409": {
            "description": "100000-entry tenant limit exceeded"
          },
          "413": {
            "description": "Body exceeds 128 KiB"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Add to or remove from your risk list",
        "tags": [
          "blacklist"
        ]
      }
    },
    "/v1/blacklist/entries": {
      "patch": {
        "description": "Replace the label, category, severity, reason and source of one entry in your firm's risk list.",
        "operationId": "update_entry",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEntry"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlacklistEntry"
                }
              }
            },
            "description": "Updated entry"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "invalid_request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "not_found: the address is not on your firm's list"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Change a risk-list entry",
        "tags": [
          "blacklist"
        ]
      }
    },
    "/v1/checks": {
      "delete": {
        "description": "Delete every check you ran. Colleagues' checks stay in the firm's history.",
        "operationId": "clear_checks",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Cleared"
                }
              }
            },
            "description": "Number of checks deleted"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "unauthorized"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Delete every check you ran",
        "tags": [
          "checks"
        ]
      },
      "get": {
        "operationId": "list_checks",
        "parameters": [
          {
            "description": "Opaque continuation from `next_before`.",
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckPage"
                }
              }
            },
            "description": "Your firm's checks, newest first"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "invalid_request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "unauthorized"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "List your firm's checks",
        "tags": [
          "checks"
        ]
      },
      "post": {
        "description": "Check addresses against your firm's risk list: whether each is listed, and whether listed wallets sent it funds within the hop limit over indexed history. The result is saved and visible to everyone in your firm.",
        "operationId": "create_check",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckResult"
                }
              }
            },
            "description": "Saved check with a verdict per address and overall"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "invalid_request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "unauthorized"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "service_unavailable"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Run a risk check",
        "tags": [
          "checks"
        ]
      }
    },
    "/v1/checks/{id}": {
      "delete": {
        "description": "Delete a check you ran. Colleagues' checks cannot be deleted.",
        "operationId": "delete_check",
        "parameters": [
          {
            "description": "Check ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "not_found: missing, or not run by you"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Delete a check you ran",
        "tags": [
          "checks"
        ]
      },
      "get": {
        "operationId": "get_check",
        "parameters": [
          {
            "description": "Check ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckResult"
                }
              }
            },
            "description": "The saved check as it was when run"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "not_found"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Get a check",
        "tags": [
          "checks"
        ]
      }
    },
    "/v1/connections": {
      "get": {
        "description": "List direct incoming and outgoing connections. Amounts are per-token raw units.",
        "operationId": "wallet",
        "parameters": [
          {
            "description": "Global ranking. Omit to retain legacy address ordering.",
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/WalletSort"
            }
          },
          {
            "in": "query",
            "name": "sort_order",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SortOrder"
            }
          },
          {
            "description": "Restrict counts and amounts to this indexed token. Required for total_amount.",
            "in": "query",
            "name": "token_id",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "example": "eip155:1",
            "in": "query",
            "name": "chain",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "0xf9307ad6cf0406a241d79e661d07044445194a7a",
            "in": "query",
            "name": "address",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Inclusive UTC bounds. Omit to use indexed history.",
            "example": "2026-11-10T21:51:00Z",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "example": "2026-11-10T21:51:11Z",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "next_after from the previous page; keep the other parameters unchanged.",
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": 10,
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionsResponse"
                }
              }
            },
            "description": "Connections and per-token totals"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "invalid_request: invalid address, chain, window, limit or continuation"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "unauthorized"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "search_expired: rerun the connection query"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "search_busy"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "search_timeout: narrow the window; search_capacity or service_unavailable"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Direct connections of a wallet",
        "tags": [
          "connections"
        ]
      }
    },
    "/v1/connections/blacklist": {
      "post": {
        "description": "Compare wallets with your private blacklist. Use the sample-sender setup in PATCH /v1/blacklist first.",
        "operationId": "blacklist",
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "private_blacklist": {
                  "summary": "After adding the sample sender to your blacklist",
                  "value": {
                    "chain": "eip155:1",
                    "from": "2026-11-10T21:51:00Z",
                    "limit": 10,
                    "to": "2026-11-10T21:51:11Z",
                    "wallets": [
                      "0xf9307ad6cf0406a241d79e661d07044445194a7a"
                    ]
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/GroupInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionsResponse"
                }
              }
            },
            "description": "Connections to your blacklist"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "invalid_request: invalid wallets, chain, window, limit or continuation"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "unauthorized"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "search_busy"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "search_timeout: narrow the window; search_capacity or service_unavailable"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Compare wallets with your risk list",
        "tags": [
          "connections"
        ]
      }
    },
    "/v1/connections/group": {
      "post": {
        "description": "Find direct transfers within 2–50 wallets. Groups do not imply extra edges.",
        "operationId": "group",
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "three_wallets": {
                  "summary": "Two senders to one recipient",
                  "value": {
                    "chain": "eip155:1",
                    "from": "2026-11-10T21:51:00Z",
                    "limit": 10,
                    "to": "2026-11-10T21:51:11Z",
                    "wallets": [
                      "0x643d634544a1dde9f5bc8ae3e1ddfb8e1637951b",
                      "0x80831f591103687b697965d1b6b50bbe11113472",
                      "0xf9307ad6cf0406a241d79e661d07044445194a7a"
                    ]
                  }
                },
                "two_wallets": {
                  "summary": "79.7 USDT transfer",
                  "value": {
                    "chain": "eip155:1",
                    "from": "2026-11-10T21:51:00Z",
                    "limit": 10,
                    "to": "2026-11-10T21:51:11Z",
                    "wallets": [
                      "0x643d634544a1dde9f5bc8ae3e1ddfb8e1637951b",
                      "0xf9307ad6cf0406a241d79e661d07044445194a7a"
                    ]
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/RankedGroupInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionsResponse"
                }
              }
            },
            "description": "Connections and group topology"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "invalid_request: invalid group, chain, window, limit or continuation"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "unauthorized"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "search_expired: rerun the group query"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "search_busy"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "search_timeout: narrow the window; search_capacity or service_unavailable"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Transfers within a group of wallets",
        "tags": [
          "connections"
        ]
      }
    },
    "/v1/connections/linked": {
      "post": {
        "description": "Which of 2–50 wallets are probably controlled by the same person or\ngroup, even when they never paid each other: groups of linked wallets with\nthe evidence for each linked pair, the wallets with no link, and the\nservices left out. USDT transfers since 1 January 2026. Repeats within 24\nhours return the stored result with `cached: true`.",
        "operationId": "linked",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkedInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkedResponse"
                }
              }
            },
            "description": "Linked groups with their evidence, unlinked wallets and services left out"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "invalid_request: chain, or wallets (2–50 distinct addresses)"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "unauthorized"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "search_busy: retry shortly"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Which wallets share an owner",
        "tags": [
          "connections"
        ]
      }
    },
    "/v1/connections/transactions": {
      "get": {
        "description": "List transfers between two wallets, newest first. Transactions stay whole across pages.",
        "operationId": "transactions",
        "parameters": [
          {
            "description": "Wallet/group summary snapshot; preserves token scope and indexed cutoff.",
            "in": "query",
            "name": "snapshot",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "eip155:1",
            "in": "query",
            "name": "chain",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "0x643d634544a1dde9f5bc8ae3e1ddfb8e1637951b",
            "in": "query",
            "name": "address_a",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "0xf9307ad6cf0406a241d79e661d07044445194a7a",
            "in": "query",
            "name": "address_b",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "2026-11-10T21:51:00Z",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "example": "2026-11-10T21:51:11Z",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Exclusive block:transaction_index continuation from next_after.",
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Number of whole transactions (not transfer events), newest first.",
            "example": 10,
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionTransactionsResponse"
                }
              }
            },
            "description": "Transactions and matching transfers"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "invalid_request: invalid/identical endpoints, chain, window, limit or continuation"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "unauthorized"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "search_expired: rerun the connection query"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "search_busy"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "search_timeout or search_capacity: narrow the window/reduce limit; service_unavailable"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Transfers between two wallets",
        "tags": [
          "connections"
        ]
      }
    },
    "/v1/firm": {
      "get": {
        "description": "Your firm: its name, your firm role, how many enabled members it has and its plan. Firm admins also get `entitlements`: the features and limits (`null` = no limit) the plan, with any overrides, allows.",
        "operationId": "my_firm",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FirmOverview"
                }
              }
            },
            "description": "Your firm"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "unauthorized"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Your firm",
        "tags": [
          "firm"
        ]
      }
    },
    "/v1/labels/entities/{id}/logo": {
      "get": {
        "description": "A global entity's logo: 64×64 `image/webp`, fetched once from the token list that names it (or, for a CFD broker, from its official website) and re-encoded by Cactonus. Answers 304 to a matching `If-None-Match`.",
        "operationId": "entity_logo",
        "parameters": [
          {
            "description": "Entity ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "The image version from `entity_logo_url` or `logo_url`; only makes the URL change with the picture",
            "in": "query",
            "name": "v",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "image/webp": {
                "schema": {
                  "items": {
                    "format": "int32",
                    "minimum": 0,
                    "type": "integer"
                  },
                  "type": "array"
                }
              }
            },
            "description": "The logo, with ETag and Cache-Control: private"
          },
          "304": {
            "description": "Not modified"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "not_found: no logo"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "An entity's logo",
        "tags": [
          "labels"
        ]
      }
    },
    "/v1/labels/resolve": {
      "post": {
        "description": "What each address is: its label (whose wallet it is; one per address, the\nsame for every firm), any risk flags such as OFAC sanctions, and for a\ncontract what its code is and who runs it.",
        "operationId": "resolve",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolvedPage"
                }
              }
            },
            "description": "One entry per address"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "invalid_request"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Look up labels for addresses",
        "tags": [
          "labels"
        ]
      }
    },
    "/v1/me": {
      "get": {
        "description": "Your current account and role.",
        "operationId": "me",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "email": "alice@example.com",
                  "id": 1,
                  "name": "Alice",
                  "role": "user"
                },
                "schema": {
                  "$ref": "#/components/schemas/CurrentUser"
                }
              }
            },
            "description": "Current database identity"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "unauthorized or invalid_credentials"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "auth_rate_limited"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "service_unavailable"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Who the key acts as",
        "tags": [
          "accounts"
        ]
      }
    },
    "/v1/me/api-keys": {
      "get": {
        "description": "Your API keys that are not revoked, newest first, without their secrets. Expired keys stay listed until you revoke them.",
        "operationId": "my_keys",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyList"
                }
              }
            },
            "description": "Your keys"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "unauthorized"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "List your API keys",
        "tags": [
          "api keys"
        ]
      }
    },
    "/v1/me/api-keys/{id}": {
      "delete": {
        "description": "The key stops working at once. Revoking it again succeeds. A key may revoke itself.",
        "operationId": "revoke_my_key",
        "parameters": [
          {
            "description": "Key ID from the key list",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Revoked"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "not_found: not one of your keys"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Revoke an API key",
        "tags": [
          "api keys"
        ]
      }
    },
    "/v1/search": {
      "get": {
        "operationId": "next_page",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                }
              }
            },
            "description": "Next page of this user's frozen matches; does not resume traversal"
          },
          "401": {
            "description": "Invalid key"
          },
          "410": {
            "description": "Cursor expired, evicted, unavailable to this user, or invalidated by token changes"
          },
          "429": {
            "description": "Search concurrency is full"
          },
          "503": {
            "description": "Database unavailable"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Next page of a trace",
        "tags": [
          "search"
        ]
      },
      "post": {
        "description": "Trace incoming transfers from your private blacklist. Use the sample-sender setup in PATCH /v1/blacklist first.",
        "operationId": "search_wallet",
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "incoming_USDT": {
                  "summary": "Direct incoming USDT from the sample sender",
                  "value": {
                    "address": "0xf9307ad6cf0406a241d79e661d07044445194a7a",
                    "chain": "eip155:1",
                    "from": "2026-11-10T21:51:00Z",
                    "hops": 1,
                    "to": "2026-11-10T21:51:11Z"
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/SearchInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                }
              }
            },
            "description": "Matches and transfer evidence"
          },
          "400": {
            "description": "Invalid chain, address, hops or time window"
          },
          "401": {
            "description": "Invalid key"
          },
          "410": {
            "description": "Token scope changed during result publication"
          },
          "429": {
            "description": "Search concurrency is full"
          },
          "503": {
            "description": "Database or result capacity unavailable"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Trace funds from your risk list",
        "tags": [
          "search"
        ]
      }
    },
    "/v1/senders": {
      "get": {
        "description": "List direct senders with per-token totals in raw units. No blacklist is required.",
        "operationId": "senders",
        "parameters": [
          {
            "description": "CAIP-2 chain, for example eip155:1. All its registered tokens are included.",
            "example": "eip155:1",
            "in": "query",
            "name": "chain",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Receiving wallet, in the selected chain’s native format.",
            "example": "0xf9307ad6cf0406a241d79e661d07044445194a7a",
            "in": "query",
            "name": "address",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Inclusive UTC start.",
            "example": "2026-11-10T21:51:00Z",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Inclusive UTC end.",
            "example": "2026-11-10T21:51:11Z",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Opaque continuation from next_after. Keep all other parameters unchanged.",
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Number of distinct senders per page, in ascending address order.",
            "example": 10,
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendersResponse"
                }
              }
            },
            "description": "Senders and per-token totals"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "invalid_request: invalid/unsupported chain, address, window, after or limit"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "unauthorized: valid JWT or API key required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "search_busy: shared query capacity is full"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "search_timeout: narrow the window and retry; search_capacity, search_unavailable or service_unavailable"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "List who sent to a wallet",
        "tags": [
          "explore"
        ]
      }
    },
    "/v1/tokens": {
      "get": {
        "operationId": "catalog",
        "parameters": [
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "format": "int32",
              "maximum": 1000,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogPage"
                }
              }
            },
            "description": "Token catalog without indexing progress; tokens on paused chains are left out"
          },
          "401": {
            "description": "Invalid key"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "List indexed tokens and chains",
        "tags": [
          "tokens"
        ]
      }
    },
    "/v1/trace/expand": {
      "post": {
        "description": "Per wallet: its biggest counterparties in `direction`, ranked within each\ntoken by amount, larger first, taking turns between tokens (the biggest of\neach token, then the second of each, and so on). Amounts are exact\nper-token raw units; nothing is converted or added across tokens. Each\nwallet shown carries the label the firm sees (never an unverified one),\ncontract facts, the firm's risk-list entry and `terminal`: a service, an\nexchange deposit address or a contract where tracing stops. A wallet with\nmore than 200,000 transfers in `direction` keeps only its most recent\n200,000 (`recent_only`). Wallets the deadline leaves unread come back\nwith `expanded: false`; when none could be read the request fails with\n`search_timeout`. Each expanded wallet costs one `trace_expand`; pages\nafter the first are free.",
        "operationId": "expand",
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "out": {
                  "summary": "Where one wallet's money went",
                  "value": {
                    "addresses": [
                      "0x643d634544a1dde9f5bc8ae3e1ddfb8e1637951b"
                    ],
                    "chain": "eip155:1",
                    "direction": "out",
                    "limit": 20
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/TraceInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TraceResponse"
                }
              }
            },
            "description": "One expansion per wallet"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "invalid_request: chain, addresses (1–10), direction, token, window, limit (1–50) or continuation"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "unauthorized"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "search_expired: expand the wallet again"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "search_busy"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "search_timeout: narrow the window or expand fewer wallets; search_capacity or service_unavailable"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Where money went, one hop at a time",
        "tags": [
          "trace"
        ]
      }
    },
    "/v1/wallets/balances": {
      "post": {
        "description": "Current registered-token balances. Dates do not apply; unavailable reads return null.",
        "operationId": "balances",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BalancesInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Balance"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Current balances; individual RPC failures return a null amount and an error code"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid wallet, network, token selection or pair count"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "balance_busy: retry shortly"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "balance_timeout, balance_unavailable or service_unavailable: retry shortly"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Current balances",
        "tags": [
          "wallets"
        ]
      }
    },
    "/v1/wallets/connections": {
      "get": {
        "description": "One row per counterparty, ranked across the entire snapshot.",
        "operationId": "connections",
        "parameters": [
          {
            "in": "query",
            "name": "snapshot",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sort_by",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/WalletSort"
            }
          },
          {
            "in": "query",
            "name": "sort_order",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SortOrder"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionsResponse"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid query"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Snapshot expired; search again"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Busy; retry shortly"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Search limit; narrow dates or reduce page size"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Wallet counterparties",
        "tags": [
          "wallets"
        ]
      }
    },
    "/v1/wallets/snapshot": {
      "get": {
        "description": "The snapshot fixes the window every later wallet read uses. When the wallet has\nat least 200,000 transfers in either direction within the dates, the window\nstarts at its 200,000th newest transfer in that direction (the later of the\ntwo): `window.from` is later than requested and `reasons` includes\n`recent_only`. `complete` still describes indexed history. Narrow the dates to\nread older activity.",
        "operationId": "snapshot",
        "parameters": [
          {
            "example": "eip155:1",
            "in": "query",
            "name": "chain",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "0xf9307ad6cf0406a241d79e661d07044445194a7a",
            "in": "query",
            "name": "address",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "token_id",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "example": "2026-11-10T21:51:00Z",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "example": "2026-11-10T21:51:11Z",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletSnapshot"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Search limit; choose shorter dates"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Open a wallet",
        "tags": [
          "wallets"
        ]
      }
    },
    "/v1/wallets/stats": {
      "get": {
        "description": "Exact totals for a frozen wallet snapshot. Load independently of activity pages.",
        "operationId": "stats",
        "parameters": [
          {
            "in": "query",
            "name": "snapshot",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletStats"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Wallet totals",
        "tags": [
          "wallets"
        ]
      }
    },
    "/v1/wallets/summary": {
      "get": {
        "description": "A busy wallet keeps only its recent activity: when it has at least 200,000\ntransfers in either direction within the dates, `window.from` moves forward to\nits 200,000th newest transfer in that direction (the later of the two), and\n`reasons` includes `recent_only`. Narrow the dates to read older activity.",
        "operationId": "summary",
        "parameters": [
          {
            "example": "eip155:1",
            "in": "query",
            "name": "chain",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "example": "0xf9307ad6cf0406a241d79e661d07044445194a7a",
            "in": "query",
            "name": "address",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "token_id",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "example": "2026-11-10T21:51:00Z",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "example": "2026-11-10T21:51:11Z",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletSummary"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid query"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Snapshot expired; search again"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Busy; retry shortly"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Search limit; narrow dates or reduce page size"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Wallet summary",
        "tags": [
          "wallets"
        ]
      }
    },
    "/v1/wallets/transactions": {
      "get": {
        "description": "Whole transactions, newest first, within the wallet summary snapshot.",
        "operationId": "transactions",
        "parameters": [
          {
            "in": "query",
            "name": "snapshot",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "format": "int32",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletFeed"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Invalid query"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication required"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Snapshot expired; search again"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Busy; retry shortly"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Search limit; narrow dates or reduce page size"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Wallet transactions",
        "tags": [
          "wallets"
        ]
      }
    }
  },
  "security": [
    {
      "bearer": []
    }
  ],
  "servers": [
    {
      "url": "https://cactonus-api.atlantikou.duckdns.org"
    }
  ],
  "tags": [
    {
      "description": "Who the key acts as.",
      "name": "accounts"
    },
    {
      "description": "Your firm and its plan.",
      "name": "firm"
    },
    {
      "description": "Your API keys. Create keys in the web app; a key can list and revoke them.",
      "name": "api keys"
    },
    {
      "description": "The stablecoins and chains Cactonus indexes.",
      "name": "tokens"
    },
    {
      "description": "Risk checks: is an address on your firm's risk list, or did listed wallets send it funds?",
      "name": "checks"
    },
    {
      "description": "Paths between addresses over indexed transfers.",
      "name": "search"
    },
    {
      "description": "One wallet: summary, statistics, transfers, counterparties and live balances.",
      "name": "wallets"
    },
    {
      "description": "Who sent to an address, and which addresses are associated.",
      "name": "explore"
    },
    {
      "description": "Counterparty connections of one or more wallets, grouped and filtered.",
      "name": "connections"
    },
    {
      "description": "Where money went, or came from, one hop at a time from the wallets you pick.",
      "name": "trace"
    },
    {
      "description": "Names for addresses: whose wallet each one is, one label per address.",
      "name": "labels"
    },
    {
      "description": "Your firm's risk list of addresses.",
      "name": "blacklist"
    }
  ],
  "webhooks": {
    "alert": {
      "post": {
        "description": "Cactonus POSTs each alert of the rules that send to a webhook destination, and a `webhook.test` event for \"Send test\". Verify `Cactus-Signature` before trusting the body (see Webhooks above), and drop an event whose `Cactus-Event-Id` you already handled: a retry carries the same id.",
        "parameters": [
          {
            "description": "`t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" under your secret>`; during a secret rotation a second `v1=` for the previous secret.",
            "in": "header",
            "name": "Cactus-Signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`evt_…`, the same on every retry of one event.",
            "in": "header",
            "name": "Cactus-Event-Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`alert.transfer`, `alert.freeze` or `webhook.test`.",
            "in": "header",
            "name": "Cactus-Event-Type",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Delivered. 408, 429 and 5xx answers, and no answer within 10 seconds, are retried with backoff for 24 hours (a `Retry-After` in seconds is honoured); any other answer, redirects included, gives the event up. After 20 failed requests in a row over at least an hour the webhook is turned off and your firm's Telegram chats are told."
          }
        },
        "summary": "An alert, as your endpoint receives it"
      }
    }
  }
}