{
  "openapi": "3.1.0",
  "info": {
    "title": "ApeScan native API",
    "version": "0.1.0",
    "description": "Read-only public ApeChain index APIs. Decimal quantities and token IDs are strings. Cursor results reflect indexed coverage, not a promise of complete chain history."
  },
  "servers": [{ "url": "https://explorer.apechain.com", "description": "ApeChain (chain ID 33139)" }],
  "paths": {
    "/v1/charts/daily": {
      "get": {
        "summary": "Read exact UTC daily block aggregates",
        "description": "Returns only dates with live canonical indexed block rows in the requested UTC calendar window. `days` is clamped to 1..365; the current UTC day is partial up to, but excluding, the captured whole-second observation. Missing dates are absent, not zero-filled. `gasUsed`, `avgBaseFee`, `avgBlockSize`, and `avgGasLimit` are exact non-negative integer strings. Averages use floor integer division. HTTP 200 does not claim complete history or daily completeness.",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365,
              "default": 30
            },
            "description": "Number of UTC calendar days ending with the current UTC day."
          }
        ],
        "responses": {
          "200": {
            "description": "Sparse daily aggregates for live canonical indexed rows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "day",
                      "txs",
                      "blocks",
                      "gasUsed",
                      "avgBaseFee",
                      "avgBlockSize",
                      "avgGasLimit"
                    ],
                    "properties": {
                      "day": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "description": "UTC calendar date."
                      },
                      "txs": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "Legacy transaction count for indexed blocks on this date."
                      },
                      "blocks": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "Canonical live indexed blocks returned for this date."
                      },
                      "gasUsed": {
                        "type": "string",
                        "pattern": "^[0-9]+$",
                        "description": "Exact total gas units."
                      },
                      "avgBaseFee": {
                        "type": "string",
                        "pattern": "^[0-9]+$",
                        "description": "Exact floor mean wei per gas."
                      },
                      "avgBlockSize": {
                        "type": "string",
                        "pattern": "^[0-9]+$",
                        "description": "Exact floor mean block bytes."
                      },
                      "avgGasLimit": {
                        "type": "string",
                        "pattern": "^[0-9]+$",
                        "description": "Exact floor mean gas units."
                      }
                    }
                  }
                }
              }
            }
          },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/charts": {
      "get": {
        "summary": "Read bounded UTC chart series",
        "description": "Returns the selected subset of all 16 chart series over one UTC half-open day window, `[from,to)`. HTTP 200 means transport success only. `coverage.complete` is true only when the requested returned scope is proven complete, false when it is proven partial, and null when completeness is unknown or unavailable; it is separate from HTTP status. Missing dates remain missing and are not zero-filled, while a returned numeric zero is a real indexed zero. Available sparse series include `missingDates` for requested UTC days without a point. The current UTC day is partial up to, but excluding, the captured whole-second `observedAt`. `indexedThrough` is an independently observed, non-atomic index-head fact and does not prove requested-day completeness. Integer points use exact decimal-string values. Average block-size, gas-limit, block-time and gas-price points, and the APE price and market-cap points (daily closes recorded by this explorer from DexScreener; earlier days are CoinGecko's or Coinbase's daily close), use `representation: rational`, with exact decimal-string `numerator`, positive `denominator`, and `value` formatted as `numerator/denominator`; consumers must not treat every value as a decimal scalar. Unsupported authoritative sources remain unavailable with no fabricated points. A metric that does not exist on ApeChain (block rewards on Arbitrum Nitro) has `status: not_applicable` with a reason and no points. Each series `description` states its exact formula and scope. Verified-contracts and new-addresses points also carry `cumulative`, the exact total through that UTC day. New-addresses stays unavailable (`history_not_from_genesis`) until the index holds every block from genesis.",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365,
              "default": 30
            },
            "description": "Number of UTC calendar days ending with the current UTC day; use `from` and `to` for an explicit window."
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "description": "Inclusive UTC calendar-day start. Must be supplied with `to`."
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "description": "Exclusive UTC calendar-day end. The span must be 1..365 days."
          },
          {
            "name": "series",
            "in": "query",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "price",
                "marketcap",
                "transactions",
                "addresses",
                "new-addresses",
                "blocks",
                "blocksize",
                "blocktime",
                "gasprice",
                "gaslimit",
                "gasused",
                "transactionfee",
                "verified-contracts",
                "contracts",
                "rewards",
                "internal-creates"
              ]
            },
            "description": "Repeat to select up to 16 known series. Omit or use `all` for the full catalogue."
          }
        ],
        "responses": {
          "200": {
            "description": "Sparse bounded chart response with exact integer values, exact rational average components, and explicit coverage state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "timezone",
                    "requestedRange",
                    "returnedRange",
                    "missingDates",
                    "observedAt",
                    "cacheAgeSeconds",
                    "indexedThrough",
                    "coverage",
                    "series"
                  ],
                  "properties": {
                    "timezone": {
                      "const": "UTC"
                    },
                    "requestedRange": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "from",
                        "to",
                        "days"
                      ],
                      "properties": {
                        "from": {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                        },
                        "to": {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                        },
                        "days": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 365
                        }
                      }
                    },
                    "returnedRange": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "from",
                            "to"
                          ],
                          "properties": {
                            "from": {
                              "type": "string",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                            },
                            "to": {
                              "type": "string",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                            }
                          }
                        }
                      ]
                    },
                    "missingDates": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      }
                    },
                    "observedAt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "cacheAgeSeconds": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "indexedThrough": {
                      "anyOf": [
                        {
                          "type": "null"
                        },
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "block",
                            "timestamp",
                            "observedAt"
                          ],
                          "properties": {
                            "block": {
                              "type": "string",
                              "pattern": "^[0-9]+$"
                            },
                            "timestamp": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "observedAt": {
                              "type": "integer",
                              "minimum": 0
                            }
                          }
                        }
                      ]
                    },
                    "coverage": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "complete",
                        "reason",
                        "asOf"
                      ],
                      "properties": {
                        "complete": {
                          "type": [
                            "boolean",
                            "null"
                          ],
                          "description": "true means complete returned scope, false means proven partial scope, null means unknown or unavailable; independent of HTTP 200."
                        },
                        "reason": {
                          "type": "string"
                        },
                        "asOf": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 0
                        }
                      }
                    },
                    "series": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "id",
                          "label",
                          "unit",
                          "description",
                          "status",
                          "returnedRange",
                          "points"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "enum": [
                              "price",
                              "marketcap",
                              "transactions",
                              "addresses",
                              "new-addresses",
                              "blocks",
                              "blocksize",
                              "blocktime",
                              "gasprice",
                              "gaslimit",
                              "gasused",
                              "transactionfee",
                              "verified-contracts",
                              "contracts",
                              "rewards",
                              "internal-creates"
                            ]
                          },
                          "label": {
                            "type": "string"
                          },
                          "unit": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string",
                            "description": "Exact formula and scope of the series."
                          },
                          "status": {
                            "enum": [
                              "available",
                              "unavailable",
                              "not_applicable"
                            ],
                            "description": "`unavailable`: no approved source. `not_applicable`: the metric does not exist on ApeChain."
                          },
                          "reason": {
                            "type": "string"
                          },
                          "missingDates": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                            },
                            "description": "Requested UTC days without a point for an otherwise available sparse series."
                          },
                          "returnedRange": {
                            "anyOf": [
                              {
                                "type": "null"
                              },
                              {
                                "type": "object",
                                "required": [
                                  "from",
                                  "to"
                                ],
                                "properties": {
                                  "from": {
                                    "type": "string",
                                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                  },
                                  "to": {
                                    "type": "string",
                                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                  }
                                }
                              }
                            ]
                          },
                          "points": {
                            "type": "array",
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "required": [
                                    "day",
                                    "value",
                                    "representation",
                                    "complete"
                                  ],
                                  "properties": {
                                    "day": {
                                      "type": "string",
                                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                    },
                                    "value": {
                                      "type": "string",
                                      "pattern": "^[0-9]+$"
                                    },
                                    "representation": {
                                      "const": "integer"
                                    },
                                    "complete": {
                                      "type": [
                                        "boolean",
                                        "null"
                                      ]
                                    },
                                    "cumulative": {
                                      "type": "string",
                                      "pattern": "^[0-9]+$",
                                      "description": "verified-contracts only: exact running total through the end of this UTC day."
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "required": [
                                    "day",
                                    "value",
                                    "representation",
                                    "numerator",
                                    "denominator",
                                    "complete"
                                  ],
                                  "properties": {
                                    "day": {
                                      "type": "string",
                                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                    },
                                    "value": {
                                      "type": "string",
                                      "pattern": "^[0-9]+/[1-9][0-9]*$",
                                      "description": "Exact unreduced numerator/denominator ratio."
                                    },
                                    "representation": {
                                      "const": "rational"
                                    },
                                    "numerator": {
                                      "type": "string",
                                      "pattern": "^[0-9]+$"
                                    },
                                    "denominator": {
                                      "type": "string",
                                      "pattern": "^[1-9][0-9]*$"
                                    },
                                    "complete": {
                                      "type": [
                                        "boolean",
                                        "null"
                                      ]
                                    }
                                  }
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/NativeRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/NativeInternal"
          }
        }
      }
    },
    "/v1/charts/export": {
      "get": {
        "summary": "Export bounded UTC chart series as CSV",
        "description": "Exports the same bounded UTC half-open range and selected series as `/v1/charts`. Integer values and rational numerator/denominator components remain exact decimal strings; rational `value` uses the exact `numerator/denominator` form. Rows preserve sparse dates and include explicit representation, missing or unavailable status (including not_applicable), and `verified-contracts.cumulative` and `new-addresses.cumulative` columns when those series are selected; HTTP 200 is transport success, not a completeness claim.",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365,
              "default": 30
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          {
            "name": "series",
            "in": "query",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "price",
                "marketcap",
                "transactions",
                "addresses",
                "new-addresses",
                "blocks",
                "blocksize",
                "blocktime",
                "gasprice",
                "gaslimit",
                "gasused",
                "transactionfee",
                "verified-contracts",
                "contracts",
                "rewards",
                "internal-creates"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exact CSV values with representation, rational components, missing, and unavailable status columns.",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/NativeRateLimited"
          },
          "500": {
            "$ref": "#/components/responses/NativeInternal"
          }
        }
      }
    },
    "/v1/accounts/top": {
      "get": {
        "operationId": "listTopAccounts",
        "summary": "List top APE holders",
        "description": "Balances are read from the node at `blockNumber`, so every balance is exact at that block. Candidates are the addresses that received the most APE in indexed transactions and internal transfers. `txCount` is the indexed transaction count, returned only when chain history is complete (`coverage.complete`); otherwise it is null. Cached for up to 10 minutes and computed in the background; until the first computation finishes the endpoint answers 503 with Retry-After.",
        "responses": {
          "200": {"description": "Top accounts", "content": {"application/json": {"schema": {"type": "object", "required": ["blockNumber", "items", "labels", "coverage"], "properties": {"blockNumber": {"type": "integer", "minimum": 0}, "items": {"type": "array", "maxItems": 100, "items": {"type": "object", "required": ["rank", "address", "balance", "txCount"], "properties": {"rank": {"type": "integer", "minimum": 1}, "address": {"$ref": "#/components/schemas/Address"}, "balance": {"type": "string", "pattern": "^[0-9]+$", "description": "Wei at blockNumber."}, "txCount": {"type": ["integer", "null"], "minimum": 0}}}}, "labels": {"type": "object"}, "coverage": {"$ref": "#/components/schemas/Coverage"}}}}}},
          "503": {"description": "Not computed yet; retry after Retry-After seconds", "content": {"application/json": {"schema": {"type": "object", "required": ["error", "message"], "properties": {"error": {"const": "warming"}, "message": {"type": "string"}}}}}},
          "429": {"$ref": "#/components/responses/NativeRateLimited"},
          "500": {"$ref": "#/components/responses/NativeInternal"}
        }
      }
    },
    "/v1/accounts/{address}/balance": {
      "get": {
        "operationId": "getAccountBalance",
        "summary": "Read an account's APE or ERC-20 balance at one pinned block",
        "description": "A live node read, never the index: the block is resolved first (latest, a number or a hash), then eth_getBalance (asset=native) or balanceOf (asset=erc20) runs against that block hash, and the block is checked canonical before and after. chainid must equal this chain's id; unknown or repeated query parameters are a 400. ERC-20 answers are unproven_standard: balanceOf answered, but the contract is not proven to be ERC-20; decimals, symbol and name are read at the same block. at=date is accepted but not resolved yet (422 unsupported_history, date_resolver_not_adopted). A failed read returns the same envelope plus error and message at 404, 409, 422 or 503; rawAmount is then null, never zero. Responses are not cached. Besides the shared per-client limit, the route admits 8 requests per second and 8 in flight per server; past that it answers 429 rate_limited or 503 busy with Retry-After: 1.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }, { "name": "chainid", "in": "query", "required": true, "schema": { "const": "33139" }, "description": "This chain's id, as a decimal string." }, { "name": "asset", "in": "query", "required": true, "schema": { "enum": ["native", "erc20"] }, "description": "native for APE; erc20 needs contract." }, { "name": "contract", "in": "query", "schema": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" }, "description": "Token contract; only with asset=erc20." }, { "name": "at", "in": "query", "required": true, "schema": { "enum": ["latest", "number", "hash", "date"] }, "description": "How the block is chosen." }, { "name": "block", "in": "query", "schema": { "type": "string", "pattern": "^(0|[1-9][0-9]{0,19})$|^0x[0-9a-fA-F]{64}$" }, "description": "Block number (at=number) or block hash (at=hash)." }, { "name": "date", "in": "query", "schema": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, "description": "UTC instant like 2025-01-01T00:00:00.000Z; only with at=date." }, { "name": "direction", "in": "query", "schema": { "enum": ["before", "after"] }, "description": "Nearest block before or after date; only with at=date." }],
        "responses": {
          "200": { "description": "The balance (result.status ok or unproven_standard)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountBalance" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "404": { "description": "The requested block was not returned by the node (block_not_found)", "content": { "application/json": { "schema": { "allOf": [{ "$ref": "#/components/schemas/AccountBalance" }, { "type": "object", "required": ["error", "message"], "properties": { "error": { "enum": ["block_not_found"] }, "message": { "type": "string" } } }] } } } },
          "409": { "description": "The resolved block changed or is not canonical (reorg_or_noncanonical)", "content": { "application/json": { "schema": { "allOf": [{ "$ref": "#/components/schemas/AccountBalance" }, { "type": "object", "required": ["error", "message"], "properties": { "error": { "enum": ["reorg_or_noncanonical"] }, "message": { "type": "string" } } }] } } } },
          "422": { "description": "No answer at this block: no code, the call reverted, the answer was malformed, or the snapshot capability is unavailable", "content": { "application/json": { "schema": { "allOf": [{ "$ref": "#/components/schemas/AccountBalance" }, { "type": "object", "required": ["error", "message"], "properties": { "error": { "enum": ["no_code_at_block", "contract_reverted", "invalid_answer", "unsupported_history"] }, "message": { "type": "string" } } }] } } } },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" },
          "503": { "description": "The node did not answer, its state at the block is pruned, or the request was not admitted or was cancelled; retry after Retry-After seconds when present", "content": { "application/json": { "schema": { "oneOf": [{ "allOf": [{ "$ref": "#/components/schemas/AccountBalance" }, { "type": "object", "required": ["error", "message"], "properties": { "error": { "enum": ["node_unavailable", "unsupported_history"] }, "message": { "type": "string" } } }] }, { "type": "object", "additionalProperties": false, "required": ["error", "message"], "properties": { "error": { "enum": ["busy", "admission_unavailable", "request_cancelled"] }, "message": { "type": "string" } } }] } } } }
        }
      }
    },
    "/v1/internal-txs": {
      "get": {
        "operationId": "listInternalTransactions",
        "summary": "List internal transfers",
        "description": "Successful nested calls that move APE, plus contract creations and self-destructs, newest first. A page reads at most 1,000,000 blocks below its cursor.",
        "parameters": [{"$ref": "#/components/parameters/Limit"}, {"$ref": "#/components/parameters/Cursor"}],
        "responses": {
          "200": {"description": "Internal transfers page", "content": {"application/json": {"schema": {"type": "object", "required": ["items", "next", "labels"], "properties": {"items": {"type": "array", "items": {"type": "object", "required": ["blockNumber", "index", "traceAddress", "txHash", "timestamp", "type", "from", "to", "value"], "properties": {"blockNumber": {"type": "integer"}, "index": {"type": "integer"}, "traceAddress": {"type": "string"}, "txHash": {"type": "string"}, "timestamp": {"type": "integer"}, "type": {"type": "string", "enum": ["CALL", "CREATE", "CREATE2", "SELFDESTRUCT"]}, "from": {"$ref": "#/components/schemas/Address"}, "to": {"type": ["string", "null"]}, "value": {"type": "string", "pattern": "^[0-9]+$", "description": "Wei."}}}}, "next": {"type": ["string", "null"]}, "labels": {"type": "object"}}}}}},
          "400": {"$ref": "#/components/responses/BadRequest"},
          "429": {"$ref": "#/components/responses/NativeRateLimited"},
          "500": {"$ref": "#/components/responses/NativeInternal"}
        }
      }
    },
    "/v1/token-transfers": {
      "get": {
        "operationId": "listChainTokenTransfers",
        "summary": "List ERC-20 transfers",
        "description": "Newest first. Amounts are raw token units; scale them with `labels[token].decimals` when present. NFT transfers are at /v1/nfts/feed. A page reads at most 1,000,000 blocks below its cursor.",
        "parameters": [{"$ref": "#/components/parameters/Limit"}, {"$ref": "#/components/parameters/Cursor"}],
        "responses": {
          "200": {"description": "ERC-20 transfers page", "content": {"application/json": {"schema": {"type": "object", "required": ["items", "next", "labels"], "properties": {"items": {"type": "array", "items": {"type": "object", "required": ["blockNumber", "logIndex", "batchIndex", "token", "standard", "txHash", "timestamp", "from", "to", "amount"], "properties": {"blockNumber": {"type": "integer"}, "logIndex": {"type": "integer"}, "batchIndex": {"type": "integer"}, "token": {"$ref": "#/components/schemas/Address"}, "standard": {"type": "string", "enum": ["erc20"]}, "txHash": {"type": "string"}, "timestamp": {"type": "integer"}, "from": {"$ref": "#/components/schemas/Address"}, "to": {"$ref": "#/components/schemas/Address"}, "tokenId": {"type": "string"}, "amount": {"type": "string", "pattern": "^[0-9]+$"}}}}, "next": {"type": ["string", "null"]}, "labels": {"type": "object"}}}}}},
          "400": {"$ref": "#/components/responses/BadRequest"},
          "429": {"$ref": "#/components/responses/NativeRateLimited"},
          "500": {"$ref": "#/components/responses/NativeInternal"}
        }
      }
    },
    "/v1/gas/actions": {
      "get": {
        "summary": "Read gas of common actions",
        "description": "Median receipt gasUsed of successful transactions of each kind over the last 24 hours of indexed blocks: ERC-20 `transfer` and `approve` calls, swaps (transactions that emitted a Uniswap V2- or V3-style pool `Swap` event) and NFT purchases (transactions with an indexed Seaport sale). `gasUsed` is null when no transaction of that kind was sampled. Multiply by the current base fee for a cost in wei.",
        "responses": {
          "200": {
            "description": "Typical gas per action",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": ["fromBlock", "toBlock", "actions"],
                  "properties": {
                    "fromBlock": { "type": ["integer", "null"] },
                    "toBlock": { "type": ["integer", "null"] },
                    "actions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": ["id", "label", "txs", "gasUsed"],
                        "properties": {
                          "id": { "type": "string", "enum": ["erc20-transfer", "approve", "swap", "nft-sale"] },
                          "label": { "type": "string" },
                          "txs": { "type": "integer", "minimum": 0 },
                          "gasUsed": { "type": ["string", "null"], "pattern": "^[0-9]+$" }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/gas/guzzlers": {
      "get": {
        "operationId": "listGasGuzzlers",
        "summary": "List gas-guzzling contracts",
        "description": "Contracts ranked by exact fees paid in the requested bounded recent block window. The default window is the last 200 indexed blocks and the default page has 100 contracts. `gasShareBps` is the contract's share of successful non-ArbOS transaction gas in the same window, in basis points. Results are cached for five minutes.",
        "parameters": [
          { "name": "blocks", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 5000, "default": 200 } },
          { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 100 } }
        ],
        "responses": {
          "200": {
            "description": "Gas-guzzling contracts",
            "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": ["fromBlock", "toBlock", "blocks", "totalGas", "items", "labels"], "properties": {
              "fromBlock": { "type": ["integer", "null"] }, "toBlock": { "type": ["integer", "null"] }, "blocks": { "type": "integer", "minimum": 1, "maximum": 5000 }, "totalGas": { "type": "string", "pattern": "^[0-9]+$" },
              "items": { "type": "array", "maxItems": 100, "items": { "type": "object", "additionalProperties": false, "required": ["address", "fees", "gasUsed", "gasShareBps"], "properties": { "address": { "$ref": "#/components/schemas/Address" }, "fees": { "type": "string", "pattern": "^[0-9]+$" }, "gasUsed": { "type": "string", "pattern": "^[0-9]+$" }, "gasShareBps": { "type": "integer", "minimum": 0, "maximum": 10000 } } } },
              "labels": { "type": "object" }
            } } } }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/stats": {
      "get": {
        "operationId": "getStats",
        "summary": "Read chain and index coverage status",
        "responses": { "200": { "description": "Current indexed statistics", "content": { "application/json": { "schema": { "type": "object" } } } }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" } }
      }
    },
    "/v1/charts/daily": {
      "get": {
        "summary": "Read exact UTC daily block aggregates",
        "description": "Returns only dates with live canonical indexed block rows in the requested UTC calendar window. `days` is clamped to 1..365; the current UTC day is partial up to, but excluding, the captured whole-second observation. Missing dates are absent, not zero-filled. `gasUsed`, `avgBaseFee`, `avgBlockSize`, and `avgGasLimit` are exact non-negative integer strings. Averages use floor integer division. HTTP 200 does not claim complete history or daily completeness.",
        "parameters": [
          { "name": "days", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 365, "default": 30 }, "description": "Number of UTC calendar days ending with the current UTC day." }
        ],
        "responses": {
          "200": {
            "description": "Sparse daily aggregates for live canonical indexed rows.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": ["day", "txs", "blocks", "gasUsed", "avgBaseFee", "avgBlockSize", "avgGasLimit"],
                    "properties": {
                      "day": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "UTC calendar date." },
                      "txs": { "type": "integer", "minimum": 0, "description": "Legacy transaction count for indexed blocks on this date." },
                      "blocks": { "type": "integer", "minimum": 1, "description": "Canonical live indexed blocks returned for this date." },
                      "gasUsed": { "type": "string", "pattern": "^[0-9]+$", "description": "Exact total gas units." },
                      "avgBaseFee": { "type": "string", "pattern": "^[0-9]+$", "description": "Exact floor mean wei per gas." },
                      "avgBlockSize": { "type": "string", "pattern": "^[0-9]+$", "description": "Exact floor mean block bytes." },
                      "avgGasLimit": { "type": "string", "pattern": "^[0-9]+$", "description": "Exact floor mean gas units." }
                    }
                  }
                }
              }
            }
          },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/addresses/{address}/nfts": {
      "get": {
        "operationId": "listAddressNfts",
        "summary": "List NFTs observed for an address",
        "parameters": [
          { "$ref": "#/components/parameters/Address" },
          { "$ref": "#/components/parameters/Limit" },
          { "$ref": "#/components/parameters/Cursor" },
          { "name": "collection", "in": "query", "schema": { "$ref": "#/components/schemas/Address" }, "description": "Optional NFT collection address" },
          { "name": "contract", "in": "query", "style": "form", "explode": true, "schema": { "type": "array", "maxItems": 45, "items": { "$ref": "#/components/schemas/Address" } }, "description": "Repeatable. Only items of these collections (at most 45). total counts the filtered items; collections and allTotal stay whole-wallet. Cannot be combined with collection." },
          { "name": "item", "in": "query", "schema": { "type": "string", "pattern": "^[0-9]{1,78}$" }, "description": "Optionally verify this item when collection is supplied" },
          { "name": "cq", "in": "query", "schema": { "type": "string", "maxLength": 100 }, "description": "Filter the collection list by name, symbol or address prefix" },
          { "name": "coffset", "in": "query", "schema": { "type": "string", "pattern": "^[0-9]{1,6}$" }, "description": "Offset into the collection list (see collectionsNext)" }
        ],
        "responses": { "200": { "$ref": "#/components/responses/AddressNftPage" }, "400": { "$ref": "#/components/responses/BadRequest" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" } }
      }
    },
    "/v1/addresses/{address}/tokens": {
      "get": {
        "operationId": "listAddressTokenHoldings",
        "summary": "List token and NFT holdings observed for an address",
        "description": "Balances computed from indexed history (scope: indexed), not node-confirmed. coverage says whether that history is complete; truncated only means this response hit its row cap. An empty or short list in a partially indexed range is not proof that the wallet holds nothing.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }],
        "responses": {
          "200": { "description": "Indexed holdings", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "truncated", "coverage", "scope"], "properties": {
            "items": { "type": "array", "items": { "type": "object", "required": ["token", "standard", "balance"], "properties": { "token": { "$ref": "#/components/schemas/Address" }, "standard": { "enum": ["erc20", "erc721", "erc1155"] }, "balance": { "type": "string", "pattern": "^-?[0-9]+$" }, "priceUsd": { "type": ["string", "null"], "pattern": "^[0-9]+(\\.[0-9]+)?$", "description": "ERC-20 only, with market data on: today's USD price; null when unpriced." }, "valueUsd": { "type": ["string", "null"], "pattern": "^[0-9]+(\\.[0-9]+)?$", "description": "ERC-20 only: balance × today's price, truncated to cents. Not a historical value." } } } },
            "usd": { "type": ["object", "null"], "description": "With market data on: the sum of priced ERC-20 valueUsd, and the oldest price time used.", "properties": { "total": { "type": "string" }, "observedAt": { "type": "string", "format": "date-time" } } },
            "truncated": { "type": "boolean", "description": "The response hit the 5,000-row cap. Says nothing about history completeness." },
            "coverage": { "$ref": "#/components/schemas/Coverage" },
            "scope": { "const": "indexed" }
          } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/addresses/{address}/apestake": {
      "get": {
        "operationId": "getAddressApeStake",
        "summary": "Read an address's ApeCoin staking positions on ApeChain and legacy Ethereum staking",
        "description": "Current node reads, one pinned block hash per chain. The wallet's BAYC, MAYC and BAKC ids come from the Ethereum originals (at most 50 per collection; truncated says more exist), then each id is read from the ApeChain staking contract. A position whose ApeChain copy of the NFT (ownerOf on ApeChain) is not the address has shadowOwnerMatches=false and is not summed. A chain section that could not be read is status unavailable with no amounts; it is never zero. Read-only: withdrawals happen on the portal. Complete answers are cached for 60 seconds. Served on ApeChain mainnet (33139) only.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }],
        "responses": {
          "200": { "description": "Staking positions; each chain section is ok or unavailable", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApeStakePositions" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "503": { "description": "Too many staking lookups in flight; retry after Retry-After seconds", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": ["error", "message"], "properties": { "error": { "const": "busy" }, "message": { "type": "string" } } } } } },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/addresses/{address}/bayc-member": {
      "get": {
        "operationId": "getAddressBaycMember",
        "summary": "Check whether an address has a public member profile on the Bored Ape Yacht Club site",
        "description": "Asks the BAYC members API (boredapeyachtclub.com) with a 1.5 second timeout. member is true with profileUrl when the site has a profile for the address, false when it has none, and null when the site did not answer in time, failed or is rate-limiting ApeScan. memberSince is the site's own member-since date, when it has one. True and false answers are cached for an hour; null answers are not cached.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }],
        "responses": {
          "200": { "description": "The profile answer", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": ["address", "member", "profileUrl", "memberSince"], "properties": { "address": { "$ref": "#/components/schemas/Address" }, "member": { "type": ["boolean", "null"] }, "profileUrl": { "type": ["string", "null"], "format": "uri" }, "memberSince": { "type": ["string", "null"], "format": "date-time" } } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/addresses/{address}/shadows": {
      "get": {
        "operationId": "getAddressShadows",
        "summary": "Read an address's NFT shadows here and its BAYC, MAYC and BAKC on Ethereum with their sync state",
        "description": "apechain: balanceOf on every listed shadow here, holdings above zero only. ethereum: the address's BAYC, MAYC and BAKC on Ethereum (tokenOfOwnerByIndex, at most 50 per collection; truncated says more exist), each with its state here: synced (the shadow is this address's), delegated (it is this address's delegate.xyz delegate's), pending (not synced yet) or bridged (bridged to another chain). Current node reads through Multicall3. A chain that could not be read is status unavailable, never empty. Complete answers are cached for 60 seconds. 404 on a chain without NFT shadows.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }],
        "responses": {
          "200": { "description": "Shadow holdings and Ethereum items", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": ["address", "apechain", "ethereum"], "properties": {
            "address": { "$ref": "#/components/schemas/Address" },
            "apechain": { "oneOf": [
              { "type": "object", "additionalProperties": false, "required": ["status", "items"], "properties": { "status": { "const": "ok" }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["shadow", "name", "symbol", "balance"], "properties": { "shadow": { "$ref": "#/components/schemas/Address" }, "name": { "type": "string" }, "symbol": { "type": "string" }, "balance": { "type": "string", "pattern": "^[0-9]+$" } } } } } },
              { "type": "object", "additionalProperties": false, "required": ["status"], "properties": { "status": { "const": "unavailable" } } }
            ] },
            "ethereum": { "oneOf": [
              { "type": "object", "additionalProperties": false, "required": ["status", "items", "truncated"], "properties": { "status": { "const": "ok" }, "truncated": { "type": "boolean" }, "items": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["shadow", "symbol", "tokenId", "state", "owner", "delegate"], "properties": { "shadow": { "$ref": "#/components/schemas/Address" }, "symbol": { "type": "string" }, "tokenId": { "type": "string", "pattern": "^[0-9]+$" }, "state": { "enum": ["synced", "delegated", "pending", "bridged"] }, "owner": { "oneOf": [{ "$ref": "#/components/schemas/Address" }, { "type": "null" }], "description": "ownerOf here; null when never synced." }, "delegate": { "oneOf": [{ "$ref": "#/components/schemas/Address" }, { "type": "null" }], "description": "The delegate.xyz delegate the shadow follows, when it is not this address." } } } } } },
              { "type": "object", "additionalProperties": false, "required": ["status"], "properties": { "status": { "const": "unavailable" } } }
            ] }
          } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/addresses/{address}/balance-history": {
      "get": {
        "operationId": "getAddressBalanceHistory",
        "summary": "List the blocks where an address's APE balance changed",
        "description": "Newest first. The index lists the blocks where the address sent a transaction or moved APE (value or internal transfers); the node gives the exact balance after each block and after the block before, so every point is exact even while the index is partial. Blocks whose balance did not change are left out, so a page can hold fewer than limit items (or none) and still have a next cursor. txHash is the address's last indexed transaction in that block; txCount counts them.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }, { "$ref": "#/components/parameters/Limit" }, { "$ref": "#/components/parameters/Cursor" }],
        "responses": {
          "200": { "description": "One page of balance changes", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "next"], "properties": { "items": { "type": "array", "maxItems": 100, "items": { "type": "object", "required": ["blockNumber", "timestamp", "txHash", "txCount", "balance", "delta"], "properties": { "blockNumber": { "type": "integer", "minimum": 0 }, "timestamp": { "type": "integer", "description": "Unix seconds." }, "txHash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "txCount": { "type": "integer", "minimum": 1 }, "balance": { "type": "string", "pattern": "^[0-9]+$", "description": "Wei after the block." }, "delta": { "type": "string", "pattern": "^-?[0-9]+$", "description": "Signed wei change in the block; never 0." } } } }, "next": { "type": ["string", "null"] } } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" },
          "503": { "description": "The node did not answer; balance history could not be read", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": ["error", "message"], "properties": { "error": { "enum": ["node_unavailable"] }, "message": { "type": "string" } } } } } }
        }
      }
    },
    "/v1/transactions/{hash}/l2-to-l1": {
      "get": {
        "operationId": "getTransactionL2ToL1Messages",
        "summary": "Read the L2 to L1 messages in an ApeChain transaction and their status on Arbitrum One",
        "description": "Decodes every ArbSys L2ToL1Tx log in the receipt (withdrawEth and sendTxToL1; at most 20, truncated says more exist) and reads each message's status on Arbitrum One, ApeChain's parent chain, at one pinned block: unconfirmed (the latest confirmed rollup node does not cover its position yet), confirmed (covered and not executed; claim it on the ApeChain portal with the included outbox proof), executed (Outbox.isSpent), or unknown (the parent chain could not be read; this never means unconfirmed). estimatedConfirmAt is an estimate: the parent block ethBlockNum plus the rollup's confirmPeriodBlocks, at 12 seconds per block. Read-only: ApeScan never signs or executes. Answers whose messages are all executed are cached for 60 seconds. Served on ApeChain mainnet (33139) only.",
        "parameters": [{ "name": "hash", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" } }],
        "responses": {
          "200": { "description": "Messages in log order; an empty list when the transaction sent none", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/L2ToL1Messages" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "503": { "description": "ApeChain or the parent-chain endpoint is not available, or too many lookups are in flight (busy, with Retry-After)", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": ["error", "message"], "properties": { "error": { "enum": ["unavailable", "busy"] }, "message": { "type": "string" } } } } } },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/txs/{hash}": {
      "get": {
        "operationId": "getTransaction",
        "summary": "Read one transaction",
        "description": "Returns the indexed transaction and execution evidence. Failed transactions include a bounded node trace explanation when available. ERC-4337 handleOps responses identify the bundler, UserOperation sender, nonce, paymaster, AA code and failed UserOperationRevertReason events. EIP-7702 authorization data is present only for type 4 transactions.",
        "parameters": [{ "name": "hash", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" } }],
        "responses": {
          "200": { "description": "Transaction detail", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionDetail" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" },
          "503": { "description": "The node could not be reached for a transaction not in the index", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "message"], "properties": { "error": { "const": "node_unavailable" }, "message": { "type": "string" } } } } } }
        }
      }
    },
    "/v1/txs/{hash}/state": {
      "get": {
        "operationId": "getTransactionState",
        "summary": "Read the APE balance changes a transaction made",
        "description": "APE balance before and after the transaction for every account it changed, from the node's prestateTracer in diff mode. Exact wei strings, gas fee included. An account created by the transaction starts at 0; an account the transaction self-destructed ends at 0. Ordered by the size of the change, largest first. A traced answer is cached for an hour. 503 trace_unavailable means the node could not trace the transaction (including a hash the node does not know); retry later.",
        "parameters": [{ "name": "hash", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "description": "Transaction hash" }],
        "responses": {
          "200": { "description": "APE balance changes, largest change first", "content": { "application/json": { "schema": { "type": "object", "required": ["hash", "balances"], "properties": { "hash": { "type": "string", "pattern": "^0x[0-9a-f]{64}$" }, "balances": { "type": "array", "items": { "type": "object", "required": ["address", "before", "after"], "properties": { "address": { "$ref": "#/components/schemas/Address" }, "before": { "type": "string", "pattern": "^[0-9]+$", "description": "Wei before the transaction." }, "after": { "type": "string", "pattern": "^[0-9]+$", "description": "Wei after the transaction." } } } } } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "503": { "description": "The node could not trace this transaction right now", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": ["error", "message"], "properties": { "error": { "const": "trace_unavailable" }, "message": { "type": "string" } } } } } },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/txs/{hash}/shadow-read": {
      "get": {
        "operationId": "getTransactionShadowRead",
        "summary": "Link an NFT shadow sync request to its LayerZero delivery",
        "description": "For a sync request (a shadow's read: Beacon ReadTriggered and a LayerZero packet to a read channel) or its delivery (PacketDelivered from that read channel to the Beacon), both legs, matched by the packet's nonce. request.fee is the LayerZero fee paid in wei: what EndpointV2 forwarded to the read library. A leg not found within 100,000 blocks is null. 404 when the transaction is neither leg. See docs/shadows.md.",
        "parameters": [{ "name": "hash", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "description": "Transaction hash" }],
        "responses": {
          "200": { "description": "Both legs of the sync", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": ["nonce", "request", "delivery"], "properties": {
            "nonce": { "type": "string", "pattern": "^[0-9]+$", "description": "The LayerZero packet nonce." },
            "request": { "oneOf": [{ "type": "null" }, { "type": "object", "additionalProperties": false, "required": ["txHash", "blockNumber", "timestamp", "from", "shadow", "tokenIds", "fee"], "properties": { "txHash": { "type": "string", "pattern": "^0x[0-9a-f]{64}$" }, "blockNumber": { "type": "integer" }, "timestamp": { "type": "integer" }, "from": { "oneOf": [{ "$ref": "#/components/schemas/Address" }, { "type": "null" }], "description": "Who paid." }, "shadow": { "oneOf": [{ "$ref": "#/components/schemas/Address" }, { "type": "null" }] }, "tokenIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "pattern": "^[0-9]+$" } }, "fee": { "type": ["string", "null"], "pattern": "^[0-9]+$" } } }] },
            "delivery": { "oneOf": [{ "type": "null" }, { "type": "object", "additionalProperties": false, "required": ["txHash", "blockNumber", "timestamp"], "properties": { "txHash": { "type": "string", "pattern": "^0x[0-9a-f]{64}$" }, "blockNumber": { "type": "integer" }, "timestamp": { "type": "integer" } } }] }
          } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/blocks/at-time": {
      "get": {
        "operationId": "getBlockAtTime",
        "summary": "Find the block at a Unix time",
        "description": "The last block at or before timestamp (closest=before) or the first block at or after it (closest=after). The index answers (source index) when it holds the block and its neighbour across the boundary; otherwise the node answers (source node) with a bounded batched header search. block is null when no such block exists yet. The same lookup backs the Etherscan getblocknobytime action.",
        "parameters": [
          { "name": "timestamp", "in": "query", "required": true, "schema": { "type": "integer", "minimum": 0, "maximum": 4294967295 }, "description": "Unix seconds, at most 11 digits" },
          { "name": "closest", "in": "query", "schema": { "enum": ["before", "after"], "default": "before" }, "description": "Nearest block before or after the time" }
        ],
        "responses": {
          "200": { "description": "The block at that time, or null", "content": { "application/json": { "schema": { "type": "object", "required": ["timestamp", "closest", "block", "source"], "properties": { "timestamp": { "type": "integer", "description": "The requested Unix time." }, "closest": { "enum": ["before", "after"] }, "block": { "anyOf": [{ "type": "object", "required": ["number", "timestamp"], "properties": { "number": { "type": "integer", "minimum": 0 }, "timestamp": { "type": "integer", "description": "Block time, Unix seconds." } } }, { "type": "null" }] }, "source": { "enum": ["index", "node"] } } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "503": { "description": "The node search could not finish in time; retry shortly", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": ["error", "message"], "properties": { "error": { "const": "unavailable" }, "message": { "type": "string" } } } } } },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/batches": {
      "get": {
        "operationId": "listBatches",
        "summary": "List sequencer batches posted to Arbitrum One",
        "description": "SequencerBatchDelivered events from ApeChain's SequencerInbox on Arbitrum One, newest first, read from the parent chain (not the index). A page scans back a bounded range of parent-chain blocks, so a page can hold fewer than limit batches while next is still set. Registered only on chains with a parent chain. First pages are cached for 60 seconds.",
        "parameters": [{ "$ref": "#/components/parameters/Limit" }, { "$ref": "#/components/parameters/Cursor" }],
        "responses": {
          "200": { "description": "One page of batches", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "next", "parentChainId", "sequencerInbox"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": ["number", "parentBlock", "parentTx", "timestamp", "delayedMessagesRead"], "properties": { "number": { "type": "string", "pattern": "^[0-9]+$", "description": "Batch sequence number." }, "parentBlock": { "type": "integer", "description": "Arbitrum One block that posted the batch." }, "parentTx": { "type": "string", "pattern": "^0x[0-9a-f]{64}$", "description": "Arbitrum One transaction that posted the batch." }, "timestamp": { "type": "integer", "description": "Parent block time, Unix seconds." }, "delayedMessagesRead": { "type": "string", "pattern": "^[0-9]+$", "description": "Parent-chain messages read once this batch was included." } } } }, "next": { "type": ["string", "null"] }, "parentChainId": { "type": "integer", "const": 42161 }, "sequencerInbox": { "$ref": "#/components/schemas/Address" } } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "503": { "description": "Arbitrum One cannot be read right now", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": ["error", "message"], "properties": { "error": { "const": "unavailable" }, "message": { "type": "string" } } } } } },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/bridges": {
      "get": {
        "operationId": "listBridges",
        "summary": "List bridge activity",
        "description": "Indexed LayerZero OFT, Stargate and Relay bridge events on the served chain, newest first. LayerZero packet headers provide the configured peer, source or destination endpoint id, nonce and recipient when present; unknown endpoint ids and missing peer data remain explicit. The scan is bounded to the recent indexed window. First pages are cached for 10 seconds.",
        "parameters": [{ "$ref": "#/components/parameters/Limit" }, { "$ref": "#/components/parameters/Cursor" }],
        "responses": {
          "200": { "description": "One page of bridge activity", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": ["items", "next"], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/BridgeActivity" } }, "next": { "type": ["string", "null"] }, "labels": { "type": "object", "additionalProperties": { "type": "object" } } } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/txs/deposits": {
      "get": {
        "operationId": "listDeposits",
        "summary": "List deposits from Arbitrum One",
        "description": "Indexed transactions created by Arbitrum One messages, newest first: kind deposit is native APE sent from the parent chain (to is the recipient); kind message is a retryable call such as a token bridge (to is the called contract, null for a contract creation; value is the call value). First pages are cached for 10 seconds.",
        "parameters": [{ "$ref": "#/components/parameters/Limit" }, { "$ref": "#/components/parameters/Cursor" }],
        "responses": {
          "200": { "description": "One page of deposits", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "next"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": ["hash", "blockNumber", "timestamp", "kind", "to", "value"], "properties": { "hash": { "type": "string" }, "blockNumber": { "type": "integer" }, "timestamp": { "type": "integer" }, "kind": { "enum": ["deposit", "message"] }, "to": { "type": ["string", "null"] }, "value": { "type": "string", "pattern": "^[0-9]+$", "description": "Wei delivered to to." } } } }, "next": { "type": ["string", "null"] } } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/txs/exits": {
      "get": {
        "operationId": "listExits",
        "summary": "List withdrawals to Arbitrum One",
        "description": "Indexed ArbSys L2ToL1Tx messages (withdrawals and other L2 to L1 calls), newest first. position is the outbox position used to claim on Arbitrum One; /v1/transactions/{hash}/l2-to-l1 reads each message's status. Malformed logs are skipped, so a page can hold fewer than limit items while next is still set. First pages are cached for 10 seconds.",
        "parameters": [{ "$ref": "#/components/parameters/Limit" }, { "$ref": "#/components/parameters/Cursor" }],
        "responses": {
          "200": { "description": "One page of exits", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "next"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": ["txHash", "blockNumber", "timestamp", "from", "to", "value", "position"], "properties": { "txHash": { "type": "string" }, "blockNumber": { "type": "integer" }, "timestamp": { "type": "integer" }, "from": { "$ref": "#/components/schemas/Address" }, "to": { "$ref": "#/components/schemas/Address" }, "value": { "type": "string", "pattern": "^[0-9]+$", "description": "Wei withdrawn." }, "position": { "type": "string", "pattern": "^[0-9]+$", "description": "Outbox position." } } } }, "next": { "type": ["string", "null"] } } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/txs/aa": {
      "get": {
        "operationId": "listAaBundles",
        "summary": "List ERC-4337 bundles",
        "description": "Indexed transactions sent to the ERC-4337 EntryPoint v0.6 or v0.7, newest first, with the user operations each ran: userOps and failedOps count UserOperationEvent logs, and accounts lists up to 3 smart accounts in first-seen order. First pages are cached for 10 seconds.",
        "parameters": [{ "$ref": "#/components/parameters/Limit" }, { "$ref": "#/components/parameters/Cursor" }],
        "responses": {
          "200": { "description": "One page of bundles", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "next"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": ["hash", "blockNumber", "timestamp", "bundler", "entryPoint", "version", "status", "userOps", "failedOps", "accounts"], "properties": { "hash": { "type": "string" }, "blockNumber": { "type": "integer" }, "timestamp": { "type": "integer" }, "bundler": { "$ref": "#/components/schemas/Address" }, "entryPoint": { "$ref": "#/components/schemas/Address" }, "version": { "enum": ["0.6", "0.7"] }, "status": { "enum": ["success", "failed"] }, "userOps": { "type": "integer", "minimum": 0 }, "failedOps": { "type": "integer", "minimum": 0 }, "accounts": { "type": "array", "maxItems": 3, "items": { "$ref": "#/components/schemas/Address" } } } } }, "next": { "type": ["string", "null"] } } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/labels": {
      "get": {
        "operationId": "listLabels",
        "summary": "List the public name tags for this chain",
        "description": "The curated public labels, each with the official source that publishes the address, sorted by name. Small and static: no paging. q matches a name substring (case-insensitive) or a lowercase address substring; categories always lists every category. Cached for 5 minutes.",
        "parameters": [{ "name": "q", "in": "query", "schema": { "type": "string", "maxLength": 128 }, "description": "Name or address substring." }, { "name": "category", "in": "query", "schema": { "enum": ["DEX", "Aggregator", "Bridge", "Messaging", "NFT marketplace", "Staking", "Account abstraction", "Utility", "Gambling", "Oracle", "Token", "Collection"] }, "description": "Only this category." }],
        "responses": {
          "200": { "description": "Matching labels", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "total", "categories"], "properties": { "items": { "type": "array", "items": { "type": "object", "required": ["address", "name", "category", "source"], "properties": { "address": { "type": "string", "pattern": "^0x[0-9a-f]{40}$" }, "name": { "type": "string" }, "category": { "enum": ["DEX", "Aggregator", "Bridge", "Messaging", "NFT marketplace", "Staking", "Account abstraction", "Utility", "Gambling", "Oracle", "Token", "Collection"] }, "source": { "type": "string", "description": "Where the address is published, plus the on-chain check that confirms it." }, "protocol": { "type": "object", "required": ["name", "url"], "properties": { "name": { "type": "string" }, "url": { "type": "string", "format": "uri" } }, "description": "The project behind the contract." } } } }, "total": { "type": "integer", "minimum": 0 }, "categories": { "type": "array", "items": { "enum": ["DEX", "Aggregator", "Bridge", "Messaging", "NFT marketplace", "Staking", "Account abstraction", "Utility", "Gambling", "Oracle", "Token", "Collection"] } } } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/protocols": {
      "get": {
        "operationId": "listProtocols",
        "summary": "List the projects tagged on this chain with recent activity",
        "description": "Each project in the curated registry, with how many contracts it has here and the indexed transactions sent to them, and their distinct senders, over the last `days` days. Busiest first. Contracts are the project's name-tag rows plus every contract a listed project deployer created. Refreshed hourly.",
        "responses": {
          "200": { "description": "Projects", "content": { "application/json": { "schema": { "type": "object", "required": ["days", "items"], "properties": { "days": { "type": "integer", "minimum": 1 }, "items": { "type": "array", "items": { "type": "object", "required": ["id", "name", "category", "url", "contracts", "txs", "users"], "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "category": { "type": "string" }, "url": { "type": "string", "format": "uri" }, "contracts": { "type": "integer", "minimum": 0 }, "txs": { "type": "integer", "minimum": 0 }, "users": { "type": "integer", "minimum": 0 } } } } } } } } },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },

    "/v1/tokens": {"get": {"operationId": "listTokens", "summary": "List tokens with prices", "description": "Tokens with readable metadata. rank is the holder rank across every token. sort=liquidity, market_cap (circulating market cap, else FDV), volume, change or price orders ERC-20 tokens whose pools hold at least the server's liquidity floor (1000 USD by default) highest first; other tokens follow in holder order, lookalikes last. ERC-20 rows carry market (null when unpriced) when market data is enabled.", "parameters": [{"name": "sort", "in": "query", "schema": {"enum": ["holders", "market_cap", "volume", "change", "price", "liquidity"], "default": "holders"}}, {"name": "standard", "in": "query", "schema": {"enum": ["erc20", "erc721", "erc1155"]}}, {"name": "q", "in": "query", "schema": {"type": "string"}, "description": "Name or symbol substring, or an address prefix of 6 or more characters."}, {"$ref": "#/components/parameters/Limit"}, {"$ref": "#/components/parameters/Cursor"}], "responses": {"200": {"description": "One page of tokens", "content": {"application/json": {"schema": {"type": "object", "required": ["items", "next", "total"], "properties": {"items": {"type": "array", "items": {"type": "object", "required": ["address", "standard", "name", "symbol", "holders", "rank"], "properties": {"address": {"$ref": "#/components/schemas/Address"}, "standard": {"enum": ["erc20", "erc721", "erc1155"]}, "name": {"type": "string"}, "symbol": {"type": "string"}, "logo": {"type": ["string", "null"], "pattern": "^/v1/tokens/0x[0-9a-f]{40}/logo$", "description": "API path of a Camelot token-list logo, or null when no Camelot logo is cached."}, "decimals": {"type": ["integer", "null"]}, "totalSupply": {"type": "string", "pattern": "^[0-9]+$"}, "holders": {"type": "integer"}, "rank": {"type": "integer"}, "coverage": {"$ref": "#/components/schemas/Coverage"}, "market": {"anyOf": [{"$ref": "#/components/schemas/TokenMarket"}, {"type": "null"}]}, "lookalikeOf": {"type": "object", "required": ["address", "symbol"], "description": "An ERC-20 token below the liquidity floor with the symbol of a deeper token, or of the native coin (address null).", "properties": {"address": {"anyOf": [{"$ref": "#/components/schemas/Address"}, {"type": "null"}]}, "symbol": {"type": "string"}}}}}}, "next": {"type": ["string", "null"]}, "total": {"type": "integer"}}}}}}, "400": {"$ref": "#/components/responses/BadRequest"}, "429": {"$ref": "#/components/responses/NativeRateLimited"}, "500": {"$ref": "#/components/responses/NativeInternal"}}}},
    "/v1/prices/ape": {"get": {"operationId": "getApePrice", "summary": "Read APE's price", "description": "APE's USD price, 24 h change and market cap from DexScreener (ApeCoin's deepest market), cached for a minute.", "responses": {"200": {"description": "APE price", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApePrice"}}}}, "503": {"description": "DexScreener is unavailable and no recent price is cached.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "429": {"$ref": "#/components/responses/NativeRateLimited"}, "500": {"$ref": "#/components/responses/NativeInternal"}}}},
    "/v1/dex/trades": {
      "get": {
        "operationId": "listDexTrades",
        "summary": "List indexed DEX trades.",
        "description": "Recent swaps decoded from indexed Uniswap V2/V3-style pool events, including Camelot pools. The first page is cached briefly and every response is bounded to the requested page size.",
        "parameters": [{ "$ref": "#/components/parameters/Limit" }, { "$ref": "#/components/parameters/Cursor" }],
        "responses": {
          "200": { "description": "Indexed DEX trades", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "next", "labels"], "properties": {
            "items": { "type": "array", "items": { "$ref": "#/components/schemas/DexTrade" } }, "next": { "type": ["string", "null"] }, "labels": { "type": "object" }
          } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/dex/pairs": {
      "get": {
        "operationId": "listDexPairs",
        "summary": "List indexed trading pairs.",
        "description": "The bounded directory of indexed DEX pools, with trailing 24-hour volume, observed price and current USD liquidity when the pool is quoted in a supported stablecoin or WAPE.",
        "responses": {
          "200": { "description": "Indexed trading pairs", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DexPairs" } } } },
          "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/tokens/{address}/dex-trades": {
      "get": {
        "operationId": "listTokenDexTrades",
        "summary": "List token DEX trades.",
        "description": "Recent indexed swaps for one token, decoded into buy and sell legs with exact token amounts, rates, supported USD values and pool labels.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }, { "$ref": "#/components/parameters/Limit" }, { "$ref": "#/components/parameters/Cursor" }],
        "responses": {
          "200": { "description": "Token DEX trades", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "next", "labels"], "properties": {
            "items": { "type": "array", "items": { "$ref": "#/components/schemas/DexTrade" } }, "next": { "type": ["string", "null"] }, "labels": { "type": "object" }
          } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/tokens/{address}/trading-pairs": {
      "get": {
        "operationId": "listTokenTradingPairs",
        "summary": "List token trading pairs.",
        "description": "Indexed pools for one token with trailing 24-hour volume, observed price, swap count and current USD liquidity when supported.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }],
        "responses": {
          "200": { "description": "Token trading pairs", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DexPairs" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/tokens/{address}": {
      "get": {
        "operationId": "getToken",
        "summary": "Read one indexed or node-discovered token collection",
        "parameters": [{ "$ref": "#/components/parameters/Address" }],
        "responses": { "200": { "description": "Token collection", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TokenDetail" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "404": { "$ref": "#/components/responses/NotFound" }, "503": { "description": "The token is not indexed and ERC-165 discovery was unavailable or inconclusive; retry without inferring that the address is not an NFT.", "headers": { "Retry-After": { "description": "Retry after 10 seconds.", "schema": { "const": "10" } }, "Cache-Control": { "description": "Response must not be stored.", "schema": { "const": "no-store" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TokenDetailUnavailable" } } } }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" } }
      }
    },
    "/v1/nfts/{address}/{id}": {
      "get": {
        "operationId": "getNft",
        "summary": "Read one NFT item and its indexed metadata",
        "parameters": [{ "$ref": "#/components/parameters/Address" }, { "$ref": "#/components/parameters/TokenId" }],
        "responses": { "200": { "description": "NFT item", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NftDetail" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "404": { "description": "A typed not-NFT classification (NftNotAnNft), an item absence with scoped collection context (NftItemAbsent), or a generic not-found error", "content": { "application/json": { "schema": { "anyOf": [{ "$ref": "#/components/schemas/NftItemAbsent" }, { "$ref": "#/components/schemas/NftNotAnNft" }, { "$ref": "#/components/schemas/Error" }] } } } }, "503": { "description": "Lookup unavailable or inconclusive ERC-165 discovery: nothing is indexed and the node could not establish an NFT standard; retry (Retry-After)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NftItemUnavailable" } } } }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" } }
      }
    },
    "/v1/nfts/{address}/{id}/image": {
      "get": {
        "operationId": "getNftImage",
        "summary": "Read an NFT item's image through the sandboxed media proxy",
        "description": "Serves only the image recorded in the item's metadata, fetched under the SSRF guard and size limits, with a sandboxing Content-Security-Policy. Use the `image` path from the item's metadata, which carries the current `v`. Add `w` for a WebP thumbnail that fits a `w` x `w` box, and `fmt=png` with it for a PNG thumbnail (for clients that cannot decode WebP); SVG, GIF and animated images, and images that cannot be resized, are returned as the original.",
        "parameters": [
          { "$ref": "#/components/parameters/Address" }, { "$ref": "#/components/parameters/TokenId" },
          { "name": "v", "in": "query", "description": "Media version from the metadata `image` path. A missing or outdated version redirects to the current one.", "schema": { "type": "string", "pattern": "^[0-9a-f]{16}$" } },
          { "name": "w", "in": "query", "description": "Thumbnail width in pixels.", "schema": { "enum": ["128", "256", "512"] } },
          { "name": "fmt", "in": "query", "description": "Thumbnail encoding; needs `w`. Defaults to `webp`.", "schema": { "enum": ["webp", "png"], "default": "webp" } }
        ],
        "responses": {
          "200": { "description": "Image bytes (`image/webp` for a thumbnail, `image/png` with `fmt=png`)", "content": { "image/*": { "schema": { "type": "string", "format": "binary" } } } },
          "302": { "description": "Redirect to the current media version, keeping `w` and `fmt`" },
          "304": { "description": "Not modified (If-None-Match matched the body ETag)" },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "404": { "description": "No image for this item, or the image could not be fetched", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "errorClass"], "properties": { "error": { "const": "image_unavailable" }, "errorClass": { "type": "string" } } } } } },
          "503": { "description": "Too many media fetches in progress; retry (Retry-After)", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "message"], "properties": { "error": { "const": "media_busy" }, "message": { "type": "string" } } } } } },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/nfts/{address}/{id}/animation": {
      "get": {
        "operationId": "getNftAnimation",
        "summary": "Read an NFT item's animation through the sandboxed media proxy",
        "description": "Serves the item's stored animation_url only when its bytes sniff as video, audio or a still image, fetched under the same SSRF guard, blocklist, size and time limits and sandboxing Content-Security-Policy as images. HTML, scripts and 3D models are never served. Supports byte ranges (Accept-Ranges: bytes, If-Range with the strong ETag) for seeking. Use the `animation` path from the item's metadata, which carries the current `v`.",
        "parameters": [
          { "$ref": "#/components/parameters/Address" }, { "$ref": "#/components/parameters/TokenId" },
          { "name": "v", "in": "query", "description": "Media version from the metadata animation path. A missing or outdated version redirects to the current one.", "schema": { "type": "string", "pattern": "^[0-9a-f]{16}$" } },
          { "name": "Range", "in": "header", "description": "One `bytes=start-end` range; multi-range or malformed values return the whole body.", "schema": { "type": "string" } }
        ],
        "responses": {
          "200": { "description": "Animation bytes", "content": { "video/*": { "schema": { "type": "string", "format": "binary" } }, "audio/*": { "schema": { "type": "string", "format": "binary" } }, "image/*": { "schema": { "type": "string", "format": "binary" } } } },
          "206": { "description": "The requested byte range (Content-Range)", "content": { "video/*": { "schema": { "type": "string", "format": "binary" } }, "audio/*": { "schema": { "type": "string", "format": "binary" } }, "image/*": { "schema": { "type": "string", "format": "binary" } } } },
          "302": { "description": "Redirect to the current media version" },
          "304": { "description": "Not modified (If-None-Match matched the body ETag)" },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "404": { "description": "No animation for this item, or it could not be fetched or is not playable media", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "errorClass"], "properties": { "error": { "const": "animation_unavailable" }, "errorClass": { "type": "string" } } } } } },
          "416": { "description": "Range not satisfiable (Content-Range: bytes */size)" },
          "503": { "description": "Too many media fetches in progress; retry (Retry-After)", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "message"], "properties": { "error": { "const": "media_busy" }, "message": { "type": "string" } } } } } },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/nfts/{address}/{id}/refresh": {
      "get": {
        "operationId": "getNftRefreshStatus",
        "summary": "Read the metadata refresh status of an NFT item",
        "description": "Progress of the latest viewer-requested metadata refresh for one item. state is idle when none is recorded; expired means an accepted request was lost and can be requested again at once. cooldownUntil (Unix seconds) is when the item can be refreshed again, null for now. Never cached.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }, { "$ref": "#/components/parameters/TokenId" }],
        "responses": {
          "200": { "description": "Refresh state", "content": { "application/json": { "schema": { "type": "object", "required": ["state", "requestedAt", "startedAt", "finishedAt", "outcome", "errorClass", "fetchedAt", "cooldownUntil"], "properties": { "state": { "enum": ["idle", "queued", "running", "completed", "expired"] }, "requestedAt": { "type": ["integer", "null"], "description": "Unix seconds." }, "startedAt": { "type": ["integer", "null"], "description": "Unix seconds." }, "finishedAt": { "type": ["integer", "null"], "description": "Unix seconds." }, "outcome": { "enum": ["updated", "unchanged", "failed", null] }, "errorClass": { "type": ["string", "null"] }, "fetchedAt": { "type": ["integer", "null"], "description": "Unix seconds." }, "cooldownUntil": { "type": ["integer", "null"], "description": "Unix seconds; null when the item can be refreshed now." } } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "503": { "description": "Refresh status is unavailable right now (Retry-After)", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "message"], "properties": { "error": { "const": "refresh_unavailable" }, "message": { "type": "string" } } } } } },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      },
      "post": {
        "operationId": "refreshNftMetadata",
        "summary": "Ask the metadata worker to refetch an NFT item's metadata",
        "description": "Queues one item for a metadata refetch (for reveals). Takes no body: the worker reads the token URI from the contract through the usual scam gate. At most 6 requests per client per minute; one refresh per item every 300 seconds, and a repeat while queued or running returns the same pending state (202). An item still in cooldown answers 429 with its refresh state plus error cooldown and Retry-After; the per-client limit answers 429 rate_limited. The response body has the same fields as GET.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }, { "$ref": "#/components/parameters/TokenId" }],
        "responses": {
          "202": { "description": "Queued, or already queued or running (deduplicated); the item's refresh state", "content": { "application/json": { "schema": { "type": "object", "required": ["state", "requestedAt", "startedAt", "finishedAt", "outcome", "errorClass", "fetchedAt", "cooldownUntil"], "properties": { "state": { "enum": ["idle", "queued", "running", "completed", "expired"] }, "requestedAt": { "type": ["integer", "null"] }, "startedAt": { "type": ["integer", "null"] }, "finishedAt": { "type": ["integer", "null"] }, "outcome": { "enum": ["updated", "unchanged", "failed", null] }, "errorClass": { "type": ["string", "null"] }, "fetchedAt": { "type": ["integer", "null"] }, "cooldownUntil": { "type": ["integer", "null"] } } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "403": { "description": "Flagged collection, or the item's metadata is quarantined by the blocklist", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "message"], "properties": { "error": { "enum": ["blocked_collection", "blocked_host", "image_blocked_host"] }, "message": { "type": "string" } } } } } },
          "404": { "$ref": "#/components/responses/NotFound" },
          "503": { "description": "Refresh requests are unavailable or too many are pending (Retry-After)", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "message"], "properties": { "error": { "enum": ["refresh_unavailable", "refresh_busy"] }, "message": { "type": "string" } } } } } },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/nfts/{address}/{id}/balance": {
      "get": {
        "operationId": "getNftBalance",
        "summary": "Check one wallet's current NFT balance at a pinned block",
        "parameters": [{ "$ref": "#/components/parameters/Address" }, { "$ref": "#/components/parameters/TokenId" }, { "name": "owner", "in": "query", "required": true, "schema": { "$ref": "#/components/schemas/Address" } }],
        "responses": { "200": { "description": "Current node result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NftBalanceResult" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "404": { "description": "Compliant ERC-165 negatives for both NFT standards", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NftBalanceNotNft" } } } }, "503": { "$ref": "#/components/responses/NftBalanceUnavailable" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" } }
      }
    },
    "/v1/nfts/balances": {
      "post": {
        "operationId": "checkNftBalances",
        "summary": "Check up to 50 current NFT balances at one shared pinned block",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["items"], "properties": { "items": { "type": "array", "minItems": 1, "maxItems": 50, "items": { "type": "object", "required": ["owner", "contract", "id"], "properties": { "owner": { "$ref": "#/components/schemas/Address" }, "contract": { "$ref": "#/components/schemas/Address" }, "id": { "type": "string", "pattern": "^[0-9]{1,78}$" } } } } } } } } },
        "responses": { "200": { "description": "Input-order results at one pinned block; unavailable entries remain entries, never zero balances.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NftBalanceBatch" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "503": { "$ref": "#/components/responses/NftBalanceUnavailable" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" } }
      }
    },
    "/v1/transactions/decode": {
      "post": {
        "operationId": "decodeSignedTransaction",
        "summary": "Review a signed ApeChain transaction without submitting it",
        "description": "Decodes canonical signed legacy (EIP-155), EIP-2930 or EIP-1559 bytes for chain 33139, checks low-s and exact re-encoding, and recovers the sender. Nothing is sent to a node. Never send a private key or seed phrase; this API does not sign. The body must be exactly these JSON fields with Content-Type application/json and no query string.",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignedTransactionDecodeRequest" } } } },
        "responses": { "200": { "description": "The reviewed transaction. Amounts are exact decimal wei strings.", "headers": { "Cache-Control": { "schema": { "const": "no-store" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignedTransactionReview" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "413": { "$ref": "#/components/responses/SignedTransactionTooLarge" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" } }
      }
    },
    "/v1/transactions/broadcast": {
      "post": {
        "operationId": "broadcastSignedTransaction",
        "summary": "Submit reviewed signed bytes to the ApeChain node once",
        "description": "Submits already-signed bytes after the same review as decode. Each server process admits at most 2 submissions per second and 2 at once, each bounded by a 5 second deadline. confirmHash must equal the reviewed transaction hash. A fresh eth_chainId check must return 33139 before eth_sendRawTransaction. Once the write may have started, the server never resends it: a repeat of the same hash returns the remembered outcome with duplicate true. outcome_unknown means the node may or may not have the transaction; look it up by hash before signing anything new. Never send a private key or seed phrase; this API does not sign.",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignedTransactionBroadcastRequest" } } } },
        "responses": {
          "202": { "description": "node_accepted (the node returned the matching hash; indexing may take a moment) or outcome_unknown (do not resubmit blindly).", "headers": { "Cache-Control": { "schema": { "const": "no-store" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BroadcastOutcome" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "413": { "$ref": "#/components/responses/SignedTransactionTooLarge" },
          "422": { "description": "node_error: the node refused the transaction. nodeError carries its code and message as plain text.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BroadcastOutcome" } } } },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "503": { "description": "not_submitted (chain mismatch or the node was unreachable before the write; safe to retry), or a refusal before submission: capacity busy, too many unknown outcomes, or broadcast not configured.", "headers": { "Retry-After": { "schema": { "type": "string", "pattern": "^[0-9]+$" } } }, "content": { "application/json": { "schema": { "oneOf": [{ "$ref": "#/components/schemas/BroadcastOutcome" }, { "$ref": "#/components/schemas/BroadcastRefused" }] } } } },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/nfts/{address}/{id}/activity": {
      "get": {
        "operationId": "listNftActivity",
        "summary": "List canonical indexed activity for an NFT item",
        "parameters": [{ "$ref": "#/components/parameters/Address" }, { "$ref": "#/components/parameters/TokenId" }, { "name": "holder", "in": "query", "description": "Show only transfers involving this wallet.", "schema": { "$ref": "#/components/schemas/Address" } }, { "$ref": "#/components/parameters/Limit" }, { "$ref": "#/components/parameters/Cursor" }],
        "responses": { "200": { "$ref": "#/components/responses/NftActivityPage" }, "400": { "$ref": "#/components/responses/BadRequest" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" } }
      }
    },
    "/v1/nfts/{address}/{id}/provenance": {
      "get": {
        "operationId": "getNftProvenance",
        "summary": "Read an NFT item's mint, owners and sale history",
        "description": "Facts from indexed history for one item. mint is the first indexed mint (a transfer from the zero address, or the ERC-2309 range mint covering the id) with the transaction sender as minter; mint.price is present only when that transaction carried native value: value in wei for units items this collection minted in it. owners counts distinct non-zero recipients and transfers counts indexed movements. heldSince is the latest movement's time for an ERC-721 item that is not burnt. sales lists exact single-item sales paid in APE or WAPE, oldest first, at most 200 (the newest). collection gives the collection's median exact APE sale per bucketDays-day bucket since the item's first listed sale, at most 60 buckets; null when sales is empty.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }, { "$ref": "#/components/parameters/TokenId" }],
        "responses": {
          "200": { "description": "The item's provenance", "content": { "application/json": { "schema": { "type": "object", "required": ["tokenId", "standard", "mint", "owners", "transfers", "heldSince", "sales", "collection", "labels"], "properties": {
            "tokenId": { "type": "string", "pattern": "^[0-9]+$" },
            "standard": { "enum": ["erc721", "erc1155", null] },
            "mint": { "type": ["object", "null"], "required": ["to", "minter", "txHash", "blockNumber", "timestamp", "price"], "properties": { "to": { "$ref": "#/components/schemas/Address" }, "minter": { "anyOf": [{ "$ref": "#/components/schemas/Address" }, { "type": "null" }] }, "txHash": { "type": "string" }, "blockNumber": { "type": "integer" }, "timestamp": { "type": "integer" }, "price": { "type": ["object", "null"], "required": ["value", "units"], "properties": { "value": { "type": "string", "pattern": "^[0-9]+$", "description": "Native value of the mint transaction, in wei." }, "units": { "type": "string", "pattern": "^[0-9]+$", "description": "Units of this collection minted in that transaction." } } } } },
            "owners": { "type": "integer", "minimum": 0 },
            "transfers": { "type": "integer", "minimum": 0 },
            "heldSince": { "type": ["integer", "null"] },
            "sales": { "type": "array", "maxItems": 200, "items": { "type": "object", "required": ["timestamp", "price", "txHash", "marketplace"], "properties": { "timestamp": { "type": "integer" }, "price": { "type": "string", "pattern": "^[0-9]+$", "description": "Price in wei of APE or WAPE." }, "txHash": { "type": "string" }, "marketplace": { "type": "string" } } } },
            "collection": { "type": ["object", "null"], "required": ["bucketDays", "points"], "properties": { "bucketDays": { "type": "integer", "minimum": 1 }, "points": { "type": "array", "items": { "type": "object", "required": ["timestamp", "medianApe", "sales"], "properties": { "timestamp": { "type": "integer", "description": "Bucket start (UTC)." }, "medianApe": { "type": "number", "description": "Median exact single-item sale in APE." }, "sales": { "type": "integer" } } } } } },
            "labels": { "type": "object" }
          } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/nfts/{address}/{id}/rarity": {
      "get": {
        "operationId": "getNftRarity",
        "summary": "Read an NFT item's trait-rarity rank",
        "description": "Rank 1 is the rarest. The score is the sum, over the item's distinct trait values, of N divided by the number of items sharing that value, N being the collection's indexed items with fetched metadata; equal scores share a rank and of is the number of ranked items. Only ERC-721 collections of 20 to 50,000 indexed items with metadata fetched for at least 90% of them are ranked, and only when scores differ; otherwise, or while a ranking is being built, rank and of are null. Rankings are cached for up to six hours.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }, { "$ref": "#/components/parameters/TokenId" }],
        "responses": {
          "200": { "description": "The item's rank, or null", "content": { "application/json": { "schema": { "type": "object", "required": ["tokenId", "rank", "of", "method"], "properties": { "tokenId": { "type": "string", "pattern": "^[0-9]+$" }, "rank": { "type": ["integer", "null"], "minimum": 1 }, "of": { "type": ["integer", "null"], "minimum": 1 }, "method": { "const": "trait_rarity_score" } } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/nfts/collections": {
      "get": { "operationId": "listNftCollections", "summary": "List indexed NFT collections", "parameters": [{ "$ref": "#/components/parameters/Limit" }, { "$ref": "#/components/parameters/Cursor" }, { "name": "sort", "in": "query", "description": "Default holders. top: featured collections first, then collections with enough holders and distinct buyers in the last 7 days, each group by 3·log2(1+buyers) + log2(1+APE volume) + log2(1+holders). volume24h: highest APE and wrapped APE sales volume in the last 24 hours.", "schema": { "enum": ["top", "holders", "items", "transfers", "recent", "name", "address", "volume24h"] } }, { "name": "standard", "in": "query", "schema": { "enum": ["erc721", "erc1155"] } }, { "name": "q", "in": "query", "schema": { "type": "string" } }], "responses": { "200": { "$ref": "#/components/responses/NftCollectionPage" }, "410": { "$ref": "#/components/responses/CursorExpired" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" } } }
    },
    "/v1/nfts/collections/featured": {
      "get": {
        "operationId": "listFeaturedNftCollections",
        "summary": "List collections by indexed sales in the last 24 hours",
        "description": "The \"Top indexed sales · 24h\" ranking: collections ordered by accepted indexed marketplace executions in a 24-hour window anchored at the indexed head, then by address. Flagged collections, bundles, ambiguous, legacy, unrepaired and otherwise unusable executions are excluded and counted in excluded. Volumes stay per currency (raw base units) and are never summed across currencies. Pages come from a frozen snapshot (snapshotExpiresAt); status unavailable carries a reason and no items. A cursor whose snapshot is gone answers 410 cursor_expired.",
        "parameters": [
          { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 12, "default": 3 } },
          { "$ref": "#/components/parameters/Cursor" }
        ],
        "responses": {
          "200": { "description": "One page of the ranking, or status unavailable with a reason", "content": { "application/json": { "schema": { "type": "object", "required": ["status", "criterion", "label", "qualification", "repairPolicy", "excludedDenominator", "flagInput", "total", "offset", "emptyReason", "orderAsOf", "snapshotMode", "snapshotExpiresAt", "metricsLive", "orderCapped", "window", "coverage", "reprocessing", "excluded", "items", "next"], "properties": { "status": { "enum": ["available", "unavailable"] }, "reason": { "enum": ["flag_input_unavailable", "not_indexed", "head_unavailable", "head_changed", "required_evidence_unavailable"], "description": "Present when status is unavailable." }, "criterion": { "const": "top_indexed_sales_24h" }, "label": { "type": "string" }, "qualification": { "type": "object", "required": ["status"], "properties": { "status": { "enum": ["screened", "unavailable"] }, "policy": { "type": "string" }, "basis": { "type": "string" }, "limitations": { "type": "array", "items": { "type": "string" } }, "reason": { "type": "string" } } }, "repairPolicy": { "const": "partial_indexed_evidence_allowed" }, "excludedDenominator": { "type": "object", "required": ["excluded", "flagged"], "properties": { "excluded": { "const": "execution_groups" }, "flagged": { "const": "collections" } } }, "flagInput": { "type": "object", "required": ["status", "source", "revision"], "properties": { "status": { "enum": ["available", "not_provided"] }, "source": { "const": "configured_collection_blocklist" }, "revision": { "type": "string" } } }, "order": { "const": "accepted_executions_desc,address_asc", "description": "Present when status is available." }, "total": { "type": "integer", "minimum": 0 }, "offset": { "type": "integer", "minimum": 0 }, "emptyReason": { "enum": ["no_eligible_sales", "no_eligible_sales_partial", null] }, "orderAsOf": { "type": ["string", "null"], "format": "date-time" }, "snapshotMode": { "enum": ["frozen", "unavailable"] }, "snapshotExpiresAt": { "type": ["string", "null"], "format": "date-time" }, "metricsLive": { "const": false }, "orderCapped": { "type": "boolean" }, "window": { "type": "object", "required": ["headBlock", "fromTimestamp", "toTimestamp", "fromBlock", "toBlock", "boundary", "observedAt", "fetchedAt"], "properties": { "headBlock": { "type": ["integer", "null"] }, "headHash": { "type": "string", "pattern": "^0x[0-9a-f]{64}$" }, "headTimestamp": { "type": "integer" }, "fromTimestamp": { "type": ["integer", "null"] }, "toTimestamp": { "type": ["integer", "null"] }, "fromBlock": { "type": ["integer", "null"] }, "toBlock": { "type": ["integer", "null"] }, "boundary": { "type": "object", "required": ["status", "predecessorBlock"], "properties": { "status": { "enum": ["known", "unknown"] }, "predecessorBlock": { "type": ["integer", "null"] } } }, "observedAt": { "type": ["string", "null"], "format": "date-time" }, "fetchedAt": { "type": ["string", "null"], "format": "date-time" } } }, "coverage": { "$ref": "#/components/schemas/Coverage" }, "reprocessing": { "type": "object", "required": ["status", "throughBlock"], "properties": { "status": { "enum": ["complete", "partial", "pending", "unknown"] }, "throughBlock": { "type": ["integer", "null"] } } }, "excluded": { "type": "object", "description": "Excluded execution groups by reason; flagged counts collections.", "additionalProperties": { "type": "integer", "minimum": 0 } }, "items": { "type": "array", "maxItems": 12, "items": { "type": "object", "required": ["address", "collection", "acceptedExecutions", "distinctBuyers", "distinctSellers", "transactions", "lastSaleBlock", "volumeByCurrency", "volumeState", "excluded", "flagged"], "properties": { "address": { "$ref": "#/components/schemas/Address" }, "collection": { "type": "object", "required": ["name", "symbol"], "properties": { "name": { "type": "string" }, "symbol": { "type": "string" } } }, "acceptedExecutions": { "type": "integer", "minimum": 1 }, "distinctBuyers": { "type": "integer", "minimum": 0 }, "distinctSellers": { "type": "integer", "minimum": 0 }, "transactions": { "type": "integer", "minimum": 0 }, "lastSaleBlock": { "type": ["integer", "null"] }, "volumeByCurrency": { "type": "array", "items": { "type": "object", "required": ["currency", "executions", "total"], "properties": { "currency": { "$ref": "#/components/schemas/Currency" }, "executions": { "type": "integer", "minimum": 1 }, "total": { "type": "string", "pattern": "^[0-9]+$", "description": "Raw base units of currency." } } } }, "volumeState": { "enum": ["complete", "partial", "unknown"] }, "excluded": { "type": "object", "additionalProperties": { "type": "integer", "minimum": 0 } }, "flagged": { "const": false } } } }, "next": { "type": ["string", "null"] } } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "410": { "$ref": "#/components/responses/CursorExpired" },
          "503": { "description": "The indexed sales ranking is unavailable (Retry-After)", "content": { "application/json": { "schema": { "type": "object", "required": ["error", "message"], "properties": { "error": { "const": "ranking_unavailable" }, "message": { "type": "string" } } } } } },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/nfts/feed": {
      "get": { "operationId": "listNftFeed", "summary": "List indexed NFT mints and transfers", "parameters": [{ "$ref": "#/components/parameters/Limit" }, { "$ref": "#/components/parameters/Cursor" }, { "name": "kind", "in": "query", "schema": { "enum": ["all", "mints", "transfers"] } }, { "name": "standard", "in": "query", "schema": { "enum": ["erc721", "erc1155"] } }], "responses": { "200": { "$ref": "#/components/responses/NftFeedPage" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" } } }
    },
    "/v1/nfts/feed/collections": {
      "get": { "operationId": "listRecentlyActiveNftCollections", "summary": "Summarize collections active in a bounded indexed window", "description": "Aggregates indexed transfer events over the inclusive block window returned in the response. Counts are events, distinct token IDs, ERC-1155 units, and distinct transactions. The response's coverage qualifies the measured range; first observed activity is not collection age or endorsement.", "parameters": [{ "name": "kind", "in": "query", "schema": { "enum": ["all", "mints", "transfers"], "default": "all" }, "description": "Optional transfer category; defaults to all." }], "responses": { "200": { "description": "Bounded active-collection summary", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActiveCollectionsSummary" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" } } }
    },
    "/v1/nfts/sales": {
      "get": { "operationId": "listNftSales", "summary": "List indexed marketplace sales", "parameters": [{ "$ref": "#/components/parameters/Limit" }, { "$ref": "#/components/parameters/Cursor" }, { "name": "lane", "in": "query", "schema": { "enum": ["all", "priority"], "default": "all" }, "description": "priority: only sales of featured collections, the collections Otherside supports as avatars, and the top community collections by holders, distinct buyers and APE volume over 7 days. Curated-out collections never join. Every sale, newest first. A cursor works only in the lane that issued it." }], "responses": { "200": { "$ref": "#/components/responses/NftSalePage" }, "400": { "$ref": "#/components/responses/BadRequest" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" } } }
    },
    "/v1/nfts/{address}/{id}/holders": {
      "get": { "operationId": "listNftHolders", "summary": "List indexed holders for one NFT item", "parameters": [{ "$ref": "#/components/parameters/Address" }, { "$ref": "#/components/parameters/TokenId" }, { "$ref": "#/components/parameters/Limit" }, { "$ref": "#/components/parameters/Cursor" }, { "name": "owner", "in": "query", "schema": { "$ref": "#/components/schemas/Address" } }], "responses": { "200": { "$ref": "#/components/responses/NftHolderPage" }, "400": { "$ref": "#/components/responses/BadRequest" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" } } }
    },
    "/v1/tokens/{address}/inventory": {
      "get": {
        "operationId": "listCollectionInventory",
        "summary": "List an NFT collection's indexed inventory",
        "description": "Default order: items with art (fetched metadata with an image) first, then the rest, token ID ascending inside each group. A start jump, a flagged collection and ERC-2309 range collections are listed in token ID order only. Cursors name their order; a cursor from the other order, or from before art-first ordering, is a 400. Viewing a page asks the metadata worker, within per-request and per-collection rate limits, to fetch items whose metadata was never fetched or whose retryable failure is due.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }, { "$ref": "#/components/parameters/Limit" }, { "$ref": "#/components/parameters/Cursor" }, {"name": "owner", "in": "query", "schema": {"$ref": "#/components/schemas/Address"}, "description": "Only items currently held by this address (ERC-1155: a positive indexed balance)."}, {"name": "trait", "in": "query", "style": "form", "explode": true, "schema": {"type": "array", "maxItems": 8, "items": {"type": "string"}}, "description": "A property filter as a JSON [type, value] pair, e.g. [\"Origin\",\"Ruins\"]. Repeat for up to 8 filters: values of one type match any of them, and every type must match. Only items with fetched metadata can match. An invalid pair or more than 8 filters is a 400, never silently dropped."}, {"name": "start", "in": "query", "schema": {"type": "string", "pattern": "^[0-9]{1,78}$"}, "description": "Begin at this token ID (inclusive). It is part of the matching scope; a cursor takes precedence for paging."}, {"name": "meta", "in": "query", "schema": {"enum": ["ok", "stale", "failed", "blocked", "pending"]}, "description": "Only items in this metadata state."}, {"name": "metaClass", "in": "query", "schema": {"type": "string"}, "description": "With meta=failed or meta=stale: one error class (for example http_404)."}],
        "responses": { "200": { "$ref": "#/components/responses/InventoryPage" }, "400": { "$ref": "#/components/responses/BadRequest" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" } }
      }
    },
    "/v1/tokens/{address}/metadata-health": {
      "get": {
        "operationId": "getCollectionMetadataHealth",
        "summary": "Read a collection's metadata fetch health",
        "description": "Collection-wide metadata state over the indexed inventory (items seen in indexed transfers): ok, stale (last refetch failed, earlier metadata kept), failed, blocked (quarantined by the blocklist) and pending (not fetched yet). failed lists up to 50 failing items in token id order; failedTruncated says more exist. Flagged collections return counts null and an empty failed list. Takes no filters. Cached for 30 seconds.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }],
        "responses": {
          "200": { "description": "Metadata health", "content": { "application/json": { "schema": { "type": "object", "required": ["token", "scope", "flagged", "coverage", "denominator", "partial", "counts", "metadataOnlyItems", "failed", "failedTruncated", "pendingLabel"], "properties": { "token": { "$ref": "#/components/schemas/Address" }, "scope": { "const": "collection_indexed_inventory" }, "flagged": { "type": "boolean" }, "coverage": { "$ref": "#/components/schemas/Coverage" }, "denominator": { "type": "integer", "minimum": 0, "description": "Distinct token ids in indexed transfers." }, "partial": { "type": "boolean", "description": "True when coverage is not complete." }, "counts": { "anyOf": [{ "type": "object", "required": ["ok", "stale", "failed", "blocked", "pending"], "properties": { "ok": { "type": "integer", "minimum": 0 }, "stale": { "type": "integer", "minimum": 0 }, "failed": { "type": "integer", "minimum": 0 }, "blocked": { "type": "integer", "minimum": 0 }, "pending": { "type": "integer", "minimum": 0 } } }, { "type": "null" }] }, "metadataOnlyItems": { "type": "integer", "minimum": 0, "description": "Items with fetched metadata but no indexed transfer." }, "failed": { "type": "array", "maxItems": 50, "items": { "type": "object", "required": ["tokenId", "errorClass", "httpStatus", "attemptedAt", "source"], "properties": { "tokenId": { "type": "string", "pattern": "^[0-9]{1,78}$" }, "errorClass": { "type": "string" }, "httpStatus": { "type": ["integer", "null"] }, "attemptedAt": { "type": ["integer", "null"], "description": "Unix seconds." }, "source": { "const": "apescan" } } } }, "failedTruncated": { "type": "boolean" }, "pendingLabel": { "const": "Not fetched yet" } } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/tokens/{address}/market": {
      "get": {
        "operationId": "getCollectionMarket",
        "summary": "Read observed market data for an NFT collection",
        "parameters": [{ "$ref": "#/components/parameters/Address" }],
        "responses": { "200": { "description": "Observed market data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CollectionMarket" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" } }
      }
    }
    ,"/v1/tokens/{address}/stats": {
      "get": {
        "operationId": "getCollectionStats",
        "summary": "Read an NFT collection's sales and holder statistics",
        "description": "Sales are whole marketplace executions with an exact price paid in APE or WAPE, as in the collection market's volumeApe: never ambiguous or legacy rows, a share of a mixed bundle, or another currency. sales.medianApe is the median single-item sale in wei (the lower middle value for an even count); null without one. periods compares the last 7 and 30 days with the 7 and 30 days before them. daily lists the days in the requested range (UTC, ending today) that had sales, with each day's volume and median single-item sale. holders buckets the current owners by items held (ERC-1155: units held), with the total held and the share held by the top 10 owners; owners come from the same relation as the holder list. rarity is present when the collection's items are ranked by trait rarity (see the collection rarity list). Cached for up to five minutes.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }, { "name": "days", "in": "query", "schema": { "type": "integer", "enum": [30, 90, 365], "default": 90 }, "description": "Days in the daily series." }],
        "responses": {
          "200": { "description": "Collection statistics", "content": { "application/json": { "schema": { "type": "object", "required": ["address", "standard", "asOf", "sales", "periods", "daily", "holders", "rarity"], "properties": {
            "address": { "$ref": "#/components/schemas/Address" },
            "standard": { "enum": ["erc721", "erc1155", null] },
            "asOf": { "type": "integer", "description": "Unix seconds the figures were computed at." },
            "sales": { "type": "object", "required": ["count", "volumeApe", "medianApe"], "properties": { "count": { "type": "integer", "minimum": 0 }, "volumeApe": { "type": "string", "pattern": "^[0-9]+$", "description": "Wei of APE and WAPE." }, "medianApe": { "type": ["string", "null"], "pattern": "^[0-9]+$" } } },
            "periods": { "type": "array", "maxItems": 2, "items": { "type": "object", "required": ["days", "sales", "volumeApe", "previousSales", "previousVolumeApe"], "properties": { "days": { "enum": [7, 30] }, "sales": { "type": "integer", "minimum": 0 }, "volumeApe": { "type": "string", "pattern": "^[0-9]+$" }, "previousSales": { "type": "integer", "minimum": 0 }, "previousVolumeApe": { "type": "string", "pattern": "^[0-9]+$" } } } },
            "daily": { "type": "object", "required": ["days", "from", "to", "points"], "properties": { "days": { "enum": [30, 90, 365] }, "from": { "type": "string", "format": "date" }, "to": { "type": "string", "format": "date" }, "points": { "type": "array", "maxItems": 366, "items": { "type": "object", "required": ["day", "sales", "volumeApe", "medianApe"], "properties": { "day": { "type": "string", "format": "date" }, "sales": { "type": "integer", "minimum": 1 }, "volumeApe": { "type": "string", "pattern": "^[0-9]+$" }, "medianApe": { "type": ["string", "null"], "pattern": "^[0-9]+$" } } } } } },
            "holders": { "type": "object", "required": ["unit", "owners", "held", "top", "buckets"], "properties": { "unit": { "enum": ["items", "units"] }, "owners": { "type": "integer", "minimum": 0 }, "held": { "type": "string", "pattern": "^[0-9]+$" }, "top": { "type": "object", "required": ["holders", "held"], "properties": { "holders": { "const": 10 }, "held": { "type": "string", "pattern": "^[0-9]+$" } } }, "buckets": { "type": "array", "minItems": 4, "maxItems": 4, "items": { "type": "object", "required": ["label", "min", "max", "owners", "held"], "properties": { "label": { "enum": ["1", "2-5", "6-20", "21+"] }, "min": { "type": "integer", "minimum": 1 }, "max": { "type": ["integer", "null"] }, "owners": { "type": "integer", "minimum": 0 }, "held": { "type": "string", "pattern": "^[0-9]+$" } } } } } },
            "rarity": { "type": ["object", "null"], "required": ["ranked", "method"], "properties": { "ranked": { "type": "integer", "minimum": 1 }, "method": { "const": "trait_rarity_score" } } }
          } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    }
    ,"/v1/tokens/{address}/rarity": {
      "get": {
        "operationId": "listCollectionRarity",
        "summary": "List an NFT collection's items rarest first",
        "description": "Items in trait-rarity rank order, rank 1 first, with the same ranking as the item rarity endpoint (equal scores share a rank; ties in token ID order). Each item carries its metadata summary. ranked is the number of ranked items; it is null with no items when the collection is not ranked, is flagged, or its ranking is being built. Rankings are cached for up to six hours.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }, { "$ref": "#/components/parameters/Limit" }, { "$ref": "#/components/parameters/Cursor" }],
        "responses": {
          "200": { "description": "One page of ranked items", "content": { "application/json": { "schema": { "type": "object", "required": ["method", "ranked", "flagged", "items", "next"], "properties": {
            "method": { "const": "trait_rarity_score" },
            "ranked": { "type": ["integer", "null"], "minimum": 1 },
            "flagged": { "type": "boolean" },
            "items": { "type": "array", "maxItems": 100, "items": { "type": "object", "required": ["tokenId", "rank", "metadata"], "properties": { "tokenId": { "type": "string", "pattern": "^[0-9]+$" }, "rank": { "type": "integer", "minimum": 1 }, "metadata": { "$ref": "#/components/schemas/NftMetadata" } } } },
            "next": { "type": ["string", "null"] }
          } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    }
    ,"/v1/tokens/{address}/profile": {
      "get": { "operationId": "getCollectionProfile", "summary": "Read indexed provenance and unverified collection metadata links", "description": "Creator is the indexed deployer or factory provenance, not an artist/authorship claim. external_url values come from token metadata and remain unverified. Contract URI is not indexed and no collection marketplace destinations are currently verified. Flagged collections suppress metadata links and marketplace exits.", "parameters": [{ "$ref": "#/components/parameters/Address" }], "responses": { "200": { "description": "Collection profile and source status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CollectionProfile" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" } } }
    },
    "/v1/tokens/{address}/risk": {
      "get": {
        "operationId": "getCollectionRisk",
        "summary": "Read rug radar risk signals for a token or collection",
        "description": "Risk signals computed from indexed data only: the deployer's other collections (curated out, or trading stopped within a week of the first transfer at least 30 days ago), mint-and-dump (items their minter sold within 24 hours of minting), self-trades and back-and-forth trades (the featured ranking's self-trade rule), sales clustered in three wallets, the top-10 wallet share of holdings (contracts and burn addresses set aside), and contract powers read from verified source (owner-only mint and supply cap, pausable transfers, blocklist, mutable metadata) plus upgradeable proxy slots from the node. Unverified source is reported as unverified; nothing is inferred from bytecode. ERC-20 tokens get holder and contract signals only. Each reason has a weight (3 strong, 2 notable, 1 caution, 0 context); level is high when the weights add up to 5 or more and at least one strong reason is a market or deployer behaviour, caution at 2 or more, else ok. Collections on the never-hidden allowlist are held at ok. With RUG_RADAR_AUTO_HIDE on (the default), a high collection is left out of the home rails, browse grids and featured lists and ranked last in search, like a curated-out one; its page stays reachable. Assessments are cached for 6 hours and refreshed in the background.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }],
        "responses": {
          "200": { "description": "Risk assessment", "content": { "application/json": { "schema": { "type": "object", "required": ["version", "address", "standard", "level", "score", "reasons", "allowlisted", "signals", "assessedAt", "hidden", "autoHide"], "properties": {
            "version": { "const": 1 },
            "address": { "$ref": "#/components/schemas/Address" },
            "standard": { "enum": ["erc20", "erc721", "erc1155"] },
            "level": { "enum": ["ok", "caution", "high"] },
            "score": { "type": "integer", "minimum": 0 },
            "reasons": { "type": "array", "items": { "type": "object", "required": ["kind", "code", "weight", "text"], "properties": { "kind": { "enum": ["deployer", "mint_dump", "wash", "sales_cluster", "holders", "contract"] }, "code": { "type": "string" }, "weight": { "enum": [0, 1, 2, 3] }, "text": { "type": "string", "description": "One plain-language fact." } } } },
            "allowlisted": { "type": "boolean", "description": "On the never-hidden allowlist: measured, but the level is held at ok." },
            "signals": { "type": "object", "required": ["deployer", "mintDump", "sales", "holders", "powers"], "properties": {
              "deployer": { "anyOf": [{ "type": "object", "required": ["deployer", "factory", "collections", "curated", "dead", "bad"], "properties": { "deployer": { "$ref": "#/components/schemas/Address" }, "factory": { "type": ["string", "null"] }, "collections": { "type": "integer", "minimum": 0 }, "curated": { "type": "integer", "minimum": 0 }, "dead": { "type": "integer", "minimum": 0 }, "bad": { "type": "integer", "minimum": 0 } } }, { "type": "null" }] },
              "mintDump": { "anyOf": [{ "type": "object", "required": ["minted", "dumped", "dumpers", "top3", "windowHours"], "properties": { "minted": { "type": "integer", "minimum": 0 }, "dumped": { "type": "integer", "minimum": 0 }, "dumpers": { "type": "integer", "minimum": 0 }, "top3": { "type": "integer", "minimum": 0 }, "windowHours": { "type": "integer", "minimum": 0 } } }, { "type": "null" }] },
              "sales": { "anyOf": [{ "type": "object", "required": ["sales", "selfTrades", "backAndForth", "top3Wallets"], "properties": { "sales": { "type": "integer", "minimum": 0 }, "selfTrades": { "type": "integer", "minimum": 0 }, "backAndForth": { "type": "integer", "minimum": 0 }, "top3Wallets": { "type": "integer", "minimum": 0 } } }, { "type": "null" }] },
              "holders": { "anyOf": [{ "type": "object", "required": ["units", "holders", "top10", "contractsExcluded"], "properties": { "units": { "type": "number", "minimum": 0 }, "holders": { "type": "integer", "minimum": 0 }, "top10": { "type": "number", "minimum": 0 }, "contractsExcluded": { "type": "integer", "minimum": 0 } } }, { "type": "null" }], "description": "Null for ERC-2309 range collections." },
              "powers": { "anyOf": [{ "type": "object", "required": ["source", "upgradeable", "ownerMint", "supplyCap", "pauseTransfers", "blocklist", "mutableMetadata", "metadataFreeze"], "properties": { "source": { "enum": ["verified", "unverified"] }, "upgradeable": { "type": ["string", "null"] }, "ownerMint": { "type": "boolean" }, "supplyCap": { "type": ["boolean", "null"] }, "pauseTransfers": { "type": "boolean" }, "blocklist": { "type": "boolean" }, "mutableMetadata": { "type": "boolean" }, "metadataFreeze": { "type": "boolean" } } }, { "type": "null" }], "description": "Null when the verified-source store is unavailable." }
            } },
            "assessedAt": { "type": "string", "format": "date-time" },
            "hidden": { "type": "boolean", "description": "Left out of discovery views: curated out, or rated high with auto-hide on." },
            "autoHide": { "type": "boolean", "description": "RUG_RADAR_AUTO_HIDE on this server." }
          } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/tokens/{address}/pools": {
      "get": {
        "operationId": "getTokenPools",
        "summary": "List an ERC-20 token's DEX pools",
        "description": "Every pool DexScreener tracks for the token on this chain, deepest first (up to 50). Prices, liquidity and volume are USD decimal strings. The list is cached for 10 minutes; DexScreener calls share one rate budget with backoff, and while DexScreener is unavailable with nothing cached the endpoint answers 503.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }],
        "responses": {
          "200": { "description": "The token's pools", "content": { "application/json": { "schema": { "type": "object", "required": ["address", "source", "pools"], "properties": {
            "address": { "$ref": "#/components/schemas/Address" },
            "source": { "const": "dexscreener" },
            "pools": { "type": "array", "maxItems": 50, "items": { "type": "object", "required": ["pair", "dex", "version", "url", "base", "quote", "paired", "priceUsd", "pricePaired", "liquidity", "volume24h", "change24h"], "properties": {
              "pair": { "type": "string", "pattern": "^0x([0-9a-f]{40}|[0-9a-f]{64})$", "description": "Pool contract, or a 32-byte pool id on singleton DEXes." },
              "dex": { "type": "string", "description": "DexScreener's DEX id." },
              "version": { "type": ["string", "null"] },
              "url": { "type": ["string", "null"], "format": "uri", "description": "The pool on DexScreener." },
              "base": { "type": "object", "required": ["address", "symbol"], "properties": { "address": { "$ref": "#/components/schemas/Address" }, "symbol": { "type": "string" } } },
              "quote": { "type": "object", "required": ["address", "symbol"], "properties": { "address": { "$ref": "#/components/schemas/Address" }, "symbol": { "type": "string" } } },
              "paired": { "type": "object", "required": ["address", "symbol"], "properties": { "address": { "$ref": "#/components/schemas/Address" }, "symbol": { "type": "string" } } },
              "priceUsd": { "type": ["string", "null"], "pattern": "^[0-9]+(\\.[0-9]+)?$", "description": "USD per token in this pool." },
              "pricePaired": { "type": ["string", "null"], "pattern": "^[0-9]+(\\.[0-9]+)?$", "description": "Paired-token units per token." },
              "liquidity": { "type": ["string", "null"], "pattern": "^[0-9]+(\\.[0-9]+)?$", "description": "USD liquidity." },
              "volume24h": { "type": ["string", "null"], "pattern": "^[0-9]+(\\.[0-9]+)?$", "description": "USD traded over 24 hours." },
              "change24h": { "type": ["string", "null"], "pattern": "^-?[0-9]+(\\.[0-9]+)?$", "description": "Percent change over 24 hours, when the token is the pool's base token." }
            } } }
          } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" },
          "503": { "description": "DexScreener is unavailable and no pool list is cached", "headers": { "Retry-After": { "schema": { "const": "30" } }, "Cache-Control": { "schema": { "const": "no-store" } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "message"], "properties": { "error": { "const": "price_unavailable" }, "message": { "type": "string" } } } } } }
        }
      }
    },
    "/v1/tokens/{address}/logo": {
      "get": {
        "operationId": "getTokenLogo",
        "summary": "Get an ERC-20 token's logo",
        "description": "The token's logo from Camelot's ApeChain token list or DexScreener's reviewed token info, fetched by this API and cached. Camelot list assets are validated before serving; SVG is allowed only when it contains no executable or remote content.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }],
        "responses": {
          "200": { "description": "The logo", "content": { "image/*": { "schema": { "type": "string", "format": "binary" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/tokens/{address}/price-history": {
      "get": {
        "operationId": "getTokenPriceHistory",
        "summary": "Read an ERC-20 token's USD price history",
        "description": "Prices this explorer recorded from its market data, oldest first. range=1d: 15-minute points. 7d: hourly points (daily closes until intraday points exist). 30d and 90d: daily closes. Points are USD decimal strings. Cached for one minute (1d, 7d) or five minutes (30d, 90d).",
        "parameters": [{ "$ref": "#/components/parameters/Address" }, { "name": "range", "in": "query", "schema": { "enum": ["1d", "7d", "30d", "90d"], "default": "30d" } }],
        "responses": {
          "200": { "description": "Price points", "content": { "application/json": { "schema": { "type": "object", "required": ["address", "range", "interval", "points"], "properties": {
            "address": { "$ref": "#/components/schemas/Address" },
            "range": { "enum": ["1d", "7d", "30d", "90d"] },
            "interval": { "enum": ["15m", "1h", "1d"] },
            "points": { "type": "array", "items": { "type": "object", "required": ["at", "priceUsd"], "properties": { "at": { "type": "string", "format": "date-time" }, "priceUsd": { "type": "string", "pattern": "^[0-9]+(\\.[0-9]+)?$" } } } }
          } } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" },
          "503": { "description": "Price history is not enabled on this server", "headers": { "Retry-After": { "schema": { "const": "30" } }, "Cache-Control": { "schema": { "const": "no-store" } } }, "content": { "application/json": { "schema": { "type": "object", "required": ["error", "message"], "properties": { "error": { "const": "price_unavailable" }, "message": { "type": "string" } } } } } }
        }
      }
    },
    "/v1/shadows": {
      "get": {
        "operationId": "listShadows",
        "summary": "List the NFT shadow collections registered on this chain, with sync activity",
        "description": "Every shadow ApeScan lists (docs/shadows.md): the source collection, shadow mode, items and holders here, items bridged here now (unlocked), LayerZero sync requests in the last 24 hours and 7 days, and the last sync that moved an item. From indexed events; cached for two minutes. Empty on a chain without a shadow Beacon.",
        "responses": {
          "200": { "description": "Shadow collections", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": ["chainId", "items"], "properties": { "chainId": { "type": "integer" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/ShadowCollection" } } } } } } },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/shadows/{address}": {
      "get": {
        "operationId": "getShadow",
        "summary": "Read one NFT shadow collection and its recent sync and bridge activity",
        "description": "The listShadows row for one shadow, plus up to 30 recent events, newest first: sync requests (read paid by anyone), syncs (a LayerZero read answer moved items here), arrivals (bridged here, now transferable) and sends (bridged away). Requests and syncs cover the last 7 days. Cached for one minute.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }],
        "responses": {
          "200": { "description": "The shadow and its activity", "content": { "application/json": { "schema": { "allOf": [{ "$ref": "#/components/schemas/ShadowCollection" }, { "type": "object", "required": ["bridged", "activity"], "properties": { "bridged": { "type": "array", "maxItems": 100, "description": "Ids bridged here now, transferable on this chain, lowest first (at most 100; unlocked has the count).", "items": { "type": "string", "pattern": "^[0-9]+$" } }, "activity": { "type": "array", "items": { "$ref": "#/components/schemas/ShadowActivity" } } } }] } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/contracts/{address}": {
      "get": {
        "operationId": "getContractView",
        "summary": "Read contract code state and stored verification evidence",
        "description": "The response separates the current node code read from locally stored verification evidence. A full or partial match is a stored verifier classification, not a new compiler or source-trust guarantee.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }, { "name": "summary", "in": "query", "schema": { "const": "1" }, "description": "Return only the stored verification badge fields; this does not perform a node code read." }, { "name": "file", "in": "query", "schema": { "type": "string" }, "description": "Select a stored verified source file when full contract detail is requested." }],
        "responses": { "200": { "$ref": "#/components/responses/ContractResponse" }, "400": { "$ref": "#/components/responses/BadRequest" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" } }
      }
    },
    "/v1/contracts/{address}/sources": {
      "get": {
        "operationId": "downloadContractSources",
        "summary": "Download stored standard JSON contract sources",
        "description": "Returns the locally stored source bundle only when a verified-contract record exists. It does not fetch source from a chain or prove that the returned files currently match deployed code.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }],
        "responses": { "200": { "$ref": "#/components/responses/ContractSources" }, "400": { "$ref": "#/components/responses/BadRequest" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" } }
      }
    },
    "/v1/contracts/verified": {
      "get": {
        "operationId": "listVerifiedContracts",
        "summary": "List verified contracts",
        "description": "Verified contracts from the verification store, ordered by verification time. Pass `next` back as `cursor` for the following page.",
        "parameters": [
          { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 25 } },
          { "name": "cursor", "in": "query", "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "One page of verified contracts", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerifiedContractPage" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" }, "503": { "$ref": "#/components/responses/VerificationUnavailable" } }
      }
    },
    "/v1/contracts/{address}/import-sourcify": {
      "post": {
        "operationId": "importContractFromSourcify",
        "summary": "Import from Sourcify",
        "description": "Fetches this address's verified input from Sourcify and queues it. The verifier recompiles it and compares it with the code on ApeChain, so the result is our own match, stored with provenance `sourcify`.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }],
        "responses": { "202": { "$ref": "#/components/responses/VerificationAccepted" }, "400": { "$ref": "#/components/responses/VerificationBadRequest" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/VerificationAlreadyVerified" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" }, "503": { "$ref": "#/components/responses/VerificationUnavailable" } }
      }
    },
    "/v1/contracts/{address}/verify-from": {
      "post": {
        "operationId": "verifyContractFromReference",
        "summary": "Verify from same code",
        "description": "Recompiles the stored input of `reference` and compares it with this address. `sameCode` on the contract view lists candidates.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }],
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": ["reference"], "properties": { "reference": { "$ref": "#/components/schemas/Address" } } } } } },
        "responses": { "202": { "$ref": "#/components/responses/VerificationAccepted" }, "400": { "$ref": "#/components/responses/VerificationBadRequest" }, "404": { "$ref": "#/components/responses/NotFound" }, "409": { "$ref": "#/components/responses/VerificationAlreadyVerified" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" }, "503": { "$ref": "#/components/responses/VerificationUnavailable" } }
      }
    },
    "/v1/contracts/{address}/implementations": {
      "get": {
        "operationId": "contractImplementationHistory",
        "summary": "List past implementations",
        "description": "EIP-1967 `Upgraded` and `BeaconUpgraded` events emitted by this address (and by its beacon), newest first, up to 100, with each implementation's verified name.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }],
        "responses": { "200": { "description": "Implementation changes", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImplementationHistory" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" } }
      }
    },
    "/v1/contracts/{address}/verify": {
      "post": {
        "operationId": "submitContractVerification",
        "summary": "Queue a standard JSON contract verification",
        "description": "Accepts an anonymous supplied standard JSON input for the existing verifier queue. HTTP 202 means the request was queued; it does not mean compilation or matching succeeded. No private key or transaction is submitted by this endpoint.",
        "parameters": [{ "$ref": "#/components/parameters/Address" }],
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerifyRequest" } } } },
        "responses": { "202": { "$ref": "#/components/responses/VerificationAccepted" }, "400": { "$ref": "#/components/responses/VerificationBadRequest" }, "409": { "$ref": "#/components/responses/VerificationAlreadyVerified" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" }, "503": { "$ref": "#/components/responses/VerificationUnavailable" } }
      }
    },
    "/v1/verifications/{id}": {
      "get": {
        "operationId": "getVerification",
        "summary": "Read the public status of a verification job",
        "description": "Returns a bounded public job status. Pending and pass messages describe queue or stored match state; they do not expose compiler logs or provider diagnostics.",
        "parameters": [{ "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }],
        "responses": { "200": { "$ref": "#/components/responses/VerificationJob" }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" } }
      }
    },
    "/v1/vyper/versions": {
      "get": {
        "operationId": "listVyperVersions",
        "summary": "List the Vyper compiler releases, EVM versions and limits the online compiler accepts",
        "responses": { "200": { "description": "The allowlist. Each release is an official vyperlang/vyper binary pinned by sha256 on the server.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VyperVersions" } } } }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" } }
      }
    },
    "/v1/vyper/compile": {
      "post": {
        "operationId": "submitVyperCompile",
        "summary": "Queue a single-file Vyper compile",
        "description": "Compiles one Vyper source file with an allowlisted official compiler release and EVM version, in an isolated child process limited to 60 s wall clock, 30 s CPU, 1 GiB memory and 4 MiB of output. The body must be exactly these JSON fields with Content-Type application/json and no query string. Source is at most 200 KiB of UTF-8 and may import only modules built into Vyper (ethereum.ercs, math, vyper.interfaces). Identical input returns the same job id. Submissions share the smaller per-client rate bucket. Poll GET /v1/vyper/jobs/{id} for the result.",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VyperCompileRequest" } } } },
        "responses": {
          "202": { "description": "Queued, or an existing job with the same input (whatever its status).", "headers": { "Cache-Control": { "schema": { "const": "no-store" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VyperCompileAccepted" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "413": { "description": "The source exceeds 200 KiB or the request body exceeds 1 MiB.", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": ["error", "message"], "properties": { "error": { "const": "payload_too_large" }, "message": { "type": "string" } } } } } },
          "429": { "$ref": "#/components/responses/NativeRateLimited" },
          "503": { "description": "busy: the compile queue is full (Retry-After in seconds); unavailable: the job store or queue is unreachable. Nothing was queued.", "headers": { "Retry-After": { "schema": { "type": "string", "pattern": "^[0-9]+$" } } }, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": ["error", "message"], "properties": { "error": { "enum": ["busy", "unavailable"] }, "message": { "type": "string" } } } } } },
          "500": { "$ref": "#/components/responses/NativeInternal" }
        }
      }
    },
    "/v1/vyper/jobs/{id}": {
      "get": {
        "operationId": "getVyperCompileJob",
        "summary": "Read a Vyper compile job and its result",
        "description": "status is queued, running, succeeded or failed. A succeeded job carries the ABI, creation and deployed bytecode, method identifiers and compiler warnings. A failed job carries the compiler's messages as plain text (control characters removed), or an operational message; resubmitting identical input retries an operational failure. Finished jobs are kept for a limited time. The source is not returned.",
        "parameters": [{ "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }],
        "responses": { "200": { "description": "The job.", "headers": { "Cache-Control": { "schema": { "const": "no-store" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VyperCompileJob" } } } }, "404": { "$ref": "#/components/responses/NotFound" }, "429": { "$ref": "#/components/responses/NativeRateLimited" }, "500": { "$ref": "#/components/responses/NativeInternal" }, "503": { "description": "The job store is not configured on this server.", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": ["error", "message"], "properties": { "error": { "const": "unavailable" }, "message": { "type": "string" } } } } } } }
      }
    }
  },
  "components": {
    "parameters": {
      "Address": { "name": "address", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/Address" } },
      "TokenId": { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[0-9]{1,78}$" }, "description": "Exact unsigned 256-bit decimal token ID" },
      "Limit": { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100 } },
      "Cursor": { "name": "cursor", "in": "query", "schema": { "type": "string" }, "description": "Opaque cursor. Use only with the same filters and ordering." }
    },
    "schemas": {
      "Address": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$" },
      "TxRevert": { "type": "object", "additionalProperties": false, "required": ["error", "data", "decoded"], "properties": {
        "error": { "type": "string" }, "data": { "type": ["string", "null"], "pattern": "^0x([0-9a-fA-F]{2})*$" },
        "decoded": { "anyOf": [{ "$ref": "#/components/schemas/DecodedRevert" }, { "type": "null" }] },
        "call": { "type": ["object", "null"], "additionalProperties": false, "required": ["traceAddress", "from", "to", "methodId", "method", "depth"], "properties": { "traceAddress": { "type": ["string", "null"] }, "from": { "$ref": "#/components/schemas/Address" }, "to": { "type": ["string", "null"], "pattern": "^0x[0-9a-fA-F]{40}$" }, "methodId": { "type": ["string", "null"] }, "method": { "type": ["string", "null"] }, "depth": { "type": "integer", "minimum": 0 } } },
        "aa": { "anyOf": [{ "$ref": "#/components/schemas/TransactionAa" }, { "type": "null" }] }, "summary": { "type": "string" }
      } },
      "DecodedRevert": { "type": "object", "additionalProperties": false, "required": ["kind", "message"], "properties": { "kind": { "enum": ["error", "panic", "custom", "empty", "unknown"] }, "message": { "type": "string" }, "name": { "type": "string" }, "args": { "type": "array", "items": { "type": "object", "required": ["name", "type", "value"], "properties": { "name": { "type": "string" }, "type": { "type": "string" }, "value": {} } } } } },
      "TransactionAaOperation": { "type": "object", "additionalProperties": false, "required": ["index", "sender", "nonce", "paymaster", "userOpHash", "success", "gasCost", "gasUsed", "revertReason"], "properties": { "index": { "type": "integer", "minimum": 0 }, "sender": { "$ref": "#/components/schemas/Address" }, "nonce": { "type": "string", "pattern": "^[0-9]+$" }, "paymaster": { "type": ["string", "null"], "pattern": "^0x[0-9a-fA-F]{40}$" }, "userOpHash": { "type": ["string", "null"], "pattern": "^0x[0-9a-fA-F]{64}$" }, "success": { "type": ["boolean", "null"] }, "gasCost": { "type": ["string", "null"], "pattern": "^[0-9]+$" }, "gasUsed": { "type": ["string", "null"], "pattern": "^[0-9]+$" }, "revertReason": { "anyOf": [{ "$ref": "#/components/schemas/DecodedRevert" }, { "type": "null" }] } } },
      "TransactionAa": { "type": "object", "additionalProperties": false, "required": ["version", "beneficiary", "entryPoint", "bundler", "operations", "failure"], "properties": { "version": { "enum": ["0.6", "0.7"] }, "beneficiary": { "$ref": "#/components/schemas/Address" }, "entryPoint": { "$ref": "#/components/schemas/Address" }, "bundler": { "$ref": "#/components/schemas/Address" }, "operations": { "type": "array", "maxItems": 64, "items": { "$ref": "#/components/schemas/TransactionAaOperation" } }, "failure": { "anyOf": [{ "type": "object", "required": ["opIndex", "code", "reason", "meaning", "inner"], "properties": { "opIndex": { "type": "integer", "minimum": 0 }, "code": { "type": ["string", "null"], "pattern": "^AA[0-9]{2}$" }, "reason": { "type": "string" }, "meaning": { "type": ["string", "null"] }, "inner": { "anyOf": [{ "$ref": "#/components/schemas/DecodedRevert" }, { "type": "null" }] } } }, { "type": "null" }] } } },
      "TxAuthorization": { "type": "object", "additionalProperties": false, "required": ["chainId", "address", "nonce", "yParity", "r", "s"], "properties": { "chainId": { "type": "string", "pattern": "^[0-9]+$" }, "address": { "$ref": "#/components/schemas/Address", "description": "Delegated code target." }, "nonce": { "type": "string", "pattern": "^[0-9]+$" }, "yParity": { "type": "string", "pattern": "^[0-9]+$" }, "r": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "s": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" } } },
      "BridgeChain": { "type": "object", "additionalProperties": false, "required": ["id", "name", "eid"], "properties": { "id": { "type": ["integer", "null"] }, "name": { "type": "string" }, "eid": { "type": ["integer", "null"] } } },
      "BridgeActivity": { "type": "object", "additionalProperties": false, "required": ["hash", "blockNumber", "timestamp", "direction", "source", "destination", "sender", "recipient", "token", "amount", "protocol", "status", "guid", "nonce", "layerzeroScanUrl"], "properties": { "hash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "blockNumber": { "type": "integer", "minimum": 0 }, "timestamp": { "type": "integer", "minimum": 0 }, "direction": { "enum": ["in", "out"] }, "source": { "anyOf": [{ "$ref": "#/components/schemas/BridgeChain" }, { "type": "null" }] }, "destination": { "anyOf": [{ "$ref": "#/components/schemas/BridgeChain" }, { "type": "null" }] }, "sender": { "type": ["string", "null"], "pattern": "^0x[0-9a-fA-F]{40}$" }, "recipient": { "type": ["string", "null"], "pattern": "^0x[0-9a-fA-F]{40}$" }, "token": { "type": ["string", "null"], "pattern": "^0x[0-9a-fA-F]{40}$" }, "amount": { "type": "string", "pattern": "^[0-9]+$" }, "protocol": { "enum": ["LayerZero OFT", "Stargate", "Relay"] }, "status": { "enum": ["sent", "received", "filled"] }, "guid": { "type": ["string", "null"], "pattern": "^0x[0-9a-fA-F]{64}$" }, "nonce": { "type": ["string", "null"], "pattern": "^[0-9]+$" }, "layerzeroScanUrl": { "type": ["string", "null"], "format": "uri" } } },
      "TransactionDetail": { "type": "object", "additionalProperties": true, "required": ["state", "hash", "from", "to", "input"], "properties": { "state": { "enum": ["confirmed", "pending", "included"] }, "hash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "status": { "enum": ["success", "failed"] }, "from": { "$ref": "#/components/schemas/Address" }, "to": { "type": ["string", "null"], "pattern": "^0x[0-9a-fA-F]{40}$" }, "input": { "type": "string", "pattern": "^0x([0-9a-fA-F]{2})*$" }, "logs": { "type": "array" }, "internal": { "type": "array" }, "tokenTransfers": { "type": "array" }, "bridge": { "type": "array", "items": { "$ref": "#/components/schemas/BridgeActivity" } }, "revert": { "anyOf": [{ "$ref": "#/components/schemas/TxRevert" }, { "type": "null" }] }, "aa": { "anyOf": [{ "$ref": "#/components/schemas/TransactionAa" }, { "type": "null" }] }, "authorization": { "type": "array", "items": { "$ref": "#/components/schemas/TxAuthorization" } } } },
      "Error": { "type": "object", "required": ["error", "message"], "properties": { "error": { "enum": ["bad_request", "not_found"] }, "message": { "type": "string" } } },
      "NativeRateLimited": {"type":"object","additionalProperties":false,"required":["error","message"],"properties":{"error":{"const":"rate_limited"},"message":{"type":"string"}}},
      "NativeInternal": {"type":"object","additionalProperties":false,"required":["error","message"],"properties":{"error":{"const":"internal"},"message":{"const":"Something went wrong on our side. Try again in a moment."}}},
      "CursorExpired": {"type":"object","additionalProperties":false,"required":["error","message"],"properties":{"error":{"const":"cursor_expired"},"message":{"const":"Results changed; restart from the first page"}}},
      "ApeStakeUnavailable": { "description": "The section could not be read. It carries no amounts and does not mean nothing is staked.", "type": "object", "additionalProperties": false, "required": ["status", "message"], "properties": { "status": { "const": "unavailable" }, "message": { "type": "string" } } },
      "ApeStakePosition": { "type": "object", "additionalProperties": false, "required": ["pool", "poolId", "collection", "tokenId", "staked", "pendingRewards", "shadowOwnerMatches"], "properties": { "pool": { "enum": ["BAYC", "MAYC", "BAKC"] }, "poolId": { "enum": [1, 2, 3] }, "collection": { "$ref": "#/components/schemas/Address" }, "tokenId": { "type": "string", "pattern": "^[0-9]+$" }, "staked": { "type": "string", "pattern": "^[0-9]+$", "description": "Exact wei of native APE" }, "pendingRewards": { "type": "string", "pattern": "^[0-9]+$", "description": "Exact wei of native APE" }, "shadowOwnerMatches": { "type": "boolean", "description": "ownerOf on ApeChain for this NFT equals the address. False positions are not summed." } } },
      "L2ToL1Message": { "type": "object", "additionalProperties": false, "required": ["position", "caller", "destination", "callvalue", "data", "hash", "arbBlockNum", "ethBlockNum", "timestamp", "status", "estimatedConfirmAt", "parentBlock", "proof"], "properties": {
        "position": { "type": "string", "pattern": "^[0-9]+$", "description": "Outbox leaf index (the executeTransaction index)." },
        "caller": { "$ref": "#/components/schemas/Address" }, "destination": { "$ref": "#/components/schemas/Address", "description": "Recipient on Arbitrum One." },
        "callvalue": { "type": "string", "pattern": "^[0-9]+$", "description": "Exact wei of native APE; paid out as ApeCoin on Arbitrum One." },
        "data": { "type": "string", "pattern": "^0x([0-9a-f]{2})*$" }, "hash": { "type": "string", "pattern": "^0x[0-9a-f]{64}$" },
        "arbBlockNum": { "type": "string", "pattern": "^[0-9]+$" }, "ethBlockNum": { "type": "string", "pattern": "^[0-9]+$" }, "timestamp": { "type": "string", "pattern": "^[0-9]+$" },
        "status": { "enum": ["unconfirmed", "confirmed", "executed", "unknown"] },
        "estimatedConfirmAt": { "anyOf": [{ "type": "string", "format": "date-time" }, { "type": "null" }], "description": "Estimate only; null when the status is unknown." },
        "parentBlock": { "anyOf": [{ "$ref": "#/components/schemas/PinnedBlock" }, { "type": "null" }], "description": "Arbitrum One block every status read used." },
        "proof": { "anyOf": [{ "type": "object", "additionalProperties": false, "required": ["size", "root", "proof"], "properties": { "size": { "type": "string", "pattern": "^[0-9]+$" }, "root": { "type": "string", "pattern": "^0x[0-9a-f]{64}$" }, "proof": { "type": "array", "maxItems": 64, "items": { "type": "string", "pattern": "^0x[0-9a-f]{64}$" } } } }, { "type": "null" }], "description": "Outbox proof against the latest confirmed send root; only for a confirmed message." },
        "message": { "type": "string", "description": "Present when the status is unknown." }
      } },
      "L2ToL1Messages": { "type": "object", "additionalProperties": false, "required": ["txHash", "chainId", "parentChainId", "block", "contracts", "portal", "messages", "truncated"], "properties": {
        "txHash": { "type": "string", "pattern": "^0x[0-9a-f]{64}$" }, "chainId": { "const": 33139 }, "parentChainId": { "const": 42161 },
        "block": { "$ref": "#/components/schemas/PinnedBlock" },
        "contracts": { "type": "object", "additionalProperties": false, "required": ["outbox", "rollup", "apeCoin"], "properties": { "outbox": { "$ref": "#/components/schemas/Address" }, "rollup": { "$ref": "#/components/schemas/Address" }, "apeCoin": { "$ref": "#/components/schemas/Address" } } },
        "portal": { "type": "string", "format": "uri" },
        "messages": { "type": "array", "maxItems": 20, "items": { "$ref": "#/components/schemas/L2ToL1Message" } },
        "truncated": { "type": "boolean" }
      } },
      "ApeStakePositions": { "type": "object", "additionalProperties": false, "required": ["address", "apechain", "ethereum", "limitations"], "properties": {
        "address": { "$ref": "#/components/schemas/Address" },
        "apechain": { "oneOf": [{ "$ref": "#/components/schemas/ApeStakeUnavailable" }, { "type": "object", "additionalProperties": false, "required": ["status", "block", "contract", "portal", "distribution", "positions", "totalStaked", "truncated"], "properties": { "status": { "const": "ok" }, "block": { "$ref": "#/components/schemas/PinnedBlock" }, "contract": { "$ref": "#/components/schemas/Address" }, "portal": { "const": "https://www.apechainstake.io" }, "distribution": { "type": "object", "additionalProperties": false, "required": ["endedAt", "ended"], "properties": { "endedAt": { "type": "string", "format": "date-time", "description": "Latest endTimestampHour of each pool's current reward time range (getTimeRangeBy(pool, lastRewardsRangeIndex)); ended is true when it is at or before the pinned block time" }, "ended": { "type": "boolean" } } }, "positions": { "type": "array", "description": "Only positions with staked or pending rewards above zero", "items": { "$ref": "#/components/schemas/ApeStakePosition" } }, "totalStaked": { "type": "string", "pattern": "^[0-9]+$", "description": "Sum of staked over positions whose shadowOwnerMatches is true" }, "truncated": { "type": "boolean" } } }] },
        "ethereum": { "oneOf": [{ "$ref": "#/components/schemas/ApeStakeUnavailable" }, { "type": "object", "additionalProperties": false, "required": ["status", "block", "enumerated", "legacy"], "properties": { "status": { "const": "ok" }, "block": { "$ref": "#/components/schemas/PinnedBlock" }, "enumerated": { "type": "object", "additionalProperties": false, "required": ["bayc", "mayc", "bakc"], "description": "Ethereum balanceOf per collection", "properties": { "bayc": { "type": "string", "pattern": "^[0-9]+$" }, "mayc": { "type": "string", "pattern": "^[0-9]+$" }, "bakc": { "type": "string", "pattern": "^[0-9]+$" } } }, "legacy": { "type": "object", "additionalProperties": false, "required": ["contract", "positions"], "properties": { "contract": { "$ref": "#/components/schemas/Address" }, "positions": { "type": "array", "description": "Deposits or unclaimed rewards left on the legacy Ethereum staking contract", "items": { "type": "object", "additionalProperties": false, "required": ["pool", "poolId", "tokenId", "deposited", "unclaimed"], "properties": { "pool": { "enum": ["APE", "BAYC", "MAYC", "BAKC"] }, "poolId": { "enum": [0, 1, 2, 3] }, "tokenId": { "type": "string", "pattern": "^[0-9]+$" }, "deposited": { "type": "string", "pattern": "^[0-9]+$" }, "unclaimed": { "type": "string", "pattern": "^[0-9]+$" } } } } } } } }] },
        "limitations": { "type": "array", "items": { "type": "string" } }
      } },
      "AccountBalance": { "type": "object", "additionalProperties": false, "description": "One balance read pinned to one block hash. result.status says whether rawAmount is an answer; a null rawAmount is never zero. Every field is present on every status.", "required": ["version", "chainId", "account", "asset", "requested", "resolved", "result", "classification", "metadata", "evidence", "capabilities", "coverage"], "properties": { "version": { "const": 1 }, "chainId": { "const": "33139" }, "account": { "type": "string", "pattern": "^0x[0-9a-f]{40}$" }, "asset": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["kind", "contract"], "properties": { "kind": { "const": "native" }, "contract": { "type": "null" } } }, { "type": "object", "additionalProperties": false, "required": ["kind", "contract"], "properties": { "kind": { "const": "erc20" }, "contract": { "type": "string", "pattern": "^0x[0-9a-f]{40}$" } } }] }, "requested": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["kind"], "properties": { "kind": { "const": "latest" } } }, { "type": "object", "additionalProperties": false, "required": ["kind", "number"], "properties": { "kind": { "const": "number" }, "number": { "type": "string", "pattern": "^(0|[1-9][0-9]{0,19})$" } } }, { "type": "object", "additionalProperties": false, "required": ["kind", "hash"], "properties": { "kind": { "const": "hash" }, "hash": { "type": "string", "pattern": "^0x[0-9a-f]{64}$" } } }, { "type": "object", "additionalProperties": false, "required": ["kind", "utc", "direction"], "properties": { "kind": { "const": "date" }, "utc": { "type": "string", "format": "date-time" }, "direction": { "enum": ["before", "after"] } } }] }, "resolved": { "anyOf": [{ "type": "object", "additionalProperties": false, "required": ["number", "hash", "timestampSeconds", "timestampUtc", "resolvedAt"], "properties": { "number": { "type": "string", "pattern": "^[0-9]+$" }, "hash": { "type": "string", "pattern": "^0x[0-9a-f]{64}$" }, "timestampSeconds": { "type": "string", "pattern": "^[0-9]+$" }, "timestampUtc": { "type": ["string", "null"], "format": "date-time" }, "resolvedAt": { "type": "string", "format": "date-time" } } }, { "type": "null" }], "description": "The block every read used; null when no block was resolved." }, "result": { "type": "object", "additionalProperties": false, "required": ["status", "reason", "rawAmount", "zero", "unit"], "properties": { "status": { "enum": ["ok", "unproven_standard", "no_code_at_block", "contract_reverted", "invalid_answer", "block_not_found", "reorg_or_noncanonical", "unsupported_history", "node_unavailable"] }, "reason": { "enum": ["date_resolver_not_adopted", "block_hash_selector_unsupported", "historical_state_pruned", "transport_unavailable", "invalid_response", "requested_block_absent", "canonical_hash_changed", "empty_code", "call_reverted", "standard_unproven", null] }, "rawAmount": { "type": ["string", "null"], "pattern": "^[0-9]+$", "description": "Exact base units (wei for native APE); null when there is no answer." }, "zero": { "type": ["boolean", "null"], "description": "Native only; null for ERC-20 and failed reads." }, "unit": { "enum": ["wei", "raw_token_units"] } } }, "classification": { "type": "object", "additionalProperties": false, "required": ["status", "source", "evidenceRef"], "properties": { "status": { "enum": ["native", "interface_compatible_unproven", "unknown"] }, "source": { "enum": ["chain_definition", "pinned_abi_probe", "none"] }, "evidenceRef": { "type": "null" } } }, "metadata": { "type": "object", "additionalProperties": false, "required": ["decimals", "symbol", "name"], "properties": { "decimals": { "type": "object", "additionalProperties": false, "required": ["status", "value", "source", "blockHash", "observedAt"], "properties": { "status": { "enum": ["ok", "unknown", "unsupported", "reverted", "unavailable"] }, "value": { "type": ["integer", "null"], "minimum": 0, "maximum": 255 }, "source": { "enum": ["chain_definition", "rpc_at_block_hash", "none"] }, "blockHash": { "anyOf": [{ "type": "string", "pattern": "^0x[0-9a-f]{64}$" }, { "type": "null" }] }, "observedAt": { "type": ["string", "null"], "format": "date-time" } } }, "symbol": { "type": "object", "additionalProperties": false, "required": ["status", "value", "source", "blockHash", "observedAt"], "properties": { "status": { "enum": ["ok", "unknown", "unsupported", "reverted", "unavailable"] }, "value": { "type": ["string", "null"] }, "source": { "enum": ["chain_definition", "rpc_at_block_hash", "none"] }, "blockHash": { "anyOf": [{ "type": "string", "pattern": "^0x[0-9a-f]{64}$" }, { "type": "null" }] }, "observedAt": { "type": ["string", "null"], "format": "date-time" } } }, "name": { "type": "object", "additionalProperties": false, "required": ["status", "value", "source", "blockHash", "observedAt"], "properties": { "status": { "enum": ["ok", "unknown", "unsupported", "reverted", "unavailable"] }, "value": { "type": ["string", "null"] }, "source": { "enum": ["chain_definition", "rpc_at_block_hash", "none"] }, "blockHash": { "anyOf": [{ "type": "string", "pattern": "^0x[0-9a-f]{64}$" }, { "type": "null" }] }, "observedAt": { "type": ["string", "null"], "format": "date-time" } } } } }, "evidence": { "type": "object", "additionalProperties": false, "required": ["source", "endpointId", "endpointBinding", "rpcChainObservedAt", "stateReadAt", "canonicalBeforeAt", "canonicalAfterAt", "canonicality", "freshness", "atomic"], "properties": { "source": { "const": "rpc_state" }, "endpointId": { "type": ["string", "null"] }, "endpointBinding": { "enum": ["captured_route", "unknown"] }, "rpcChainObservedAt": { "type": ["string", "null"], "format": "date-time" }, "stateReadAt": { "type": ["string", "null"], "format": "date-time" }, "canonicalBeforeAt": { "type": ["string", "null"], "format": "date-time" }, "canonicalAfterAt": { "type": ["string", "null"], "format": "date-time" }, "canonicality": { "enum": ["revalidated", "noncanonical", "unknown"] }, "freshness": { "const": "unknown" }, "atomic": { "const": false } } }, "capabilities": { "type": "object", "additionalProperties": false, "required": ["dateResolver", "blockHashState", "historicalState"], "properties": { "dateResolver": { "const": "not_adopted" }, "blockHashState": { "enum": ["observed_supported", "observed_unsupported", "unknown"] }, "historicalState": { "enum": ["observed_at_requested_block", "unavailable_at_requested_block", "unknown"] } } }, "coverage": { "type": "object", "additionalProperties": false, "required": ["source", "from", "to", "complete"], "properties": { "source": { "const": "not_measured" }, "from": { "type": "null" }, "to": { "type": "null" }, "complete": { "type": "null" } } } } },
      "PinnedBlock": { "type": "object", "required": ["number", "hash"], "properties": { "number": { "type": "string", "pattern": "^[0-9]+$" }, "hash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" } } },
      "SignedTransactionHex": { "type": "string", "pattern": "^0x([0-9a-fA-F]{2})+$", "maxLength": 65538, "description": "Signed transaction bytes, at most 32 KiB" },
      "SignedTransactionDecodeRequest": { "type": "object", "additionalProperties": false, "required": ["rawTransaction", "chainId"], "properties": { "rawTransaction": { "$ref": "#/components/schemas/SignedTransactionHex" }, "chainId": { "const": "33139" } } },
      "SignedTransactionBroadcastRequest": { "type": "object", "additionalProperties": false, "required": ["rawTransaction", "confirmHash", "chainId", "confirmation"], "properties": { "rawTransaction": { "$ref": "#/components/schemas/SignedTransactionHex" }, "confirmHash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$", "description": "The hash shown by decode, confirming this exact transaction" }, "chainId": { "const": "33139" }, "confirmation": { "const": "broadcast_signed_transaction" } } },
      "SignedTransactionReview": { "type": "object", "additionalProperties": false, "required": ["version", "hash", "chainId", "sender", "to", "type", "nonce", "value", "gas", "gasPrice", "maxFeePerGas", "maxPriorityFeePerGas", "data", "accessListEntries", "decodedInput"], "properties": {
        "version": { "const": 1 }, "hash": { "type": "string", "pattern": "^0x[0-9a-f]{64}$" }, "chainId": { "const": 33139 }, "sender": { "type": "string", "pattern": "^0x[0-9a-f]{40}$", "description": "Recovered from the signature" },
        "to": { "oneOf": [{ "type": "string", "pattern": "^0x[0-9a-f]{40}$" }, { "type": "null", "description": "Contract creation" }] }, "type": { "enum": ["legacy", "eip2930", "eip1559"] },
        "nonce": { "type": "string", "pattern": "^[0-9]+$" }, "value": { "type": "string", "pattern": "^[0-9]+$", "description": "Exact wei" }, "gas": { "type": "string", "pattern": "^[0-9]+$" },
        "gasPrice": { "type": ["string", "null"], "pattern": "^[0-9]+$" }, "maxFeePerGas": { "type": ["string", "null"], "pattern": "^[0-9]+$" }, "maxPriorityFeePerGas": { "type": ["string", "null"], "pattern": "^[0-9]+$" },
        "data": { "type": "string", "pattern": "^0x([0-9a-f]{2})*$" }, "accessListEntries": { "type": "integer", "minimum": 0 },
        "decodedInput": { "type": ["object", "null"], "description": "Calldata matched by selector against a bundled signature list; names are a best guess" } } },
      "BroadcastOutcome": { "type": "object", "additionalProperties": false, "required": ["version", "chainId", "hash", "duplicate", "status", "reason", "nodeError", "observedAt", "endpointId", "chainObservedAt"], "properties": {
        "version": { "const": 1 }, "chainId": { "const": 33139 }, "hash": { "type": "string", "pattern": "^0x[0-9a-f]{64}$" }, "duplicate": { "type": "boolean", "description": "True when this hash was already submitted to this server; nothing was resent" },
        "status": { "enum": ["node_accepted", "node_error", "outcome_unknown", "not_submitted"] }, "reason": { "enum": ["matching_hash", "node_returned_error", "transport_or_response_unknown", "preflight_unavailable", "chain_mismatch"] },
        "nodeError": { "oneOf": [{ "type": "null" }, { "type": "object", "additionalProperties": false, "required": ["code", "message"], "properties": { "code": { "type": "integer" }, "message": { "type": "string", "maxLength": 512 } } }] },
        "observedAt": { "type": "string", "format": "date-time" }, "endpointId": { "const": "startup-primary" }, "chainObservedAt": { "type": "string", "format": "date-time" } } },
      "BroadcastRefused": { "type": "object", "additionalProperties": false, "required": ["error", "message"], "properties": { "error": { "enum": ["busy", "unavailable"] }, "message": { "type": "string" } } },
      "NftBalanceEntry": { "description": "Anonymous supplied wallet, contract and ID current-state check. Each returned block identifies that one node read; separate calls are not an atomic snapshot or wallet enumeration.", "oneOf": [{ "type": "object", "required": ["owner", "contract", "id", "standard", "status", "balance", "reason"], "properties": { "owner": { "$ref": "#/components/schemas/Address" }, "contract": { "$ref": "#/components/schemas/Address" }, "id": { "type": "string", "pattern": "^[0-9]+$" }, "standard": { "const": "erc721" }, "status": { "const": "ok" }, "balance": { "type": "string", "pattern": "^[01]$" }, "reason": { "enum": ["owner", "not_owner", "no_owner"] } } }, { "type": "object", "required": ["owner", "contract", "id", "standard", "status", "balance"], "not": { "required": ["reason"] }, "properties": { "owner": { "$ref": "#/components/schemas/Address" }, "contract": { "$ref": "#/components/schemas/Address" }, "id": { "type": "string", "pattern": "^[0-9]+$" }, "standard": { "const": "erc1155" }, "status": { "const": "ok" }, "balance": { "type": "string", "pattern": "^[0-9]+$" } } }, { "type": "object", "required": ["owner", "contract", "id", "standard", "status", "balance", "reason"], "properties": { "owner": { "$ref": "#/components/schemas/Address" }, "contract": { "$ref": "#/components/schemas/Address" }, "id": { "type": "string", "pattern": "^[0-9]+$" }, "standard": { "const": null }, "status": { "const": "not_nft" }, "balance": { "const": null }, "reason": { "const": "not_nft" } } }, { "type": "object", "required": ["owner", "contract", "id", "standard", "status", "balance", "reason"], "properties": { "owner": { "$ref": "#/components/schemas/Address" }, "contract": { "$ref": "#/components/schemas/Address" }, "id": { "type": "string", "pattern": "^[0-9]+$" }, "standard": { "enum": ["erc721", "erc1155", null] }, "status": { "const": "unavailable" }, "balance": { "const": null }, "reason": { "enum": ["node_unavailable", "unexpected_answer", "reverted", "standard_unknown"] } } }] },
      "NftBalanceResult": { "allOf": [{ "$ref": "#/components/schemas/NftBalanceEntry" }, { "type": "object", "required": ["chainId", "block", "scope"], "properties": { "chainId": { "const": 33139 }, "block": { "$ref": "#/components/schemas/PinnedBlock" }, "scope": { "const": "current on-chain state read from the node at `block`; not the indexed holder history" } } }] },
      "NftBalanceBatch": { "type": "object", "required": ["chainId", "block", "scope", "items"], "properties": { "chainId": { "const": 33139 }, "block": { "$ref": "#/components/schemas/PinnedBlock" }, "scope": { "type": "string" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/NftBalanceEntry" } } } },
      "NftBalanceNotNft": { "allOf": [{ "$ref": "#/components/schemas/NftBalanceResult" }, { "type": "object", "required": ["error", "message"], "properties": { "error": { "const": "not_an_nft" }, "message": { "type": "string" } } }] },
      "NftBalancePinUnavailable": { "description": "The initial head pin failed, so there is no block or per-item result. Retry after five seconds and do not treat it as zero.", "type": "object", "additionalProperties": false, "required": ["error", "message"], "properties": { "error": { "const": "node_unavailable" }, "message": { "type": "string" } } },
      "NftBalanceCurrentUnavailable": { "description": "The block pin succeeded, but discovery or the item read was unavailable. This retains the pinned chain, block, scope, and typed unavailable entry.", "allOf": [{ "$ref": "#/components/schemas/NftBalanceResult" }, { "type": "object", "required": ["error", "message", "standard", "status", "balance", "reason"], "properties": { "error": { "enum": ["node_unavailable", "standard_unknown"] }, "message": { "type": "string" }, "status": { "const": "unavailable" }, "balance": { "const": null }, "reason": { "enum": ["node_unavailable", "unexpected_answer", "reverted", "standard_unknown"] } } }] },
      "NftBalanceUnavailable": { "description": "Either the initial pin failed without a block, or a post-pin current-state read returned a typed unavailable result. Neither is a zero balance.", "oneOf": [{ "$ref": "#/components/schemas/NftBalancePinUnavailable" }, { "$ref": "#/components/schemas/NftBalanceCurrentUnavailable" }] },
      "TokenDetailUnavailable": { "description": "Token detail discovery could not establish an NFT standard. This does not classify the address as absent or non-NFT.", "type": "object", "additionalProperties": false, "required": ["error", "message"], "properties": { "error": { "enum": ["lookup_unavailable", "standard_unknown"] }, "message": { "type": "string" } } },
      "NftNotAnNft": { "description": "The contract was classified as non-NFT only after a compliant ERC-165 handshake and explicit negatives for both NFT interfaces.", "type": "object", "required": ["error", "message", "reason"], "properties": { "error": { "enum": ["not_an_nft"] }, "message": { "type": "string" }, "reason": { "enum": ["not_nft"] } } },
      "NftItemAbsent": { "description": "Why an item cannot be shown, no stronger than the evidence: owner_not_reported (ERC-721 ownerOf did not report an owner; this lookup does not establish why), zero_supply_no_history (ERC-1155 totalSupply(id) is 0 at the latest block and no transfer of it is indexed; says nothing about earlier existence), not_indexed_unconfirmed (nothing indexed, the node could not confirm).", "type": "object", "required": ["error", "message", "reason"], "properties": { "error": { "enum": ["not_found"] }, "message": { "type": "string" }, "reason": { "enum": ["owner_not_reported", "zero_supply_no_history", "not_indexed_unconfirmed"] }, "evidence": { "type": "object", "properties": { "source": { "type": "string" }, "blockTag": { "type": "string" }, "result": { "type": "string" } } }, "tokenId": { "type": "string", "pattern": "^[0-9]+$" }, "collection": { "type": "object", "required": ["address", "name", "symbol", "standard"], "properties": { "address": { "$ref": "#/components/schemas/Address" }, "name": { "type": "string" }, "symbol": { "type": "string" }, "standard": { "enum": ["erc721", "erc1155", null] } } }, "indexedIds": { "type": ["object", "null"], "properties": { "min": { "type": "string", "pattern": "^[0-9]+$" }, "max": { "type": "string", "pattern": "^[0-9]+$" }, "count": { "type": "integer" } } }, "indexedThrough": { "type": ["object", "null"], "properties": { "blockNumber": { "type": "integer" }, "timestamp": { "type": "integer" } } } } },
      "NftItemUnavailable": { "type": "object", "required": ["error", "message", "reason"], "properties": { "error": { "enum": ["lookup_unavailable", "standard_unknown"] }, "message": { "type": "string" }, "reason": { "enum": ["lookup_unavailable", "standard_unknown"] }, "tokenId": { "type": "string", "pattern": "^[0-9]+$" }, "collection": { "type": "object", "required": ["address", "name", "symbol", "standard"], "properties": { "address": { "$ref": "#/components/schemas/Address" }, "name": { "type": "string" }, "symbol": { "type": "string" }, "standard": { "enum": ["erc721", "erc1155", null] } } }, "indexedIds": { "type": ["object", "null"], "properties": { "min": { "type": "string", "pattern": "^[0-9]+$" }, "max": { "type": "string", "pattern": "^[0-9]+$" }, "count": { "type": "integer" } } }, "indexedThrough": { "type": ["object", "null"], "properties": { "blockNumber": { "type": "integer" }, "timestamp": { "type": "integer" } } } }, "allOf": [{ "anyOf": [{ "properties": { "error": { "const": "lookup_unavailable" }, "reason": { "const": "lookup_unavailable" } } }, { "properties": { "error": { "const": "standard_unknown" }, "reason": { "const": "standard_unknown" } } }] }] },
      "NftCollection": { "type": "object", "required": ["address", "standard", "name", "symbol", "indexedHolders", "indexedItems", "indexedTransfers", "indexedMints", "lastActivity", "supply", "flagged", "image", "coverage"], "properties": { "address": { "$ref": "#/components/schemas/Address" }, "standard": { "enum": ["erc721", "erc1155"] }, "name": { "type": "string" }, "symbol": { "type": "string" }, "indexedHolders": { "type": "integer", "minimum": 0 }, "indexedItems": { "type": "integer", "minimum": 0 }, "indexedTransfers": { "type": "integer", "minimum": 0 }, "indexedMints": { "type": "integer", "minimum": 0 }, "lastActivity": { "type": ["object", "null"] }, "activity7d": { "type": "object", "properties": { "buyers": { "type": "integer" }, "sales": { "type": "integer" }, "volume": { "type": "string", "pattern": "^[0-9]+$" } } }, "activity24h": { "type": "object", "required": ["sales", "volume", "minPrice", "maxPrice"], "properties": { "sales": { "type": "integer", "minimum": 0 }, "volume": { "type": "string", "pattern": "^[0-9]+$" }, "minPrice": { "type": ["string", "null"], "pattern": "^[0-9]+$" }, "maxPrice": { "type": ["string", "null"], "pattern": "^[0-9]+$" } } }, "supply": { "type": "object" }, "flagged": { "type": "boolean" }, "image": { "type": ["string", "null"] }, "coverage": { "$ref": "#/components/schemas/Coverage" } } },
      "NftMetadata": { "type": "object", "required": ["status", "errorClass", "name", "image"], "properties": { "status": { "enum": ["ok", "pending", "error"] }, "errorClass": { "type": ["string", "null"] }, "name": { "type": ["string", "null"] }, "image": { "type": ["string", "null"] }, "modelUrl": { "type": ["string", "null"], "format": "uri", "description": "Allowlisted HTTPS GLB or GLTF model URL, or null when the item has no safe 3D model." }, "domain": { "$ref": "#/components/schemas/DomainName" } } },
      "DexTrade": { "type": "object", "required": ["txHash", "blockNumber", "timestamp", "side", "token", "tokenSymbol", "counterToken", "counterSymbol", "amount", "counterAmount", "rawAmount", "rawCounterAmount", "rate", "usdValue", "dex", "pool", "version"], "properties": { "txHash": { "type": "string", "pattern": "^0x[0-9a-fA-F]{64}$" }, "blockNumber": { "type": "integer", "minimum": 0 }, "timestamp": { "type": "integer", "minimum": 0 }, "side": { "enum": ["buy", "sell"] }, "token": { "$ref": "#/components/schemas/Address" }, "tokenSymbol": { "type": "string" }, "counterToken": { "$ref": "#/components/schemas/Address" }, "counterSymbol": { "type": "string" }, "amount": { "type": "string" }, "counterAmount": { "type": "string" }, "rawAmount": { "type": "string", "pattern": "^[0-9]+$" }, "rawCounterAmount": { "type": "string", "pattern": "^[0-9]+$" }, "rate": { "type": ["string", "null"] }, "usdValue": { "type": ["string", "null"] }, "dex": { "type": "string" }, "pool": { "$ref": "#/components/schemas/Address" }, "version": { "enum": ["v2", "v3"] } } },
      "DexPair": { "type": "object", "required": ["pool", "dex", "version", "token", "symbol", "pairedToken", "pairedSymbol", "price", "volume24h", "liquidity", "swaps24h", "observedAt"], "properties": { "pool": { "$ref": "#/components/schemas/Address" }, "dex": { "type": "string" }, "version": { "enum": ["v2", "v3"] }, "token": { "$ref": "#/components/schemas/Address" }, "symbol": { "type": "string" }, "pairedToken": { "$ref": "#/components/schemas/Address" }, "pairedSymbol": { "type": "string" }, "price": { "type": ["string", "null"] }, "volume24h": { "type": ["string", "null"] }, "liquidity": { "type": ["string", "null"] }, "swaps24h": { "type": "integer", "minimum": 0 }, "observedAt": { "type": ["integer", "null"], "minimum": 0 } } },
      "DexPairs": { "type": "object", "required": ["source", "pairs", "labels"], "properties": { "address": { "anyOf": [{ "$ref": "#/components/schemas/Address" }, { "type": "null" }] }, "source": { "const": "indexed" }, "pairs": { "type": "array", "maxItems": 50, "items": { "$ref": "#/components/schemas/DexPair" } }, "labels": { "type": "object" } } },
      "DomainName": { "description": "Naming collections only: the item name, sanitised (hidden characters, non-ASCII and malformed names are withheld).", "type": "object", "required": ["name", "label", "tld", "separator"], "properties": { "name": { "type": "string" }, "label": { "type": "string" }, "tld": { "type": "string" }, "separator": { "type": "string" } } },
      "NameExpiry": { "description": "Expiry read from the naming contract (bounded per response, cached). unknown is never active or expired; loading means the read did not finish within the response budget and is still filling the cache.", "oneOf": [{ "type": "object", "required": ["status", "expiresAt", "expired"], "properties": { "status": { "const": "ok" }, "expiresAt": { "type": "integer" }, "expired": { "type": "boolean" } } }, { "type": "object", "required": ["status", "reason"], "properties": { "status": { "const": "unknown" }, "reason": { "enum": ["reverted", "unsupported", "unavailable", "not_checked", "loading"] } } }] },
      "Shadow": { "description": "Set when the collection is an NFT shadow: a mirror of a collection on another chain, registered with this chain's shadow Beacon. A locked item follows the exclusive owner on the source chain (delegate.xyz rights) and only moves when a LayerZero read syncs it, so ownerOf can lag. An unlocked item was bridged here and is an ordinary ERC-721. See docs/shadows.md.", "type": "object", "additionalProperties": false, "required": ["source", "beacon", "shadowMode"], "properties": { "source": { "type": "object", "additionalProperties": false, "required": ["chainId", "chain", "eid", "address", "url"], "properties": { "chainId": { "type": "integer" }, "chain": { "type": "string", "description": "Source chain name, e.g. Ethereum." }, "eid": { "type": "integer", "description": "LayerZero endpoint id of the source chain." }, "address": { "$ref": "#/components/schemas/Address" }, "url": { "type": "string", "format": "uri", "description": "The source collection, or the source item on item answers, on the source chain's explorer." }, "name": { "type": "string", "description": "The source collection's name, for registrations ApeScan lists." } } }, "beacon": { "$ref": "#/components/schemas/Address" }, "shadowMode": { "type": ["boolean", "null"], "description": "true: items follow the source owner unless bridged here. false: items exist only while bridged here. null: the node did not answer." }, "locked": { "type": ["boolean", "null"], "description": "Item answers only. true: a soulbound mirror of the source owner. false: bridged here and transferable. null: the node did not answer." }, "sync": { "description": "Locked items of an Ethereum collection: the item's owner on Ethereum against its shadow owner here. Absent when a read failed or the item is bridged to another chain.", "type": "object", "additionalProperties": false, "required": ["sourceOwner", "delegate", "owner", "inSync", "fee"], "properties": { "sourceOwner": { "$ref": "#/components/schemas/Address", "description": "ownerOf on Ethereum." }, "delegate": { "oneOf": [{ "$ref": "#/components/schemas/Address" }, { "type": "null" }], "description": "The wallet the Ethereum owner delegated this chain's rights to with delegate.xyz; the shadow follows it." }, "owner": { "oneOf": [{ "$ref": "#/components/schemas/Address" }, { "type": "null" }], "description": "ownerOf here. null: never synced to this chain." }, "inSync": { "type": "boolean", "description": "owner is the delegate, or the Ethereum owner when there is none." }, "fee": { "type": ["string", "null"], "pattern": "^[0-9]+$", "description": "LayerZero fee in wei for read([tokenId], [source eid]) on the shadow now (Beacon quoteRead). Any excess is refunded. null: the quote failed." } } } } },
      "ShadowCollection": { "description": "A registered NFT shadow on this chain (docs/shadows.md).", "type": "object", "required": ["address", "name", "symbol", "source", "shadowMode", "items", "holders", "unlocked", "requests", "lastSync"], "properties": { "address": { "$ref": "#/components/schemas/Address" }, "name": { "type": "string", "description": "The source collection's name." }, "symbol": { "type": "string" }, "source": { "type": "object", "required": ["chainId", "chain", "eid", "address", "url"], "properties": { "chainId": { "type": "integer" }, "chain": { "type": "string" }, "eid": { "type": "integer" }, "address": { "$ref": "#/components/schemas/Address" }, "url": { "type": "string", "format": "uri" }, "name": { "type": "string" } } }, "shadowMode": { "type": ["boolean", "null"], "description": "true: items follow the source owner unless bridged here. false: a plain bridge. null: the node did not answer." }, "items": { "type": ["string", "null"], "pattern": "^[0-9]+$", "description": "Items that exist on this chain: the current-state snapshot, else totalSupply. null: unknown." }, "holders": { "type": ["integer", "null"], "description": "Owners on this chain." }, "unlocked": { "type": "integer", "description": "Items bridged here now (latest Unlocked newer than latest Locked): transferable on this chain." }, "requests": { "type": "object", "additionalProperties": false, "required": ["day", "week", "last"], "properties": { "day": { "type": "integer", "description": "Sync requests (Beacon ReadTriggered) in the last 24 hours." }, "week": { "type": "integer", "description": "Sync requests in the last 7 days." }, "last": { "type": ["integer", "null"], "description": "Unix seconds of the last request in the last 7 days." } } }, "lastSync": { "type": ["integer", "null"], "description": "Unix seconds of the last LayerZero read answer that moved an item here, in the last 7 days." } } },
      "ShadowActivity": { "type": "object", "additionalProperties": false, "required": ["kind", "txHash", "blockNumber", "timestamp", "tokenIds", "from", "to"], "properties": { "kind": { "enum": ["request", "sync", "arrive", "send"], "description": "request: someone paid for a sync. sync: a LayerZero read answer moved items here. arrive: items bridged here. send: items bridged away." }, "txHash": { "type": "string", "pattern": "^0x[0-9a-f]{64}$" }, "blockNumber": { "type": "integer" }, "timestamp": { "type": "integer" }, "tokenIds": { "type": "array", "maxItems": 50, "items": { "type": "string", "pattern": "^[0-9]+$" } }, "from": { "oneOf": [{ "$ref": "#/components/schemas/Address" }, { "type": "null" }], "description": "Who paid for a request; the single previous owner of a sync." }, "to": { "oneOf": [{ "$ref": "#/components/schemas/Address" }, { "type": "null" }], "description": "The single new owner of a sync or arrival; the beneficiary of a send." } } },
      "Naming": { "description": "Set when the collection's items are names. operator.url is the verified official registration page.", "type": "object", "required": ["id", "title", "tld", "separator", "operator"], "properties": { "id": { "type": "string" }, "title": { "type": "string" }, "tld": { "type": "string" }, "separator": { "type": "string" }, "operator": { "type": "object", "required": ["name", "url", "label", "source"], "properties": { "name": { "type": "string" }, "url": { "type": "string" }, "label": { "type": "string" }, "source": { "type": "string" } } }, "expiry": { "$ref": "#/components/schemas/NameExpiry" } } },
      "TokenMarket": {"description": "Token price and market values in USD. Decimal strings, never floats. null when no pool prices the token.", "type": "object", "additionalProperties": false, "required": ["price", "change24h", "volume24h", "liquidity", "marketCap", "fdv", "source", "observedAt", "url", "pools"], "properties": {"price": {"type": "object", "additionalProperties": false, "required": ["usd", "ape"], "properties": {"usd": {"type": "string", "pattern": "^[0-9]+(\\.[0-9]+)?$"}, "ape": {"type": ["string", "null"], "pattern": "^[0-9]+(\\.[0-9]+)?$", "description": "Price in APE (WAPE)."}}}, "change24h": {"type": ["string", "null"], "pattern": "^-?[0-9]+(\\.[0-9]+)?$", "description": "Percent change over 24 hours (DexScreener), when the token is its pool's base token."}, "volume24h": {"type": ["string", "null"], "pattern": "^[0-9]+(\\.[0-9]+)?$", "description": "USD traded over 24 hours, summed over the token's pools."}, "liquidity": {"type": ["string", "null"], "pattern": "^[0-9]+(\\.[0-9]+)?$", "description": "USD liquidity, summed over the token's pools."}, "marketCap": {"type": ["string", "null"], "pattern": "^[0-9]+(\\.[0-9]+)?$", "description": "Circulating market cap (DexScreener), only when a circulating supply is known; otherwise use fdv."}, "fdv": {"type": ["string", "null"], "pattern": "^[0-9]+(\\.[0-9]+)?$", "description": "Fully diluted value: price × on-chain totalSupply, truncated to cents."}, "source": {"enum": ["dexscreener", "lp"], "description": "dexscreener, or lp: read from the token's deepest ApeChain pool while DexScreener is unavailable."}, "observedAt": {"type": "string", "format": "date-time"}, "url": {"type": ["string", "null"], "format": "uri", "description": "The token on DexScreener."}, "pools": {"type": "array", "maxItems": 5, "items": {"$ref": "#/components/schemas/MarketPool"}, "description": "Deepest pools first."}, "logo": {"type": ["string", "null"], "pattern": "^/v1/tokens/0x[0-9a-f]{40}/logo$", "description": "API path of the token's logo (DexScreener), or null when it has none."}, "history": {"type": "array", "description": "Daily USD closes recorded by this explorer, oldest first: up to 31 days on token detail, the last 7 days on /v1/tokens rows.", "items": {"type": "object", "required": ["day", "priceUsd"], "properties": {"day": {"type": "string", "format": "date"}, "priceUsd": {"type": "string", "pattern": "^[0-9]+(\\.[0-9]+)?$"}}}}}},
      "MarketPool": {"type": "object", "additionalProperties": false, "required": ["dex", "version", "pair", "url", "base", "quote", "liquidity", "volume24h"], "properties": {"dex": {"type": "string", "description": "DexScreener's DEX id (camelot, saru, …); some DEXes are named by their factory address."}, "version": {"type": ["string", "null"], "description": "Pool version label (v2, v3), when known."}, "pair": {"type": "string", "pattern": "^0x([0-9a-f]{40}|[0-9a-f]{64})$"}, "url": {"type": ["string", "null"], "format": "uri"}, "base": {"type": "string"}, "quote": {"type": "string"}, "liquidity": {"type": ["string", "null"], "pattern": "^[0-9]+(\\.[0-9]+)?$", "description": "USD"}, "volume24h": {"type": ["string", "null"], "pattern": "^[0-9]+(\\.[0-9]+)?$", "description": "USD"}}},
      "ApePrice": {"type": "object", "additionalProperties": false, "required": ["priceUsd", "change24h", "marketCap", "volume24h", "observedAt", "url", "source"], "properties": {"priceUsd": {"type": "string", "pattern": "^[0-9]+(\\.[0-9]+)?$"}, "change24h": {"type": ["string", "null"], "pattern": "^-?[0-9]+(\\.[0-9]+)?$"}, "marketCap": {"type": ["string", "null"], "pattern": "^[0-9]+(\\.[0-9]+)?$"}, "volume24h": {"type": ["string", "null"], "pattern": "^[0-9]+(\\.[0-9]+)?$"}, "observedAt": {"type": "string", "format": "date-time"}, "url": {"type": ["string", "null"], "format": "uri"}, "source": {"const": "dexscreener"}}},
      "TokenDetail": { "description": "Indexed token detail or an ERC-165-discovered NFT collection. coverage scopes the indexed facts; naming is present only for registered naming collections.", "type": "object", "required": ["address", "standard", "name", "symbol", "decimals", "decimalsKnown", "totalSupply", "firstBlock", "holders", "transfers", "supply", "coverage"], "properties": { "address": { "$ref": "#/components/schemas/Address" }, "standard": { "enum": ["erc20", "erc721", "erc1155"] }, "name": { "type": "string" }, "symbol": { "type": "string" }, "logo": { "type": ["string", "null"], "pattern": "^/v1/tokens/0x[0-9a-f]{40}/logo$", "description": "API path of a Camelot token-list logo, or null when no Camelot logo is cached." }, "decimals": { "type": ["integer", "null"] }, "decimalsKnown": { "type": "boolean" }, "totalSupply": { "type": "string", "pattern": "^[0-9]+$" }, "firstBlock": { "type": ["integer", "null"] }, "holders": { "type": ["integer", "null"], "description": "Indexed holders; with stateSnapshot, the distinct current owners of the snapshot's items." }, "transfers": { "type": ["integer", "null"] }, "supply": { "type": "object" }, "coverage": { "$ref": "#/components/schemas/Coverage" }, "naming": { "$ref": "#/components/schemas/Naming" }, "shadow": { "$ref": "#/components/schemas/Shadow" }, "stateSnapshot": { "$ref": "#/components/schemas/StateSnapshotCoverage" }, "market": { "description": "ERC-20 only, when market data is enabled.", "anyOf": [{ "$ref": "#/components/schemas/TokenMarket" }, { "type": "null" }] } } },
      "InventoryItem": { "type": "object", "required": ["tokenId", "owner", "burnt", "metadata"], "properties": { "tokenId": { "type": "string", "pattern": "^[0-9]+$" }, "owner": { "anyOf": [{ "$ref": "#/components/schemas/Address" }, { "type": "null" }] }, "burnt": { "type": "boolean" }, "transfers": { "type": "integer" }, "holders": { "type": "integer" }, "supply": { "type": "string", "pattern": "^[0-9]+$" }, "balance": { "type": "string", "pattern": "^[0-9]+$" }, "ownerSource": { "enum": ["snapshot", "index"], "description": "Present only with a current-state snapshot: snapshot = ownerOf at the snapshot block; index = an indexed transfer after that block." }, "metadata": { "$ref": "#/components/schemas/NftMetadata" }, "expiry": { "$ref": "#/components/schemas/NameExpiry" } } },
      "AddressNft": { "type": "object", "required": ["token", "tokenId", "balance", "standard", "collection", "symbol", "metadata"], "properties": { "token": { "$ref": "#/components/schemas/Address" }, "tokenId": { "type": "string", "pattern": "^[0-9]+$" }, "balance": { "type": "string", "pattern": "^[0-9]+$" }, "standard": { "enum": ["erc721", "erc1155"] }, "collection": { "type": "string" }, "symbol": { "type": "string" }, "metadata": { "$ref": "#/components/schemas/NftMetadata" }, "expiry": { "$ref": "#/components/schemas/NameExpiry" }, "ownerSource": { "enum": ["index", "snapshot"], "description": "What establishes this wallet's holding: indexed transfers, or a current-state ownerOf snapshot (see stateSnapshots)." } } },
      "NftDetail": {"type":"object","required":["token","tokenId","standard","owner","burnt","metadata","holders","holderCount","supply","market","flagged","ownerCurrent","ownerStatus","nodeCheck","discovered","existence","burntInHistory","indexedThrough","coverage","zeroSupplyProof","holdersScope","nodeSupply"],"properties":{"token":{"type":"object","required":["address","name","symbol","standard"],"properties":{"address":{"$ref":"#/components/schemas/Address"},"name":{"type":"string"},"symbol":{"type":"string"},"standard":{"enum":["erc721","erc1155"]}}},"tokenId":{"type":"string","pattern":"^[0-9]+$"},"standard":{"enum":["erc721","erc1155"]},"owner":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}],"description":"ERC-721 ownership may be node-confirmed."},"ownerCurrent":{"type":["boolean","null"],"description":"Whether a node check confirmed the current ERC-721 owner."},"ownerSource":{"type":["string","null"],"description":"Evidence source for owner: index (indexed history), snapshot (a current-state ownerOf snapshot, see ownerSnapshot) or node (read now)."},"ownerSnapshot":{"description":"Collections with a current-state snapshot only: this id's answer at the snapshot block (owner null when ownerOf reverted).","allOf":[{"$ref":"#/components/schemas/StateSnapshotCoverage"}],"type":"object","required":["owner"],"properties":{"owner":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]}}},"ownerStatus":{"enum":["indexed","snapshot","node","node_negative","node_unsupported","node_unavailable","not_applicable","unknown"],"description":"Owner lookup status; use with owner and ownerCurrent for ownership confidence."},"burnt":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/NftMetadata"},"naming":{"$ref":"#/components/schemas/Naming"},"shadow":{"$ref":"#/components/schemas/Shadow"},"holdersScope":{"enum":["indexed_observations","not_applicable"],"description":"ERC-1155: holders are positive balances observed in indexed transfers, not a current or complete holder list. ERC-721: not_applicable; use owner, ownerCurrent, ownerSource and ownerStatus. For a current-state check use /v1/nfts/{address}/{id}/balance."},"holders":{"type":["array","null"],"description":"ERC-1155 indexed holder observations (top 25). null for ERC-721. The separate /v1/nfts/{address}/{id}/holders endpoint derives the latest indexed ERC-721 recipient with coverage/provenance.","items":{"type":"object","required":["address","balance"],"properties":{"address":{"$ref":"#/components/schemas/Address"},"balance":{"type":"string"}}}},"holderCount":{"type":["integer","null"],"description":"ERC-1155 indexed holder-observation count. null for ERC-721 (not applicable, never a zero placeholder)."},"supply":{"type":["string","null"],"description":"ERC-1155 observed indexed units, distinct from contract-reported total supply (nodeSupply). null for ERC-721."},"indexedHolders":{"type":["integer","null"],"description":"Same as holderCount for ERC-1155, named for its scope. null for ERC-721."},"observedUnits":{"type":["string","null"],"description":"Same as supply for ERC-1155, named for its scope. null for ERC-721."},"market":{"type":"object"},"flagged":{"type":"boolean"},"nodeCheck":{"enum":["confirmed","differs","negative","unsupported","unavailable","not_checked"],"description":"Bounded ownerOf check. negative groups explicit no-owner and generic revert; it alone does not prove a burn."},"discovered":{"type":"boolean"},"existence":{"enum":["indexed","snapshot","metadata","node","unknown"]},"burntInHistory":{"type":"boolean"},"indexedThrough":{"type":["object","null"],"properties":{"blockNumber":{"type":"integer"},"timestamp":{"type":"integer"}}},"coverage":{"$ref":"#/components/schemas/Coverage"},"zeroSupplyProof":{"enum":["node_total_supply","complete_index",null],"description":"Stronger current or complete-index burn evidence than nodeCheck alone."},"nodeSupply":{"type":["object","null"]}}},
      "NftSale": {"type":"object","description":"One indexed marketplace execution for an item. `price` and bundle totals are exact raw integer currency units. For example, price `58880000000000000000` with `currency.decimals: 18` represents 58.88 APE; when decimals is null, keep and display the raw units.","required":["tokenId","blockNumber","logIndex","itemIndex","txHash","timestamp","marketplace","seller","buyer","amount","currency","price","orderHash","match","counterOrderHash","bundle","legacy"],"properties":{"tokenId":{"type":"string","pattern":"^[0-9]+$"},"blockNumber":{"type":"integer"},"logIndex":{"type":"integer"},"itemIndex":{"type":"integer"},"txHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"timestamp":{"type":"integer"},"marketplace":{"type":"string"},"seller":{"$ref":"#/components/schemas/Address"},"buyer":{"$ref":"#/components/schemas/Address"},"amount":{"type":"string","pattern":"^[0-9]+$"},"currency":{"$ref":"#/components/schemas/Currency"},"price":{"anyOf":[{"type":"string","pattern":"^[0-9]+$"},{"type":"null"}],"description":"Exact raw payment units for this item, or null for a bundle or legacy row."},"orderHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"match":{"enum":["single","matched","ambiguous","legacy"]},"counterOrderHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"bundle":{"anyOf":[{"type":"object","required":["items","total","estimate"],"properties":{"items":{"type":"integer"},"total":{"type":"string","pattern":"^[0-9]+$"},"estimate":{"type":"object","required":["price","method"],"properties":{"price":{"type":"string","pattern":"^[0-9]+$"},"method":{"type":"string"}}}}},{"type":"null"}]},"legacy":{"type":"boolean"}}},
      "NftActivity": {"type":"object","description":"Canonical indexed movements for one item. This endpoint does not assert complete item history; use a response that exposes coverage when completeness is required.","required":["blockNumber","logIndex","batchIndex","txHash","timestamp","from","to","amount","event","sale","txSales"],"properties":{"blockNumber":{"type":"integer"},"logIndex":{"type":"integer"},"batchIndex":{"type":"integer"},"txHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"timestamp":{"type":"integer"},"from":{"$ref":"#/components/schemas/Address"},"to":{"$ref":"#/components/schemas/Address"},"amount":{"type":"string","pattern":"^[0-9]+$"},"event":{"enum":["mint","transfer","burn","sale"]},"sale":{"anyOf":[{"$ref":"#/components/schemas/NftSale"},{"type":"null"}]},"txSales":{"type":"integer","minimum":0,"description":"Marketplace executions for this item in the same transaction; a nonzero value does not price an unbound movement."}}},
      "NftFeedItem": {"type":"object","required":["blockNumber","logIndex","batchIndex","txHash","timestamp","token","tokenId","standard","from","to","amount","action","collection","flagged","metadata"],"properties":{"blockNumber":{"type":"integer"},"logIndex":{"type":"integer"},"batchIndex":{"type":"integer"},"txHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"timestamp":{"type":"integer"},"token":{"$ref":"#/components/schemas/Address"},"tokenId":{"type":"string","pattern":"^[0-9]+$"},"standard":{"enum":["erc721","erc1155"]},"from":{"$ref":"#/components/schemas/Address"},"to":{"$ref":"#/components/schemas/Address"},"amount":{"type":"string","pattern":"^[0-9]+$"},"action":{"enum":["mint","transfer","burn"]},"collection":{"type":"object","required":["name","symbol"],"properties":{"name":{"type":"string"},"symbol":{"type":"string"}}},"flagged":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/NftMetadata"}}},
      "NftSaleItem": {"allOf":[{"$ref":"#/components/schemas/NftSale"},{"type":"object","required":["token","collection","flagged","metadata"],"properties":{"token":{"$ref":"#/components/schemas/Address"},"collection":{"type":"object","required":["name","symbol"],"properties":{"name":{"type":"string"},"symbol":{"type":"string"}}},"flagged":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/NftMetadata"}}}]},
      "Coverage": {"type":"object","description":"Measured coverage of indexed blocks for this response scope. `complete: true` applies only to that scope. It does not claim that the chain, wallet, or collection has complete indexed history outside the scope.","required":["scope","from","to","scopeStart","interiorGaps","missingBlocks","complete","reason","asOf"],"properties":{"scope":{"enum":["chain","window","collection","item"]},"from":{"type":["integer","null"]},"to":{"type":["integer","null"]},"scopeStart":{"type":["integer","null"]},"interiorGaps":{"type":"boolean"},"missingBlocks":{"type":["integer","null"]},"complete":{"type":"boolean"},"reason":{"enum":["complete","interior_gaps","starts_after_scope","scope_start_unknown","not_indexed"]},"asOf":{"type":"integer"}}},
      "StateSnapshotCoverage": {"type":"object","description":"A complete current-state ownership snapshot: ownerOf answered or reverted for every id of the registered range at one pinned block. It says who owned which item at blockNumber, not that transfer history is complete; coverage still describes the indexed history.","required":["scope","source","complete","blockNumber","blockHash","observedAt","items","idsScanned"],"properties":{"scope":{"const":"current_state"},"source":{"const":"node_ownerOf_snapshot"},"complete":{"const":true},"blockNumber":{"type":"integer"},"blockHash":{"type":"string","pattern":"^0x[0-9a-f]{64}$"},"observedAt":{"type":"integer","description":"Unix seconds when the snapshot finished."},"items":{"type":"string","pattern":"^[0-9]+$","description":"Ids with an owner at blockNumber."},"idsScanned":{"type":"string","pattern":"^[0-9]+$"}}},
      "Currency": {"type":"object","description":"Payment currency identity. Amounts are raw integer units; divide by 10 ** decimals only when decimals is non-null.","required":["kind","address","symbol","name","decimals"],"properties":{"kind":{"enum":["native","wrapped-native","erc20"]},"address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"symbol":{"type":["string","null"]},"name":{"type":["string","null"]},"decimals":{"type":["integer","null"],"description":"Token scale for raw amounts. Example: raw price 58880000000000000000 with decimals 18 is 58.88 APE. Null means the scale is unknown; do not guess one."}}},
      "CollectionMarket": { "type": "object", "required": ["sales", "executions", "volumeApe", "volume", "bundles", "ambiguous", "legacy", "lastSale", "marketplaces", "coverage"], "properties": { "sales": { "type": "integer" }, "executions": { "type": "integer" }, "volumeApe": { "type": ["string", "null"] }, "volume": { "type": "array", "items": { "type": "object", "required": ["currency", "sales", "total"], "properties": { "currency": { "$ref": "#/components/schemas/Currency" }, "sales": { "type": "integer" }, "total": { "type": "string" } } } }, "bundles": { "type": "array", "items": { "type": "object" } }, "ambiguous": { "type": "array", "items": { "type": "object" } }, "legacy": { "type": "array", "items": { "type": "object" } }, "lastSale": { "type": ["object", "null"] }, "marketplaces": { "type": "array", "items": { "type": "string" } }, "coverage": { "type": "object", "required": ["scope", "basis", "sources", "reprocessing"] } } }
      ,"ActiveCollectionsSummary": {"description":"At most 12 collection aggregates over one inclusive cached-index-head window; coverage qualifies the exact measured range.","type":"object","additionalProperties":false,"required":["kind","items","window","coverage"],"properties":{"kind":{"enum":["all","mints","transfers"]},"items":{"type":"array","maxItems":12,"items":{"$ref":"#/components/schemas/ActiveCollectionSummaryItem"}},"window":{"type":"object","additionalProperties":false,"required":["fromBlock","toBlock","blocks"],"properties":{"fromBlock":{"type":"integer","minimum":0,"description":"Inclusive lower block bound: the configured lookback from the head, but never before the first indexed block."},"toBlock":{"type":["integer","null"],"description":"Inclusive cached indexed head. Null means no trusted indexed upper bound was available when the response was built."},"blocks":{"type":"integer","const":1000000,"description":"Configured lookback in block-number distance, not a claim that one million blocks are indexed or present in this interval."}}},"coverage":{"$ref":"#/components/schemas/Coverage"}}},
      "ActiveCollectionSummaryItem":{"type":"object","additionalProperties":false,"required":["token","standard","collection","events","distinctIds","units","transactions","firstObserved","lastObserved","lastBlock","flagged","sample"],"properties":{"token":{"$ref":"#/components/schemas/Address"},"standard":{"enum":["erc721","erc1155"]},"collection":{"type":"object","required":["name","symbol"],"properties":{"name":{"type":"string"},"symbol":{"type":"string"}}},"events":{"type":"integer","minimum":0},"distinctIds":{"type":"integer","minimum":0},"units":{"type":"string","pattern":"^\\d+$","description":"Exact sum of observed transfer quantities; separate from distinct token IDs."},"transactions":{"type":"integer","minimum":0},"firstObserved":{"type":"integer"},"lastObserved":{"type":"integer"},"lastBlock":{"type":"integer"},"flagged":{"type":"boolean"},"sample":{"type":"object","required":["tokenId","metadata"],"properties":{"tokenId":{"type":"string","pattern":"^\\d+$"},"metadata":{"$ref":"#/components/schemas/NftMetadata"}}}}},
      "CollectionProfile":{"description":"Indexed creator is deployer/factory provenance, not artist authorship. Metadata external_url values are unverified. Contract URI is not indexed; collection marketplace allowlist is empty. Flagged collections suppress links and exits.","type":"object","additionalProperties":false,"required":["address","flagged","provenance","links","sources","marketplace","labels"],"properties":{"address":{"$ref":"#/components/schemas/Address"},"flagged":{"type":"boolean"},"provenance":{"oneOf":[{"type":"object","additionalProperties":false,"required":["status","creator","txHash","blockNumber","timestamp"],"properties":{"status":{"const":"indexed"},"creator":{"$ref":"#/components/schemas/Address"},"txHash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"blockNumber":{"type":"integer"},"timestamp":{"type":"integer"}}},{"type":"object","additionalProperties":false,"required":["status"],"properties":{"status":{"const":"not_indexed"}}}]},"links":{"type":"array","maxItems":5,"items":{"type":"object","additionalProperties":false,"required":["url","host","source","items","verified"],"properties":{"url":{"type":"string","format":"uri","maxLength":2048},"host":{"type":"string"},"source":{"const":"token_metadata_external_url"},"items":{"type":"integer","minimum":0},"verified":{"const":false}}}},"sources":{"type":"object","required":["tokenMetadata","contractUri","registry"],"properties":{"tokenMetadata":{"type":"object","required":["status","itemsWithMetadata"],"properties":{"status":{"enum":["read","suppressed_flagged"]},"itemsWithMetadata":{"type":"integer","minimum":0}}},"contractUri":{"type":"object","required":["status"],"properties":{"status":{"const":"not_indexed"}}},"registry":{"type":"object","required":["status"],"properties":{"status":{"const":"none"}}}}},"marketplace":{"oneOf":[{"type":"object","additionalProperties":false,"required":["status","venue","url","verifiedAt","evidence"],"properties":{"status":{"const":"verified"},"venue":{"type":"string"},"url":{"type":"string","format":"uri"},"verifiedAt":{"type":"string"},"evidence":{"type":"string"}}},{"type":"object","additionalProperties":false,"required":["status"],"properties":{"status":{"enum":["not_verified","suppressed_flagged"]}}}]},"labels":{"type":"object","additionalProperties":{"type":"object"}},"description":{"type":["string","null"],"maxLength":1000,"description":"Item metadata's description when at least two items and half of the items with fetched metadata share it; control and bidirectional-override characters removed. Untrusted text."},"image":{"type":["string","null"],"description":"Image proxy path of the lowest token ID with fetched art."}},"allOf":[{"if":{"properties":{"flagged":{"const":true}}},"then":{"properties":{"links":{"maxItems":0},"description":{"const":null},"image":{"const":null},"sources":{"properties":{"tokenMetadata":{"properties":{"status":{"const":"suppressed_flagged"}}}}},"marketplace":{"properties":{"status":{"const":"suppressed_flagged"}}}}}}]},
      "ProfileMarketplaceStatus": {"description":"The explicit status of a collection marketplace destination; no destination is currently allowlisted.","enum":["not_verified","suppressed_flagged","verified"]}
      ,"ContractSummary": {"description":"Stored verification badge fields returned when summary=1; this is not a current node code check.","type":"object","additionalProperties":false,"required":["address","verified"],"properties":{"address":{"$ref":"#/components/schemas/Address"},"verified":{"anyOf":[{"type":"null"},{"type":"object","additionalProperties":false,"required":["name","matchType","compilerVersion"],"properties":{"name":{"type":"string"},"matchType":{"enum":["full","partial"]},"compilerVersion":{"type":"string"}}}]}}},
      "ContractCodeError": {"type":"object","additionalProperties":false,"required":["kind","message"],"properties":{"kind":{"const":"node-unavailable"},"message":{"const":"The node did not answer; current code could not be checked."}}},
      "ContractFile": {"type":"object","additionalProperties":false,"required":["path","size","lines"],"properties":{"path":{"type":"string"},"size":{"type":"integer","minimum":0},"lines":{"type":"integer","minimum":1}}},
      "ContractProxy": {"type":"object","additionalProperties":false,"required":["kind","implementation","implementationVerified"],"properties":{"kind":{"enum":["eip1167","eip1967","eip1967-beacon","eip1822","oz-legacy"]},"implementation":{"$ref":"#/components/schemas/Address"},"beacon":{"$ref":"#/components/schemas/Address"},"implementationVerified":{"anyOf":[{"type":"null"},{"type":"object","additionalProperties":false,"required":["name","matchType","abi"],"properties":{"name":{"type":"string"},"matchType":{"enum":["full","partial"]},"abi":{"type":"array"}}}]}}},
      "ContractVerified": {"description":"Stored verifier evidence associated with the contract view. Full and partial are stored match classifications, not a new compiler-backed acceptance claim.","type":"object","additionalProperties":false,"required":["matchType","name","path","language","compilerVersion","optimizer","evmVersion","viaIR","license","verifiedAt","provenance","constructorArgs","libraries","immutables","metadataHash","creationTx","creationMatch","creationBytecode","runtimeBytecodeHash","runtimeUnchanged","abi","files","file"],"properties":{"matchType":{"enum":["full","partial"]},"name":{"type":"string"},"path":{"type":"string"},"language":{"type":"string"},"compilerVersion":{"type":"string"},"optimizer":{"type":"object","additionalProperties":false,"required":["enabled","runs"],"properties":{"enabled":{"type":"boolean"},"runs":{"type":"integer"}}},"evmVersion":{"type":"string"},"viaIR":{"type":"boolean"},"license":{"type":"string"},"verifiedAt":{"type":"string","format":"date-time"},"provenance":{"enum":["submitted","sourcify","blockscout","etherscan"]},"constructorArgs":{"type":"string"},"libraries":{"type":"object"},"immutables":{"type":"object"},"metadataHash":{"type":"string"},"creationTx":{"type":["string","null"]},"creationMatch":{"enum":["full","partial",null]},"creationBytecode":{"type":"string"},"runtimeBytecodeHash":{"type":"string"},"runtimeUnchanged":{"type":["boolean","null"]},"abi":{"type":"array"},"files":{"type":"array","items":{"$ref":"#/components/schemas/ContractFile"}},"file":{"type":"object","additionalProperties":false,"required":["path","content"],"properties":{"path":{"type":"string"},"content":{"type":"string"}}}}},
      "ContractView": {"description":"Current node code state plus optional locally stored verification evidence. Proxy data is resolved only when the node code read supports it.","type":"object","additionalProperties":false,"required":["address","isContract","codeState","codeError","runtimeBytecode","verified","proxy"],"properties":{"address":{"$ref":"#/components/schemas/Address"},"isContract":{"type":"boolean"},"codeState":{"enum":["unknown","contract","no-code"]},"codeError":{"anyOf":[{"type":"null"},{"$ref":"#/components/schemas/ContractCodeError"}]},"runtimeBytecode":{"type":["string","null"]},"verified":{"anyOf":[{"type":"null"},{"$ref":"#/components/schemas/ContractVerified"}]},"proxy":{"anyOf":[{"type":"null"},{"$ref":"#/components/schemas/ContractProxy"}]},"sameCode":{"description":"Verified contracts whose stored runtime equals this address's code, when this address is not verified itself. Up to 5, full matches first.","type":"array","items":{"$ref":"#/components/schemas/SameCodeContract"}} }},
      "SameCodeContract": {"type":"object","additionalProperties":false,"required":["address","name","matchType","compilerVersion","verifiedAt"],"properties":{"address":{"$ref":"#/components/schemas/Address"},"name":{"type":"string"},"matchType":{"enum":["full","partial"]},"compilerVersion":{"type":"string"},"verifiedAt":{"type":"string","format":"date-time"}}},
      "VerifiedContractPage": {"type":"object","additionalProperties":false,"required":["items","next"],"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["address","name","language","compilerVersion","optimizer","evmVersion","license","matchType","provenance","verifiedAt"],"properties":{"address":{"$ref":"#/components/schemas/Address"},"name":{"type":"string"},"language":{"type":"string"},"compilerVersion":{"type":"string"},"optimizer":{"type":"object","additionalProperties":false,"required":["enabled","runs"],"properties":{"enabled":{"type":"boolean"},"runs":{"type":"integer"}}},"evmVersion":{"type":"string"},"license":{"type":"string"},"matchType":{"enum":["full","partial"]},"provenance":{"enum":["submitted","sourcify","blockscout","etherscan"]},"verifiedAt":{"type":"string","format":"date-time"}}}},"next":{"type":["string","null"]}}},
      "ImplementationHistory": {"type":"object","additionalProperties":false,"required":["items"],"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["kind","address","blockNumber","txHash","timestamp","verifiedName"],"properties":{"kind":{"enum":["implementation","beacon"]},"address":{"$ref":"#/components/schemas/Address"},"blockNumber":{"type":"string","pattern":"^[0-9]+$"},"txHash":{"type":"string"},"timestamp":{"type":"integer"},"verifiedName":{"type":["string","null"]}}}}}},
      "ContractResponse": {"oneOf":[{"$ref":"#/components/schemas/ContractSummary"},{"$ref":"#/components/schemas/ContractView"}]},
      "ContractSources": {"description":"Stored standard JSON source bundle. The source values are supplied by the verification store and remain unverified outside that store's recorded provenance.","type":"object","additionalProperties":false,"required":["language","sources","settings"],"properties":{"language":{"type":"string"},"sources":{"type":"object","additionalProperties":{"type":"object","additionalProperties":false,"required":["content"],"properties":{"content":{"type":"string"}}}},"settings":{"type":"object"}}},
      "VerifyRequest": {"description":"Anonymous supplied standard JSON input for the verifier queue. The server requires an input object with sources, contractName and compilerVersion; it does not treat submission as verification success.","type":"object","additionalProperties":false,"required":["input","contractName","compilerVersion"],"properties":{"input":{"type":"object","additionalProperties":true,"required":["sources"],"properties":{"language":{"type":"string"},"sources":{"type":"object"},"settings":{"type":"object"}}},"contractName":{"type":"string","minLength":1},"compilerVersion":{"type":"string","minLength":1},"constructorArgs":{"type":"string"},"license":{"type":"string"}}},
      "VerificationAccepted": {"type":"object","additionalProperties":false,"required":["id","status"],"properties":{"id":{"type":"string","format":"uuid"},"status":{"const":"pending"}}},
      "VerificationJob": {"description":"Public bounded verification status. Match types and messages reflect stored job state; they do not expose compiler logs or establish current deployed-source truth by themselves.","type":"object","additionalProperties":false,"required":["id","address","status","message","matchType","provenance","createdAt","updatedAt"],"properties":{"id":{"type":"string","format":"uuid"},"address":{"$ref":"#/components/schemas/Address"},"status":{"enum":["pending","running","pass","fail"]},"message":{"type":"string"},"matchType":{"enum":["full","partial",null]},"provenance":{"enum":["submitted","sourcify","blockscout","etherscan"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},
      "VerificationBadRequest": {"type":"object","additionalProperties":false,"required":["error","message"],"properties":{"error":{"enum":["bad_request","invalid","invalid_json","no_code"]},"message":{"type":"string"}}},
      "VerificationAlreadyVerified": {"type":"object","additionalProperties":false,"required":["error","message"],"properties":{"error":{"const":"already_verified"},"message":{"type":"string"}}},
      "VerificationUnavailable": {"type":"object","additionalProperties":false,"required":["error","message"],"properties":{"error":{"const":"unavailable"},"message":{"type":"string"}}},
      "VyperVersions": { "type": "object", "additionalProperties": false, "required": ["versions", "optimize", "limits"], "properties": {
        "versions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["version", "evmVersions", "defaultEvmVersion"], "properties": { "version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" }, "evmVersions": { "type": "array", "items": { "type": "string" } }, "defaultEvmVersion": { "type": "string" } } } },
        "optimize": { "type": "array", "items": { "enum": ["gas", "codesize", "none"] } },
        "limits": { "type": "object", "additionalProperties": false, "required": ["sourceBytes", "fileNamePattern"], "properties": { "sourceBytes": { "type": "integer" }, "fileNamePattern": { "type": "string" } } } } },
      "VyperCompileRequest": { "type": "object", "additionalProperties": false, "required": ["version", "evmVersion", "fileName", "source"], "properties": {
        "version": { "enum": ["0.4.3", "0.4.2", "0.4.1", "0.4.0", "0.3.10"] },
        "evmVersion": { "enum": ["london", "paris", "shanghai", "cancun", "prague"], "description": "Must be one the chosen release supports (GET /v1/vyper/versions); prague needs 0.4.3. ApeChain executes Cancun." },
        "optimize": { "enum": ["gas", "codesize", "none", null], "description": "settings.optimize; omitted or null uses the compiler default." },
        "fileName": { "type": "string", "pattern": "^[A-Za-z0-9_]{1,64}\\.vy$" },
        "source": { "type": "string", "minLength": 1, "description": "At most 204800 bytes of UTF-8." } } },
      "VyperCompileAccepted": { "type": "object", "additionalProperties": false, "required": ["id", "status"], "properties": { "id": { "type": "string", "format": "uuid" }, "status": { "enum": ["queued", "running", "succeeded", "failed"] } } },
      "VyperCompileResult": { "type": "object", "additionalProperties": false, "required": ["contractName", "abi", "bytecode", "deployedBytecode", "methodIdentifiers", "warnings"], "properties": {
        "contractName": { "type": "string" }, "abi": { "type": "array" },
        "bytecode": { "type": "string", "pattern": "^0x([0-9a-f]{2})*$" }, "deployedBytecode": { "type": "string", "pattern": "^0x([0-9a-f]{2})*$" },
        "methodIdentifiers": { "type": "object", "additionalProperties": { "type": "string", "pattern": "^0x[0-9a-f]{8}$" } },
        "warnings": { "type": "array", "items": { "type": "string" } } } },
      "VyperCompileJob": { "type": "object", "additionalProperties": false, "required": ["id", "status", "version", "evmVersion", "optimize", "fileName", "result", "error", "createdAt", "updatedAt"], "properties": {
        "id": { "type": "string", "format": "uuid" }, "status": { "enum": ["queued", "running", "succeeded", "failed"] },
        "version": { "type": "string" }, "evmVersion": { "type": "string" }, "optimize": { "enum": ["gas", "codesize", "none", null] }, "fileName": { "type": "string" },
        "result": { "oneOf": [{ "$ref": "#/components/schemas/VyperCompileResult" }, { "type": "null" }] },
        "error": { "type": ["string", "null"], "description": "Plain text; set only when status is failed." },
        "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } }
    },
    "responses": {
      "AddressNftPage": { "description": "Owned NFT page: NFTs the index shows this wallet holding. Indexed observations (scope: indexed), plus, for collections with a current-state snapshot, the items ownerOf assigned to this wallet at the snapshot block (ownerSource: snapshot, see stateSnapshots); measured coverage says whether that history is complete. An empty page in a partially indexed range is not proof that the wallet holds nothing. knownItem is a separate node check of one item.", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "next", "total", "allTotal", "collections", "collectionsTotal", "collectionsOffset", "collectionsNext", "collectionsQuery", "activeCollection", "knownItem", "coverage", "scope"], "properties": {
        "items": { "type": "array", "items": { "$ref": "#/components/schemas/AddressNft" } },
        "next": { "type": ["string", "null"] },
        "total": { "type": "integer", "description": "Indexed observations in the current view (the collection filter applied), safe for UI display but not a chain-current or complete ownership claim." },
        "allTotal": { "type": "integer", "description": "Indexed observations across every collection the wallet holds (unfiltered), safe for UI display but not a chain-current or complete ownership claim." },
        "totalExact": { "type": "string", "pattern": "^[0-9]+$", "description": "Exact selected-view count, present only when its bounded range traversal completed." },
        "allTotalExact": { "type": "string", "pattern": "^[0-9]+$", "description": "Exact whole-wallet count, present only when every bounded range traversal completed." },
        "totalsScope": { "const": "partial_indexed_observations", "description": "When present, total and allTotal are lower-bound indexed observations, not chain-current or complete ownership claims." },
        "rangeCoverage": { "type": "object", "description": "Why exact range totals are withheld. Emitted only for an incomplete selected or whole-wallet bounded range traversal; a global pending repair alone does not downgrade an ordinary wallet with no relevant range candidates.", "required": ["truncated", "repair"], "properties": { "truncated": { "type": "boolean", "description": "Whether the relevant bounded range traversal hit its cap." }, "repair": { "type": "object", "description": "Historical ERC-2309 repair checkpoint.", "required": ["checkpoint", "repairedThrough", "complete"], "properties": { "checkpoint": { "const": "nft_ranges_v1" }, "repairedThrough": { "type": ["integer", "null"] }, "complete": { "type": "boolean" } } } } },
        "collections": { "type": "array", "description": "One page of the wallet's collections (matching cq).", "items": { "type": "object", "required": ["token", "name", "symbol", "standard", "items"], "properties": { "token": { "$ref": "#/components/schemas/Address" }, "name": { "type": "string" }, "symbol": { "type": "string" }, "standard": { "enum": ["erc721", "erc1155"] }, "items": { "type": "integer" } } } },
        "collectionsTotal": { "type": "integer", "description": "Indexed-observation collections matching cq across all collection pages, safe for UI display but not a chain-current or complete ownership claim." },
        "collectionsOffset": { "type": "integer" },
        "collectionsNext": { "type": ["integer", "null"], "description": "coffset of the next collection page, or null." },
        "collectionsQuery": { "type": "string", "description": "Normalized cq (empty when not filtering)." },
        "activeCollection": { "description": "The collection filter, when set.", "anyOf": [{ "type": "null" }, { "type": "object", "required": ["token", "name", "symbol", "standard", "indexedItems", "flagged"], "properties": { "token": { "$ref": "#/components/schemas/Address" }, "name": { "type": "string" }, "symbol": { "type": "string" }, "standard": { "enum": ["erc721", "erc1155", null], "description": "null when the index does not know the standard." }, "indexedItems": { "type": "integer" }, "flagged": { "type": "boolean" } } }] },
        "knownItem": { "description": "With collection and item: a node check of this wallet for one item, plus that item's indexed history. Chain context, separate from the indexed gallery; not a complete ownership listing.", "anyOf": [{ "type": "null" }, { "type": "object", "required": ["token", "tokenId", "standard", "standardSource", "check", "balance", "indexed", "history", "metadata", "flagged"], "properties": { "token": { "$ref": "#/components/schemas/Address" }, "tokenId": { "type": "string", "pattern": "^[0-9]+$" }, "standard": { "enum": ["erc721", "erc1155", null] }, "standardSource": { "enum": ["index", "node", null] }, "check": { "enum": ["owner", "not_owner", "negative", "unsupported", "not_nft", "unknown", "unavailable"], "description": "Wallet check outcome. unknown means the ERC-165 handshake did not establish an NFT standard; it is not a not_nft classification, an owner absence, or unsupported (an owner response whose ABI word could not be decoded)." }, "balance": { "type": ["string", "null"], "pattern": "^[0-9]+$" }, "indexed": { "type": "boolean", "description": "The index itself shows this wallet holding the item." }, "history": { "type": "object", "required": ["transfers", "indexedOwner", "lastBlock"], "properties": { "transfers": { "type": "integer" }, "indexedOwner": { "anyOf": [{ "$ref": "#/components/schemas/Address" }, { "type": "null" }] }, "lastBlock": { "type": ["integer", "null"] } } }, "metadata": { "$ref": "#/components/schemas/NftMetadata" }, "flagged": { "type": "boolean" } } }] },
        "coverage": { "$ref": "#/components/schemas/Coverage" },
        "scope": { "const": "indexed" },
        "stateSnapshots": { "type": "array", "description": "Current-state snapshots behind ownerSource: snapshot items, one per snapshot collection.", "items": { "allOf": [{ "$ref": "#/components/schemas/StateSnapshotCoverage" }], "type": "object", "required": ["contract"], "properties": { "contract": { "$ref": "#/components/schemas/Address" } } } }
      } } } } },
      "InventoryPage": {"description":"Collection inventory page","content":{"application/json":{"schema":{"type":"object","required":["standard","items","next","total","totalExact","matching","matchingExact","matchingCapped","labels","coverage","flagged"],"properties":{"standard":{"enum":["erc721","erc1155",null]},"items":{"type":"array","items":{"$ref":"#/components/schemas/InventoryItem"}},"next":{"type":["string","null"]},"total":{"type":"integer","description":"Indexed distinct item IDs in the collection (or snapshot items for registered snapshot collections, see stateSnapshot). It never changes with the owner, trait, start or meta filters; use matchingExact for the selected scope."},"totalExact":{"type":"string","pattern":"^(0|[1-9][0-9]*)$","description":"total as an exact decimal string."},"matchingExact":{"type":["string","null"],"pattern":"^(0|[1-9][0-9]*)$","description":"Items matching every active filter (owner, trait, start, meta) as a decimal string, counted with the same ownership and property rules as items and independent of the cursor and page size. Without filters it equals totalExact. Counts stop at 10,000: above that it is \"10000\" and matchingCapped is true, meaning at least that many. Null only for ERC-2309 range-aware filtered reads (see rangeCoverage), which cannot be counted. Property matches cover only items whose metadata has been fetched; unfetched items are unknown, not non-matching. Not a rarity."},"matching":{"type":["integer","null"],"description":"matchingExact as a number when it is exact (matchingCapped false) and a safe integer; otherwise null."},"matchingCapped":{"type":"boolean","description":"True when more than 10,000 items match: matchingExact is then the cap (a lower bound) and matching is null."},"rangeCoverage":{"type":"object","description":"Present for ERC-2309 range collections: range ownership is resolved separately and may be incomplete.","required":["ranges","truncated","repair"],"properties":{"ranges":{"type":"integer"},"truncated":{"type":"boolean"},"repair":{"type":"object","required":["complete","repairedThrough"],"properties":{"complete":{"type":"boolean"},"repairedThrough":{"type":["integer","null"]}}}}},"labels":{"type":"object"},"naming":{"$ref":"#/components/schemas/Naming"},"coverage":{"allOf":[{"$ref":"#/components/schemas/Coverage"}],"description":"Indexed block coverage of the collection's transfer history. complete:false means earlier history may be missing; counts are then indexed observations."},"flagged":{"type":"boolean","description":"True for a known scam or phishing collection: metadata and media are not loaded, ownership is still reported."},"stateSnapshot":{"$ref":"#/components/schemas/StateSnapshotCoverage"}}}}}},
      "NftActivityPage": {"description":"Canonical indexed activity page for one NFT. Rows are not a complete-history guarantee.","content":{"application/json":{"schema":{"type":"object","required":["items","next","labels"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/NftActivity"}},"next":{"type":["string","null"]},"labels":{"type":"object"}}}}}},
      "NftCollectionPage": { "description": "Indexed NFT collection directory", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "next", "total", "sort"], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/NftCollection" } }, "next": { "type": ["string", "null"] }, "total": { "type": "integer" }, "sort": { "type": "string" } } } } } },
      "NftFeedPage": {"description":"Indexed NFT mint and transfer feed page.","content":{"application/json":{"schema":{"type":"object","required":["kind","items","labels","next","window","coverage"],"properties":{"kind":{"enum":["all","mints","transfers"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/NftFeedItem"}},"labels":{"type":"object"},"next":{"type":["string","null"]},"window":{"type":"object","required":["fromBlock","toBlock","blocks"],"properties":{"fromBlock":{"type":"integer","description":"Inclusive lower block bound: the configured lookback from the head, but never before the first indexed block."},"toBlock":{"type":["integer","null"]},"blocks":{"type":"integer"}}},"coverage":{"$ref":"#/components/schemas/Coverage"}}}}}},
      "CollectionProfile": {"description":"Collection profile response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionProfile"}}}},
      "NftSalePage": {"description":"Indexed marketplace sales page. Prices and bundle totals are raw currency units; use currency.decimals when available.","content":{"application/json":{"schema":{"type":"object","required":["items","labels","next","coverage"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/NftSaleItem"}},"labels":{"type":"object"},"next":{"type":["string","null"]},"coverage":{"$ref":"#/components/schemas/Coverage"}}}}}},
      "NftHolderPage": { "description": "Indexed NFT holder page", "content": { "application/json": { "schema": { "type": "object", "required": ["items", "next", "standard"], "properties": { "items": { "type": "array", "items": { "type": "object" } }, "next": { "type": ["string", "null"] }, "standard": { "enum": ["erc721", "erc1155"] } } } } } },
      "ContractResponse": { "description": "Contract code state or summary response", "headers": { "Cache-Control": { "description": "Short cache for the current contract view.", "schema": { "const": "public, max-age=5, stale-while-revalidate=5" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContractResponse" } } } },
      "ContractSources": { "description": "Stored standard JSON source bundle for a verified-contract record.", "headers": { "Content-Disposition": { "description": "Attachment filename is generated from the stored contract name and normalized address.", "schema": { "type": "string" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContractSources" } } } },
      "VerificationAccepted": { "description": "Verification request accepted into the queue. This is not a compiler or match result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerificationAccepted" } } } },
      "VerificationJob": { "description": "Public verification job status; responses are not cacheable.", "headers": { "Cache-Control": { "schema": { "const": "no-store" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerificationJob" } } } },
      "VerificationBadRequest": { "description": "Invalid supplied verification input or an address with no node code.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerificationBadRequest" } } } },
      "VerificationAlreadyVerified": { "description": "The address already has a full stored verification record.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerificationAlreadyVerified" } } } },
      "VerificationUnavailable": { "description": "Verification is unavailable or its queue is full. The server does not claim that work was started.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerificationUnavailable" } } } },
      "SignedTransactionTooLarge": { "description": "The request body exceeds the signed-transaction body limit", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "required": ["error", "message"], "properties": { "error": { "const": "payload_too_large" }, "message": { "type": "string" } } } } } },
      "BadRequest": { "description": "Invalid parameter", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
      "NftBalanceUnavailable": { "description": "Current-balance node read unavailable", "headers": { "Retry-After": { "schema": { "const": "5" } }, "Cache-Control": { "schema": { "const": "no-store" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NftBalanceUnavailable" } } } },
      "NotFound": { "description": "Entity is not known in the indexed range", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
      "NativeRateLimited": { "description": "The native request exceeded the fixed one-second client quota. Retry after the advertised delay.", "headers": { "Retry-After": { "schema": { "const": "1" } }, "X-RateLimit-Limit": { "schema": { "type": "string", "pattern": "^[0-9]+$" } }, "X-RateLimit-Remaining": { "schema": { "type": "string", "pattern": "^[0-9]+$" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NativeRateLimited" } } } },
      "NativeInternal": { "description": "An unexpected native API failure. The response is not cacheable.", "headers": { "Cache-Control": { "schema": { "const": "no-store" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NativeInternal" } } } },
      "CursorExpired": { "description": "The server-side cursor snapshot is gone. Restart from the first page; no offset fallback is used.", "headers": { "Cache-Control": { "schema": { "const": "no-store" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorExpired" } } } }
    }
  }
}
