{
  "openapi": "3.1.0",
  "info": {
    "title": "crc20.org API",
    "version": "1",
    "description": "Read-only API over the LEAF (CRC-20) ledger indexed from Bitcoin mainnet, for exchanges, DEXes and wallets: LEAF history, address balances (LEAF and BTC), address history, transaction lookup and transaction details (template, roles, marketplace economics). Every operation carries the `template` of its transaction (`transfer`, `market`, `mint`) and, for a marketplace sale, what the buyer paid (`market`). GET, HEAD and OPTIONS only; CORS open to every origin (no credentials). Amounts are integer atoms as decimal strings next to `decimals` (LEAF: 8; BTC values are satoshis). Lists are newest first and paginated with an opaque `next_cursor`. Errors are `{\"error\": {\"code\", \"message\"}}`. Rate limit: 300 requests per minute per IP without a key (bursts of 50), announced in the `RateLimit-Policy` response header; past it, 429 with `Retry-After`. A larger quota comes with an API key, sent as `X-API-Key` (recommended) or `?api_key=`: the quota then counts per key."
  },
  "security": [
    {},
    {
      "ApiKeyHeader": []
    },
    {
      "ApiKeyQuery": []
    }
  ],
  "servers": [
    {
      "url": "https://crc20.org"
    }
  ],
  "paths": {
    "/api/v1/status": {
      "get": {
        "operationId": "status",
        "summary": "Status",
        "description": "Network, LEAF supply and the indexer tip. `indexer.synced` is true when everything the API serves reflects that tip (replica ready, last poll under 60 s old, index built for the tip).",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                },
                "example": {
                  "network": "bitcoin",
                  "token": {
                    "tick": "LEAF",
                    "decimals": 8,
                    "max_supply": "100000000000000000",
                    "supply": "100000000000000000"
                  },
                  "indexer": {
                    "height": 970726,
                    "hash": "00000000000000000001a9b0493a333b631d1d4f0324d9452337cea80f1fdc13",
                    "synced": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/InvalidApiKey"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/api/v1/history": {
      "get": {
        "operationId": "history",
        "summary": "LEAF history",
        "description": "Every LEAF operation (transfers, mints, pool swaps and liquidity deposits), newest first; tick=AXBT or all for AXBT. Follow `next_cursor` until it is null; new blocks never shift later pages.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size, 1 to 100 (default 50).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "example": 2
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`next_cursor` of the previous page, unchanged. Omit for the newest page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tick",
            "in": "query",
            "required": false,
            "description": "Token scope: `LEAF` (default: one operation per txid and type), `AXBT` (AXBT transfers, AXBT vault operations and the pool swaps, liquidity deposits and paybacks) or `all` (both; a payback reuses its deposit's txid). Case-insensitive.",
            "schema": {
              "type": "string",
              "pattern": "^([Ll][Ee][Aa][Ff]|[Aa][Xx][Bb][Tt]|[Aa][Ll][Ll])$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationPage"
                },
                "example": {
                  "items": [
                    {
                      "txid": "3bb4b2e08c1ccfa2cbb946a3b4f8aadc12cf4454290dab051b8ed1b18de0de5b",
                      "type": "transfer",
                      "from": "bc1pzm0zm2fj7d2qcjnxvuw8mgan806zfgp3r92jsc8r2uykwzqvgq7qqy9e8l",
                      "to": "bc1pc0grjplv5lv90sejxjaa2nxn0exf6smgyfle5xrckpualjhmtpkqnvt45d",
                      "amount": "18688000000000",
                      "decimals": 8,
                      "block_height": 970714,
                      "block_hash": "00000000000000000000f38166b89fafe2dc3655b5685765e5c4662bc5c34b44",
                      "block_time": "2026-10-10T03:33:29Z",
                      "confirmations": 13,
                      "template": "market",
                      "market": {
                        "price_sat": "334516",
                        "platform_fee_sat": "19737",
                        "network_fee_sat": "2955",
                        "buyer_paid_sat": "357208",
                        "unit_price_sat": "1.79000428"
                      },
                      "sender_balance_before": "18688047619047",
                      "swap": null,
                      "liquidity": null,
                      "vault": null,
                      "tick": "LEAF"
                    },
                    {
                      "txid": "97586b1dfd16131696996fd74c471296634df963414518afeb0c01896f9038ea",
                      "type": "transfer",
                      "from": "bc1pakgy6qpwh2ln4z3ndr89ufu2j2yaffy9ga3740c88hxpc0m2y5qq7av7fv",
                      "to": "bc1qawl7ts2gqu6x2ppxhvpprq9hfqy49u8wlfr9lz",
                      "amount": "5000000000000",
                      "decimals": 8,
                      "block_height": 970697,
                      "block_hash": "00000000000000000000e7493735a2c0aa70df633b15c350af7bbc4872a669ca",
                      "block_time": "2026-10-10T00:41:50Z",
                      "confirmations": 30,
                      "template": "market",
                      "market": {
                        "price_sat": "100000",
                        "platform_fee_sat": "5600",
                        "network_fee_sat": "3114",
                        "buyer_paid_sat": "108714",
                        "unit_price_sat": "2"
                      },
                      "sender_balance_before": "89098428571429",
                      "swap": null,
                      "liquidity": null,
                      "vault": null,
                      "tick": "LEAF"
                    }
                  ],
                  "next_cursor": "eyJoIjo5NzA2OTcsInQiOiI5NzU4NmIxZGZkMTYxMzE2OTY5OTZmZDc0YzQ3MTI5NjYzNGRmOTYzNDE0NTE4YWZlYjBjMDE4OTZmOTAzOGVhIiwiayI6InRyYW5zZmVyIiwiaSI6MH0"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/InvalidApiKey"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/api/v1/addresses/{address}": {
      "get": {
        "operationId": "address",
        "summary": "Address balances",
        "description": "LEAF balance (from the indexer, at block `height`) and BTC balance (from mempool.space, cached 30 s; `null` when mempool.space does not answer, never a made-up zero). An address without activity has balance \"0\", not 404. Minted LEAF sits on the mint's covenant address.",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "description": "Mainnet Bitcoin address (bc1q\u2026, bc1p\u2026, 1\u2026, 3\u2026). Bech32 in either case.",
            "schema": {
              "type": "string",
              "maxLength": 90
            },
            "example": "bc1pnjm803d0erzgvvmx6ue99gunsht8vpl3kxa3k8d00pke32argr6syrvu6u"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Address"
                },
                "example": {
                  "address": "bc1pnjm803d0erzgvvmx6ue99gunsht8vpl3kxa3k8d00pke32argr6syrvu6u",
                  "leaf": {
                    "balance": "2238772061904761",
                    "decimals": 8
                  },
                  "btc": {
                    "balance": "116964",
                    "unconfirmed": "0",
                    "tx_count": 16
                  },
                  "height": 970726,
                  "axbt": {
                    "balance": "0",
                    "decimals": 8
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/InvalidApiKey"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/api/v1/addresses/{address}/history": {
      "get": {
        "operationId": "address_history",
        "summary": "Address history",
        "description": "LEAF operations where the address is `from` or `to`, newest first, with `direction` (`in`, `out`, `self`). For a mint, `out` means the address paid for it: its LEAF balance does not change.",
        "parameters": [
          {
            "name": "address",
            "in": "path",
            "required": true,
            "description": "Mainnet Bitcoin address (bc1q\u2026, bc1p\u2026, 1\u2026, 3\u2026). Bech32 in either case.",
            "schema": {
              "type": "string",
              "maxLength": 90
            },
            "example": "bc1pnjm803d0erzgvvmx6ue99gunsht8vpl3kxa3k8d00pke32argr6syrvu6u"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size, 1 to 100 (default 50).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "example": 2
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "`next_cursor` of the previous page, unchanged. Omit for the newest page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tick",
            "in": "query",
            "required": false,
            "description": "Token scope: `LEAF` (default: one operation per txid and type), `AXBT` (AXBT transfers, AXBT vault operations and the pool swaps, liquidity deposits and paybacks) or `all` (both; a payback reuses its deposit's txid). Case-insensitive.",
            "schema": {
              "type": "string",
              "pattern": "^([Ll][Ee][Aa][Ff]|[Aa][Xx][Bb][Tt]|[Aa][Ll][Ll])$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddressOperationPage"
                },
                "example": {
                  "items": [
                    {
                      "txid": "1b356577165847e2e3b1cfe285a8d05f1803f0b4125584cc0914e97801089641",
                      "type": "transfer",
                      "direction": "in",
                      "from": "bc1p24k5avrf8x44mmefh0kuf7up7y5cg7l2rghcqxdrzhpy4uxm24nschygc9",
                      "to": "bc1pnjm803d0erzgvvmx6ue99gunsht8vpl3kxa3k8d00pke32argr6syrvu6u",
                      "amount": "1745641300000000",
                      "decimals": 8,
                      "block_height": 970382,
                      "block_hash": "000000000000000000019ea373aecab3b1714e714f9fbde6a26ac1a0bc49b0e8",
                      "block_time": "2026-10-07T19:52:43Z",
                      "confirmations": 345,
                      "template": "transfer",
                      "market": null,
                      "sender_balance_before": "1745641333333334",
                      "swap": null,
                      "liquidity": null,
                      "vault": null,
                      "tick": "LEAF"
                    },
                    {
                      "txid": "c4028663c6a47821ce55d8f9035225117de45d594366af1c4f4a1893950b3784",
                      "type": "transfer",
                      "direction": "in",
                      "from": "bc1pmtc4d6sf9we4qm504gsk38ceecmfkhntkfa7w8gls5gn3v6gsjfsuwkwel",
                      "to": "bc1pnjm803d0erzgvvmx6ue99gunsht8vpl3kxa3k8d00pke32argr6syrvu6u",
                      "amount": "493130761904761",
                      "decimals": 8,
                      "block_height": 969700,
                      "block_hash": "0000000000000000000082d7034deea63b3dfaf8d89b5b4bdde4a034e07d8fa6",
                      "block_time": "2026-10-03T07:44:37Z",
                      "confirmations": 1027,
                      "template": "transfer",
                      "market": null,
                      "sender_balance_before": "493130761904761",
                      "swap": null,
                      "liquidity": null,
                      "vault": null,
                      "tick": "LEAF"
                    }
                  ],
                  "next_cursor": "eyJoIjo5Njk3MDAsInQiOiJjNDAyODY2M2M2YTQ3ODIxY2U1NWQ4ZjkwMzUyMjUxMTdkZTQ1ZDU5NDM2NmFmMWM0ZjRhMTg5Mzk1MGIzNzg0IiwiayI6InRyYW5zZmVyIiwiaSI6MH0"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/InvalidApiKey"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/api/v1/transactions/{txid}": {
      "get": {
        "operationId": "transaction",
        "summary": "Transaction",
        "description": "The accepted LEAF operations of a Bitcoin transaction. 404 when it has none (unknown, unconfirmed or not a valid LEAF transfer); 503 instead of 404 while the index may be behind.",
        "parameters": [
          {
            "name": "txid",
            "in": "path",
            "required": true,
            "description": "Transaction id, 64 hex characters.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{64}$"
            },
            "example": "394bdb537c5c1e7a11fe95230cafda2394911b86a054ca1c974bcfed5b7c8feb"
          },
          {
            "name": "tick",
            "in": "query",
            "required": false,
            "description": "Token scope: `LEAF` (default: one operation per txid and type), `AXBT` (AXBT transfers, AXBT vault operations and the pool swaps, liquidity deposits and paybacks) or `all` (both; a payback reuses its deposit's txid). Case-insensitive.",
            "schema": {
              "type": "string",
              "pattern": "^([Ll][Ee][Aa][Ff]|[Aa][Xx][Bb][Tt]|[Aa][Ll][Ll])$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                },
                "examples": {
                  "mint": {
                    "summary": "A mint",
                    "value": {
                      "txid": "394bdb537c5c1e7a11fe95230cafda2394911b86a054ca1c974bcfed5b7c8feb",
                      "operations": [
                        {
                          "txid": "394bdb537c5c1e7a11fe95230cafda2394911b86a054ca1c974bcfed5b7c8feb",
                          "type": "mint",
                          "from": "bc1p7qpz46khgcdu7dcmw3t8wtt6hc7sf9r3djgevsgeym7tau825v6sfa97ek",
                          "to": "bc1ppxgzntmcp6t44yl5lt0nknfdwnzdmxm22jqgtu9xzcvah7tc8msq3d0z6y",
                          "amount": "145658857142858",
                          "decimals": 8,
                          "block_height": 967930,
                          "block_hash": "0000000000000000000062b25ebb689e0866e3f4830373311291267ede20972f",
                          "block_time": "2026-09-21T03:25:52Z",
                          "confirmations": 2797,
                          "template": "mint",
                          "market": null,
                          "sender_balance_before": null,
                          "swap": null,
                          "liquidity": null,
                          "vault": null,
                          "tick": "LEAF"
                        }
                      ]
                    }
                  },
                  "market": {
                    "summary": "A marketplace sale",
                    "value": {
                      "txid": "31b48cf8827cf1dd2297e043ab208cde3a61dfea5c9406fd82f87c0fa7775b9b",
                      "operations": [
                        {
                          "txid": "31b48cf8827cf1dd2297e043ab208cde3a61dfea5c9406fd82f87c0fa7775b9b",
                          "type": "transfer",
                          "from": "bc1pwcu88svh8kh08a4s42sex2razsfc596q2vx6cu2aaw06xzq5wrmqcse9v7",
                          "to": "bc1pzy9q4ze2tvsnll9pvgcr74wefq74tqt47rvd4zu2x373llzhwrfs8ffygw",
                          "amount": "10000000000000",
                          "decimals": 8,
                          "block_height": 969171,
                          "block_hash": "000000000000000000016bc5a657d718c5d3a81946c4bf1f8100089ae3751f3f",
                          "block_time": "2026-09-29T15:14:36Z",
                          "confirmations": 1556,
                          "template": "market",
                          "market": {
                            "price_sat": "150000",
                            "platform_fee_sat": "7800",
                            "network_fee_sat": "3198",
                            "buyer_paid_sat": "160998",
                            "unit_price_sat": "1.5"
                          },
                          "sender_balance_before": "10000014285714",
                          "swap": null,
                          "liquidity": null,
                          "vault": null,
                          "tick": "LEAF"
                        }
                      ]
                    }
                  },
                  "swap": {
                    "summary": "A swap through the AXBT/LEAF pool",
                    "value": {
                      "txid": "286df23aed4a765bd2c3bed3ffa168a4e85240dbc2656d73424150e002de1b1d",
                      "operations": [
                        {
                          "txid": "286df23aed4a765bd2c3bed3ffa168a4e85240dbc2656d73424150e002de1b1d",
                          "type": "swap",
                          "from": null,
                          "to": "bc1p0a44csqwu3dyecdq337fyjvzu2xjph8a2ued505c87j2kvtpscsqde8kzq",
                          "amount": "1911196911196",
                          "decimals": 8,
                          "block_height": 970541,
                          "block_hash": "0000000000000000000014690f405c8651369691b133dce8b176b88cdf9aaf02",
                          "block_time": "2026-10-08T22:53:43Z",
                          "confirmations": 186,
                          "template": "swap",
                          "market": null,
                          "sender_balance_before": null,
                          "swap": {
                            "pool": "SWAP_POOL:4:AXBT:4:LEAF",
                            "side": "buy",
                            "input_tick": "AXBT",
                            "input_atoms": "50000",
                            "output_tick": "LEAF",
                            "output_atoms": "1911196911196",
                            "fee_atoms": "500"
                          },
                          "liquidity": null,
                          "vault": null,
                          "tick": "LEAF"
                        }
                      ]
                    }
                  },
                  "liquidity": {
                    "summary": "A liquidity deposit that opened the pool",
                    "value": {
                      "txid": "c7c536b9665b8a234497c8293c792a76816105d71259815ba105c208b4a1f34b",
                      "operations": [
                        {
                          "txid": "c7c536b9665b8a234497c8293c792a76816105d71259815ba105c208b4a1f34b",
                          "type": "liquidity",
                          "from": "bc1pq73spc672uv4hm03fw7k0zl5uh4u4fq65wm3mkrml50aetlqudzs2v3kru",
                          "to": null,
                          "amount": "5000000000000",
                          "decimals": 8,
                          "block_height": 970540,
                          "block_hash": "00000000000000000000a6153701a8e47ef24844b627d8bc14defd461fc1186a",
                          "block_time": "2026-10-08T22:05:48Z",
                          "confirmations": 187,
                          "template": "liquidity",
                          "market": null,
                          "sender_balance_before": null,
                          "swap": null,
                          "liquidity": {
                            "pool": "SWAP_POOL:4:AXBT:4:LEAF",
                            "action": "deposit",
                            "creates_pool": true,
                            "deposit": {
                              "AXBT": "80000",
                              "LEAF": "5000000000000"
                            },
                            "lock_blocks": 12,
                            "maturity_height": 970552,
                            "credited": null,
                            "fees": null
                          },
                          "vault": null,
                          "tick": "LEAF"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "401": {
            "$ref": "#/components/responses/InvalidApiKey"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/api/v1/transactions/{txid}/details": {
      "get": {
        "operationId": "transaction_details",
        "summary": "Transaction details",
        "description": "The whole Bitcoin transaction and what it means for CRC-20: `status` (`accepted` when the indexer applied a LEAF operation, else `not_leaf`), the `template` (`transfer`, `market`, `mint`, `swap`, `liquidity`, `vault` or `none`), every input and output with its role, signature hash type and spend path, the CRC-20 payload, and for a marketplace settlement what the buyer paid and the seller received (`market`). `notes` explain anomalies, such as a settlement that confirmed but was not applied. Decoded by the node for accepted operations, otherwise by mempool.space (`decoded_from`). `not_leaf` with a `block` but `confirmations` null: the block is newer than the indexer tip (not evaluated yet). An output back to the address of an input (sender, payer or fee input) is `change`. 404 when neither knows the transaction; 503 when mempool.space cannot be reached or is busy (`Retry-After: 1`), when its answer is over 256 KiB (too large to decode here; retrying does not help), or instead of `not_leaf` while the index may be behind.",
        "parameters": [
          {
            "name": "txid",
            "in": "path",
            "required": true,
            "description": "Transaction id, 64 hex characters.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{64}$"
            },
            "example": "31b48cf8827cf1dd2297e043ab208cde3a61dfea5c9406fd82f87c0fa7775b9b"
          },
          {
            "name": "tick",
            "in": "query",
            "required": false,
            "description": "Token scope: `LEAF` (default: one operation per txid and type), `AXBT` (AXBT transfers, AXBT vault operations and the pool swaps, liquidity deposits and paybacks) or `all` (both; a payback reuses its deposit's txid). Case-insensitive.",
            "schema": {
              "type": "string",
              "pattern": "^([Ll][Ee][Aa][Ff]|[Aa][Xx][Bb][Tt]|[Aa][Ll][Ll])$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionDetails"
                },
                "examples": {
                  "market": {
                    "summary": "A marketplace sale: the buyer paid 160998 sat",
                    "value": {
                      "txid": "31b48cf8827cf1dd2297e043ab208cde3a61dfea5c9406fd82f87c0fa7775b9b",
                      "status": "accepted",
                      "decoded_from": "node",
                      "template": "market",
                      "operations": [
                        {
                          "txid": "31b48cf8827cf1dd2297e043ab208cde3a61dfea5c9406fd82f87c0fa7775b9b",
                          "type": "transfer",
                          "from": "bc1pwcu88svh8kh08a4s42sex2razsfc596q2vx6cu2aaw06xzq5wrmqcse9v7",
                          "to": "bc1pzy9q4ze2tvsnll9pvgcr74wefq74tqt47rvd4zu2x373llzhwrfs8ffygw",
                          "amount": "10000000000000",
                          "decimals": 8,
                          "block_height": 969171,
                          "block_hash": "000000000000000000016bc5a657d718c5d3a81946c4bf1f8100089ae3751f3f",
                          "block_time": "2026-09-29T15:14:36Z",
                          "confirmations": 1556,
                          "template": "market",
                          "market": {
                            "price_sat": "150000",
                            "platform_fee_sat": "7800",
                            "network_fee_sat": "3198",
                            "buyer_paid_sat": "160998",
                            "unit_price_sat": "1.5"
                          },
                          "sender_balance_before": "10000014285714",
                          "swap": null,
                          "liquidity": null,
                          "vault": null,
                          "tick": "LEAF"
                        }
                      ],
                      "block": {
                        "height": 969171,
                        "hash": "000000000000000000016bc5a657d718c5d3a81946c4bf1f8100089ae3751f3f",
                        "time": "2026-09-29T15:14:36Z"
                      },
                      "confirmations": 1556,
                      "version": 2,
                      "locktime": 0,
                      "size": 765,
                      "vsize": 533,
                      "weight": 2130,
                      "fee_sat": "3198",
                      "inputs": [
                        {
                          "index": 0,
                          "txid": "956e363da1d77c86727df379aca81ebc129b7f2f003434fda72f41ae4c692679",
                          "vout": 0,
                          "address": "bc1pwcu88svh8kh08a4s42sex2razsfc596q2vx6cu2aaw06xzq5wrmqcse9v7",
                          "value_sat": "670",
                          "type": "p2tr",
                          "sighash": "SINGLE|ANYONECANPAY",
                          "spend": "key_path",
                          "role": "seller_carrier"
                        },
                        {
                          "index": 1,
                          "txid": "956e363da1d77c86727df379aca81ebc129b7f2f003434fda72f41ae4c692679",
                          "vout": 1,
                          "address": "bc1pwcu88svh8kh08a4s42sex2razsfc596q2vx6cu2aaw06xzq5wrmqcse9v7",
                          "value_sat": "670",
                          "type": "p2tr",
                          "sighash": "SINGLE|ANYONECANPAY",
                          "spend": "key_path",
                          "role": "seller_carrier"
                        },
                        {
                          "index": 2,
                          "txid": "ae1967281469c3184858dd2279b5e9f9f214376b95010222e8f04d13dc360cc0",
                          "vout": 7,
                          "address": "bc1q54cxdsctws0uxy6lx6uar5agzm07z3a7wu0zt2",
                          "value_sat": "1000",
                          "type": "p2wpkh",
                          "sighash": "ALL",
                          "spend": null,
                          "role": "platform_anchor"
                        },
                        {
                          "index": 3,
                          "txid": "881d33c6d4553e7e4ca522476dec5057eef7e389a2f583a9796230bc943795e6",
                          "vout": 5,
                          "address": "bc1pzy9q4ze2tvsnll9pvgcr74wefq74tqt47rvd4zu2x373llzhwrfs8ffygw",
                          "value_sat": "175017",
                          "type": "p2tr",
                          "sighash": "DEFAULT",
                          "spend": "key_path",
                          "role": "buyer_funding"
                        }
                      ],
                      "outputs": [
                        {
                          "index": 0,
                          "address": "bc1pwcu88svh8kh08a4s42sex2razsfc596q2vx6cu2aaw06xzq5wrmqcse9v7",
                          "value_sat": "151340",
                          "type": "p2tr",
                          "role": "seller_payment",
                          "payload": null
                        },
                        {
                          "index": 1,
                          "address": null,
                          "value_sat": "0",
                          "type": "op_return",
                          "role": "payload",
                          "payload": {
                            "p": "crc-20",
                            "op": "transfer",
                            "tick": "LEAF",
                            "amt": "10000000000000"
                          }
                        },
                        {
                          "index": 2,
                          "address": "bc1pzy9q4ze2tvsnll9pvgcr74wefq74tqt47rvd4zu2x373llzhwrfs8ffygw",
                          "value_sat": "1000",
                          "type": "p2tr",
                          "role": "buyer_receiver",
                          "payload": null
                        },
                        {
                          "index": 3,
                          "address": "bc1pn2w870z6684y74teczw36rfvq5zqy9mu44rz8v5zfutf2spf0w4s92ag35",
                          "value_sat": "7800",
                          "type": "p2tr",
                          "role": "platform_fee",
                          "payload": null
                        },
                        {
                          "index": 4,
                          "address": "bc1q54cxdsctws0uxy6lx6uar5agzm07z3a7wu0zt2",
                          "value_sat": "1000",
                          "type": "p2wpkh",
                          "role": "anchor_return",
                          "payload": null
                        },
                        {
                          "index": 5,
                          "address": "bc1pzy9q4ze2tvsnll9pvgcr74wefq74tqt47rvd4zu2x373llzhwrfs8ffygw",
                          "value_sat": "13019",
                          "type": "p2tr",
                          "role": "buyer_change",
                          "payload": null
                        }
                      ],
                      "market": {
                        "seller": "bc1pwcu88svh8kh08a4s42sex2razsfc596q2vx6cu2aaw06xzq5wrmqcse9v7",
                        "buyer": "bc1pzy9q4ze2tvsnll9pvgcr74wefq74tqt47rvd4zu2x373llzhwrfs8ffygw",
                        "amount": "10000000000000",
                        "decimals": 8,
                        "price_sat": "150000",
                        "platform_fee_sat": "7800",
                        "network_fee_sat": "3198",
                        "buyer_paid_sat": "160998",
                        "seller_received_sat": "150000",
                        "unit_price_sat": "1.5"
                      },
                      "notes": []
                    }
                  },
                  "rejected_market": {
                    "summary": "A settlement that confirmed but was not applied (listing already sold)",
                    "value": {
                      "txid": "36947bcbbd6efa132d240f6f8e3c7c7d10601444d0d7926daa03470db94eeb3e",
                      "status": "not_leaf",
                      "decoded_from": "mempool.space",
                      "template": "market",
                      "operations": [],
                      "block": {
                        "height": 969171,
                        "hash": "000000000000000000016bc5a657d718c5d3a81946c4bf1f8100089ae3751f3f",
                        "time": "2026-09-29T15:14:36Z"
                      },
                      "confirmations": 1556,
                      "version": 2,
                      "locktime": 0,
                      "size": 764,
                      "vsize": 533,
                      "weight": 2129,
                      "fee_sat": "2665",
                      "inputs": [
                        {
                          "index": 0,
                          "txid": "2d66588ade015bf31c83558bcc255bdd18b84267c3bba42c088377c6e4d2ffa8",
                          "vout": 0,
                          "address": "bc1pwcu88svh8kh08a4s42sex2razsfc596q2vx6cu2aaw06xzq5wrmqcse9v7",
                          "value_sat": "670",
                          "type": "p2tr",
                          "sighash": "SINGLE|ANYONECANPAY",
                          "spend": "key_path",
                          "role": "seller_carrier"
                        },
                        {
                          "index": 1,
                          "txid": "2d66588ade015bf31c83558bcc255bdd18b84267c3bba42c088377c6e4d2ffa8",
                          "vout": 1,
                          "address": "bc1pwcu88svh8kh08a4s42sex2razsfc596q2vx6cu2aaw06xzq5wrmqcse9v7",
                          "value_sat": "670",
                          "type": "p2tr",
                          "sighash": "SINGLE|ANYONECANPAY",
                          "spend": "key_path",
                          "role": "seller_carrier"
                        },
                        {
                          "index": 2,
                          "txid": "ae1967281469c3184858dd2279b5e9f9f214376b95010222e8f04d13dc360cc0",
                          "vout": 50,
                          "address": "bc1q54cxdsctws0uxy6lx6uar5agzm07z3a7wu0zt2",
                          "value_sat": "1000",
                          "type": "p2wpkh",
                          "sighash": "ALL",
                          "spend": null,
                          "role": "platform_anchor"
                        },
                        {
                          "index": 3,
                          "txid": "1c9eef57a19787a439417840f180d9356a3ad6bf60aa3dc5b095289b37ec6472",
                          "vout": 5,
                          "address": "bc1pk6rlnew83q24lqr5eytltn3082a2yw5qprp8rylsf3tar2cfgqaq59huqm",
                          "value_sat": "237617",
                          "type": "p2tr",
                          "sighash": "DEFAULT",
                          "spend": "key_path",
                          "role": "buyer_funding"
                        }
                      ],
                      "outputs": [
                        {
                          "index": 0,
                          "address": "bc1pwcu88svh8kh08a4s42sex2razsfc596q2vx6cu2aaw06xzq5wrmqcse9v7",
                          "value_sat": "201340",
                          "type": "p2tr",
                          "role": "seller_payment",
                          "payload": null
                        },
                        {
                          "index": 1,
                          "address": null,
                          "value_sat": "0",
                          "type": "op_return",
                          "role": "payload",
                          "payload": {
                            "p": "crc-20",
                            "op": "transfer",
                            "tick": "LEAF",
                            "amt": "10000000000000"
                          }
                        },
                        {
                          "index": 2,
                          "address": "bc1pk6rlnew83q24lqr5eytltn3082a2yw5qprp8rylsf3tar2cfgqaq59huqm",
                          "value_sat": "1000",
                          "type": "p2tr",
                          "role": "buyer_receiver",
                          "payload": null
                        },
                        {
                          "index": 3,
                          "address": "bc1pn2w870z6684y74teczw36rfvq5zqy9mu44rz8v5zfutf2spf0w4s92ag35",
                          "value_sat": "10400",
                          "type": "p2tr",
                          "role": "platform_fee",
                          "payload": null
                        },
                        {
                          "index": 4,
                          "address": "bc1q54cxdsctws0uxy6lx6uar5agzm07z3a7wu0zt2",
                          "value_sat": "1000",
                          "type": "p2wpkh",
                          "role": "anchor_return",
                          "payload": null
                        },
                        {
                          "index": 5,
                          "address": "bc1pk6rlnew83q24lqr5eytltn3082a2yw5qprp8rylsf3tar2cfgqaq59huqm",
                          "value_sat": "23552",
                          "type": "p2tr",
                          "role": "buyer_change",
                          "payload": null
                        }
                      ],
                      "market": {
                        "seller": "bc1pwcu88svh8kh08a4s42sex2razsfc596q2vx6cu2aaw06xzq5wrmqcse9v7",
                        "buyer": "bc1pk6rlnew83q24lqr5eytltn3082a2yw5qprp8rylsf3tar2cfgqaq59huqm",
                        "amount": "10000000000000",
                        "decimals": 8,
                        "price_sat": "200000",
                        "platform_fee_sat": "10400",
                        "network_fee_sat": "2665",
                        "buyer_paid_sat": "213065",
                        "seller_received_sat": "200000",
                        "unit_price_sat": "2"
                      },
                      "notes": [
                        "The indexer did not apply this transfer: the sender's balance was insufficient or the transaction is otherwise invalid.",
                        "The Bitcoin side still settled: the buyer paid 213065 sat and the seller received 200000 sat, but no LEAF moved."
                      ]
                    }
                  },
                  "transfer": {
                    "summary": "An ordinary transfer",
                    "value": {
                      "txid": "1b356577165847e2e3b1cfe285a8d05f1803f0b4125584cc0914e97801089641",
                      "status": "accepted",
                      "decoded_from": "node",
                      "template": "transfer",
                      "operations": [
                        {
                          "txid": "1b356577165847e2e3b1cfe285a8d05f1803f0b4125584cc0914e97801089641",
                          "type": "transfer",
                          "from": "bc1p24k5avrf8x44mmefh0kuf7up7y5cg7l2rghcqxdrzhpy4uxm24nschygc9",
                          "to": "bc1pnjm803d0erzgvvmx6ue99gunsht8vpl3kxa3k8d00pke32argr6syrvu6u",
                          "amount": "1745641300000000",
                          "decimals": 8,
                          "block_height": 970382,
                          "block_hash": "000000000000000000019ea373aecab3b1714e714f9fbde6a26ac1a0bc49b0e8",
                          "block_time": "2026-10-07T19:52:43Z",
                          "confirmations": 345,
                          "template": "transfer",
                          "market": null,
                          "sender_balance_before": "1745641333333334",
                          "swap": null,
                          "liquidity": null,
                          "vault": null,
                          "tick": "LEAF"
                        }
                      ],
                      "block": {
                        "height": 970382,
                        "hash": "000000000000000000019ea373aecab3b1714e714f9fbde6a26ac1a0bc49b0e8",
                        "time": "2026-10-07T19:52:43Z"
                      },
                      "confirmations": 345,
                      "version": 2,
                      "locktime": 0,
                      "size": 328,
                      "vsize": 277,
                      "weight": 1108,
                      "fee_sat": "834",
                      "inputs": [
                        {
                          "index": 0,
                          "txid": "706ca5c3306b8fa346715c5cbaacfb0fb1c737667b8c982c76c03ad17ad3952f",
                          "vout": 3,
                          "address": "bc1p24k5avrf8x44mmefh0kuf7up7y5cg7l2rghcqxdrzhpy4uxm24nschygc9",
                          "value_sat": "48000",
                          "type": "p2tr",
                          "sighash": "DEFAULT",
                          "spend": "key_path",
                          "role": "sender"
                        }
                      ],
                      "outputs": [
                        {
                          "index": 0,
                          "address": null,
                          "value_sat": "0",
                          "type": "op_return",
                          "role": "payload",
                          "payload": {
                            "p": "crc-20",
                            "op": "transfer",
                            "tick": "LEAF",
                            "amt": "1745641300000000"
                          }
                        },
                        {
                          "index": 1,
                          "address": "bc1pnjm803d0erzgvvmx6ue99gunsht8vpl3kxa3k8d00pke32argr6syrvu6u",
                          "value_sat": "330",
                          "type": "p2tr",
                          "role": "receiver",
                          "payload": null
                        },
                        {
                          "index": 2,
                          "address": "bc1pv85mk7dh9ea4ylsamzvcwsseglj7smph8rm8hz8ksxg4d5q43u8selta0j",
                          "value_sat": "1347",
                          "type": "p2tr",
                          "role": "other",
                          "payload": null
                        },
                        {
                          "index": 3,
                          "address": "bc1p24k5avrf8x44mmefh0kuf7up7y5cg7l2rghcqxdrzhpy4uxm24nschygc9",
                          "value_sat": "45489",
                          "type": "p2tr",
                          "role": "change",
                          "payload": null
                        }
                      ],
                      "market": null,
                      "notes": []
                    }
                  },
                  "mint": {
                    "summary": "A mint",
                    "value": {
                      "txid": "394bdb537c5c1e7a11fe95230cafda2394911b86a054ca1c974bcfed5b7c8feb",
                      "status": "accepted",
                      "decoded_from": "node",
                      "template": "mint",
                      "operations": [
                        {
                          "txid": "394bdb537c5c1e7a11fe95230cafda2394911b86a054ca1c974bcfed5b7c8feb",
                          "type": "mint",
                          "from": "bc1p7qpz46khgcdu7dcmw3t8wtt6hc7sf9r3djgevsgeym7tau825v6sfa97ek",
                          "to": "bc1ppxgzntmcp6t44yl5lt0nknfdwnzdmxm22jqgtu9xzcvah7tc8msq3d0z6y",
                          "amount": "145658857142858",
                          "decimals": 8,
                          "block_height": 967930,
                          "block_hash": "0000000000000000000062b25ebb689e0866e3f4830373311291267ede20972f",
                          "block_time": "2026-09-21T03:25:52Z",
                          "confirmations": 2797,
                          "template": "mint",
                          "market": null,
                          "sender_balance_before": null,
                          "swap": null,
                          "liquidity": null,
                          "vault": null,
                          "tick": "LEAF"
                        }
                      ],
                      "block": {
                        "height": 967930,
                        "hash": "0000000000000000000062b25ebb689e0866e3f4830373311291267ede20972f",
                        "time": "2026-09-21T03:25:52Z"
                      },
                      "confirmations": 2797,
                      "version": 2,
                      "locktime": 0,
                      "size": 404,
                      "vsize": 353,
                      "weight": 1412,
                      "fee_sat": "885",
                      "inputs": [
                        {
                          "index": 0,
                          "txid": "369d0b671cfaae4d39dd8a0691d29d71e29350a5e4b0f507cf8fc5a31c68c296",
                          "vout": 2,
                          "address": "bc1p7qpz46khgcdu7dcmw3t8wtt6hc7sf9r3djgevsgeym7tau825v6sfa97ek",
                          "value_sat": "859755",
                          "type": "p2tr",
                          "sighash": "DEFAULT",
                          "spend": "key_path",
                          "role": "payer"
                        }
                      ],
                      "outputs": [
                        {
                          "index": 0,
                          "address": null,
                          "value_sat": "0",
                          "type": "op_return",
                          "role": "legacy_intent",
                          "payload": {
                            "p": "ico-20",
                            "op": "transfer",
                            "tick": "LEAF",
                            "amt": "1630000"
                          }
                        },
                        {
                          "index": 1,
                          "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
                          "value_sat": "546",
                          "type": "p2pkh",
                          "role": "legacy_burn",
                          "payload": null
                        },
                        {
                          "index": 2,
                          "address": null,
                          "value_sat": "0",
                          "type": "op_return",
                          "role": "payload",
                          "payload": {
                            "p": "crc-20",
                            "op": "mint",
                            "tick": "LEAF"
                          }
                        },
                        {
                          "index": 3,
                          "address": "bc1ppxgzntmcp6t44yl5lt0nknfdwnzdmxm22jqgtu9xzcvah7tc8msq3d0z6y",
                          "value_sat": "330",
                          "type": "p2tr",
                          "role": "soft_covenant",
                          "payload": null
                        },
                        {
                          "index": 4,
                          "address": "bc1phuuulh7fs5zrm48ethfyqvt860fxsaxuq643telqn06yz4u3c70spyleaf",
                          "value_sat": "10000",
                          "type": "p2tr",
                          "role": "treasury",
                          "payload": null
                        },
                        {
                          "index": 5,
                          "address": "bc1p7qpz46khgcdu7dcmw3t8wtt6hc7sf9r3djgevsgeym7tau825v6sfa97ek",
                          "value_sat": "847994",
                          "type": "p2tr",
                          "role": "change",
                          "payload": null
                        }
                      ],
                      "market": null,
                      "notes": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "401": {
            "$ref": "#/components/responses/InvalidApiKey"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/api/v1/stats/{tick}": {
      "get": {
        "operationId": "stats",
        "summary": "Token statistics",
        "description": "Statistics of LEAF or AXBT at the index tip: the indexer's supply and holder count, the operations by type and over the last 24 h / 7 d, the volumes, a day-by-day series (operations, volume, holders at the end of each UTC day), the top 10 holders and, for AXBT, the CDP accounting and every vault. Balances are replayed from the operations; `holders.exact` is true when that replay finds the indexer's holder count and top balances (the top balances are read from the indexer either way). Computed once per block.",
        "parameters": [
          {
            "name": "tick",
            "in": "path",
            "required": true,
            "description": "LEAF or AXBT (case-insensitive).",
            "schema": {
              "type": "string",
              "pattern": "^([Ll][Ee][Aa][Ff]|[Aa][Xx][Bb][Tt])$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenStats"
                },
                "examples": {
                  "LEAF": {
                    "summary": "LEAF",
                    "value": {
                      "tick": "LEAF",
                      "decimals": 8,
                      "height": 970726,
                      "token": {
                        "type": "bonding",
                        "supply": "100000000000000000",
                        "max_supply": "100000000000000000",
                        "holders": 970,
                        "height": 970726
                      },
                      "operations": {
                        "total": 2336,
                        "by_type": {
                          "liquidity_deposit": 2,
                          "liquidity_payback": 2,
                          "mint": 812,
                          "sale": 957,
                          "swap": 13,
                          "transfer": 550
                        },
                        "last_24h": 24,
                        "last_7d": 304,
                        "window_end": "2026-10-10T04:46:40Z",
                        "first": {
                          "height": 967487,
                          "time": "2026-09-18T02:38:38Z",
                          "txid": "cb6c011cf9517574fe13d91bef41e699a2bd476965dd6503f75e70981eccc984"
                        },
                        "last": {
                          "height": 970714,
                          "time": "2026-10-10T03:33:29Z",
                          "txid": "3bb4b2e08c1ccfa2cbb946a3b4f8aadc12cf4454290dab051b8ed1b18de0de5b"
                        }
                      },
                      "addresses": 1752,
                      "volume": {
                        "transferred": "63770822451633336",
                        "swapped": "17291920133212",
                        "minted": "100000000000000000",
                        "burned": "0"
                      },
                      "holders": {
                        "count": 970,
                        "exact": true,
                        "top": [
                          {
                            "address": "bc1pkrns7ra9mwp3t4mq7ukwygkk5jptadtggftal9l5tt3r8j2ertjs5dv976",
                            "balance": "13441322714285714"
                          },
                          {
                            "address": "bc1paa53dmgqhl8j457cq0p42w52nrsw7gst2f8jehjles9ga8c7tahqltxe84",
                            "balance": "5072808333333333"
                          },
                          {
                            "address": "bc1pez9x4ylzxplxker5e4p5ephna9j3phnwllcmwlgp04e0jes8fp6qvrcd7x",
                            "balance": "4457179857142857"
                          },
                          {
                            "address": "bc1pd5qvrcula0ky6pg20gtuwzay34gwd80r77rtxm3sga3pyk8jnxnqq86dmj",
                            "balance": "4327656380952381"
                          },
                          {
                            "address": "bc1p40gxlvfw9pz04av5ppl4ngdensh0p3ph0xwz7judls4q4azae20qwerkpy",
                            "balance": "3386880809523810"
                          },
                          {
                            "address": "bc1psczwy85cuc7js8ds86qstnmyff06py3m6xenjas6d68mw4ph459sw5u9ve",
                            "balance": "3377654047619048"
                          },
                          {
                            "address": "bc1pnjm803d0erzgvvmx6ue99gunsht8vpl3kxa3k8d00pke32argr6syrvu6u",
                            "balance": "2238772061904761"
                          },
                          {
                            "address": "bc1p6lkyn3hladp2auxfsk94sphw2sdr397npghmrr4ez34w8twukrnszntu70",
                            "balance": "1774514904761905"
                          },
                          {
                            "address": "bc1ptynqdsyxwsfuunms778r9n9r2y3tz9g26mr4zswqgh8v370htpzqaymhhf",
                            "balance": "1430100000000000"
                          },
                          {
                            "address": "bc1ptg2kz7dn64sxf0dh7qkc422jul7aj3zvrl438ehdrdrxqf4jumnqc0zsws",
                            "balance": "1400024761904762"
                          }
                        ]
                      },
                      "daily": [
                        {
                          "date": "2026-09-18",
                          "operations": 610,
                          "volume": "0",
                          "holders": 544
                        },
                        {
                          "date": "2026-09-19",
                          "operations": 112,
                          "volume": "394131476190477",
                          "holders": 633
                        },
                        {
                          "date": "2026-09-20",
                          "operations": 143,
                          "volume": "3457613571428570",
                          "holders": 705
                        },
                        {
                          "date": "2026-09-21",
                          "operations": 65,
                          "volume": "1858379571428580",
                          "holders": 716
                        },
                        {
                          "date": "2026-09-22",
                          "operations": 77,
                          "volume": "2439147214285716",
                          "holders": 735
                        },
                        {
                          "date": "2026-09-23",
                          "operations": 25,
                          "volume": "2124758761904761",
                          "holders": 739
                        },
                        {
                          "date": "2026-09-24",
                          "operations": 46,
                          "volume": "1469999156761904",
                          "holders": 753
                        },
                        {
                          "date": "2026-09-25",
                          "operations": 380,
                          "volume": "13954622390428572",
                          "holders": 853
                        },
                        {
                          "date": "2026-09-26",
                          "operations": 273,
                          "volume": "4300251947619048",
                          "holders": 935
                        },
                        {
                          "date": "2026-09-27",
                          "operations": 73,
                          "volume": "1761171014285713",
                          "holders": 942
                        },
                        {
                          "date": "2026-09-28",
                          "operations": 60,
                          "volume": "723164014285714",
                          "holders": 945
                        },
                        {
                          "date": "2026-09-29",
                          "operations": 63,
                          "volume": "797761738095239",
                          "holders": 951
                        },
                        {
                          "date": "2026-09-30",
                          "operations": 39,
                          "volume": "385350690395237",
                          "holders": 958
                        },
                        {
                          "date": "2026-10-01",
                          "operations": 17,
                          "volume": "256213780952381",
                          "holders": 957
                        },
                        {
                          "date": "2026-10-02",
                          "operations": 23,
                          "volume": "4723079819047619",
                          "holders": 955
                        },
                        {
                          "date": "2026-10-03",
                          "operations": 94,
                          "volume": "12078590976190477",
                          "holders": 957
                        },
                        {
                          "date": "2026-10-04",
                          "operations": 80,
                          "volume": "7085822490476186",
                          "holders": 963
                        },
                        {
                          "date": "2026-10-05",
                          "operations": 36,
                          "volume": "1218080252142858",
                          "holders": 957
                        },
                        {
                          "date": "2026-10-06",
                          "operations": 17,
                          "volume": "600604428571428",
                          "holders": 958
                        },
                        {
                          "date": "2026-10-07",
                          "operations": 37,
                          "volume": "3431552747619047",
                          "holders": 966
                        },
                        {
                          "date": "2026-10-08",
                          "operations": 29,
                          "volume": "332522358815958",
                          "holders": 970
                        },
                        {
                          "date": "2026-10-09",
                          "operations": 34,
                          "volume": "371607970841063",
                          "holders": 971
                        },
                        {
                          "date": "2026-10-10",
                          "operations": 3,
                          "volume": "23688000000000",
                          "holders": 970
                        }
                      ],
                      "pool": {
                        "swaps": 13,
                        "last": {
                          "height": 970692,
                          "time": "2026-10-09T23:41:32Z",
                          "txid": "7ac2f36a6a2934b0976c6f4ab9c52a444203d06420fa61653f60a8a96472e5eb",
                          "side": "sell",
                          "leaf": "595828863600",
                          "axbt": "68874"
                        }
                      },
                      "market": {
                        "sales": 957,
                        "volume_sat": "281442040",
                        "last_unit_price_sat": "1.79000428",
                        "last": {
                          "height": 970714,
                          "time": "2026-10-10T03:33:29Z",
                          "txid": "3bb4b2e08c1ccfa2cbb946a3b4f8aadc12cf4454290dab051b8ed1b18de0de5b"
                        }
                      },
                      "cdp": null
                    }
                  },
                  "AXBT": {
                    "summary": "AXBT",
                    "value": {
                      "tick": "AXBT",
                      "decimals": 8,
                      "height": 970726,
                      "token": {
                        "type": "cdp",
                        "supply": "356492",
                        "max_supply": null,
                        "holders": 2,
                        "height": 970726
                      },
                      "operations": {
                        "total": 29,
                        "by_type": {
                          "liquidity_deposit": 2,
                          "liquidity_payback": 2,
                          "swap": 13,
                          "transfer": 1,
                          "vault_close": 3,
                          "vault_open": 5,
                          "vault_repay": 3
                        },
                        "last_24h": 18,
                        "last_7d": 29,
                        "window_end": "2026-10-10T04:46:40Z",
                        "first": {
                          "height": 970531,
                          "time": "2026-10-08T20:55:12Z",
                          "txid": "9a61fc6e1f86ffb604ef035859d6970474b6f5dda5c4057d2674cf53c15c3058"
                        },
                        "last": {
                          "height": 970713,
                          "time": "2026-10-10T03:11:36Z",
                          "txid": "d7c99ee15280d680bd5ce0ea724ae2fe1c26b57a950a176664d941a361f8d59f"
                        }
                      },
                      "addresses": 7,
                      "volume": {
                        "transferred": "136363",
                        "swapped": "891241",
                        "minted": "762641",
                        "burned": "406149"
                      },
                      "holders": {
                        "count": 2,
                        "exact": true,
                        "top": [
                          {
                            "address": "bc1pq73spc672uv4hm03fw7k0zl5uh4u4fq65wm3mkrml50aetlqudzs2v3kru",
                            "balance": "247981"
                          },
                          {
                            "address": "bc1p0a44csqwu3dyecdq337fyjvzu2xjph8a2ued505c87j2kvtpscsqde8kzq",
                            "balance": "108511"
                          }
                        ]
                      },
                      "daily": [
                        {
                          "date": "2026-10-08",
                          "operations": 8,
                          "volume": "50000",
                          "holders": 4
                        },
                        {
                          "date": "2026-10-09",
                          "operations": 16,
                          "volume": "841241",
                          "holders": 3
                        },
                        {
                          "date": "2026-10-10",
                          "operations": 5,
                          "volume": "136363",
                          "holders": 2
                        }
                      ],
                      "pool": {
                        "swaps": 13,
                        "last": {
                          "height": 970692,
                          "time": "2026-10-09T23:41:32Z",
                          "txid": "7ac2f36a6a2934b0976c6f4ab9c52a444203d06420fa61653f60a8a96472e5eb",
                          "side": "sell",
                          "leaf": "595828863600",
                          "axbt": "68874"
                        }
                      },
                      "market": null,
                      "cdp": {
                        "open_debt": "356492",
                        "bad_debt": "0",
                        "reserved": "0",
                        "vaults": 5,
                        "open_vaults": 2,
                        "activation_height": 970376,
                        "collateral_locked_sats": "400000",
                        "list": [
                          {
                            "funding_txid": "328bd860216d68538ff3921d111f4f161498bdbde92a66b408bf71ffc8c39bea",
                            "owner": "bc1p0a44csqwu3dyecdq337fyjvzu2xjph8a2ued505c87j2kvtpscsqde8kzq",
                            "collateral_sats": "200000",
                            "debt": "176000",
                            "status": "open",
                            "liquidation_height": 972141,
                            "settlement_account": "bc1pr6j4pvkcgujuuysgx9mv7pf2xmxdw9xyphdht62uvpjyw720z46sjqyt2n",
                            "opened_height": 970701,
                            "repaid_height": null,
                            "closed_height": null,
                            "route": null
                          },
                          {
                            "funding_txid": "e24a4316cae941db35105549aa0ed6321a1d8befb82d533dc20de7855f00416b",
                            "owner": "bc1pcr4crf0kxfqhjphtzk5zqvzq6rugmgpqgce39yuawsrm44meh0ks424246",
                            "collateral_sats": "150000",
                            "debt": "136363",
                            "status": "closed",
                            "liquidation_height": 970688,
                            "settlement_account": "bc1plnwfqh2ynf2srd5yf36kpny3f6d4renwgx7aqykd7m9xh59glhasw9slrk",
                            "opened_height": 970544,
                            "repaid_height": 970660,
                            "closed_height": 970666,
                            "route": "owner_repay"
                          },
                          {
                            "funding_txid": "bd085ea08af522ca57372d1d27b69449b678320efe084472bebc4151e047970c",
                            "owner": "bc1p0a44csqwu3dyecdq337fyjvzu2xjph8a2ued505c87j2kvtpscsqde8kzq",
                            "collateral_sats": "200000",
                            "debt": "180492",
                            "status": "open",
                            "liquidation_height": 970967,
                            "settlement_account": "bc1pheefmktr7awnpdtppmt65sdpqmsawn7a632hmh9ckcvhlm0tcexs9aawmy",
                            "opened_height": 970535,
                            "repaid_height": null,
                            "closed_height": null,
                            "route": null
                          },
                          {
                            "funding_txid": "4a7243ded61a058c871c753d8a8a8e40d1c1b3406d8defb78a099d709279517f",
                            "owner": "bc1pq73spc672uv4hm03fw7k0zl5uh4u4fq65wm3mkrml50aetlqudzs2v3kru",
                            "collateral_sats": "150000",
                            "debt": "136363",
                            "status": "closed",
                            "liquidation_height": 970679,
                            "settlement_account": "bc1ptnt0zzvc369vnw9hqp9cd7fs9ulxgtuaxx6a0ncakqrfy7fgj5xsw9uqdu",
                            "opened_height": 970535,
                            "repaid_height": 970707,
                            "closed_height": 970713,
                            "route": "operator_liquidation"
                          },
                          {
                            "funding_txid": "9a61fc6e1f86ffb604ef035859d6970474b6f5dda5c4057d2674cf53c15c3058",
                            "owner": "bc1pcr4crf0kxfqhjphtzk5zqvzq6rugmgpqgce39yuawsrm44meh0ks424246",
                            "collateral_sats": "150000",
                            "debt": "133423",
                            "status": "closed",
                            "liquidation_height": 971539,
                            "settlement_account": "bc1pzq2as73dz94kjtmcqh8xmncjmtrgshshwge35qzjryc6gvpqxw6sra02ch",
                            "opened_height": 970531,
                            "repaid_height": 970532,
                            "closed_height": 970538,
                            "route": "owner_repay"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "401": {
            "$ref": "#/components/responses/InvalidApiKey"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Status": {
        "type": "object",
        "required": [
          "network",
          "token",
          "indexer"
        ],
        "additionalProperties": false,
        "properties": {
          "network": {
            "type": "string",
            "const": "bitcoin"
          },
          "token": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "tick",
              "decimals",
              "max_supply",
              "supply"
            ],
            "additionalProperties": false,
            "properties": {
              "tick": {
                "type": "string",
                "const": "LEAF"
              },
              "decimals": {
                "type": "integer",
                "const": 8
              },
              "max_supply": {
                "type": "string",
                "pattern": "^[0-9]+$",
                "description": "Integer atoms as a decimal string."
              },
              "supply": {
                "type": "string",
                "pattern": "^[0-9]+$",
                "description": "Integer atoms as a decimal string."
              }
            }
          },
          "indexer": {
            "type": "object",
            "required": [
              "height",
              "hash",
              "synced"
            ],
            "additionalProperties": false,
            "properties": {
              "height": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "hash": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^[0-9a-f]{64}$"
              },
              "synced": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "Operation": {
        "type": "object",
        "required": [
          "txid",
          "type",
          "from",
          "to",
          "amount",
          "decimals",
          "block_height",
          "block_hash",
          "block_time",
          "confirmations",
          "template",
          "market",
          "sender_balance_before",
          "swap",
          "liquidity",
          "vault",
          "tick"
        ],
        "additionalProperties": false,
        "properties": {
          "txid": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "type": {
            "type": "string",
            "enum": [
              "transfer",
              "mint",
              "swap",
              "liquidity",
              "vault_open",
              "vault_repay",
              "vault_liquidation",
              "vault_close"
            ]
          },
          "from": {
            "type": [
              "string",
              "null"
            ],
            "description": "Debited `amount`: transfer sender; swap owner selling LEAF; liquidity deposit owner; vault repayment payer; vault close settlement account (burn). Mint: the wallet that paid for it (not debited). null for the pool (swap buy, payback), a mint of AXBT (vault open), or when unknown."
          },
          "to": {
            "type": [
              "string",
              "null"
            ],
            "description": "Credited `amount`: transfer receiver; mint beneficiary covenant address; swap owner buying LEAF; payback owner; vault open owner; vault repayment settlement account. null for the pool (swap sell, deposit) or a burn (vault close)."
          },
          "amount": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Atoms of `tick`."
          },
          "decimals": {
            "type": "integer",
            "const": 8
          },
          "block_height": {
            "type": [
              "integer",
              "null"
            ]
          },
          "block_hash": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9a-f]{64}$"
          },
          "block_time": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "confirmations": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1
          },
          "template": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "transfer",
              "market",
              "mint",
              "swap",
              "liquidity",
              "vault",
              null
            ],
            "description": "Bitcoin template of the transaction: an ordinary `transfer`, a marketplace settlement (`market`), a `mint`, an AXBT/LEAF pool operation (`swap`, `liquidity`) or an AXBT vault open / close (`vault`). null while the decoded transaction is not available yet, or when it carries no CRC-20 payload (e.g. an operator's vault close)."
          },
          "market": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationMarket"
              }
            ],
            "description": "Marketplace economics, present only when `template` is `market`."
          },
          "sender_balance_before": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]+$",
            "description": "Transfer: the sender's LEAF atoms just before it. null for every other type, and when it cannot be replayed exactly (order of operations in the block unknown, or a liquidity position of the sender the replay cannot follow)."
          },
          "swap": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationSwap"
              }
            ],
            "description": "The AXBT/LEAF pool execution, present only when `type` is `swap`."
          },
          "liquidity": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationLiquidity"
              }
            ],
            "description": "The liquidity deposit or payback (`action`), present only when `type` is `liquidity`."
          },
          "vault": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationVault"
              }
            ],
            "description": "The AXBT vault, present only for the `vault_*` types."
          },
          "tick": {
            "type": "string",
            "enum": [
              "LEAF",
              "AXBT"
            ],
            "description": "Token of `amount`."
          }
        }
      },
      "AddressOperation": {
        "type": "object",
        "required": [
          "txid",
          "type",
          "direction",
          "from",
          "to",
          "amount",
          "decimals",
          "block_height",
          "block_hash",
          "block_time",
          "confirmations",
          "template",
          "market",
          "sender_balance_before",
          "swap",
          "liquidity",
          "vault",
          "tick"
        ],
        "additionalProperties": false,
        "properties": {
          "txid": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "type": {
            "type": "string",
            "enum": [
              "transfer",
              "mint",
              "swap",
              "liquidity",
              "vault_open",
              "vault_repay",
              "vault_liquidation",
              "vault_close"
            ]
          },
          "direction": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "in",
              "out",
              "self",
              null
            ],
            "description": "in: the address is `to`; out: it is `from`; self: both; null: an AXBT vault operation listed because the address owns the vault (tick=AXBT or all)."
          },
          "from": {
            "type": [
              "string",
              "null"
            ],
            "description": "Debited `amount`: transfer sender; swap owner selling LEAF; liquidity deposit owner; vault repayment payer; vault close settlement account (burn). Mint: the wallet that paid for it (not debited). null for the pool (swap buy, payback), a mint of AXBT (vault open), or when unknown."
          },
          "to": {
            "type": [
              "string",
              "null"
            ],
            "description": "Credited `amount`: transfer receiver; mint beneficiary covenant address; swap owner buying LEAF; payback owner; vault open owner; vault repayment settlement account. null for the pool (swap sell, deposit) or a burn (vault close)."
          },
          "amount": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Atoms of `tick`."
          },
          "decimals": {
            "type": "integer",
            "const": 8
          },
          "block_height": {
            "type": [
              "integer",
              "null"
            ]
          },
          "block_hash": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9a-f]{64}$"
          },
          "block_time": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "confirmations": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1
          },
          "template": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "transfer",
              "market",
              "mint",
              "swap",
              "liquidity",
              "vault",
              null
            ],
            "description": "Bitcoin template of the transaction: an ordinary `transfer`, a marketplace settlement (`market`), a `mint`, an AXBT/LEAF pool operation (`swap`, `liquidity`) or an AXBT vault open / close (`vault`). null while the decoded transaction is not available yet, or when it carries no CRC-20 payload (e.g. an operator's vault close)."
          },
          "market": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationMarket"
              }
            ],
            "description": "Marketplace economics, present only when `template` is `market`."
          },
          "sender_balance_before": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]+$",
            "description": "Transfer: the sender's LEAF atoms just before it. null for every other type, and when it cannot be replayed exactly (order of operations in the block unknown, or a liquidity position of the sender the replay cannot follow)."
          },
          "swap": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationSwap"
              }
            ],
            "description": "The AXBT/LEAF pool execution, present only when `type` is `swap`."
          },
          "liquidity": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationLiquidity"
              }
            ],
            "description": "The liquidity deposit or payback (`action`), present only when `type` is `liquidity`."
          },
          "vault": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OperationVault"
              }
            ],
            "description": "The AXBT vault, present only for the `vault_*` types."
          },
          "tick": {
            "type": "string",
            "enum": [
              "LEAF",
              "AXBT"
            ],
            "description": "Token of `amount`."
          }
        }
      },
      "OperationPage": {
        "type": "object",
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false,
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Operation"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cursor of the next page; null on the last page."
          }
        }
      },
      "AddressOperationPage": {
        "type": "object",
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false,
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AddressOperation"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cursor of the next page; null on the last page."
          }
        }
      },
      "Address": {
        "type": "object",
        "required": [
          "address",
          "leaf",
          "btc",
          "height",
          "axbt"
        ],
        "additionalProperties": false,
        "properties": {
          "address": {
            "type": "string",
            "description": "Normalized (bech32 lowercase)."
          },
          "leaf": {
            "type": "object",
            "required": [
              "balance",
              "decimals"
            ],
            "additionalProperties": false,
            "properties": {
              "balance": {
                "type": "string",
                "pattern": "^[0-9]+$",
                "description": "Integer atoms as a decimal string."
              },
              "decimals": {
                "type": "integer",
                "const": 8
              }
            }
          },
          "btc": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "balance",
              "unconfirmed",
              "tx_count"
            ],
            "additionalProperties": false,
            "description": "From mempool.space; null when it could not be read.",
            "properties": {
              "balance": {
                "type": "string",
                "pattern": "^[0-9]+$",
                "description": "Confirmed satoshis."
              },
              "unconfirmed": {
                "type": "string",
                "pattern": "^-?[0-9]+$",
                "description": "Signed satoshis pending in the mempool."
              },
              "tx_count": {
                "type": "integer",
                "minimum": 0,
                "description": "Confirmed + unconfirmed transactions."
              }
            }
          },
          "height": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Block the LEAF balance was read at."
          },
          "axbt": {
            "type": "object",
            "required": [
              "balance",
              "decimals"
            ],
            "additionalProperties": false,
            "description": "AXBT balance (atoms = sats).",
            "properties": {
              "balance": {
                "type": "string",
                "pattern": "^[0-9]+$",
                "description": "Integer atoms as a decimal string."
              },
              "decimals": {
                "type": "integer",
                "const": 8
              }
            }
          }
        }
      },
      "TokenStats": {
        "type": "object",
        "required": [
          "tick",
          "decimals",
          "height",
          "token",
          "operations",
          "addresses",
          "volume",
          "holders",
          "daily",
          "pool",
          "market",
          "cdp"
        ],
        "additionalProperties": false,
        "properties": {
          "tick": {
            "type": "string",
            "enum": [
              "LEAF",
              "AXBT"
            ]
          },
          "decimals": {
            "type": "integer",
            "const": 8
          },
          "height": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Index tip the operations were read at."
          },
          "token": {
            "type": "object",
            "required": [
              "type",
              "supply",
              "max_supply",
              "holders",
              "height"
            ],
            "additionalProperties": false,
            "properties": {
              "type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "supply": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^[0-9]+$",
                "description": "Atoms as a decimal string, or null."
              },
              "max_supply": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^[0-9]+$",
                "description": "Atoms as a decimal string, or null."
              },
              "holders": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "height": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "description": "PRECOP's token state (max_supply null for AXBT)."
          },
          "operations": {
            "type": "object",
            "required": [
              "total",
              "by_type",
              "last_24h",
              "last_7d",
              "window_end",
              "first",
              "last"
            ],
            "additionalProperties": false,
            "properties": {
              "total": {
                "type": "integer"
              },
              "by_type": {
                "type": "object",
                "additionalProperties": {
                  "type": "integer"
                },
                "description": "Kinds that occurred: transfer, sale, mint, swap, liquidity_deposit, liquidity_payback, vault_open, vault_repay, vault_liquidation, vault_close."
              },
              "last_24h": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "last_7d": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "window_end": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "first": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "required": [
                      "height",
                      "time",
                      "txid"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "height": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "time": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "txid": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{64}$"
                      }
                    }
                  }
                ]
              },
              "last": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "required": [
                      "height",
                      "time",
                      "txid"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "height": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "time": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "txid": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{64}$"
                      }
                    }
                  }
                ]
              }
            }
          },
          "addresses": {
            "type": "integer",
            "description": "Distinct addresses in the token's operations."
          },
          "volume": {
            "type": "object",
            "required": [
              "transferred",
              "swapped",
              "minted",
              "burned"
            ],
            "additionalProperties": false,
            "properties": {
              "transferred": {
                "type": "string",
                "pattern": "^[0-9]+$",
                "description": "Integer atoms as a decimal string."
              },
              "swapped": {
                "type": "string",
                "pattern": "^[0-9]+$",
                "description": "Integer atoms as a decimal string."
              },
              "minted": {
                "type": "string",
                "pattern": "^[0-9]+$",
                "description": "Integer atoms as a decimal string."
              },
              "burned": {
                "type": "string",
                "pattern": "^[0-9]+$",
                "description": "Integer atoms as a decimal string."
              }
            }
          },
          "holders": {
            "type": "object",
            "required": [
              "count",
              "exact",
              "top"
            ],
            "additionalProperties": false,
            "properties": {
              "count": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "exact": {
                "type": "boolean"
              },
              "top": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "address",
                    "balance"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "address": {
                      "type": "string"
                    },
                    "balance": {
                      "type": "string",
                      "pattern": "^[0-9]+$",
                      "description": "Integer atoms as a decimal string."
                    }
                  }
                }
              }
            }
          },
          "daily": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "date",
                "operations",
                "volume",
                "holders"
              ],
              "additionalProperties": false,
              "properties": {
                "date": {
                  "type": "string",
                  "format": "date"
                },
                "operations": {
                  "type": "integer"
                },
                "volume": {
                  "type": "string",
                  "pattern": "^[0-9]+$",
                  "description": "Integer atoms as a decimal string."
                },
                "holders": {
                  "type": "integer"
                }
              }
            }
          },
          "pool": {
            "type": "object",
            "required": [
              "swaps",
              "last"
            ],
            "additionalProperties": false,
            "properties": {
              "swaps": {
                "type": "integer"
              },
              "last": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "required": [
                      "height",
                      "time",
                      "txid",
                      "side",
                      "leaf",
                      "axbt"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "height": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "time": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "txid": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{64}$"
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "buy",
                          "sell"
                        ]
                      },
                      "leaf": {
                        "type": "string",
                        "pattern": "^[0-9]+$",
                        "description": "Integer atoms as a decimal string."
                      },
                      "axbt": {
                        "type": "string",
                        "pattern": "^[0-9]+$",
                        "description": "Integer atoms as a decimal string."
                      }
                    }
                  }
                ]
              }
            }
          },
          "market": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "required": [
                  "sales",
                  "volume_sat",
                  "last_unit_price_sat",
                  "last"
                ],
                "additionalProperties": false,
                "properties": {
                  "sales": {
                    "type": "integer"
                  },
                  "volume_sat": {
                    "type": "string",
                    "pattern": "^[0-9]+$",
                    "description": "Integer atoms as a decimal string."
                  },
                  "last_unit_price_sat": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9]+(\\.[0-9]{1,8})?$",
                    "description": "Satoshis per whole LEAF (price \u00f7 (amount / 10^8)), rounded half up to at most 8 decimals, trailing zeros trimmed."
                  },
                  "last": {
                    "oneOf": [
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "required": [
                          "height",
                          "time",
                          "txid"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "height": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "time": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "txid": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{64}$"
                          }
                        }
                      }
                    ]
                  }
                }
              }
            ],
            "description": "LEAF only."
          },
          "cdp": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "required": [
                  "open_debt",
                  "bad_debt",
                  "reserved",
                  "vaults",
                  "open_vaults",
                  "activation_height",
                  "collateral_locked_sats",
                  "list"
                ],
                "additionalProperties": false,
                "properties": {
                  "open_debt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9]+$",
                    "description": "Atoms as a decimal string, or null."
                  },
                  "bad_debt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9]+$",
                    "description": "Atoms as a decimal string, or null."
                  },
                  "reserved": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^[0-9]+$",
                    "description": "Atoms as a decimal string, or null."
                  },
                  "vaults": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "open_vaults": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "activation_height": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "collateral_locked_sats": {
                    "type": "string",
                    "pattern": "^[0-9]+$",
                    "description": "Integer atoms as a decimal string."
                  },
                  "list": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "funding_txid",
                        "owner",
                        "collateral_sats",
                        "debt",
                        "status",
                        "liquidation_height",
                        "settlement_account",
                        "opened_height",
                        "repaid_height",
                        "closed_height",
                        "route"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "funding_txid": {
                          "type": "string",
                          "pattern": "^[0-9a-f]{64}$"
                        },
                        "owner": {
                          "type": "string"
                        },
                        "collateral_sats": {
                          "type": "string",
                          "pattern": "^[0-9]+$",
                          "description": "Integer atoms as a decimal string."
                        },
                        "debt": {
                          "type": "string",
                          "pattern": "^[0-9]+$",
                          "description": "Integer atoms as a decimal string."
                        },
                        "status": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "liquidation_height": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "settlement_account": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "opened_height": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "repaid_height": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "closed_height": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "route": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            ],
            "description": "AXBT only."
          }
        },
        "description": "Statistics of a token at the index tip."
      },
      "OperationVault": {
        "type": "object",
        "required": [
          "funding_txid",
          "owner",
          "collateral_sats",
          "debt",
          "status",
          "liquidation_height",
          "settlement_account",
          "route"
        ],
        "additionalProperties": false,
        "properties": {
          "funding_txid": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "owner": {
            "type": "string"
          },
          "collateral_sats": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Integer atoms as a decimal string."
          },
          "debt": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Integer atoms as a decimal string."
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "As PRECOP reports the vault now (open, closed, unbacked_bad_debt\u2026)."
          },
          "liquidation_height": {
            "type": [
              "integer",
              "null"
            ]
          },
          "settlement_account": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where a repayment waits until the close burns it."
          },
          "route": {
            "type": [
              "string",
              "null"
            ],
            "description": "owner_repay or operator_liquidation (repay / close)."
          }
        },
        "description": "An AXBT vault (CDP): BTC collateral locked, its AXBT debt."
      },
      "OperationMarket": {
        "type": "object",
        "required": [
          "price_sat",
          "platform_fee_sat",
          "network_fee_sat",
          "buyer_paid_sat",
          "unit_price_sat"
        ],
        "additionalProperties": false,
        "properties": {
          "price_sat": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]+$",
            "description": "Price paid to the seller: seller payment output minus the seller's two carrier inputs."
          },
          "platform_fee_sat": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]+$",
            "description": "Marketplace fee output."
          },
          "network_fee_sat": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]+$",
            "description": "Bitcoin transaction fee (paid by the buyer)."
          },
          "buyer_paid_sat": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]+$",
            "description": "Total cost to the buyer: price + platform fee + network fee."
          },
          "unit_price_sat": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]+(\\.[0-9]{1,8})?$",
            "description": "Satoshis per whole LEAF (price \u00f7 (amount / 10^8)), rounded half up to at most 8 decimals, trailing zeros trimmed."
          }
        },
        "description": "Economics of a marketplace settlement, in satoshis."
      },
      "OperationSwap": {
        "type": "object",
        "required": [
          "pool",
          "side",
          "input_tick",
          "input_atoms",
          "output_tick",
          "output_atoms",
          "fee_atoms"
        ],
        "additionalProperties": false,
        "properties": {
          "pool": {
            "type": "string",
            "const": "SWAP_POOL:4:AXBT:4:LEAF",
            "description": "The pool account (a ledger account, not a Bitcoin address); `from` or `to` is null for it."
          },
          "side": {
            "type": "string",
            "enum": [
              "buy",
              "sell"
            ],
            "description": "buy: the owner received LEAF; sell: it paid LEAF."
          },
          "input_tick": {
            "type": "string",
            "enum": [
              "AXBT",
              "LEAF"
            ]
          },
          "input_atoms": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Atoms the owner paid into the pool (8 decimals)."
          },
          "output_tick": {
            "type": "string",
            "enum": [
              "AXBT",
              "LEAF"
            ]
          },
          "output_atoms": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Atoms the owner received from the pool (8 decimals)."
          },
          "fee_atoms": {
            "type": "string",
            "pattern": "^[0-9]+$",
            "description": "Pool fee, in `input_tick` atoms, kept for the liquidity."
          }
        },
        "description": "A swap through the AXBT/LEAF pool of the PRECOP v7 ledger."
      },
      "OperationLiquidity": {
        "type": "object",
        "required": [
          "pool",
          "action",
          "creates_pool",
          "deposit",
          "lock_blocks",
          "maturity_height",
          "credited",
          "fees"
        ],
        "additionalProperties": false,
        "properties": {
          "pool": {
            "type": "string",
            "const": "SWAP_POOL:4:AXBT:4:LEAF"
          },
          "action": {
            "type": "string",
            "enum": [
              "deposit",
              "payback"
            ]
          },
          "creates_pool": {
            "type": "boolean",
            "description": "The pool was empty before: this deposit sets its price."
          },
          "deposit": {
            "type": "object",
            "required": [
              "AXBT",
              "LEAF"
            ],
            "additionalProperties": false,
            "properties": {
              "AXBT": {
                "type": "string",
                "pattern": "^[0-9]+$",
                "description": "Integer atoms as a decimal string."
              },
              "LEAF": {
                "type": "string",
                "pattern": "^[0-9]+$",
                "description": "Integer atoms as a decimal string."
              }
            }
          },
          "lock_blocks": {
            "type": "integer",
            "minimum": 0
          },
          "maturity_height": {
            "type": "integer",
            "description": "Block where the pool pays the position back."
          },
          "credited": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "required": [
                  "AXBT",
                  "LEAF"
                ],
                "additionalProperties": false,
                "properties": {
                  "AXBT": {
                    "type": "string",
                    "pattern": "^[0-9]+$",
                    "description": "Integer atoms as a decimal string."
                  },
                  "LEAF": {
                    "type": "string",
                    "pattern": "^[0-9]+$",
                    "description": "Integer atoms as a decimal string."
                  }
                }
              }
            ],
            "description": "Payback: what the pool credited the owner (its share, fees included); null for a deposit."
          },
          "fees": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "required": [
                  "AXBT",
                  "LEAF"
                ],
                "additionalProperties": false,
                "properties": {
                  "AXBT": {
                    "type": "string",
                    "pattern": "^[0-9]+$",
                    "description": "Integer atoms as a decimal string."
                  },
                  "LEAF": {
                    "type": "string",
                    "pattern": "^[0-9]+$",
                    "description": "Integer atoms as a decimal string."
                  }
                }
              }
            ],
            "description": "Payback: the fees earned, included in `credited`; null for a deposit."
          }
        },
        "description": "A liquidity deposit into the AXBT/LEAF pool (confirmed by the pool reserves of its block), or its payback at maturity (no transaction of its own: `txid` is the deposit's, the block is the settlement block)."
      },
      "DetailsMarket": {
        "type": "object",
        "required": [
          "seller",
          "buyer",
          "amount",
          "decimals",
          "price_sat",
          "platform_fee_sat",
          "network_fee_sat",
          "buyer_paid_sat",
          "seller_received_sat",
          "unit_price_sat"
        ],
        "additionalProperties": false,
        "properties": {
          "seller": {
            "type": [
              "string",
              "null"
            ],
            "description": "Seller address (the two carrier inputs)."
          },
          "buyer": {
            "type": [
              "string",
              "null"
            ],
            "description": "Buyer address (receives the LEAF)."
          },
          "amount": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]+$",
            "description": "LEAF atoms of the payload."
          },
          "decimals": {
            "type": "integer",
            "const": 8
          },
          "price_sat": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]+$",
            "description": "Price paid to the seller: seller payment output minus the seller's two carrier inputs."
          },
          "platform_fee_sat": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]+$",
            "description": "Marketplace fee output."
          },
          "network_fee_sat": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]+$",
            "description": "Bitcoin transaction fee (paid by the buyer)."
          },
          "buyer_paid_sat": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]+$",
            "description": "Total cost to the buyer: price + platform fee + network fee."
          },
          "seller_received_sat": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]+$",
            "description": "What the seller received (= price)."
          },
          "unit_price_sat": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]+(\\.[0-9]{1,8})?$",
            "description": "Satoshis per whole LEAF (price \u00f7 (amount / 10^8)), rounded half up to at most 8 decimals, trailing zeros trimmed."
          }
        },
        "description": "Marketplace settlement: who sold, who bought, and what each side paid or received."
      },
      "TransactionDetails": {
        "type": "object",
        "required": [
          "txid",
          "status",
          "decoded_from",
          "template",
          "operations",
          "block",
          "confirmations",
          "version",
          "locktime",
          "size",
          "vsize",
          "weight",
          "fee_sat",
          "inputs",
          "outputs",
          "market",
          "notes"
        ],
        "additionalProperties": false,
        "properties": {
          "txid": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "status": {
            "type": "string",
            "enum": [
              "accepted",
              "not_leaf"
            ],
            "description": "accepted: the indexer applied a LEAF operation of this transaction."
          },
          "decoded_from": {
            "type": "string",
            "enum": [
              "node",
              "mempool.space"
            ]
          },
          "template": {
            "type": "string",
            "enum": [
              "transfer",
              "market",
              "mint",
              "swap",
              "liquidity",
              "vault",
              "none"
            ],
            "description": "none: no CRC-20 payload."
          },
          "operations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Operation"
            },
            "description": "Accepted LEAF operations; empty when `not_leaf`."
          },
          "block": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "required": [
                  "height",
                  "hash",
                  "time"
                ],
                "additionalProperties": false,
                "properties": {
                  "height": {
                    "type": "integer"
                  },
                  "hash": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "time": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  }
                }
              }
            ],
            "description": "null while unconfirmed."
          },
          "confirmations": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "description": "Relative to the indexer tip; null when unconfirmed or newer than the tip."
          },
          "version": {
            "type": "integer"
          },
          "locktime": {
            "type": "integer",
            "minimum": 0
          },
          "size": {
            "type": "integer"
          },
          "vsize": {
            "type": "integer"
          },
          "weight": {
            "type": "integer"
          },
          "fee_sat": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]+$",
            "description": "Satoshis as a decimal string; null when a value it depends on is unknown."
          },
          "inputs": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "index",
                "txid",
                "vout",
                "address",
                "value_sat",
                "type",
                "sighash",
                "spend",
                "role"
              ],
              "additionalProperties": false,
              "properties": {
                "index": {
                  "type": "integer",
                  "minimum": 0
                },
                "txid": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "pattern": "^[0-9a-f]{64}$",
                  "description": "Spent output (null: coinbase)."
                },
                "vout": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 0
                },
                "address": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "value_sat": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "pattern": "^[0-9]+$",
                  "description": "Satoshis as a decimal string; null when a value it depends on is unknown."
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "p2pkh",
                    "p2sh",
                    "p2wpkh",
                    "p2wsh",
                    "p2tr",
                    "op_return",
                    "p2pk",
                    "multisig",
                    "anchor",
                    "witness_unknown",
                    "nonstandard",
                    null
                  ]
                },
                "sighash": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "DEFAULT",
                    "ALL",
                    "NONE",
                    "SINGLE",
                    "ALL|ANYONECANPAY",
                    "NONE|ANYONECANPAY",
                    "SINGLE|ANYONECANPAY",
                    null
                  ],
                  "description": "Signature hash type read from the witness; null when unreadable (non-witness inputs)."
                },
                "spend": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "key_path",
                    "script_path",
                    null
                  ],
                  "description": "Taproot spend path; null for other input types."
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "seller_carrier",
                    "platform_anchor",
                    "buyer_funding",
                    "sender",
                    "fee_input",
                    "payer",
                    "coinbase",
                    "swap_owner",
                    "liquidity_owner",
                    "vault_input",
                    "other"
                  ]
                }
              }
            }
          },
          "outputs": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "index",
                "address",
                "value_sat",
                "type",
                "role",
                "payload"
              ],
              "additionalProperties": false,
              "properties": {
                "index": {
                  "type": "integer",
                  "minimum": 0
                },
                "address": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "value_sat": {
                  "type": "string",
                  "pattern": "^[0-9]+$",
                  "description": "Satoshis."
                },
                "type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "p2pkh",
                    "p2sh",
                    "p2wpkh",
                    "p2wsh",
                    "p2tr",
                    "op_return",
                    "p2pk",
                    "multisig",
                    "anchor",
                    "witness_unknown",
                    "nonstandard",
                    null
                  ]
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "seller_payment",
                    "payload",
                    "buyer_receiver",
                    "platform_fee",
                    "anchor_return",
                    "buyer_change",
                    "receiver",
                    "change",
                    "legacy_intent",
                    "legacy_burn",
                    "soft_covenant",
                    "treasury",
                    "other"
                  ]
                },
                "payload": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "description": "Parsed JSON of an OP_RETURN that carries a flat JSON object (the CRC-20 payload, a legacy intent)."
                }
              }
            }
          },
          "market": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DetailsMarket"
              }
            ]
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Explanations of anomalies (for example a settlement that was not applied)."
          }
        }
      },
      "Transaction": {
        "type": "object",
        "required": [
          "txid",
          "operations"
        ],
        "additionalProperties": false,
        "properties": {
          "txid": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "operations": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/Operation"
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "additionalProperties": false,
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false,
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "invalid_address",
                  "invalid_txid",
                  "invalid_cursor",
                  "invalid_limit",
                  "invalid_query",
                  "not_found",
                  "method_not_allowed",
                  "unavailable",
                  "indexer_unavailable",
                  "rate_limited",
                  "invalid_api_key"
                ]
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Optional: a larger quota than the anonymous one, counted per key."
      },
      "ApiKeyQuery": {
        "type": "apiKey",
        "in": "query",
        "name": "api_key",
        "description": "The same key as a query parameter (prefer the header)."
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid parameter: invalid_address, invalid_txid, invalid_cursor, invalid_limit or invalid_query.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "invalid_address",
                "message": "Not a mainnet Bitcoin address."
              }
            }
          }
        }
      },
      "NotFound": {
        "description": "not_found: no accepted LEAF operation in this transaction (details: a transaction neither the node nor mempool.space knows), or an unknown route.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "not_found",
                "message": "No accepted LEAF operation in this transaction (unknown, unconfirmed or not a valid transfer)."
              }
            }
          }
        }
      },
      "InvalidApiKey": {
        "description": "invalid_api_key: the key sent is unknown (revoked or mistyped); without a key the anonymous quota applies.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "invalid_api_key",
                "message": "Unknown API key: remove it to use the anonymous quota (https://crc20.org/docs#limits)."
              }
            }
          }
        }
      },
      "RateLimited": {
        "description": "rate_limited: quota exceeded; retry after `Retry-After` seconds. The quota is in `RateLimit-Policy` (`300;w=60` = 300 requests per 60 s).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "rate_limited",
                "message": "Too many requests: slow down, or ask for an API key (https://crc20.org/docs#limits)."
              }
            }
          }
        }
      },
      "Unavailable": {
        "description": "unavailable: indexer unreachable or catching up, or the API is busy (then `Retry-After: 1`). Retry later; stale data is never served as current.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": {
                "code": "unavailable",
                "message": "The LEAF indexer is unavailable. Retry later."
              }
            }
          }
        }
      }
    }
  }
}
