{
  "openapi": "3.1.0",
  "info": {
    "title": "Ankr Advanced API",
    "version": "1.0.0",
    "description": "**Ankr Advanced API** turns raw chain data into ready-made answers — NFTs, token balances and prices, transactions, and logs — across **20+ EVM chains** from a single multichain endpoint. Every method is a JSON-RPC 2.0 `POST`; the `method` field selects the operation, so one endpoint and one API key cover every call below.\n\n**Endpoint:** `https://rpc.ankr.com/multichain/<API_KEY>`\n\n### Method groups\n\n- **[Query API](https://www.ankr.com/docs/advanced-api/query-methods/)** — blocks, transactions, logs, chain stats, and cross-chain wallet activity.\n- **[Token API](https://www.ankr.com/docs/advanced-api/token-methods/)** — ERC-20 and native balances, USD prices, holder rosters, transfers, and currencies.\n- **[NFT API](https://www.ankr.com/docs/advanced-api/nft-methods/)** — ERC-721 / ERC-1155 / ENS / POAP holdings, collection holders, transfers, and metadata.\n\nPick a method from the sidebar to see its parameters, responses, and a live **Try It** panel.\n\n### Start building\n\nNew to the Advanced API? Read the **[overview](https://www.ankr.com/docs/advanced-api/overview/)** and **[quickstart](https://www.ankr.com/docs/advanced-api/quickstart/overview/)**, or use a client SDK — **[JavaScript](https://www.ankr.com/docs/advanced-api/javascript-sdk/)**, **[Python](https://www.ankr.com/docs/advanced-api/python-sdk/)**, **[React Hooks](https://www.ankr.com/docs/advanced-api/react-hooks/)**. See **[pricing](https://www.ankr.com/docs/advanced-api/pricing/)** for limits and cost.\n\n### Use the spec directly\n\nDownload the full **OpenAPI 3.1** definition and import it into Postman, Insomnia, or your code generator: **[OpenAPI YAML](https://www.ankr.com/docs/openapi/ankr-advanced-api.yaml)** · **[JSON](https://www.ankr.com/docs/openapi/ankr-advanced-api.json)**.\n\nGet an API key at https://www.ankr.com/rpc/.\n\n> **Demo key.** Code samples and the interactive panels ship with a shared public demo key so every request works out of the box. It is heavily rate-limited and some methods are restricted on it — get your own API key at https://www.ankr.com/rpc/ for real usage. The key is part of the endpoint URL path (`https://rpc.ankr.com/multichain/<API_KEY>`); no auth header is needed.",
    "contact": {
      "name": "Ankr Support",
      "url": "https://www.ankr.com/support/"
    },
    "license": {
      "name": "Ankr Terms of Service",
      "url": "https://www.ankr.com/terms/"
    }
  },
  "servers": [
    {
      "url": "https://rpc.ankr.com/multichain/{API_KEY}",
      "description": "Ankr Multichain JSON-RPC endpoint",
      "variables": {
        "API_KEY": {
          "default": "569ca1f392f7d3d0bb1073a1173ecb649af1d9249231fe59fa95db19d5ae41fe",
          "description": "Pre-filled with Ankr's public demo key (shared, rate-limited — fine for trying calls from the docs). For production, replace it with your own key from https://www.ankr.com/rpc/."
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Query API",
      "description": "General-purpose chain query endpoints — blocks, transactions, logs,\nchain-level stats, account interactions."
    },
    {
      "name": "Token API",
      "description": "ERC-20 and native-token enrichment endpoints — wallet balances,\nUSD prices, holder rosters, transfer history, and chain currencies."
    },
    {
      "name": "NFT API",
      "description": "ERC-721 / ERC-1155 / ENS / POAP enrichment endpoints — wallet NFT\nholdings, collection holders, transfer history, and per-token metadata."
    }
  ],
  "paths": {
    "/?ankr_getAccountBalance": {
      "post": {
        "operationId": "ankr_getAccountBalance",
        "tags": [
          "Token API"
        ],
        "summary": "Get wallet token balances across chains",
        "description": "Returns the **total native + ERC-20 balance** of a wallet across one or more supported EVM chains, with USD valuations computed by Ankr's pricing service. Each asset includes contract address, decimals, raw integer balance, and a normalized human-readable balance.\n\nPass `walletAddress` (hex address, or ENS name on Ethereum). Scope to specific chains with the `blockchain` array, or omit it to query all supported chains. Filter by `onlyWhitelisted: true` (default) to limit results to tokens indexed on CoinGecko, or set to `false` for the full ERC-20 inventory the wallet has touched.\n\nPagination via `pageSize` + `pageToken`. The endpoint is part of the **Token API** product (700 compute units per call, $0.00007 at base rate).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "jsonrpc",
                  "method",
                  "params"
                ],
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "Client-supplied request ID echoed in the response.",
                    "examples": [
                      1
                    ]
                  },
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ],
                    "examples": [
                      "2.0"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "ankr_getAccountBalance"
                    ],
                    "examples": [
                      "ankr_getAccountBalance"
                    ]
                  },
                  "params": {
                    "type": "object",
                    "required": [
                      "walletAddress"
                    ],
                    "properties": {
                      "walletAddress": {
                        "type": "string",
                        "description": "Wallet to query. Hex address (`0x…`) or ENS name on Ethereum (e.g. `vitalik.eth`).",
                        "examples": [
                          "0x18b2a687610328590bc8f2e5fedde3b582a49cda"
                        ]
                      },
                      "blockchain": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "arbitrum",
                            "avalanche",
                            "base",
                            "bsc",
                            "eth",
                            "fantom",
                            "flare",
                            "gnosis",
                            "linea",
                            "optimism",
                            "polygon",
                            "scroll",
                            "stellar",
                            "story_mainnet",
                            "taiko",
                            "telos",
                            "xai",
                            "xlayer",
                            "avalanche_fuji",
                            "base_sepolia",
                            "eth_holesky",
                            "eth_sepolia",
                            "optimism_testnet",
                            "polygon_amoy",
                            "story_aeneid_testnet"
                          ]
                        },
                        "description": "Optional. One or more chains to query. Omit for all supported chains.",
                        "examples": [
                          [
                            "eth",
                            "bsc",
                            "polygon"
                          ]
                        ]
                      },
                      "nativeFirst": {
                        "type": "boolean",
                        "description": "Sort native tokens first when true.",
                        "default": false
                      },
                      "onlyWhitelisted": {
                        "type": "boolean",
                        "description": "Restrict to tokens listed on CoinGecko. Defaults to true; set false for the full ERC-20 inventory.",
                        "default": true
                      },
                      "pageSize": {
                        "type": "integer",
                        "description": "Number of assets per page. Default is no pagination.",
                        "minimum": 1
                      },
                      "pageToken": {
                        "type": "string",
                        "description": "Opaque page token from a prior response's `nextPageToken`."
                      }
                    }
                  }
                },
                "examples": [
                  {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getAccountBalance",
                    "params": {
                      "walletAddress": "0x18b2a687610328590bc8f2e5fedde3b582a49cda",
                      "blockchain": [
                        "eth",
                        "bsc",
                        "polygon"
                      ]
                    }
                  }
                ]
              },
              "examples": {
                "Multi-chain wallet": {
                  "summary": "Multi-chain balance with chain filter",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getAccountBalance",
                    "params": {
                      "walletAddress": "0x18b2a687610328590bc8f2e5fedde3b582a49cda",
                      "blockchain": [
                        "eth",
                        "bsc",
                        "polygon"
                      ]
                    }
                  }
                },
                "ENS wallet, all chains": {
                  "summary": "ENS name, no chain filter",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getAccountBalance",
                    "params": {
                      "walletAddress": "vitalik.eth"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. JSON-RPC `result` envelope contains the asset list, total USD valuation, and total count. Note: JSON-RPC errors (e.g. `-32602 invalid params`) are also returned with HTTP 200 — clients must check for `error` in the response body.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "jsonrpc",
                    "result"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "jsonrpc": {
                      "type": "string",
                      "enum": [
                        "2.0"
                      ]
                    },
                    "result": {
                      "type": "object",
                      "required": [
                        "totalBalanceUsd",
                        "totalCount",
                        "assets"
                      ],
                      "properties": {
                        "totalBalanceUsd": {
                          "type": "string",
                          "description": "Sum of all asset USD values for the wallet, as a decimal string."
                        },
                        "totalCount": {
                          "type": "integer",
                          "description": "Total number of ERC-20 and native-token holdings."
                        },
                        "nextPageToken": {
                          "type": "string",
                          "description": "Page token for subsequent pages. Empty when no more pages remain."
                        },
                        "assets": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "description": "Asset entries. Native token for the chain plus any ERC-20 holdings.",
                          "items": {
                            "type": "object",
                            "required": [
                              "blockchain",
                              "tokenName",
                              "tokenSymbol",
                              "tokenDecimals",
                              "tokenType",
                              "holderAddress",
                              "balance",
                              "balanceRawInteger",
                              "balanceUsd",
                              "tokenPrice",
                              "thumbnail"
                            ],
                            "properties": {
                              "blockchain": {
                                "type": "string",
                                "enum": [
                                  "arbitrum",
                                  "avalanche",
                                  "base",
                                  "bsc",
                                  "eth",
                                  "fantom",
                                  "flare",
                                  "gnosis",
                                  "linea",
                                  "optimism",
                                  "polygon",
                                  "scroll",
                                  "stellar",
                                  "story_mainnet",
                                  "taiko",
                                  "telos",
                                  "xai",
                                  "xlayer",
                                  "avalanche_fuji",
                                  "base_sepolia",
                                  "eth_holesky",
                                  "eth_sepolia",
                                  "optimism_testnet",
                                  "polygon_amoy",
                                  "story_aeneid_testnet"
                                ]
                              },
                              "tokenName": {
                                "type": "string"
                              },
                              "tokenSymbol": {
                                "type": "string"
                              },
                              "tokenDecimals": {
                                "type": "integer"
                              },
                              "tokenType": {
                                "type": "string",
                                "description": "`NATIVE` for the chain's native asset, or the ERC token standard (`ERC20`, …)."
                              },
                              "holderAddress": {
                                "type": "string",
                                "description": "Address of the wallet that holds the asset."
                              },
                              "contractAddress": {
                                "type": "string",
                                "description": "ERC-20 contract address. Absent for native tokens."
                              },
                              "balance": {
                                "type": "string",
                                "description": "Human-readable balance (decimal string)."
                              },
                              "balanceRawInteger": {
                                "type": "string",
                                "description": "Raw integer balance (`balance × 10^decimals`)."
                              },
                              "balanceUsd": {
                                "type": "string",
                                "description": "USD value of the holding."
                              },
                              "tokenPrice": {
                                "type": "string",
                                "description": "Current unit price in USD."
                              },
                              "thumbnail": {
                                "type": "string",
                                "description": "URL to the token logo."
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Multi-chain balance": {
                    "value": {
                      "id": 1,
                      "jsonrpc": "2.0",
                      "result": {
                        "totalBalanceUsd": "398857.927815440716633863",
                        "totalCount": 3,
                        "assets": [
                          {
                            "blockchain": "bsc",
                            "tokenName": "Binance Smart Chain",
                            "tokenSymbol": "BNB",
                            "tokenDecimals": 18,
                            "tokenType": "NATIVE",
                            "holderAddress": "0x18b2a687610328590bc8f2e5fedde3b582a49cda",
                            "balance": "1608.434310817656690616",
                            "balanceRawInteger": "1608434310817656690616",
                            "balanceUsd": "394175.866488091069305026",
                            "tokenPrice": "245.068053968402063819",
                            "thumbnail": "https://www.ankr.com/protocol/static/media/bsc.e1bfba92.svg"
                          },
                          {
                            "blockchain": "eth",
                            "tokenName": "Ethereum",
                            "tokenSymbol": "ETH",
                            "tokenDecimals": 18,
                            "tokenType": "NATIVE",
                            "holderAddress": "0x18b2a687610328590bc8f2e5fedde3b582a49cda",
                            "balance": "1.106063312048596845",
                            "balanceRawInteger": "1106063312048596845",
                            "balanceUsd": "1339.617032917654314456",
                            "tokenPrice": "1211.157641994725049028",
                            "thumbnail": "https://www.ankr.com/protocol/static/media/eth.3ee8ddd4.svg"
                          },
                          {
                            "blockchain": "polygon",
                            "tokenName": "Minereum Polygon",
                            "tokenSymbol": "MNEP",
                            "tokenDecimals": 8,
                            "tokenType": "ERC20",
                            "holderAddress": "0x18b2a687610328590bc8f2e5fedde3b582a49cda",
                            "contractAddress": "0x0b91b07beb67333225a5ba0259d55aee10e3a578",
                            "balance": "300000",
                            "balanceRawInteger": "30000000000000",
                            "balanceUsd": "1244.852927117672699968",
                            "tokenPrice": "0.004149509757058909",
                            "thumbnail": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x426CA1eA2406c07d75Db9585F22781c096e3d0E0/logo.png"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — malformed JSON-RPC envelope or invalid `params`. The gateway rejects before the JSON-RPC layer processes the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcError"
                },
                "examples": {
                  "Invalid Params": {
                    "value": {
                      "jsonrpc": "2.0",
                      "id": 1,
                      "error": {
                        "code": -32602,
                        "message": "Invalid params"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — missing or invalid API key in the server URL path. Verify that `{API_KEY}` is set to a valid project key."
          },
          "429": {
            "description": "Too Many Requests — the API key has exceeded its rate or quota limits. Back off and retry; consider upgrading the Premium tier for higher limits.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error — unexpected condition. Retry with exponential backoff; if it persists, file a ticket at https://www.ankr.com/support/."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X POST \"https://rpc.ankr.com/multichain/$ANKR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"method\": \"ankr_getAccountBalance\",\n    \"params\": {\n      \"walletAddress\": \"0x18b2a687610328590bc8f2e5fedde3b582a49cda\",\n      \"blockchain\": [\"eth\", \"bsc\", \"polygon\"]\n    }\n  }'"
          },
          {
            "lang": "javascript",
            "label": "JavaScript (fetch)",
            "source": "const apiKey = process.env.ANKR_API_KEY;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getAccountBalance',\n    params: {\n      walletAddress: '0x18b2a687610328590bc8f2e5fedde3b582a49cda',\n      blockchain: ['eth', 'bsc', 'polygon'],\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = await res.json();\nconsole.log(data.result);"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import os\n\nimport requests\n\nresponse = requests.post(\n    f\"https://rpc.ankr.com/multichain/{os.environ['ANKR_API_KEY']}\",\n    json={\n        \"jsonrpc\": \"2.0\",\n        \"id\": 1,\n        \"method\": \"ankr_getAccountBalance\",\n        \"params\": {\n            \"walletAddress\": \"0x18b2a687610328590bc8f2e5fedde3b582a49cda\",\n            \"blockchain\": [\"eth\", \"bsc\", \"polygon\"],\n        },\n    },\n    timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json()[\"result\"])"
          },
          {
            "lang": "go",
            "label": "Go (net/http)",
            "source": "package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"os\"\n)\n\nfunc main() {\n    body, _ := json.Marshal(map[string]any{\n        \"jsonrpc\": \"2.0\",\n        \"id\":      1,\n        \"method\":  \"ankr_getAccountBalance\",\n        \"params\":  map[string]any{\n            \"walletAddress\": \"0x18b2a687610328590bc8f2e5fedde3b582a49cda\",\n            \"blockchain\":    []string{\"eth\", \"bsc\", \"polygon\"},\n        },\n    })\n    url := fmt.Sprintf(\"https://rpc.ankr.com/multichain/%s\", os.Getenv(\"ANKR_API_KEY\"))\n    resp, err := http.Post(url, \"application/json\", bytes.NewReader(body))\n    if err != nil { panic(err) }\n    defer resp.Body.Close()\n    out, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(out))\n}"
          },
          {
            "lang": "typescript",
            "label": "TypeScript (fetch + types)",
            "source": "interface AccountAsset {\n  blockchain: string;\n  tokenName: string;\n  tokenSymbol: string;\n  tokenDecimals: number;\n  tokenType: 'NATIVE' | 'ERC20' | string;\n  holderAddress: string;\n  contractAddress?: string;\n  balance: string;\n  balanceRawInteger: string;\n  balanceUsd: string;\n  tokenPrice: string;\n  thumbnail: string;\n}\n\ninterface Result {\n  totalBalanceUsd: string;\n  totalCount: number;\n  assets: AccountAsset[];\n  nextPageToken?: string;\n}\n\ninterface JsonRpcResponse<T> {\n  jsonrpc: '2.0';\n  id: number | string | null;\n  result?: T;\n  error?: { code: number; message: string; data?: unknown };\n}\n\nconst apiKey = process.env.ANKR_API_KEY!;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getAccountBalance',\n    params: {\n      walletAddress: '0x18b2a687610328590bc8f2e5fedde3b582a49cda',\n      blockchain: ['eth', 'bsc', 'polygon'],\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = (await res.json()) as JsonRpcResponse<Result>;\nif (data.error) throw new Error(data.error.message);\nconsole.log(data.result);"
          }
        ]
      }
    },
    "/?ankr_getBlockchainStats": {
      "post": {
        "operationId": "ankr_getBlockchainStats",
        "tags": [
          "Query API"
        ],
        "summary": "Get per-chain stats: latest block, totals, native coin USD price",
        "description": "Returns headline statistics for one or more chains: latest block number, average block time, total transactions and events since genesis, and the current native coin USD price.\n\nPass a `blockchain` array to scope the query; omit or pass an empty array for all supported chains. Useful for hero banners, homepage tiles, and basic network health checks.\n\nPart of the **Query API** product (700 compute units per call, $0.00007 at base rate).\n\n> **Plan availability.** This method is restricted on the shared demo key (`-32075 Method disabled, reason: restricted by blockchain schema`). Use your own API key to call it.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "jsonrpc",
                  "method",
                  "params"
                ],
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "Client-supplied request ID echoed in the response.",
                    "examples": [
                      1
                    ]
                  },
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ],
                    "examples": [
                      "2.0"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "ankr_getBlockchainStats"
                    ],
                    "examples": [
                      "ankr_getBlockchainStats"
                    ]
                  },
                  "params": {
                    "type": "object",
                    "properties": {
                      "blockchain": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "arbitrum",
                            "avalanche",
                            "base",
                            "bsc",
                            "eth",
                            "fantom",
                            "flare",
                            "gnosis",
                            "linea",
                            "optimism",
                            "polygon",
                            "scroll",
                            "stellar",
                            "story_mainnet",
                            "taiko",
                            "telos",
                            "xai",
                            "xlayer",
                            "avalanche_fuji",
                            "base_sepolia",
                            "eth_holesky",
                            "eth_sepolia",
                            "optimism_testnet",
                            "polygon_amoy",
                            "story_aeneid_testnet"
                          ]
                        },
                        "description": "Chains to query. Omit or pass an empty array to query all supported chains.",
                        "examples": [
                          [
                            "bsc",
                            "polygon"
                          ]
                        ]
                      }
                    }
                  }
                },
                "examples": [
                  {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getBlockchainStats",
                    "params": {
                      "blockchain": [
                        "bsc",
                        "polygon"
                      ]
                    }
                  }
                ]
              },
              "examples": {
                "Two chains": {
                  "summary": "BSC + Polygon",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getBlockchainStats",
                    "params": {
                      "blockchain": [
                        "bsc",
                        "polygon"
                      ]
                    }
                  }
                },
                "All chains": {
                  "summary": "All supported chains",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getBlockchainStats",
                    "params": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. JSON-RPC `result` contains the `stats` array. JSON-RPC errors are returned with HTTP 200; check the response body for an `error` key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "jsonrpc",
                    "result"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "jsonrpc": {
                      "type": "string",
                      "enum": [
                        "2.0"
                      ]
                    },
                    "result": {
                      "type": "object",
                      "required": [
                        "stats"
                      ],
                      "properties": {
                        "stats": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "items": {
                            "type": "object",
                            "required": [
                              "blockchain",
                              "totalTransactionsCount",
                              "totalEventsCount",
                              "latestBlockNumber",
                              "blockTimeMs",
                              "nativeCoinUsdPrice"
                            ],
                            "properties": {
                              "blockTimeMs": {
                                "type": "integer",
                                "minimum": 0,
                                "description": "Average block time in milliseconds."
                              },
                              "blockchain": {
                                "type": "string"
                              },
                              "latestBlockNumber": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "nativeCoinUsdPrice": {
                                "type": "string",
                                "description": "Native coin USD price as a decimal string."
                              },
                              "totalEventsCount": {
                                "type": "integer",
                                "minimum": 0,
                                "description": "All events emitted since genesis."
                              },
                              "totalTransactionsCount": {
                                "type": "integer",
                                "minimum": 0,
                                "description": "All transactions since genesis."
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Two chains": {
                    "value": {
                      "id": 1,
                      "jsonrpc": "2.0",
                      "result": {
                        "stats": [
                          {
                            "blockTimeMs": 3000,
                            "blockchain": "bsc",
                            "latestBlockNumber": 24274429,
                            "nativeCoinUsdPrice": "245.153233940444766334",
                            "totalEventsCount": 11643833187,
                            "totalTransactionsCount": 3764960943
                          },
                          {
                            "blockTimeMs": 4000,
                            "blockchain": "polygon",
                            "latestBlockNumber": 37350500,
                            "nativeCoinUsdPrice": "0.803307052493372837",
                            "totalEventsCount": 8710949888,
                            "totalTransactionsCount": 2318753716
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — malformed JSON-RPC envelope or invalid `params`. The gateway rejects before the JSON-RPC layer processes the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcError"
                },
                "examples": {
                  "Invalid Params": {
                    "value": {
                      "jsonrpc": "2.0",
                      "id": 1,
                      "error": {
                        "code": -32602,
                        "message": "Invalid params"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — missing or invalid API key in the server URL path. Verify that `{API_KEY}` is set to a valid project key."
          },
          "429": {
            "description": "Too Many Requests — the API key has exceeded its rate or quota limits. Back off and retry; consider upgrading the Premium tier for higher limits.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error — unexpected condition. Retry with exponential backoff; if it persists, file a ticket at https://www.ankr.com/support/."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X POST \"https://rpc.ankr.com/multichain/$ANKR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"method\": \"ankr_getBlockchainStats\",\n    \"params\": {\n      \"blockchain\": [\"bsc\", \"polygon\"]\n    }\n  }'"
          },
          {
            "lang": "javascript",
            "label": "JavaScript (fetch)",
            "source": "const apiKey = process.env.ANKR_API_KEY;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getBlockchainStats',\n    params: {\n      blockchain: ['bsc', 'polygon'],\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = await res.json();\nconsole.log(data.result);"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import os\n\nimport requests\n\nresponse = requests.post(\n    f\"https://rpc.ankr.com/multichain/{os.environ['ANKR_API_KEY']}\",\n    json={\n        \"jsonrpc\": \"2.0\",\n        \"id\": 1,\n        \"method\": \"ankr_getBlockchainStats\",\n        \"params\": {\n            \"blockchain\": [\"bsc\", \"polygon\"],\n        },\n    },\n    timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json()[\"result\"])"
          },
          {
            "lang": "go",
            "label": "Go (net/http)",
            "source": "package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"os\"\n)\n\nfunc main() {\n    body, _ := json.Marshal(map[string]any{\n        \"jsonrpc\": \"2.0\",\n        \"id\":      1,\n        \"method\":  \"ankr_getBlockchainStats\",\n        \"params\":  map[string]any{\n            \"blockchain\": []string{\"bsc\", \"polygon\"},\n        },\n    })\n    url := fmt.Sprintf(\"https://rpc.ankr.com/multichain/%s\", os.Getenv(\"ANKR_API_KEY\"))\n    resp, err := http.Post(url, \"application/json\", bytes.NewReader(body))\n    if err != nil { panic(err) }\n    defer resp.Body.Close()\n    out, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(out))\n}"
          },
          {
            "lang": "typescript",
            "label": "TypeScript (fetch + types)",
            "source": "interface ChainStat {\n  blockchain: string;\n  totalTransactionsCount: number;\n  totalEventsCount: number;\n  latestBlockNumber: number;\n  blockTimeMs: number;\n  nativeCoinUsdPrice: string;\n}\n\ninterface Result {\n  stats: ChainStat[];\n}\n\ninterface JsonRpcResponse<T> {\n  jsonrpc: '2.0';\n  id: number | string | null;\n  result?: T;\n  error?: { code: number; message: string; data?: unknown };\n}\n\nconst apiKey = process.env.ANKR_API_KEY!;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getBlockchainStats',\n    params: {\n      blockchain: ['bsc', 'polygon'],\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = (await res.json()) as JsonRpcResponse<Result>;\nif (data.error) throw new Error(data.error.message);\nconsole.log(data.result);"
          }
        ]
      }
    },
    "/?ankr_getBlocks": {
      "post": {
        "operationId": "ankr_getBlocks",
        "tags": [
          "Query API"
        ],
        "summary": "Get a range of blocks with optional decoded transactions and logs",
        "description": "Returns details for the requested range of blocks on a single chain: header fields, the full transaction list (optional), and per-transaction logs (optional). Use the `decodeTxData` and `decodeLogs` flags to receive resolved method/event signatures and decoded inputs.\n\nPass `blockchain`, then `fromBlock` and `toBlock` as either integers, hex strings, or the keywords `earliest` / `latest`. **Maximum range is 30 blocks per call.** `includeLogs` requires `includeTxs` to also be true.\n\nPart of the **Query API** product (700 compute units per call, $0.00007 at base rate).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "jsonrpc",
                  "method",
                  "params"
                ],
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "Client-supplied request ID echoed in the response.",
                    "examples": [
                      1
                    ]
                  },
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ],
                    "examples": [
                      "2.0"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "ankr_getBlocks"
                    ],
                    "examples": [
                      "ankr_getBlocks"
                    ]
                  },
                  "params": {
                    "type": "object",
                    "required": [
                      "blockchain"
                    ],
                    "properties": {
                      "blockchain": {
                        "type": "string",
                        "enum": [
                          "arbitrum",
                          "avalanche",
                          "base",
                          "bsc",
                          "eth",
                          "fantom",
                          "flare",
                          "gnosis",
                          "linea",
                          "optimism",
                          "polygon",
                          "scroll",
                          "stellar",
                          "story_mainnet",
                          "taiko",
                          "telos",
                          "xai",
                          "xlayer",
                          "avalanche_fuji",
                          "base_sepolia",
                          "eth_holesky",
                          "eth_sepolia",
                          "optimism_testnet",
                          "polygon_amoy",
                          "story_aeneid_testnet"
                        ],
                        "description": "Target blockchain identifier.",
                        "examples": [
                          "eth"
                        ]
                      },
                      "fromBlock": {
                        "type": [
                          "integer",
                          "string"
                        ],
                        "description": "First block (inclusive). Integer, hex string, or `earliest`. Max range — 30 blocks.",
                        "minimum": 0,
                        "examples": [
                          "latest"
                        ]
                      },
                      "toBlock": {
                        "type": [
                          "integer",
                          "string"
                        ],
                        "description": "Last block (inclusive). Integer, hex string, or `latest`. Max range — 30 blocks.",
                        "examples": [
                          "latest"
                        ]
                      },
                      "decodeLogs": {
                        "type": "boolean",
                        "description": "Resolve event signatures and decode log inputs.",
                        "default": false,
                        "examples": [
                          true
                        ]
                      },
                      "decodeTxData": {
                        "type": "boolean",
                        "description": "Resolve method signatures and decode transaction inputs.",
                        "default": false,
                        "examples": [
                          true
                        ]
                      },
                      "descOrder": {
                        "type": "boolean",
                        "description": "Sort newest first when `true`.",
                        "default": false
                      },
                      "includeLogs": {
                        "type": "boolean",
                        "description": "Include logs inside transactions. Requires `includeTxs: true`.",
                        "default": false,
                        "examples": [
                          true
                        ]
                      },
                      "includeTxs": {
                        "type": "boolean",
                        "description": "Include transaction objects in each block.",
                        "default": false,
                        "examples": [
                          true
                        ]
                      }
                    }
                  }
                },
                "examples": [
                  {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getBlocks",
                    "params": {
                      "blockchain": "eth",
                      "fromBlock": "latest",
                      "toBlock": "latest",
                      "decodeLogs": true,
                      "decodeTxData": true,
                      "includeLogs": true,
                      "includeTxs": true
                    }
                  }
                ]
              },
              "examples": {
                "Latest block with txs and logs decoded": {
                  "summary": "Latest block, decoded",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getBlocks",
                    "params": {
                      "blockchain": "eth",
                      "fromBlock": "latest",
                      "toBlock": "latest",
                      "decodeLogs": true,
                      "decodeTxData": true,
                      "includeLogs": true,
                      "includeTxs": true
                    }
                  }
                },
                "Fixed range, headers only": {
                  "summary": "BSC blocks 100..129, no txs",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getBlocks",
                    "params": {
                      "blockchain": "bsc",
                      "fromBlock": 100,
                      "toBlock": 129
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. JSON-RPC `result` contains the `blocks` array. JSON-RPC errors are returned with HTTP 200; check the response body for an `error` key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "jsonrpc",
                    "result"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "jsonrpc": {
                      "type": "string",
                      "enum": [
                        "2.0"
                      ]
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "blocks": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "description": "Block objects in the requested range.",
                          "items": {
                            "type": "object",
                            "required": [
                              "blockchain",
                              "number",
                              "hash",
                              "parentHash",
                              "nonce",
                              "mixHash",
                              "sha3Uncles",
                              "logsBloom",
                              "stateRoot",
                              "miner",
                              "difficulty",
                              "extraData",
                              "size",
                              "gasLimit",
                              "gasUsed",
                              "timestamp",
                              "transactionsRoot",
                              "receiptsRoot",
                              "totalDifficulty",
                              "transactions",
                              "uncles"
                            ],
                            "properties": {
                              "blockchain": {
                                "type": "string"
                              },
                              "number": {
                                "type": "string",
                                "description": "Block number, hex-encoded."
                              },
                              "hash": {
                                "type": "string"
                              },
                              "parentHash": {
                                "type": "string"
                              },
                              "nonce": {
                                "type": "string"
                              },
                              "mixHash": {
                                "type": "string"
                              },
                              "sha3Uncles": {
                                "type": "string"
                              },
                              "logsBloom": {
                                "type": "string"
                              },
                              "stateRoot": {
                                "type": "string"
                              },
                              "transactionsRoot": {
                                "type": "string"
                              },
                              "receiptsRoot": {
                                "type": "string"
                              },
                              "miner": {
                                "type": "string"
                              },
                              "difficulty": {
                                "type": "string"
                              },
                              "totalDifficulty": {
                                "type": "string"
                              },
                              "extraData": {
                                "type": "string"
                              },
                              "size": {
                                "type": "string"
                              },
                              "gasLimit": {
                                "type": "string"
                              },
                              "gasUsed": {
                                "type": "string"
                              },
                              "timestamp": {
                                "type": "string",
                                "description": "UNIX timestamp, hex-encoded."
                              },
                              "transactions": {
                                "type": [
                                  "array",
                                  "null"
                                ],
                                "description": "Transaction objects or hashes depending on `includeTxs`.",
                                "items": {
                                  "type": "object"
                                }
                              },
                              "uncles": {
                                "type": [
                                  "array",
                                  "null"
                                ],
                                "items": {
                                  "type": "string"
                                },
                                "description": "Uncle block hashes."
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Latest block": {
                    "value": {
                      "id": 1,
                      "jsonrpc": "2.0",
                      "result": {
                        "blocks": [
                          {
                            "blockchain": "eth",
                            "difficulty": "0x1b20c328a941b9",
                            "extraData": "0x486976656f6e2072752d686561767920634b4674",
                            "gasLimit": "0xe48bca",
                            "gasUsed": "0xe479c0",
                            "hash": "0xc652947d88fce6b290d99d6e45241e38807a3d00697d681b6bd4796ce243329e",
                            "logsBloom": "0x4131",
                            "miner": "0x1ad91ee08f21be3de0ba2ba6918e714da6b45836",
                            "mixHash": "0x27c55ee9b24b79ba8b33f52b7411a1f7757cb7c4ab66b1d604609cf2c1953ca2",
                            "nonce": "0xbf2230abdb929ebb",
                            "number": "0xc016d9",
                            "parentHash": "0x3323200e478c0c47d88d4e9d9ae8c3da02dfa88ee897eda0042477ee03c0c6f5",
                            "receiptsRoot": "0xfd445d3c0de66f9e1a66f031d7242da2a9f1d6fde10d11f96ed526f40e90b51e",
                            "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
                            "size": "0xea61",
                            "stateRoot": "0xe154e45862394ac2a4218d3d8b725764ae98bb6e1ffb1f1b0b46e62e74b4cbab",
                            "timestamp": "0x60be5a40",
                            "totalDifficulty": "0x57be0653966d6abf487",
                            "transactions": [],
                            "transactionsRoot": "0x1729c1795404e9291ef12556fdf2ed61a2ad228cc29b76ef5d04c3e9f35f3ade",
                            "uncles": []
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — malformed JSON-RPC envelope or invalid `params`. The gateway rejects before the JSON-RPC layer processes the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcError"
                },
                "examples": {
                  "Invalid Params": {
                    "value": {
                      "jsonrpc": "2.0",
                      "id": 1,
                      "error": {
                        "code": -32602,
                        "message": "Invalid params"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — missing or invalid API key in the server URL path. Verify that `{API_KEY}` is set to a valid project key."
          },
          "429": {
            "description": "Too Many Requests — the API key has exceeded its rate or quota limits. Back off and retry; consider upgrading the Premium tier for higher limits.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error — unexpected condition. Retry with exponential backoff; if it persists, file a ticket at https://www.ankr.com/support/."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X POST \"https://rpc.ankr.com/multichain/$ANKR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"method\": \"ankr_getBlocks\",\n    \"params\": {\n      \"blockchain\": \"eth\",\n      \"fromBlock\": \"latest\",\n      \"toBlock\": \"latest\",\n      \"decodeLogs\": true,\n      \"decodeTxData\": true,\n      \"includeLogs\": true,\n      \"includeTxs\": true\n    }\n  }'"
          },
          {
            "lang": "javascript",
            "label": "JavaScript (fetch)",
            "source": "const apiKey = process.env.ANKR_API_KEY;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getBlocks',\n    params: {\n      blockchain: 'eth',\n      fromBlock: 'latest',\n      toBlock: 'latest',\n      decodeLogs: true,\n      decodeTxData: true,\n      includeLogs: true,\n      includeTxs: true,\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = await res.json();\nconsole.log(data.result);"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import os\n\nimport requests\n\nresponse = requests.post(\n    f\"https://rpc.ankr.com/multichain/{os.environ['ANKR_API_KEY']}\",\n    json={\n        \"jsonrpc\": \"2.0\",\n        \"id\": 1,\n        \"method\": \"ankr_getBlocks\",\n        \"params\": {\n            \"blockchain\": \"eth\",\n            \"fromBlock\": \"latest\",\n            \"toBlock\": \"latest\",\n            \"decodeLogs\": True,\n            \"decodeTxData\": True,\n            \"includeLogs\": True,\n            \"includeTxs\": True,\n        },\n    },\n    timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json()[\"result\"])"
          },
          {
            "lang": "go",
            "label": "Go (net/http)",
            "source": "package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"os\"\n)\n\nfunc main() {\n    body, _ := json.Marshal(map[string]any{\n        \"jsonrpc\": \"2.0\",\n        \"id\":      1,\n        \"method\":  \"ankr_getBlocks\",\n        \"params\":  map[string]any{\n            \"blockchain\":   \"eth\",\n            \"fromBlock\":    \"latest\",\n            \"toBlock\":      \"latest\",\n            \"decodeLogs\":   true,\n            \"decodeTxData\": true,\n            \"includeLogs\":  true,\n            \"includeTxs\":   true,\n        },\n    })\n    url := fmt.Sprintf(\"https://rpc.ankr.com/multichain/%s\", os.Getenv(\"ANKR_API_KEY\"))\n    resp, err := http.Post(url, \"application/json\", bytes.NewReader(body))\n    if err != nil { panic(err) }\n    defer resp.Body.Close()\n    out, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(out))\n}"
          },
          {
            "lang": "typescript",
            "label": "TypeScript (fetch + types)",
            "source": "interface Block {\n  blockchain: string;\n  number: string;\n  hash: string;\n  parentHash: string;\n  nonce: string;\n  miner: string;\n  difficulty: string;\n  totalDifficulty: string;\n  size: string;\n  gasLimit: string;\n  gasUsed: string;\n  timestamp: string;\n  transactions: unknown[];\n  uncles: string[];\n}\n\ninterface Result {\n  blocks: Block[];\n}\n\ninterface JsonRpcResponse<T> {\n  jsonrpc: '2.0';\n  id: number | string | null;\n  result?: T;\n  error?: { code: number; message: string; data?: unknown };\n}\n\nconst apiKey = process.env.ANKR_API_KEY!;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getBlocks',\n    params: {\n      blockchain: 'eth',\n      fromBlock: 'latest',\n      toBlock: 'latest',\n      decodeLogs: true,\n      decodeTxData: true,\n      includeLogs: true,\n      includeTxs: true,\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = (await res.json()) as JsonRpcResponse<Result>;\nif (data.error) throw new Error(data.error.message);\nconsole.log(data.result);"
          }
        ]
      }
    },
    "/?ankr_getCurrencies": {
      "post": {
        "operationId": "ankr_getCurrencies",
        "tags": [
          "Token API"
        ],
        "summary": "List native and ERC-20 currencies indexed on a chain",
        "description": "Returns the catalog of currencies (native coin + indexed ERC-20 tokens) for a single blockchain, including symbol, decimals, contract address, and a thumbnail URL.\n\nPass `blockchain` to scope the catalog. Useful for building asset pickers, populating token dropdowns, or mapping unknown contract addresses to known token metadata.\n\nPart of the **Token API** product (700 compute units per call, $0.00007 at base rate).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "jsonrpc",
                  "method",
                  "params"
                ],
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "Client-supplied request ID echoed in the response.",
                    "examples": [
                      1
                    ]
                  },
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ],
                    "examples": [
                      "2.0"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "ankr_getCurrencies"
                    ],
                    "examples": [
                      "ankr_getCurrencies"
                    ]
                  },
                  "params": {
                    "type": "object",
                    "required": [
                      "blockchain"
                    ],
                    "properties": {
                      "blockchain": {
                        "type": "string",
                        "enum": [
                          "arbitrum",
                          "avalanche",
                          "base",
                          "bsc",
                          "eth",
                          "fantom",
                          "flare",
                          "gnosis",
                          "linea",
                          "optimism",
                          "polygon",
                          "scroll",
                          "stellar",
                          "story_mainnet",
                          "taiko",
                          "telos",
                          "xai",
                          "xlayer",
                          "avalanche_fuji",
                          "base_sepolia",
                          "eth_holesky",
                          "eth_sepolia",
                          "optimism_testnet",
                          "polygon_amoy",
                          "story_aeneid_testnet"
                        ],
                        "description": "Target blockchain identifier.",
                        "examples": [
                          "polygon"
                        ]
                      }
                    }
                  }
                },
                "examples": [
                  {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getCurrencies",
                    "params": {
                      "blockchain": "polygon"
                    }
                  }
                ]
              },
              "examples": {
                "Polygon": {
                  "summary": "Polygon currencies",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getCurrencies",
                    "params": {
                      "blockchain": "polygon"
                    }
                  }
                },
                "Fantom": {
                  "summary": "Fantom currencies",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getCurrencies",
                    "params": {
                      "blockchain": "fantom"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. JSON-RPC `result` contains the currencies array. JSON-RPC errors are returned with HTTP 200; check for an `error` key in the response body.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "jsonrpc",
                    "result"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "jsonrpc": {
                      "type": "string",
                      "enum": [
                        "2.0"
                      ]
                    },
                    "result": {
                      "type": "object",
                      "required": [
                        "currencies"
                      ],
                      "properties": {
                        "currencies": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "items": {
                            "type": "object",
                            "required": [
                              "blockchain",
                              "name",
                              "decimals",
                              "symbol",
                              "thumbnail"
                            ],
                            "properties": {
                              "address": {
                                "type": "string",
                                "description": "Token contract address (empty for the native coin)."
                              },
                              "blockchain": {
                                "type": "string",
                                "enum": [
                                  "arbitrum",
                                  "avalanche",
                                  "base",
                                  "bsc",
                                  "eth",
                                  "fantom",
                                  "flare",
                                  "gnosis",
                                  "linea",
                                  "optimism",
                                  "polygon",
                                  "scroll",
                                  "stellar",
                                  "story_mainnet",
                                  "taiko",
                                  "telos",
                                  "xai",
                                  "xlayer",
                                  "avalanche_fuji",
                                  "base_sepolia",
                                  "eth_holesky",
                                  "eth_sepolia",
                                  "optimism_testnet",
                                  "polygon_amoy",
                                  "story_aeneid_testnet"
                                ]
                              },
                              "decimals": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "name": {
                                "type": "string"
                              },
                              "symbol": {
                                "type": "string"
                              },
                              "thumbnail": {
                                "type": "string"
                              }
                            }
                          },
                          "description": "Indexed currencies on the chain."
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Polygon sample": {
                    "value": {
                      "id": 1,
                      "jsonrpc": "2.0",
                      "result": {
                        "currencies": [
                          {
                            "address": "0x2727ab1c2d22170abc9b595177b2d5c6e1ab7b7b",
                            "blockchain": "polygon",
                            "decimals": 18,
                            "name": "Cartesi Token (PoS)",
                            "symbol": "CTSI",
                            "thumbnail": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/polygon/assets/0x2727Ab1c2D22170ABc9b595177B2D5C6E1Ab7B7B/logo.png"
                          },
                          {
                            "address": "0x580a84c73811e1839f75d86d75d88cca0c241ff4",
                            "blockchain": "polygon",
                            "decimals": 18,
                            "name": "Qi Dao",
                            "symbol": "QI",
                            "thumbnail": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/polygon/assets/0x580A84C73811E1839F75d86d75d88cCa0c241fF4/logo.png"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — malformed JSON-RPC envelope or invalid `params`. The gateway rejects before the JSON-RPC layer processes the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcError"
                },
                "examples": {
                  "Invalid Params": {
                    "value": {
                      "jsonrpc": "2.0",
                      "id": 1,
                      "error": {
                        "code": -32602,
                        "message": "Invalid params"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — missing or invalid API key in the server URL path. Verify that `{API_KEY}` is set to a valid project key."
          },
          "429": {
            "description": "Too Many Requests — the API key has exceeded its rate or quota limits. Back off and retry; consider upgrading the Premium tier for higher limits.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error — unexpected condition. Retry with exponential backoff; if it persists, file a ticket at https://www.ankr.com/support/."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X POST \"https://rpc.ankr.com/multichain/$ANKR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"method\": \"ankr_getCurrencies\",\n    \"params\": {\n      \"blockchain\": \"polygon\"\n    }\n  }'"
          },
          {
            "lang": "javascript",
            "label": "JavaScript (fetch)",
            "source": "const apiKey = process.env.ANKR_API_KEY;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getCurrencies',\n    params: {\n      blockchain: 'polygon',\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = await res.json();\nconsole.log(data.result);"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import os\n\nimport requests\n\nresponse = requests.post(\n    f\"https://rpc.ankr.com/multichain/{os.environ['ANKR_API_KEY']}\",\n    json={\n        \"jsonrpc\": \"2.0\",\n        \"id\": 1,\n        \"method\": \"ankr_getCurrencies\",\n        \"params\": {\n            \"blockchain\": \"polygon\",\n        },\n    },\n    timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json()[\"result\"])"
          },
          {
            "lang": "go",
            "label": "Go (net/http)",
            "source": "package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"os\"\n)\n\nfunc main() {\n    body, _ := json.Marshal(map[string]any{\n        \"jsonrpc\": \"2.0\",\n        \"id\":      1,\n        \"method\":  \"ankr_getCurrencies\",\n        \"params\":  map[string]any{\n            \"blockchain\": \"polygon\",\n        },\n    })\n    url := fmt.Sprintf(\"https://rpc.ankr.com/multichain/%s\", os.Getenv(\"ANKR_API_KEY\"))\n    resp, err := http.Post(url, \"application/json\", bytes.NewReader(body))\n    if err != nil { panic(err) }\n    defer resp.Body.Close()\n    out, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(out))\n}"
          },
          {
            "lang": "typescript",
            "label": "TypeScript (fetch + types)",
            "source": "interface Currency {\n  blockchain: string;\n  address?: string;\n  name: string;\n  decimals: number;\n  symbol: string;\n  thumbnail: string;\n}\n\ninterface Result {\n  currencies: Currency[];\n}\n\ninterface JsonRpcResponse<T> {\n  jsonrpc: '2.0';\n  id: number | string | null;\n  result?: T;\n  error?: { code: number; message: string; data?: unknown };\n}\n\nconst apiKey = process.env.ANKR_API_KEY!;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getCurrencies',\n    params: {\n      blockchain: 'polygon',\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = (await res.json()) as JsonRpcResponse<Result>;\nif (data.error) throw new Error(data.error.message);\nconsole.log(data.result);"
          }
        ]
      }
    },
    "/?ankr_getInteractions": {
      "post": {
        "operationId": "ankr_getInteractions",
        "tags": [
          "Query API"
        ],
        "summary": "List chains where a wallet or contract has on-chain activity",
        "description": "Returns the set of supported blockchains on which the given address has any indexed activity — tokens, NFTs, or transactions. Useful for cross-chain wallet dashboards or address-lookup UIs that want to avoid hitting every chain.\n\nPass a single `address` (wallet or contract). The response is a string array of chain identifiers; pair with downstream calls (e.g. `ankr_getAccountBalance`, `ankr_getTransactionsByAddress`) for the actual data.\n\nPart of the **Query API** product (700 compute units per call, $0.00007 at base rate).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "jsonrpc",
                  "method",
                  "params"
                ],
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "Client-supplied request ID echoed in the response.",
                    "examples": [
                      1
                    ]
                  },
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ],
                    "examples": [
                      "2.0"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "ankr_getInteractions"
                    ],
                    "examples": [
                      "ankr_getInteractions"
                    ]
                  },
                  "params": {
                    "type": "object",
                    "required": [
                      "address"
                    ],
                    "properties": {
                      "address": {
                        "type": "string",
                        "description": "Wallet or contract address.",
                        "examples": [
                          "0xF977814e90dA44bFA03b6295A0616a897441aceC"
                        ]
                      }
                    }
                  }
                },
                "examples": [
                  {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getInteractions",
                    "params": {
                      "address": "0xF977814e90dA44bFA03b6295A0616a897441aceC"
                    }
                  }
                ]
              },
              "examples": {
                "Binance hot wallet": {
                  "summary": "Look up a high-activity address",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getInteractions",
                    "params": {
                      "address": "0xF977814e90dA44bFA03b6295A0616a897441aceC"
                    }
                  }
                },
                "Single user wallet": {
                  "summary": "Personal wallet (vitalik.eth)",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getInteractions",
                    "params": {
                      "address": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. JSON-RPC `result` contains the `blockchains` array. JSON-RPC errors are returned with HTTP 200; check the response body for an `error` key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "jsonrpc",
                    "result"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "jsonrpc": {
                      "type": "string",
                      "enum": [
                        "2.0"
                      ]
                    },
                    "result": {
                      "type": "object",
                      "required": [
                        "blockchains"
                      ],
                      "properties": {
                        "blockchains": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "items": {
                            "type": "string"
                          },
                          "description": "Chains on which the address has indexed activity."
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Multi-chain activity": {
                    "value": {
                      "id": 1,
                      "jsonrpc": "2.0",
                      "result": {
                        "blockchains": [
                          "bsc",
                          "fantom",
                          "polygon",
                          "arbitrum",
                          "optimism",
                          "avalanche",
                          "eth"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — malformed JSON-RPC envelope or invalid `params`. The gateway rejects before the JSON-RPC layer processes the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcError"
                },
                "examples": {
                  "Invalid Params": {
                    "value": {
                      "jsonrpc": "2.0",
                      "id": 1,
                      "error": {
                        "code": -32602,
                        "message": "Invalid params"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — missing or invalid API key in the server URL path. Verify that `{API_KEY}` is set to a valid project key."
          },
          "429": {
            "description": "Too Many Requests — the API key has exceeded its rate or quota limits. Back off and retry; consider upgrading the Premium tier for higher limits.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error — unexpected condition. Retry with exponential backoff; if it persists, file a ticket at https://www.ankr.com/support/."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X POST \"https://rpc.ankr.com/multichain/$ANKR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"method\": \"ankr_getInteractions\",\n    \"params\": {\n      \"address\": \"0xF977814e90dA44bFA03b6295A0616a897441aceC\"\n    }\n  }'"
          },
          {
            "lang": "javascript",
            "label": "JavaScript (fetch)",
            "source": "const apiKey = process.env.ANKR_API_KEY;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getInteractions',\n    params: {\n      address: '0xF977814e90dA44bFA03b6295A0616a897441aceC',\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = await res.json();\nconsole.log(data.result);"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import os\n\nimport requests\n\nresponse = requests.post(\n    f\"https://rpc.ankr.com/multichain/{os.environ['ANKR_API_KEY']}\",\n    json={\n        \"jsonrpc\": \"2.0\",\n        \"id\": 1,\n        \"method\": \"ankr_getInteractions\",\n        \"params\": {\n            \"address\": \"0xF977814e90dA44bFA03b6295A0616a897441aceC\",\n        },\n    },\n    timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json()[\"result\"])"
          },
          {
            "lang": "go",
            "label": "Go (net/http)",
            "source": "package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"os\"\n)\n\nfunc main() {\n    body, _ := json.Marshal(map[string]any{\n        \"jsonrpc\": \"2.0\",\n        \"id\":      1,\n        \"method\":  \"ankr_getInteractions\",\n        \"params\":  map[string]any{\n            \"address\": \"0xF977814e90dA44bFA03b6295A0616a897441aceC\",\n        },\n    })\n    url := fmt.Sprintf(\"https://rpc.ankr.com/multichain/%s\", os.Getenv(\"ANKR_API_KEY\"))\n    resp, err := http.Post(url, \"application/json\", bytes.NewReader(body))\n    if err != nil { panic(err) }\n    defer resp.Body.Close()\n    out, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(out))\n}"
          },
          {
            "lang": "typescript",
            "label": "TypeScript (fetch + types)",
            "source": "interface Result {\n  blockchains: string[];\n}\n\ninterface JsonRpcResponse<T> {\n  jsonrpc: '2.0';\n  id: number | string | null;\n  result?: T;\n  error?: { code: number; message: string; data?: unknown };\n}\n\nconst apiKey = process.env.ANKR_API_KEY!;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getInteractions',\n    params: {\n      address: '0xF977814e90dA44bFA03b6295A0616a897441aceC',\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = (await res.json()) as JsonRpcResponse<Result>;\nif (data.error) throw new Error(data.error.message);\nconsole.log(data.result);"
          }
        ]
      }
    },
    "/?ankr_getLogs": {
      "post": {
        "operationId": "ankr_getLogs",
        "tags": [
          "Query API"
        ],
        "summary": "Query historical contract logs filtered by address, topic, and block range",
        "description": "Returns indexed contract logs (events) for the requested chain and block range. Standard `eth_getLogs` semantics, plus multi-chain dispatch, pagination, and optional event-signature decoding via `decodeLogs: true`.\n\nPass `blockchain` and either a block range (`fromBlock` / `toBlock`) or a time range (`fromTimestamp` / `toTimestamp`). Scope by `address` (single or array of contracts) and / or `topics` (nested arrays matching `eth_getLogs` topic filter semantics). Paginate with `pageSize` (default `1000`, max `10000`) and `pageToken`.\n\nPart of the **Query API** product (700 compute units per call, $0.00007 at base rate).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "jsonrpc",
                  "method",
                  "params"
                ],
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "Client-supplied request ID echoed in the response.",
                    "examples": [
                      1
                    ]
                  },
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ],
                    "examples": [
                      "2.0"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "ankr_getLogs"
                    ],
                    "examples": [
                      "ankr_getLogs"
                    ]
                  },
                  "params": {
                    "type": "object",
                    "properties": {
                      "blockchain": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "arbitrum",
                            "avalanche",
                            "base",
                            "bsc",
                            "eth",
                            "fantom",
                            "flare",
                            "gnosis",
                            "linea",
                            "optimism",
                            "polygon",
                            "scroll",
                            "stellar",
                            "story_mainnet",
                            "taiko",
                            "telos",
                            "xai",
                            "xlayer",
                            "avalanche_fuji",
                            "base_sepolia",
                            "eth_holesky",
                            "eth_sepolia",
                            "optimism_testnet",
                            "polygon_amoy",
                            "story_aeneid_testnet"
                          ]
                        },
                        "description": "Chains to query. Omit or pass an empty array to query all supported chains.",
                        "examples": [
                          [
                            "eth"
                          ]
                        ]
                      },
                      "address": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Contract address(es) to scope logs to.",
                        "examples": [
                          [
                            "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
                          ]
                        ]
                      },
                      "fromBlock": {
                        "type": [
                          "integer",
                          "string"
                        ],
                        "description": "Start block (integer, hex, or `earliest`).",
                        "minimum": 0,
                        "examples": [
                          "earliest"
                        ]
                      },
                      "toBlock": {
                        "type": [
                          "integer",
                          "string"
                        ],
                        "description": "End block (integer, hex, or `latest`).",
                        "examples": [
                          "latest"
                        ]
                      },
                      "fromTimestamp": {
                        "type": "integer",
                        "description": "UNIX timestamp lower bound.",
                        "minimum": 0
                      },
                      "toTimestamp": {
                        "type": "integer",
                        "description": "UNIX timestamp upper bound.",
                        "minimum": 0
                      },
                      "topics": {
                        "type": "array",
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "description": "Topic filter — array of arrays of 32-byte topic hashes, matching `eth_getLogs` semantics.",
                        "examples": [
                          [
                            [
                              "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
                            ]
                          ]
                        ]
                      },
                      "decodeLogs": {
                        "type": "boolean",
                        "description": "Resolve event signatures and decode inputs.",
                        "default": false
                      },
                      "descOrder": {
                        "type": "boolean",
                        "description": "Sort newest first when `true`.",
                        "default": false
                      },
                      "pageSize": {
                        "type": "integer",
                        "description": "Entries per page. Default `1000`, max `10000`.",
                        "minimum": 1,
                        "maximum": 10000,
                        "default": 1000,
                        "examples": [
                          1
                        ]
                      },
                      "pageToken": {
                        "type": "string",
                        "description": "Opaque page token from a prior response's `nextPageToken`."
                      }
                    }
                  }
                },
                "examples": [
                  {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getLogs",
                    "params": {
                      "blockchain": [
                        "eth"
                      ],
                      "address": [
                        "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
                      ],
                      "fromBlock": "earliest",
                      "toBlock": "latest",
                      "topics": [
                        [
                          "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
                        ]
                      ],
                      "pageSize": 1
                    }
                  }
                ]
              },
              "examples": {
                "Single-topic scan": {
                  "summary": "ERC-20 `Transfer` events on WETH",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getLogs",
                    "params": {
                      "blockchain": [
                        "eth"
                      ],
                      "address": [
                        "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
                      ],
                      "fromBlock": "earliest",
                      "toBlock": "latest",
                      "topics": [
                        [
                          "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
                        ]
                      ],
                      "pageSize": 1
                    }
                  }
                },
                "Decoded event with topics": {
                  "summary": "Decode `Transfer` between two addresses",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getLogs",
                    "params": {
                      "blockchain": [
                        "eth"
                      ],
                      "address": [
                        "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
                      ],
                      "decodeLogs": true,
                      "fromBlock": "0xdaf6b1",
                      "toBlock": 14350010,
                      "topics": [
                        [
                          "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
                        ],
                        [
                          "0x000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff"
                        ],
                        [
                          "0x0000000000000000000000003dd49f67e9d5bc4c5e6634b3f70bfd9dc1b6bd74"
                        ]
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. JSON-RPC `result` envelope contains the `logs` array and pagination cursor. JSON-RPC errors are returned with HTTP 200; check the response body for an `error` key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "jsonrpc",
                    "result"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "jsonrpc": {
                      "type": "string",
                      "enum": [
                        "2.0"
                      ]
                    },
                    "result": {
                      "type": "object",
                      "required": [
                        "logs"
                      ],
                      "properties": {
                        "nextPageToken": {
                          "type": "string"
                        },
                        "logs": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "description": "Indexed log entries.",
                          "items": {
                            "type": "object",
                            "required": [
                              "blockchain",
                              "address",
                              "topics",
                              "data",
                              "blockNumber",
                              "transactionHash",
                              "transactionIndex",
                              "blockHash",
                              "logIndex",
                              "removed"
                            ],
                            "properties": {
                              "address": {
                                "type": "string"
                              },
                              "blockHash": {
                                "type": "string"
                              },
                              "blockNumber": {
                                "type": "string",
                                "description": "Hex-encoded block number."
                              },
                              "blockchain": {
                                "type": "string",
                                "enum": [
                                  "arbitrum",
                                  "avalanche",
                                  "base",
                                  "bsc",
                                  "eth",
                                  "fantom",
                                  "flare",
                                  "gnosis",
                                  "linea",
                                  "optimism",
                                  "polygon",
                                  "scroll",
                                  "stellar",
                                  "story_mainnet",
                                  "taiko",
                                  "telos",
                                  "xai",
                                  "xlayer",
                                  "avalanche_fuji",
                                  "base_sepolia",
                                  "eth_holesky",
                                  "eth_sepolia",
                                  "optimism_testnet",
                                  "polygon_amoy",
                                  "story_aeneid_testnet"
                                ]
                              },
                              "data": {
                                "type": "string",
                                "description": "Non-indexed log arguments (hex)."
                              },
                              "logIndex": {
                                "type": "string"
                              },
                              "removed": {
                                "type": "boolean",
                                "description": "`true` if removed by a reorg."
                              },
                              "topics": {
                                "type": [
                                  "array",
                                  "null"
                                ],
                                "items": {
                                  "type": "string"
                                },
                                "description": "Up to 4 indexed topic hashes."
                              },
                              "transactionHash": {
                                "type": "string"
                              },
                              "transactionIndex": {
                                "type": "string"
                              },
                              "event": {
                                "type": "object",
                                "description": "Decoded event metadata (only when `decodeLogs: true`).",
                                "properties": {
                                  "anonymous": {
                                    "type": "boolean"
                                  },
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "signature": {
                                    "type": "string"
                                  },
                                  "string": {
                                    "type": "string"
                                  },
                                  "verified": {
                                    "type": "boolean"
                                  },
                                  "inputs": {
                                    "type": [
                                      "array",
                                      "null"
                                    ],
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "indexed": {
                                          "type": "boolean"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "size": {
                                          "type": "integer"
                                        },
                                        "type": {
                                          "type": "string"
                                        },
                                        "valueDecoded": {
                                          "type": "string"
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Decoded log": {
                    "value": {
                      "id": 1,
                      "jsonrpc": "2.0",
                      "result": {
                        "logs": [
                          {
                            "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                            "blockHash": "0x76fe73c4d2a66bb0cba343482521c8cd44f0ef824e97493f3c4f3e5140422ea5",
                            "blockNumber": "0xdaf6b4",
                            "blockchain": "eth",
                            "data": "0x00000000000000000000000000000000000000000000000000787f498b5b22b7",
                            "event": {
                              "anonymous": false,
                              "id": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                              "name": "Transfer",
                              "signature": "Transfer(address,address,uint256)",
                              "string": "event Transfer(address indexed _from, address indexed _to, uint256 _value)",
                              "verified": false
                            },
                            "logIndex": "0x49",
                            "removed": false,
                            "topics": [
                              "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                              "0x000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eff",
                              "0x0000000000000000000000003dd49f67e9d5bc4c5e6634b3f70bfd9dc1b6bd74"
                            ],
                            "transactionHash": "0x6f11297b0964a0fb0630e6667093a6c9cee4b383495c94e99becc6b88aed8f14",
                            "transactionIndex": "0x3f"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — malformed JSON-RPC envelope or invalid `params`. The gateway rejects before the JSON-RPC layer processes the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcError"
                },
                "examples": {
                  "Invalid Params": {
                    "value": {
                      "jsonrpc": "2.0",
                      "id": 1,
                      "error": {
                        "code": -32602,
                        "message": "Invalid params"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — missing or invalid API key in the server URL path. Verify that `{API_KEY}` is set to a valid project key."
          },
          "429": {
            "description": "Too Many Requests — the API key has exceeded its rate or quota limits. Back off and retry; consider upgrading the Premium tier for higher limits.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error — unexpected condition. Retry with exponential backoff; if it persists, file a ticket at https://www.ankr.com/support/."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X POST \"https://rpc.ankr.com/multichain/$ANKR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"method\": \"ankr_getLogs\",\n    \"params\": {\n      \"blockchain\": [\"eth\"],\n      \"address\": [\"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2\"],\n      \"fromBlock\": \"earliest\",\n      \"toBlock\": \"latest\",\n      \"topics\": [[\"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\"]],\n      \"pageSize\": 1\n    }\n  }'"
          },
          {
            "lang": "javascript",
            "label": "JavaScript (fetch)",
            "source": "const apiKey = process.env.ANKR_API_KEY;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getLogs',\n    params: {\n      blockchain: ['eth'],\n      address: ['0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'],\n      fromBlock: 'earliest',\n      toBlock: 'latest',\n      topics: [['0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef']],\n      pageSize: 1,\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = await res.json();\nconsole.log(data.result);"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import os\n\nimport requests\n\nresponse = requests.post(\n    f\"https://rpc.ankr.com/multichain/{os.environ['ANKR_API_KEY']}\",\n    json={\n        \"jsonrpc\": \"2.0\",\n        \"id\": 1,\n        \"method\": \"ankr_getLogs\",\n        \"params\": {\n            \"blockchain\": [\"eth\"],\n            \"address\": [\"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2\"],\n            \"fromBlock\": \"earliest\",\n            \"toBlock\": \"latest\",\n            \"topics\": [[\"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\"]],\n            \"pageSize\": 1,\n        },\n    },\n    timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json()[\"result\"])"
          },
          {
            "lang": "go",
            "label": "Go (net/http)",
            "source": "package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"os\"\n)\n\nfunc main() {\n    body, _ := json.Marshal(map[string]any{\n        \"jsonrpc\": \"2.0\",\n        \"id\":      1,\n        \"method\":  \"ankr_getLogs\",\n        \"params\":  map[string]any{\n            \"blockchain\": []string{\"eth\"},\n            \"address\":    []string{\"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2\"},\n            \"fromBlock\":  \"earliest\",\n            \"toBlock\":    \"latest\",\n            \"topics\":     [][]string{{\"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\"}},\n            \"pageSize\":   1,\n        },\n    })\n    url := fmt.Sprintf(\"https://rpc.ankr.com/multichain/%s\", os.Getenv(\"ANKR_API_KEY\"))\n    resp, err := http.Post(url, \"application/json\", bytes.NewReader(body))\n    if err != nil { panic(err) }\n    defer resp.Body.Close()\n    out, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(out))\n}"
          },
          {
            "lang": "typescript",
            "label": "TypeScript (fetch + types)",
            "source": "interface LogEntry {\n  blockchain: string;\n  address: string;\n  topics: string[];\n  data: string;\n  blockNumber: string;\n  blockHash: string;\n  transactionHash: string;\n  transactionIndex: string;\n  logIndex: string;\n  removed: boolean;\n  event?: {\n    anonymous: boolean;\n    id: string;\n    name: string;\n    signature: string;\n    string: string;\n    verified: boolean;\n    inputs?: Array<{ indexed: boolean; name: string; size: number; type: string; valueDecoded: string }>;\n  };\n}\n\ninterface Result {\n  logs: LogEntry[];\n  nextPageToken?: string;\n}\n\ninterface JsonRpcResponse<T> {\n  jsonrpc: '2.0';\n  id: number | string | null;\n  result?: T;\n  error?: { code: number; message: string; data?: unknown };\n}\n\nconst apiKey = process.env.ANKR_API_KEY!;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getLogs',\n    params: {\n      blockchain: ['eth'],\n      address: ['0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'],\n      fromBlock: 'earliest',\n      toBlock: 'latest',\n      topics: [['0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef']],\n      pageSize: 1,\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = (await res.json()) as JsonRpcResponse<Result>;\nif (data.error) throw new Error(data.error.message);\nconsole.log(data.result);"
          }
        ]
      }
    },
    "/?ankr_getNFTHolders": {
      "post": {
        "operationId": "ankr_getNFTHolders",
        "tags": [
          "NFT API"
        ],
        "summary": "List wallet holders of an NFT collection",
        "description": "Returns the list of wallet addresses that currently hold any token from the specified NFT collection. Useful for snapshotting an allowlist, computing distribution stats, or driving holder-gated drops.\n\nPass the `contractAddress` of the collection plus the `blockchain` it lives on. Page through large collections with `pageSize` (default `1000`, max `10000`) and the `nextPageToken` echoed in each response.\n\nPart of the **NFT API** product (700 compute units per call, $0.00007 at base rate).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "jsonrpc",
                  "method",
                  "params"
                ],
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "Client-supplied request ID echoed in the response.",
                    "examples": [
                      1
                    ]
                  },
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ],
                    "examples": [
                      "2.0"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "ankr_getNFTHolders"
                    ],
                    "examples": [
                      "ankr_getNFTHolders"
                    ]
                  },
                  "params": {
                    "type": "object",
                    "required": [
                      "blockchain",
                      "contractAddress"
                    ],
                    "properties": {
                      "blockchain": {
                        "type": "string",
                        "enum": [
                          "arbitrum",
                          "avalanche",
                          "base",
                          "bsc",
                          "eth",
                          "fantom",
                          "flare",
                          "gnosis",
                          "linea",
                          "optimism",
                          "polygon",
                          "scroll",
                          "stellar",
                          "story_mainnet",
                          "taiko",
                          "telos",
                          "xai",
                          "xlayer",
                          "avalanche_fuji",
                          "base_sepolia",
                          "eth_holesky",
                          "eth_sepolia",
                          "optimism_testnet",
                          "polygon_amoy",
                          "story_aeneid_testnet"
                        ],
                        "description": "Target blockchain identifier.",
                        "examples": [
                          "arbitrum"
                        ]
                      },
                      "contractAddress": {
                        "type": "string",
                        "description": "Contract address of the NFT collection. ENS names accepted on Ethereum.",
                        "examples": [
                          "0xc36442b4a4522e871399cd717abdd847ab11fe88"
                        ]
                      },
                      "pageSize": {
                        "type": "integer",
                        "description": "Entries per page. Default `1000`, maximum `10000`.",
                        "minimum": 1,
                        "maximum": 10000,
                        "default": 1000,
                        "examples": [
                          10
                        ]
                      },
                      "pageToken": {
                        "type": "string",
                        "description": "Opaque page token from a prior response's `nextPageToken`."
                      }
                    }
                  }
                },
                "examples": [
                  {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getNFTHolders",
                    "params": {
                      "blockchain": "arbitrum",
                      "contractAddress": "0xc36442b4a4522e871399cd717abdd847ab11fe88",
                      "pageSize": 10
                    }
                  }
                ]
              },
              "examples": {
                "First page": {
                  "summary": "First page, 10 holders",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getNFTHolders",
                    "params": {
                      "blockchain": "arbitrum",
                      "contractAddress": "0xc36442b4a4522e871399cd717abdd847ab11fe88",
                      "pageSize": 10
                    }
                  }
                },
                "Next page": {
                  "summary": "Subsequent page using nextPageToken",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getNFTHolders",
                    "params": {
                      "blockchain": "arbitrum",
                      "contractAddress": "0xc36442b4a4522e871399cd717abdd847ab11fe88",
                      "pageSize": 10,
                      "pageToken": "rFN6s7bcVaihtGvazmFxvsyFkoDx39sPyMULxoGT6SuoFi3tHzeAqmkVbzCtDCAQhFt6TsngYzVdMaWj"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. JSON-RPC `result` envelope contains the holders array and a pagination cursor. JSON-RPC errors are returned with HTTP 200 — check for an `error` key in the response body.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "jsonrpc",
                    "result"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "jsonrpc": {
                      "type": "string",
                      "enum": [
                        "2.0"
                      ]
                    },
                    "result": {
                      "type": "object",
                      "required": [
                        "holders"
                      ],
                      "properties": {
                        "holders": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "description": "Holder wallet addresses.",
                          "items": {
                            "type": "string"
                          }
                        },
                        "nextPageToken": {
                          "type": "string",
                          "description": "Cursor for the next page. Empty when no more pages remain."
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Paginated reply": {
                    "value": {
                      "id": 1,
                      "jsonrpc": "2.0",
                      "result": {
                        "holders": [
                          "0x000000000000000000000000000000000000dead",
                          "0x000000000000d34c44564053af35e4fe271d0caa",
                          "0x00000000000a29a0800f6f557ddbbe8249397de7"
                        ],
                        "nextPageToken": "rFN6s7bcVaihtGvazmFxvsyFkoDx39sPyMULxoGT6SuoFi3tHzeAqmkVbzCtDCAQhFt6TsngYzVdMaWj"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — malformed JSON-RPC envelope or invalid `params`. The gateway rejects before the JSON-RPC layer processes the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcError"
                },
                "examples": {
                  "Invalid Params": {
                    "value": {
                      "jsonrpc": "2.0",
                      "id": 1,
                      "error": {
                        "code": -32602,
                        "message": "Invalid params"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — missing or invalid API key in the server URL path. Verify that `{API_KEY}` is set to a valid project key."
          },
          "429": {
            "description": "Too Many Requests — the API key has exceeded its rate or quota limits. Back off and retry; consider upgrading the Premium tier for higher limits.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error — unexpected condition. Retry with exponential backoff; if it persists, file a ticket at https://www.ankr.com/support/."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X POST \"https://rpc.ankr.com/multichain/$ANKR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"method\": \"ankr_getNFTHolders\",\n    \"params\": {\n      \"blockchain\": \"arbitrum\",\n      \"contractAddress\": \"0xc36442b4a4522e871399cd717abdd847ab11fe88\",\n      \"pageSize\": 10\n    }\n  }'"
          },
          {
            "lang": "javascript",
            "label": "JavaScript (fetch)",
            "source": "const apiKey = process.env.ANKR_API_KEY;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getNFTHolders',\n    params: {\n      blockchain: 'arbitrum',\n      contractAddress: '0xc36442b4a4522e871399cd717abdd847ab11fe88',\n      pageSize: 10,\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = await res.json();\nconsole.log(data.result);"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import os\n\nimport requests\n\nresponse = requests.post(\n    f\"https://rpc.ankr.com/multichain/{os.environ['ANKR_API_KEY']}\",\n    json={\n        \"jsonrpc\": \"2.0\",\n        \"id\": 1,\n        \"method\": \"ankr_getNFTHolders\",\n        \"params\": {\n            \"blockchain\": \"arbitrum\",\n            \"contractAddress\": \"0xc36442b4a4522e871399cd717abdd847ab11fe88\",\n            \"pageSize\": 10,\n        },\n    },\n    timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json()[\"result\"])"
          },
          {
            "lang": "go",
            "label": "Go (net/http)",
            "source": "package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"os\"\n)\n\nfunc main() {\n    body, _ := json.Marshal(map[string]any{\n        \"jsonrpc\": \"2.0\",\n        \"id\":      1,\n        \"method\":  \"ankr_getNFTHolders\",\n        \"params\":  map[string]any{\n            \"blockchain\":       \"arbitrum\",\n            \"contractAddress\":  \"0xc36442b4a4522e871399cd717abdd847ab11fe88\",\n            \"pageSize\":         10,\n        },\n    })\n    url := fmt.Sprintf(\"https://rpc.ankr.com/multichain/%s\", os.Getenv(\"ANKR_API_KEY\"))\n    resp, err := http.Post(url, \"application/json\", bytes.NewReader(body))\n    if err != nil { panic(err) }\n    defer resp.Body.Close()\n    out, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(out))\n}"
          },
          {
            "lang": "typescript",
            "label": "TypeScript (fetch + types)",
            "source": "interface Result {\n  holders: string[];\n  nextPageToken?: string;\n}\n\ninterface JsonRpcResponse<T> {\n  jsonrpc: '2.0';\n  id: number | string | null;\n  result?: T;\n  error?: { code: number; message: string; data?: unknown };\n}\n\nconst apiKey = process.env.ANKR_API_KEY!;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getNFTHolders',\n    params: {\n      blockchain: 'arbitrum',\n      contractAddress: '0xc36442b4a4522e871399cd717abdd847ab11fe88',\n      pageSize: 10,\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = (await res.json()) as JsonRpcResponse<Result>;\nif (data.error) throw new Error(data.error.message);\nconsole.log(data.result);"
          }
        ]
      }
    },
    "/?ankr_getNFTMetadata": {
      "post": {
        "operationId": "ankr_getNFTMetadata",
        "tags": [
          "NFT API"
        ],
        "summary": "Get metadata and attributes for a single NFT",
        "description": "Returns full metadata for a single NFT (ERC-721, ERC-1155, ENS, or POAP) — collection info, contract type, traits, image URL, and tokenURI.\n\nPass the `contractAddress` of the collection, the `tokenId`, and the `blockchain` the NFT lives on. Set `forceFetch: true` to bypass Ankr's metadata cache and read directly from the contract (slower; useful when the cached metadata is stale).\n\nPart of the **NFT API** product (700 compute units per call, $0.00007 at base rate).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "jsonrpc",
                  "method",
                  "params"
                ],
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "Client-supplied request ID echoed in the response.",
                    "examples": [
                      1
                    ]
                  },
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ],
                    "examples": [
                      "2.0"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "ankr_getNFTMetadata"
                    ],
                    "examples": [
                      "ankr_getNFTMetadata"
                    ]
                  },
                  "params": {
                    "type": "object",
                    "required": [
                      "blockchain",
                      "contractAddress",
                      "tokenId"
                    ],
                    "properties": {
                      "blockchain": {
                        "type": "string",
                        "enum": [
                          "arbitrum",
                          "avalanche",
                          "base",
                          "bsc",
                          "eth",
                          "fantom",
                          "flare",
                          "gnosis",
                          "linea",
                          "optimism",
                          "polygon",
                          "scroll",
                          "stellar",
                          "story_mainnet",
                          "taiko",
                          "telos",
                          "xai",
                          "xlayer",
                          "avalanche_fuji",
                          "base_sepolia",
                          "eth_holesky",
                          "eth_sepolia",
                          "optimism_testnet",
                          "polygon_amoy",
                          "story_aeneid_testnet"
                        ],
                        "description": "Target blockchain identifier.",
                        "examples": [
                          "avalanche"
                        ]
                      },
                      "contractAddress": {
                        "type": "string",
                        "description": "Contract address of the NFT. ENS names accepted on Ethereum.",
                        "examples": [
                          "0x8d01c8ee82e581e55c02117a676b5bbd4734fabb"
                        ]
                      },
                      "tokenId": {
                        "type": "string",
                        "description": "On-chain token ID of the NFT.",
                        "examples": [
                          "23240"
                        ]
                      },
                      "forceFetch": {
                        "type": "boolean",
                        "description": "Read metadata directly from the contract (`true`) or from Ankr's indexed cache (`false`).",
                        "default": false
                      }
                    }
                  }
                },
                "examples": [
                  {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getNFTMetadata",
                    "params": {
                      "blockchain": "avalanche",
                      "contractAddress": "0x8d01c8ee82e581e55c02117a676b5bbd4734fabb",
                      "tokenId": "23240"
                    }
                  }
                ]
              },
              "examples": {
                "Avalanche ERC-721": {
                  "summary": "Single NFT metadata on Avalanche",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getNFTMetadata",
                    "params": {
                      "blockchain": "avalanche",
                      "contractAddress": "0x8d01c8ee82e581e55c02117a676b5bbd4734fabb",
                      "tokenId": "23240"
                    }
                  }
                },
                "Force fetch": {
                  "summary": "Bypass cache and read on-chain",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getNFTMetadata",
                    "params": {
                      "blockchain": "avalanche",
                      "contractAddress": "0x8d01c8ee82e581e55c02117a676b5bbd4734fabb",
                      "tokenId": "23240",
                      "forceFetch": true
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. JSON-RPC `result` contains `metadata` (chain, contract type, IDs) and `attributes` (description, image, traits). JSON-RPC errors are returned with HTTP 200; check for an `error` key in the response body.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "jsonrpc",
                    "result"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "jsonrpc": {
                      "type": "string",
                      "enum": [
                        "2.0"
                      ]
                    },
                    "result": {
                      "type": "object",
                      "required": [
                        "metadata",
                        "attributes"
                      ],
                      "properties": {
                        "attributes": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Per-token attributes.",
                          "properties": {
                            "contractType": {
                              "type": "string",
                              "description": "`ERC721`, `ERC1155`, `ENS`, or `POAP`."
                            },
                            "description": {
                              "type": "string"
                            },
                            "imageUrl": {
                              "type": "string",
                              "description": "URL to the NFT image (often IPFS)."
                            },
                            "name": {
                              "type": "string"
                            },
                            "tokenUrl": {
                              "type": "string",
                              "description": "URL to the off-chain tokenURI."
                            },
                            "traits": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "trait_type": {
                                    "type": "string"
                                  },
                                  "value": {
                                    "type": "string"
                                  }
                                }
                              },
                              "description": "Trait list declared in the token metadata."
                            }
                          }
                        },
                        "metadata": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "description": "Collection-level metadata.",
                          "properties": {
                            "blockchain": {
                              "type": "string",
                              "enum": [
                                "arbitrum",
                                "avalanche",
                                "base",
                                "bsc",
                                "eth",
                                "fantom",
                                "flare",
                                "gnosis",
                                "linea",
                                "optimism",
                                "polygon",
                                "scroll",
                                "stellar",
                                "story_mainnet",
                                "taiko",
                                "telos",
                                "xai",
                                "xlayer",
                                "avalanche_fuji",
                                "base_sepolia",
                                "eth_holesky",
                                "eth_sepolia",
                                "optimism_testnet",
                                "polygon_amoy",
                                "story_aeneid_testnet"
                              ]
                            },
                            "collectionName": {
                              "type": "string"
                            },
                            "collectionSymbol": {
                              "type": "string"
                            },
                            "contractAddress": {
                              "type": "string"
                            },
                            "contractType": {
                              "type": "string",
                              "description": "`ERC721`, `ERC1155`, `ENS`, or `POAP`."
                            },
                            "tokenId": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Avalanche NFT": {
                    "value": {
                      "id": 1,
                      "jsonrpc": "2.0",
                      "result": {
                        "attributes": {
                          "contractType": "ERC721",
                          "description": "Rock #23240, can be used to play Rock Game",
                          "imageUrl": "https://ipfs.io/ipfs/QmPktcEDiRD9qNwc497mwQkJ3zYFQtHwFooPLkgDdRqU4R/23240.png",
                          "name": "Rock 23240",
                          "tokenUrl": "https://ipfs.io/ipfs/QmYen4cGUc3gF9UQnCycq2AADYLYzoM6mvVzoajAXTr7vH/rock23240.json",
                          "traits": [
                            {
                              "trait_type": "face",
                              "value": "Brown"
                            },
                            {
                              "trait_type": "eyes",
                              "value": "Big Shades"
                            }
                          ]
                        },
                        "metadata": {
                          "blockchain": "avalanche",
                          "collectionName": "Rock",
                          "collectionSymbol": "ROCK",
                          "contractAddress": "0x8d01c8ee82e581e55c02117a676b5bbd4734fabb",
                          "contractType": "ERC721",
                          "tokenId": "23240"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — malformed JSON-RPC envelope or invalid `params`. The gateway rejects before the JSON-RPC layer processes the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcError"
                },
                "examples": {
                  "Invalid Params": {
                    "value": {
                      "jsonrpc": "2.0",
                      "id": 1,
                      "error": {
                        "code": -32602,
                        "message": "Invalid params"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — missing or invalid API key in the server URL path. Verify that `{API_KEY}` is set to a valid project key."
          },
          "429": {
            "description": "Too Many Requests — the API key has exceeded its rate or quota limits. Back off and retry; consider upgrading the Premium tier for higher limits.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error — unexpected condition. Retry with exponential backoff; if it persists, file a ticket at https://www.ankr.com/support/."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X POST \"https://rpc.ankr.com/multichain/$ANKR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"method\": \"ankr_getNFTMetadata\",\n    \"params\": {\n      \"blockchain\": \"avalanche\",\n      \"contractAddress\": \"0x8d01c8ee82e581e55c02117a676b5bbd4734fabb\",\n      \"tokenId\": \"23240\"\n    }\n  }'"
          },
          {
            "lang": "javascript",
            "label": "JavaScript (fetch)",
            "source": "const apiKey = process.env.ANKR_API_KEY;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getNFTMetadata',\n    params: {\n      blockchain: 'avalanche',\n      contractAddress: '0x8d01c8ee82e581e55c02117a676b5bbd4734fabb',\n      tokenId: '23240',\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = await res.json();\nconsole.log(data.result);"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import os\n\nimport requests\n\nresponse = requests.post(\n    f\"https://rpc.ankr.com/multichain/{os.environ['ANKR_API_KEY']}\",\n    json={\n        \"jsonrpc\": \"2.0\",\n        \"id\": 1,\n        \"method\": \"ankr_getNFTMetadata\",\n        \"params\": {\n            \"blockchain\": \"avalanche\",\n            \"contractAddress\": \"0x8d01c8ee82e581e55c02117a676b5bbd4734fabb\",\n            \"tokenId\": \"23240\",\n        },\n    },\n    timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json()[\"result\"])"
          },
          {
            "lang": "go",
            "label": "Go (net/http)",
            "source": "package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"os\"\n)\n\nfunc main() {\n    body, _ := json.Marshal(map[string]any{\n        \"jsonrpc\": \"2.0\",\n        \"id\":      1,\n        \"method\":  \"ankr_getNFTMetadata\",\n        \"params\":  map[string]any{\n            \"blockchain\":      \"avalanche\",\n            \"contractAddress\": \"0x8d01c8ee82e581e55c02117a676b5bbd4734fabb\",\n            \"tokenId\":         \"23240\",\n        },\n    })\n    url := fmt.Sprintf(\"https://rpc.ankr.com/multichain/%s\", os.Getenv(\"ANKR_API_KEY\"))\n    resp, err := http.Post(url, \"application/json\", bytes.NewReader(body))\n    if err != nil { panic(err) }\n    defer resp.Body.Close()\n    out, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(out))\n}"
          },
          {
            "lang": "typescript",
            "label": "TypeScript (fetch + types)",
            "source": "interface NftTrait {\n  trait_type: string;\n  value: string;\n}\n\ninterface NftAttributes {\n  contractType: string;\n  description?: string;\n  imageUrl?: string;\n  name?: string;\n  tokenUrl?: string;\n  traits?: NftTrait[];\n}\n\ninterface NftMetadata {\n  blockchain: string;\n  collectionName?: string;\n  collectionSymbol?: string;\n  contractAddress: string;\n  contractType: string;\n  tokenId: string;\n}\n\ninterface Result {\n  attributes: NftAttributes | null;\n  metadata: NftMetadata | null;\n}\n\ninterface JsonRpcResponse<T> {\n  jsonrpc: '2.0';\n  id: number | string | null;\n  result?: T;\n  error?: { code: number; message: string; data?: unknown };\n}\n\nconst apiKey = process.env.ANKR_API_KEY!;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getNFTMetadata',\n    params: {\n      blockchain: 'avalanche',\n      contractAddress: '0x8d01c8ee82e581e55c02117a676b5bbd4734fabb',\n      tokenId: '23240',\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = (await res.json()) as JsonRpcResponse<Result>;\nif (data.error) throw new Error(data.error.message);\nconsole.log(data.result);"
          }
        ]
      }
    },
    "/?ankr_getNFTsByOwner": {
      "post": {
        "operationId": "ankr_getNFTsByOwner",
        "tags": [
          "NFT API"
        ],
        "summary": "List NFTs (ERC-721/ERC-1155/ENS/POAP) owned by a wallet",
        "description": "Returns the NFTs owned by a wallet across one or more supported chains, with collection metadata, token IDs, image URLs, traits, and pagination cursors. Supports ERC-721, ERC-1155, ENS, and POAP.\n\nPass `walletAddress` (hex address, or ENS name on Ethereum). Scope to specific chains with the `blockchain` array, or omit it for all supported chains. Narrow results with the `filter` argument: each entry maps a contract address to an array of token IDs (empty array = all NFTs from that contract).\n\nPagination via `pageSize` (max **50**, default **10**) and `pageToken`. Part of the **NFT API** product (700 compute units per call, $0.00007 at base rate).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "jsonrpc",
                  "method",
                  "params"
                ],
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "Client-supplied request ID echoed in the response.",
                    "examples": [
                      1
                    ]
                  },
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ],
                    "examples": [
                      "2.0"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "ankr_getNFTsByOwner"
                    ],
                    "examples": [
                      "ankr_getNFTsByOwner"
                    ]
                  },
                  "params": {
                    "type": "object",
                    "required": [
                      "walletAddress"
                    ],
                    "properties": {
                      "walletAddress": {
                        "type": "string",
                        "description": "Wallet to query. Hex address (`0x…`) or ENS name on Ethereum (e.g. `vitalik.eth`).",
                        "examples": [
                          "vitalik.eth"
                        ]
                      },
                      "blockchain": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "arbitrum",
                            "avalanche",
                            "base",
                            "bsc",
                            "eth",
                            "fantom",
                            "flare",
                            "gnosis",
                            "linea",
                            "optimism",
                            "polygon",
                            "scroll",
                            "stellar",
                            "story_mainnet",
                            "taiko",
                            "telos",
                            "xai",
                            "xlayer",
                            "avalanche_fuji",
                            "base_sepolia",
                            "eth_holesky",
                            "eth_sepolia",
                            "optimism_testnet",
                            "polygon_amoy",
                            "story_aeneid_testnet"
                          ]
                        },
                        "description": "Optional. One or more chains to query. Omit for all supported chains."
                      },
                      "filter": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "description": "One entry per contract: `{contractAddress: [tokenId, …]}`. Empty array returns all NFTs from the contract."
                        },
                        "description": "Optional. Per-contract filter list."
                      },
                      "pageSize": {
                        "type": "integer",
                        "description": "Number of NFTs per page. Default 10, maximum 50.",
                        "minimum": 1,
                        "maximum": 50,
                        "default": 10
                      },
                      "pageToken": {
                        "type": "string",
                        "description": "Opaque page token from a prior response's `nextPageToken`."
                      }
                    }
                  }
                },
                "examples": [
                  {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getNFTsByOwner",
                    "params": {
                      "walletAddress": "vitalik.eth"
                    }
                  }
                ]
              },
              "examples": {
                "ENS wallet, all chains": {
                  "summary": "ENS name, no chain filter, default page",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getNFTsByOwner",
                    "params": {
                      "walletAddress": "vitalik.eth"
                    }
                  }
                },
                "With contract filter": {
                  "summary": "Filter by two contracts on Ethereum",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getNFTsByOwner",
                    "params": {
                      "walletAddress": "0x0E11A192d574b342C51be9e306694C41547185DD",
                      "blockchain": [
                        "eth"
                      ],
                      "pageSize": 2,
                      "filter": [
                        {
                          "0x700b4b9f39bb1faf5d0d16a20488f2733550bff4": []
                        },
                        {
                          "0xd8682bfa6918b0174f287b888e765b9a1b4dc9c3": [
                            "8937"
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. JSON-RPC `result` envelope contains the NFT asset list, the queried owner, and a pagination cursor. JSON-RPC errors are returned with HTTP 200; check the response body for an `error` key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "jsonrpc",
                    "result"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "jsonrpc": {
                      "type": "string",
                      "enum": [
                        "2.0"
                      ]
                    },
                    "result": {
                      "type": "object",
                      "required": [
                        "owner",
                        "assets"
                      ],
                      "properties": {
                        "owner": {
                          "type": "string",
                          "description": "Hex address of the wallet. ENS names are resolved to addresses before matching."
                        },
                        "nextPageToken": {
                          "type": "string",
                          "description": "Page token for subsequent pages. Empty when no more pages remain."
                        },
                        "assets": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "description": "NFTs owned by the wallet.",
                          "items": {
                            "type": "object",
                            "required": [
                              "blockchain",
                              "tokenId",
                              "contractType"
                            ],
                            "properties": {
                              "blockchain": {
                                "type": "string",
                                "enum": [
                                  "arbitrum",
                                  "avalanche",
                                  "base",
                                  "bsc",
                                  "eth",
                                  "fantom",
                                  "flare",
                                  "gnosis",
                                  "linea",
                                  "optimism",
                                  "polygon",
                                  "scroll",
                                  "stellar",
                                  "story_mainnet",
                                  "taiko",
                                  "telos",
                                  "xai",
                                  "xlayer",
                                  "avalanche_fuji",
                                  "base_sepolia",
                                  "eth_holesky",
                                  "eth_sepolia",
                                  "optimism_testnet",
                                  "polygon_amoy",
                                  "story_aeneid_testnet"
                                ]
                              },
                              "collectionName": {
                                "type": "string",
                                "description": "Collection name."
                              },
                              "contractAddress": {
                                "type": "string",
                                "description": "EVM contract address of the NFT."
                              },
                              "contractType": {
                                "type": "string",
                                "description": "`ERC721`, `ERC1155`, `ENS`, or `POAP`."
                              },
                              "imageUrl": {
                                "type": "string",
                                "description": "Pointer to the NFT image. Usually IPFS."
                              },
                              "name": {
                                "type": "string"
                              },
                              "quantity": {
                                "type": "string",
                                "description": "Token quantity (>1 only for ERC-1155)."
                              },
                              "symbol": {
                                "type": "string"
                              },
                              "tokenId": {
                                "type": "string",
                                "description": "On-chain token ID."
                              },
                              "tokenUrl": {
                                "type": "string",
                                "description": "URL to the tokenURI (metadata)."
                              },
                              "traits": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "trait_type": {
                                      "type": "string"
                                    },
                                    "value": {
                                      "type": "string"
                                    }
                                  }
                                },
                                "description": "Trait list as declared in the NFT metadata."
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Paginated NFT list": {
                    "value": {
                      "id": 1,
                      "jsonrpc": "2.0",
                      "result": {
                        "owner": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
                        "nextPageToken": "2hMDmwWDCKfaN8VPERnkckY4JWbRyDurn8LyreDRZbyprWUErKSC6AoGbKerumFnyG1SAkWHxs",
                        "assets": [
                          {
                            "blockchain": "eth",
                            "collectionName": "Cool Oliens",
                            "contractAddress": "0x03a1e037df88001bf867e3bcffa7e48bab0cf5a6",
                            "contractType": "ERC721",
                            "imageUrl": "https://ipfs.io/ipfs/QmTzuLQSn78keGt3n36b3tNNs7B3WMjo2SNJUF9rRshPjA/116.png",
                            "name": "Cool Oliens #117",
                            "symbol": "COOLIEN",
                            "tokenId": "116",
                            "tokenUrl": "https://ipfs.io/ipfs/QmdT4pLoe5w93rCnESnaEXBU7PaAiSSWuDDXurLhmzVvAz/116",
                            "traits": [
                              {
                                "trait_type": "NFT ID",
                                "value": "117"
                              },
                              {
                                "trait_type": "Rank",
                                "value": "199"
                              }
                            ]
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — malformed JSON-RPC envelope or invalid `params`. The gateway rejects before the JSON-RPC layer processes the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcError"
                },
                "examples": {
                  "Invalid Params": {
                    "value": {
                      "jsonrpc": "2.0",
                      "id": 1,
                      "error": {
                        "code": -32602,
                        "message": "Invalid params"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — missing or invalid API key in the server URL path. Verify that `{API_KEY}` is set to a valid project key."
          },
          "429": {
            "description": "Too Many Requests — the API key has exceeded its rate or quota limits. Back off and retry; consider upgrading the Premium tier for higher limits.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error — unexpected condition. Retry with exponential backoff; if it persists, file a ticket at https://www.ankr.com/support/."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X POST \"https://rpc.ankr.com/multichain/$ANKR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"method\": \"ankr_getNFTsByOwner\",\n    \"params\": {\n      \"walletAddress\": \"0x0E11A192d574b342C51be9e306694C41547185DD\",\n      \"blockchain\": [\"eth\"],\n      \"pageSize\": 2,\n      \"filter\": [\n        { \"0x700b4b9f39bb1faf5d0d16a20488f2733550bff4\": [] },\n        { \"0xd8682bfa6918b0174f287b888e765b9a1b4dc9c3\": [\"8937\"] }\n      ]\n    }\n  }'"
          },
          {
            "lang": "javascript",
            "label": "JavaScript (fetch)",
            "source": "const apiKey = process.env.ANKR_API_KEY;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getNFTsByOwner',\n    params: {\n      walletAddress: '0x0E11A192d574b342C51be9e306694C41547185DD',\n      blockchain: ['eth'],\n      pageSize: 2,\n      filter: [\n        { '0x700b4b9f39bb1faf5d0d16a20488f2733550bff4': [] },\n        { '0xd8682bfa6918b0174f287b888e765b9a1b4dc9c3': ['8937'] },\n      ],\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = await res.json();\nconsole.log(data.result);"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import os\n\nimport requests\n\nresponse = requests.post(\n    f\"https://rpc.ankr.com/multichain/{os.environ['ANKR_API_KEY']}\",\n    json={\n        \"jsonrpc\": \"2.0\",\n        \"id\": 1,\n        \"method\": \"ankr_getNFTsByOwner\",\n        \"params\": {\n            \"walletAddress\": \"0x0E11A192d574b342C51be9e306694C41547185DD\",\n            \"blockchain\": [\"eth\"],\n            \"pageSize\": 2,\n            \"filter\": [\n                {\"0x700b4b9f39bb1faf5d0d16a20488f2733550bff4\": []},\n                {\"0xd8682bfa6918b0174f287b888e765b9a1b4dc9c3\": [\"8937\"]},\n            ],\n        },\n    },\n    timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json()[\"result\"])"
          },
          {
            "lang": "go",
            "label": "Go (net/http)",
            "source": "package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"os\"\n)\n\nfunc main() {\n    body, _ := json.Marshal(map[string]any{\n        \"jsonrpc\": \"2.0\",\n        \"id\":      1,\n        \"method\":  \"ankr_getNFTsByOwner\",\n        \"params\":  map[string]any{\n            \"walletAddress\": \"0x0E11A192d574b342C51be9e306694C41547185DD\",\n            \"blockchain\":    []string{\"eth\"},\n            \"pageSize\":      2,\n            \"filter\": []map[string][]string{\n                {\"0x700b4b9f39bb1faf5d0d16a20488f2733550bff4\": {}},\n                {\"0xd8682bfa6918b0174f287b888e765b9a1b4dc9c3\": {\"8937\"}},\n            },\n        },\n    })\n    url := fmt.Sprintf(\"https://rpc.ankr.com/multichain/%s\", os.Getenv(\"ANKR_API_KEY\"))\n    resp, err := http.Post(url, \"application/json\", bytes.NewReader(body))\n    if err != nil { panic(err) }\n    defer resp.Body.Close()\n    out, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(out))\n}"
          },
          {
            "lang": "typescript",
            "label": "TypeScript (fetch + types)",
            "source": "interface NftTrait {\n  trait_type: string;\n  value: string;\n}\n\ninterface NftAsset {\n  blockchain: string;\n  collectionName?: string;\n  contractAddress?: string;\n  contractType: 'ERC721' | 'ERC1155' | string;\n  imageUrl?: string;\n  name?: string;\n  quantity?: string;\n  symbol?: string;\n  tokenId: string;\n  tokenUrl?: string;\n  traits?: NftTrait[];\n}\n\ninterface Result {\n  owner: string;\n  assets: NftAsset[];\n  nextPageToken?: string;\n}\n\ninterface JsonRpcResponse<T> {\n  jsonrpc: '2.0';\n  id: number | string | null;\n  result?: T;\n  error?: { code: number; message: string; data?: unknown };\n}\n\nconst apiKey = process.env.ANKR_API_KEY!;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getNFTsByOwner',\n    params: {\n      walletAddress: '0x0E11A192d574b342C51be9e306694C41547185DD',\n      blockchain: ['eth'],\n      pageSize: 2,\n      filter: [\n        { '0x700b4b9f39bb1faf5d0d16a20488f2733550bff4': [] },\n        { '0xd8682bfa6918b0174f287b888e765b9a1b4dc9c3': ['8937'] },\n      ],\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = (await res.json()) as JsonRpcResponse<Result>;\nif (data.error) throw new Error(data.error.message);\nconsole.log(data.result);"
          }
        ]
      }
    },
    "/?ankr_getNftTransfers": {
      "post": {
        "operationId": "ankr_getNftTransfers",
        "tags": [
          "NFT API"
        ],
        "summary": "List NFT transfers involving one or more wallets",
        "description": "Returns the on-chain history of NFT transfers in which the specified wallet(s) appear as sender or recipient. Each entry carries the contract, token ID, collection name, image URL, block height, and timestamp.\n\nPass an `address` array (single or multiple wallets). Optionally scope by `blockchain`, block range (`fromBlock` / `toBlock`), or wall-clock range (`fromTimestamp` / `toTimestamp`). Paginate with `pageSize` (default `100`, max `10000`) and `pageToken`.\n\nPart of the **NFT API** product (700 compute units per call, $0.00007 at base rate).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "jsonrpc",
                  "method",
                  "params"
                ],
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "Client-supplied request ID echoed in the response.",
                    "examples": [
                      1
                    ]
                  },
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ],
                    "examples": [
                      "2.0"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "ankr_getNftTransfers"
                    ],
                    "examples": [
                      "ankr_getNftTransfers"
                    ]
                  },
                  "params": {
                    "type": "object",
                    "properties": {
                      "address": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Wallet address(es) to query. ENS accepted on Ethereum.",
                        "examples": [
                          [
                            "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
                          ]
                        ]
                      },
                      "blockchain": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "arbitrum",
                            "avalanche",
                            "base",
                            "bsc",
                            "eth",
                            "fantom",
                            "flare",
                            "gnosis",
                            "linea",
                            "optimism",
                            "polygon",
                            "scroll",
                            "stellar",
                            "story_mainnet",
                            "taiko",
                            "telos",
                            "xai",
                            "xlayer",
                            "avalanche_fuji",
                            "base_sepolia",
                            "eth_holesky",
                            "eth_sepolia",
                            "optimism_testnet",
                            "polygon_amoy",
                            "story_aeneid_testnet"
                          ]
                        },
                        "description": "Chains to query. Omit or pass an empty array to query all supported chains.",
                        "examples": [
                          [
                            "bsc"
                          ]
                        ]
                      },
                      "fromBlock": {
                        "type": [
                          "integer",
                          "string"
                        ],
                        "description": "Start block (integer or `earliest`, or hex).",
                        "minimum": 0
                      },
                      "toBlock": {
                        "type": [
                          "integer",
                          "string"
                        ],
                        "description": "End block (integer or `latest`, or hex)."
                      },
                      "fromTimestamp": {
                        "type": "integer",
                        "description": "UNIX timestamp lower bound.",
                        "minimum": 0,
                        "examples": [
                          1655197483
                        ]
                      },
                      "toTimestamp": {
                        "type": "integer",
                        "description": "UNIX timestamp upper bound.",
                        "minimum": 0,
                        "examples": [
                          1671974699
                        ]
                      },
                      "descOrder": {
                        "type": "boolean",
                        "description": "Sort newest first when `true`.",
                        "default": false
                      },
                      "pageSize": {
                        "type": "integer",
                        "description": "Entries per page. Default `100`, max `10000`.",
                        "minimum": 1,
                        "maximum": 10000,
                        "default": 100,
                        "examples": [
                          2
                        ]
                      },
                      "pageToken": {
                        "type": "string",
                        "description": "Opaque page token from a prior response's `nextPageToken`."
                      }
                    }
                  }
                },
                "examples": [
                  {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getNftTransfers",
                    "params": {
                      "address": [
                        "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
                      ],
                      "blockchain": [
                        "bsc"
                      ],
                      "fromTimestamp": 1655197483,
                      "toTimestamp": 1671974699,
                      "pageSize": 2
                    }
                  }
                ]
              },
              "examples": {
                "By timestamp range": {
                  "summary": "BSC transfers in a time window",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getNftTransfers",
                    "params": {
                      "address": [
                        "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
                      ],
                      "blockchain": [
                        "bsc"
                      ],
                      "fromTimestamp": 1655197483,
                      "toTimestamp": 1671974699,
                      "pageSize": 2
                    }
                  }
                },
                "Multi-chain, latest first": {
                  "summary": "ETH + BSC, descending order",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getNftTransfers",
                    "params": {
                      "address": [
                        "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
                      ],
                      "blockchain": [
                        "eth",
                        "bsc"
                      ],
                      "descOrder": true,
                      "pageSize": 50
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. JSON-RPC `result` envelope contains the `transfers` array and pagination cursor. JSON-RPC errors are returned with HTTP 200 — check for an `error` key in the response body.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "jsonrpc",
                    "result"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "jsonrpc": {
                      "type": "string",
                      "enum": [
                        "2.0"
                      ]
                    },
                    "result": {
                      "type": "object",
                      "required": [
                        "transfers"
                      ],
                      "properties": {
                        "nextPageToken": {
                          "type": "string",
                          "description": "Cursor for the next page."
                        },
                        "transfers": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "description": "NFT transfers for the wallets in the query.",
                          "items": {
                            "type": "object",
                            "required": [
                              "fromAddress",
                              "toAddress",
                              "value",
                              "type",
                              "blockchain",
                              "transactionHash",
                              "collectionName",
                              "collectionSymbol",
                              "name",
                              "imageUrl",
                              "blockHeight",
                              "timestamp"
                            ],
                            "properties": {
                              "blockHeight": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "blockchain": {
                                "type": "string",
                                "enum": [
                                  "arbitrum",
                                  "avalanche",
                                  "base",
                                  "bsc",
                                  "eth",
                                  "fantom",
                                  "flare",
                                  "gnosis",
                                  "linea",
                                  "optimism",
                                  "polygon",
                                  "scroll",
                                  "stellar",
                                  "story_mainnet",
                                  "taiko",
                                  "telos",
                                  "xai",
                                  "xlayer",
                                  "avalanche_fuji",
                                  "base_sepolia",
                                  "eth_holesky",
                                  "eth_sepolia",
                                  "optimism_testnet",
                                  "polygon_amoy",
                                  "story_aeneid_testnet"
                                ]
                              },
                              "collectionName": {
                                "type": "string"
                              },
                              "collectionSymbol": {
                                "type": "string"
                              },
                              "contractAddress": {
                                "type": "string",
                                "description": "Contract address of the NFT."
                              },
                              "fromAddress": {
                                "type": "string"
                              },
                              "imageUrl": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "timestamp": {
                                "type": "integer",
                                "minimum": 0,
                                "description": "UNIX timestamp of the block."
                              },
                              "toAddress": {
                                "type": "string"
                              },
                              "tokenId": {
                                "type": "string"
                              },
                              "transactionHash": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "description": "Contract type: `ERC721` or `ERC1155`."
                              },
                              "value": {
                                "type": "string",
                                "description": "NFTs transferred (>1 only for ERC-1155)."
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Two BSC transfers": {
                    "value": {
                      "id": 1,
                      "jsonrpc": "2.0",
                      "result": {
                        "transfers": [
                          {
                            "blockHeight": 19116577,
                            "blockchain": "bsc",
                            "collectionName": "",
                            "collectionSymbol": "",
                            "contractAddress": "0x36f8f51f65fe200311f709b797baf4e193dd0b0d",
                            "fromAddress": "0x186ea56f0a40c5593a697b3e804968b8c5920ff3",
                            "imageUrl": "",
                            "name": "",
                            "timestamp": 1656519782,
                            "toAddress": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
                            "tokenId": "12",
                            "transactionHash": "0x95ae64003124fe4c3e8702364136d25c3d0f2fdbbf953bd815785f06d5cb6025",
                            "type": "ERC1155",
                            "value": "1"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — malformed JSON-RPC envelope or invalid `params`. The gateway rejects before the JSON-RPC layer processes the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcError"
                },
                "examples": {
                  "Invalid Params": {
                    "value": {
                      "jsonrpc": "2.0",
                      "id": 1,
                      "error": {
                        "code": -32602,
                        "message": "Invalid params"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — missing or invalid API key in the server URL path. Verify that `{API_KEY}` is set to a valid project key."
          },
          "429": {
            "description": "Too Many Requests — the API key has exceeded its rate or quota limits. Back off and retry; consider upgrading the Premium tier for higher limits.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error — unexpected condition. Retry with exponential backoff; if it persists, file a ticket at https://www.ankr.com/support/."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X POST \"https://rpc.ankr.com/multichain/$ANKR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"method\": \"ankr_getNftTransfers\",\n    \"params\": {\n      \"address\": [\"0xd8da6bf26964af9d7eed9e03e53415d37aa96045\"],\n      \"blockchain\": [\"bsc\"],\n      \"fromTimestamp\": 1655197483,\n      \"toTimestamp\": 1671974699,\n      \"pageSize\": 2\n    }\n  }'"
          },
          {
            "lang": "javascript",
            "label": "JavaScript (fetch)",
            "source": "const apiKey = process.env.ANKR_API_KEY;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getNftTransfers',\n    params: {\n      address: ['0xd8da6bf26964af9d7eed9e03e53415d37aa96045'],\n      blockchain: ['bsc'],\n      fromTimestamp: 1655197483,\n      toTimestamp: 1671974699,\n      pageSize: 2,\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = await res.json();\nconsole.log(data.result);"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import os\n\nimport requests\n\nresponse = requests.post(\n    f\"https://rpc.ankr.com/multichain/{os.environ['ANKR_API_KEY']}\",\n    json={\n        \"jsonrpc\": \"2.0\",\n        \"id\": 1,\n        \"method\": \"ankr_getNftTransfers\",\n        \"params\": {\n            \"address\": [\"0xd8da6bf26964af9d7eed9e03e53415d37aa96045\"],\n            \"blockchain\": [\"bsc\"],\n            \"fromTimestamp\": 1655197483,\n            \"toTimestamp\": 1671974699,\n            \"pageSize\": 2,\n        },\n    },\n    timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json()[\"result\"])"
          },
          {
            "lang": "go",
            "label": "Go (net/http)",
            "source": "package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"os\"\n)\n\nfunc main() {\n    body, _ := json.Marshal(map[string]any{\n        \"jsonrpc\": \"2.0\",\n        \"id\":      1,\n        \"method\":  \"ankr_getNftTransfers\",\n        \"params\":  map[string]any{\n            \"address\":       []string{\"0xd8da6bf26964af9d7eed9e03e53415d37aa96045\"},\n            \"blockchain\":    []string{\"bsc\"},\n            \"fromTimestamp\": 1655197483,\n            \"toTimestamp\":   1671974699,\n            \"pageSize\":      2,\n        },\n    })\n    url := fmt.Sprintf(\"https://rpc.ankr.com/multichain/%s\", os.Getenv(\"ANKR_API_KEY\"))\n    resp, err := http.Post(url, \"application/json\", bytes.NewReader(body))\n    if err != nil { panic(err) }\n    defer resp.Body.Close()\n    out, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(out))\n}"
          },
          {
            "lang": "typescript",
            "label": "TypeScript (fetch + types)",
            "source": "interface NftTransfer {\n  blockchain: string;\n  blockHeight: number;\n  collectionName: string;\n  collectionSymbol: string;\n  contractAddress?: string;\n  fromAddress: string;\n  imageUrl: string;\n  name: string;\n  timestamp: number;\n  toAddress: string;\n  tokenId?: string;\n  transactionHash: string;\n  type: string;\n  value: string;\n}\n\ninterface Result {\n  transfers: NftTransfer[];\n  nextPageToken?: string;\n}\n\ninterface JsonRpcResponse<T> {\n  jsonrpc: '2.0';\n  id: number | string | null;\n  result?: T;\n  error?: { code: number; message: string; data?: unknown };\n}\n\nconst apiKey = process.env.ANKR_API_KEY!;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getNftTransfers',\n    params: {\n      address: ['0xd8da6bf26964af9d7eed9e03e53415d37aa96045'],\n      blockchain: ['bsc'],\n      fromTimestamp: 1655197483,\n      toTimestamp: 1671974699,\n      pageSize: 2,\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = (await res.json()) as JsonRpcResponse<Result>;\nif (data.error) throw new Error(data.error.message);\nconsole.log(data.result);"
          }
        ]
      }
    },
    "/?ankr_getTokenHolders": {
      "post": {
        "operationId": "ankr_getTokenHolders",
        "tags": [
          "Token API"
        ],
        "summary": "List wallet holders of an ERC-20 token, ranked by balance",
        "description": "Returns wallet addresses that hold the specified ERC-20 token, with each holder's human-readable balance and the raw integer balance (`value × 10^decimals`). Holders are returned ranked by balance, descending.\n\nPass `contractAddress` of the token plus the `blockchain` it lives on. Paginate with `pageSize` (default `10000`, max `10000`) and the `nextPageToken` echoed in each response.\n\nPart of the **Token API** product (700 compute units per call, $0.00007 at base rate).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "jsonrpc",
                  "method",
                  "params"
                ],
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "Client-supplied request ID echoed in the response.",
                    "examples": [
                      1
                    ]
                  },
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ],
                    "examples": [
                      "2.0"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "ankr_getTokenHolders"
                    ],
                    "examples": [
                      "ankr_getTokenHolders"
                    ]
                  },
                  "params": {
                    "type": "object",
                    "required": [
                      "blockchain",
                      "contractAddress"
                    ],
                    "properties": {
                      "blockchain": {
                        "type": "string",
                        "enum": [
                          "arbitrum",
                          "avalanche",
                          "base",
                          "bsc",
                          "eth",
                          "fantom",
                          "flare",
                          "gnosis",
                          "linea",
                          "optimism",
                          "polygon",
                          "scroll",
                          "stellar",
                          "story_mainnet",
                          "taiko",
                          "telos",
                          "xai",
                          "xlayer",
                          "avalanche_fuji",
                          "base_sepolia",
                          "eth_holesky",
                          "eth_sepolia",
                          "optimism_testnet",
                          "polygon_amoy",
                          "story_aeneid_testnet"
                        ],
                        "description": "Target blockchain identifier.",
                        "examples": [
                          "eth"
                        ]
                      },
                      "contractAddress": {
                        "type": "string",
                        "description": "Token contract address.",
                        "examples": [
                          "0x40eb746dee876ac1e78697b7ca85142d178a1fc8"
                        ]
                      },
                      "pageSize": {
                        "type": "integer",
                        "description": "Entries per page. Default `10000`, max `10000`.",
                        "minimum": 1,
                        "maximum": 10000,
                        "default": 10000,
                        "examples": [
                          2
                        ]
                      },
                      "pageToken": {
                        "type": "string",
                        "description": "Opaque page token from a prior response's `nextPageToken`."
                      }
                    }
                  }
                },
                "examples": [
                  {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getTokenHolders",
                    "params": {
                      "blockchain": "eth",
                      "contractAddress": "0x40eb746dee876ac1e78697b7ca85142d178a1fc8",
                      "pageSize": 2
                    }
                  }
                ]
              },
              "examples": {
                "First page": {
                  "summary": "First page of holders",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getTokenHolders",
                    "params": {
                      "blockchain": "eth",
                      "contractAddress": "0x40eb746dee876ac1e78697b7ca85142d178a1fc8",
                      "pageSize": 2
                    }
                  }
                },
                "With page token": {
                  "summary": "Subsequent page",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getTokenHolders",
                    "params": {
                      "blockchain": "eth",
                      "contractAddress": "0x40eb746dee876ac1e78697b7ca85142d178a1fc8",
                      "pageSize": 2,
                      "pageToken": "HUAjC8b1LGxx7soyEPoojoahpqtPaAhk6jTx35dALF6jLH85QD4oHWRA8E1Wf9MqjffsuHfg6pg5ac6Eocb"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. JSON-RPC `result` carries holder list plus token decimals and total holder count. JSON-RPC errors are returned with HTTP 200; check the response body for an `error` key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "jsonrpc",
                    "result"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "jsonrpc": {
                      "type": "string",
                      "enum": [
                        "2.0"
                      ]
                    },
                    "result": {
                      "type": "object",
                      "required": [
                        "blockchain",
                        "contractAddress",
                        "tokenDecimals",
                        "holders",
                        "holdersCount",
                        "nextPageToken"
                      ],
                      "properties": {
                        "blockchain": {
                          "type": "string",
                          "enum": [
                            "arbitrum",
                            "avalanche",
                            "base",
                            "bsc",
                            "eth",
                            "fantom",
                            "flare",
                            "gnosis",
                            "linea",
                            "optimism",
                            "polygon",
                            "scroll",
                            "stellar",
                            "story_mainnet",
                            "taiko",
                            "telos",
                            "xai",
                            "xlayer",
                            "avalanche_fuji",
                            "base_sepolia",
                            "eth_holesky",
                            "eth_sepolia",
                            "optimism_testnet",
                            "polygon_amoy",
                            "story_aeneid_testnet"
                          ]
                        },
                        "contractAddress": {
                          "type": "string"
                        },
                        "tokenDecimals": {
                          "type": "integer"
                        },
                        "holdersCount": {
                          "type": "integer",
                          "description": "Total holders of the token."
                        },
                        "nextPageToken": {
                          "type": "string"
                        },
                        "holders": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "items": {
                            "type": "object",
                            "properties": {
                              "balance": {
                                "type": "string",
                                "description": "Human-readable balance."
                              },
                              "balanceRawInteger": {
                                "type": "string",
                                "description": "Raw integer balance (`value × 10^decimals`)."
                              },
                              "holderAddress": {
                                "type": "string",
                                "description": "Holder wallet address."
                              }
                            }
                          },
                          "description": "Holder list (sorted by balance, descending)."
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Holders sample": {
                    "value": {
                      "id": 1,
                      "jsonrpc": "2.0",
                      "result": {
                        "blockchain": "eth",
                        "contractAddress": "0x40eb746dee876ac1e78697b7ca85142d178a1fc8",
                        "holders": [
                          {
                            "balance": "15217676.432428",
                            "balanceRawInteger": "15217676432428000000000000",
                            "holderAddress": "0x000000000000000000000000000000000000dead"
                          },
                          {
                            "balance": "0.000000000000000001",
                            "balanceRawInteger": "1",
                            "holderAddress": "0x000000000000084e91743124a982076c59f10084"
                          }
                        ],
                        "holdersCount": 1843,
                        "nextPageToken": "HUAjC8b1LGxx7soyEPoojoahpqtPaAhk6jTx35dALF6jLH85QD4oHWRA8E1Wf9MqjffsuHfg6pg5ac6Eocb",
                        "tokenDecimals": 18
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — malformed JSON-RPC envelope or invalid `params`. The gateway rejects before the JSON-RPC layer processes the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcError"
                },
                "examples": {
                  "Invalid Params": {
                    "value": {
                      "jsonrpc": "2.0",
                      "id": 1,
                      "error": {
                        "code": -32602,
                        "message": "Invalid params"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — missing or invalid API key in the server URL path. Verify that `{API_KEY}` is set to a valid project key."
          },
          "429": {
            "description": "Too Many Requests — the API key has exceeded its rate or quota limits. Back off and retry; consider upgrading the Premium tier for higher limits.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error — unexpected condition. Retry with exponential backoff; if it persists, file a ticket at https://www.ankr.com/support/."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X POST \"https://rpc.ankr.com/multichain/$ANKR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"method\": \"ankr_getTokenHolders\",\n    \"params\": {\n      \"blockchain\": \"eth\",\n      \"contractAddress\": \"0x40eb746dee876ac1e78697b7ca85142d178a1fc8\",\n      \"pageSize\": 2\n    }\n  }'"
          },
          {
            "lang": "javascript",
            "label": "JavaScript (fetch)",
            "source": "const apiKey = process.env.ANKR_API_KEY;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getTokenHolders',\n    params: {\n      blockchain: 'eth',\n      contractAddress: '0x40eb746dee876ac1e78697b7ca85142d178a1fc8',\n      pageSize: 2,\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = await res.json();\nconsole.log(data.result);"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import os\n\nimport requests\n\nresponse = requests.post(\n    f\"https://rpc.ankr.com/multichain/{os.environ['ANKR_API_KEY']}\",\n    json={\n        \"jsonrpc\": \"2.0\",\n        \"id\": 1,\n        \"method\": \"ankr_getTokenHolders\",\n        \"params\": {\n            \"blockchain\": \"eth\",\n            \"contractAddress\": \"0x40eb746dee876ac1e78697b7ca85142d178a1fc8\",\n            \"pageSize\": 2,\n        },\n    },\n    timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json()[\"result\"])"
          },
          {
            "lang": "go",
            "label": "Go (net/http)",
            "source": "package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"os\"\n)\n\nfunc main() {\n    body, _ := json.Marshal(map[string]any{\n        \"jsonrpc\": \"2.0\",\n        \"id\":      1,\n        \"method\":  \"ankr_getTokenHolders\",\n        \"params\":  map[string]any{\n            \"blockchain\":       \"eth\",\n            \"contractAddress\":  \"0x40eb746dee876ac1e78697b7ca85142d178a1fc8\",\n            \"pageSize\":         2,\n        },\n    })\n    url := fmt.Sprintf(\"https://rpc.ankr.com/multichain/%s\", os.Getenv(\"ANKR_API_KEY\"))\n    resp, err := http.Post(url, \"application/json\", bytes.NewReader(body))\n    if err != nil { panic(err) }\n    defer resp.Body.Close()\n    out, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(out))\n}"
          },
          {
            "lang": "typescript",
            "label": "TypeScript (fetch + types)",
            "source": "interface TokenHolder {\n  balance: string;\n  balanceRawInteger: string;\n  holderAddress: string;\n}\n\ninterface Result {\n  blockchain: string;\n  contractAddress: string;\n  tokenDecimals: number;\n  holders: TokenHolder[];\n  holdersCount: number;\n  nextPageToken: string;\n}\n\ninterface JsonRpcResponse<T> {\n  jsonrpc: '2.0';\n  id: number | string | null;\n  result?: T;\n  error?: { code: number; message: string; data?: unknown };\n}\n\nconst apiKey = process.env.ANKR_API_KEY!;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getTokenHolders',\n    params: {\n      blockchain: 'eth',\n      contractAddress: '0x40eb746dee876ac1e78697b7ca85142d178a1fc8',\n      pageSize: 2,\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = (await res.json()) as JsonRpcResponse<Result>;\nif (data.error) throw new Error(data.error.message);\nconsole.log(data.result);"
          }
        ]
      }
    },
    "/?ankr_getTokenHoldersCount": {
      "post": {
        "operationId": "ankr_getTokenHoldersCount",
        "tags": [
          "Token API"
        ],
        "summary": "Get day-by-day holder count history for an ERC-20 token",
        "description": "Returns the per-day count of unique holders for the specified ERC-20 token, along with the total token amount on-chain at each snapshot. Useful for charting distribution trends or feeding token-analytics dashboards.\n\nPass `contractAddress` of the token plus the `blockchain` it lives on. The history is paginated; use `pageSize` (default `10000`, max `10000`) and `pageToken` to walk further back in time. `latestHoldersCount` is the most recent week's count.\n\nPart of the **Token API** product (700 compute units per call, $0.00007 at base rate).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "jsonrpc",
                  "method",
                  "params"
                ],
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "Client-supplied request ID echoed in the response.",
                    "examples": [
                      1
                    ]
                  },
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ],
                    "examples": [
                      "2.0"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "ankr_getTokenHoldersCount"
                    ],
                    "examples": [
                      "ankr_getTokenHoldersCount"
                    ]
                  },
                  "params": {
                    "type": "object",
                    "required": [
                      "blockchain",
                      "contractAddress"
                    ],
                    "properties": {
                      "blockchain": {
                        "type": "string",
                        "enum": [
                          "arbitrum",
                          "avalanche",
                          "base",
                          "bsc",
                          "eth",
                          "fantom",
                          "flare",
                          "gnosis",
                          "linea",
                          "optimism",
                          "polygon",
                          "scroll",
                          "stellar",
                          "story_mainnet",
                          "taiko",
                          "telos",
                          "xai",
                          "xlayer",
                          "avalanche_fuji",
                          "base_sepolia",
                          "eth_holesky",
                          "eth_sepolia",
                          "optimism_testnet",
                          "polygon_amoy",
                          "story_aeneid_testnet"
                        ],
                        "description": "Target blockchain identifier.",
                        "examples": [
                          "eth"
                        ]
                      },
                      "contractAddress": {
                        "type": "string",
                        "description": "Token contract address.",
                        "examples": [
                          "0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852"
                        ]
                      },
                      "pageSize": {
                        "type": "integer",
                        "description": "Entries per page. Default `10000`, max `10000`.",
                        "minimum": 1,
                        "maximum": 10000,
                        "default": 10000,
                        "examples": [
                          2
                        ]
                      },
                      "pageToken": {
                        "type": "string",
                        "description": "Opaque page token from a prior response's `nextPageToken`."
                      }
                    }
                  }
                },
                "examples": [
                  {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getTokenHoldersCount",
                    "params": {
                      "blockchain": "eth",
                      "contractAddress": "0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852",
                      "pageSize": 2
                    }
                  }
                ]
              },
              "examples": {
                "Latest history": {
                  "summary": "First page (latest days)",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getTokenHoldersCount",
                    "params": {
                      "blockchain": "eth",
                      "contractAddress": "0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852",
                      "pageSize": 2
                    }
                  }
                },
                "Earlier history": {
                  "summary": "Walk back with page token",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getTokenHoldersCount",
                    "params": {
                      "blockchain": "eth",
                      "contractAddress": "0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852",
                      "pageSize": 2,
                      "pageToken": "EmDqUkUByQeZ9jgedKukeKkJff9kFuPLMX6mubHUvKN1cRb3s78Yn"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. JSON-RPC `result` carries the daily history and the latest holder count. JSON-RPC errors are returned with HTTP 200; check the response body for an `error` key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "jsonrpc",
                    "result"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "jsonrpc": {
                      "type": "string",
                      "enum": [
                        "2.0"
                      ]
                    },
                    "result": {
                      "type": "object",
                      "required": [
                        "blockchain",
                        "contractAddress",
                        "tokenDecimals",
                        "holderCountHistory",
                        "nextPageToken",
                        "latestHoldersCount"
                      ],
                      "properties": {
                        "blockchain": {
                          "type": "string",
                          "enum": [
                            "arbitrum",
                            "avalanche",
                            "base",
                            "bsc",
                            "eth",
                            "fantom",
                            "flare",
                            "gnosis",
                            "linea",
                            "optimism",
                            "polygon",
                            "scroll",
                            "stellar",
                            "story_mainnet",
                            "taiko",
                            "telos",
                            "xai",
                            "xlayer",
                            "avalanche_fuji",
                            "base_sepolia",
                            "eth_holesky",
                            "eth_sepolia",
                            "optimism_testnet",
                            "polygon_amoy",
                            "story_aeneid_testnet"
                          ]
                        },
                        "contractAddress": {
                          "type": "string"
                        },
                        "tokenDecimals": {
                          "type": "integer"
                        },
                        "latestHoldersCount": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Most recent week's holder count."
                        },
                        "nextPageToken": {
                          "type": "string"
                        },
                        "holderCountHistory": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "items": {
                            "type": "object",
                            "properties": {
                              "holderCount": {
                                "type": "integer",
                                "description": "Distinct holders that day."
                              },
                              "lastUpdatedAt": {
                                "type": "string",
                                "description": "Snapshot timestamp (ISO 8601)."
                              },
                              "totalAmount": {
                                "type": "string",
                                "description": "Human-readable total token amount on-chain."
                              },
                              "totalAmountRawInteger": {
                                "type": "string",
                                "description": "Raw integer total (`value × 10^decimals`)."
                              }
                            }
                          },
                          "description": "Per-day snapshots (newest first)."
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Holder count history": {
                    "value": {
                      "id": 1,
                      "jsonrpc": "2.0",
                      "result": {
                        "blockchain": "eth",
                        "contractAddress": "0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852",
                        "holderCountHistory": [
                          {
                            "holderCount": 2617,
                            "lastUpdatedAt": "2022-12-27T02:41:31Z",
                            "totalAmount": "0.148685211383143825",
                            "totalAmountRawInteger": "148685211383143825"
                          },
                          {
                            "holderCount": 2628,
                            "lastUpdatedAt": "2022-12-26T02:39:57Z",
                            "totalAmount": "0.148695704516316983",
                            "totalAmountRawInteger": "148695704516316983"
                          }
                        ],
                        "latestHoldersCount": 2628,
                        "nextPageToken": "EmDqUkUByQeZ9jgedKukeKkJff9kFuPLMX6mubHUvKN1cRb3s78Yn",
                        "tokenDecimals": 18
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — malformed JSON-RPC envelope or invalid `params`. The gateway rejects before the JSON-RPC layer processes the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcError"
                },
                "examples": {
                  "Invalid Params": {
                    "value": {
                      "jsonrpc": "2.0",
                      "id": 1,
                      "error": {
                        "code": -32602,
                        "message": "Invalid params"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — missing or invalid API key in the server URL path. Verify that `{API_KEY}` is set to a valid project key."
          },
          "429": {
            "description": "Too Many Requests — the API key has exceeded its rate or quota limits. Back off and retry; consider upgrading the Premium tier for higher limits.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error — unexpected condition. Retry with exponential backoff; if it persists, file a ticket at https://www.ankr.com/support/."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X POST \"https://rpc.ankr.com/multichain/$ANKR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"method\": \"ankr_getTokenHoldersCount\",\n    \"params\": {\n      \"blockchain\": \"eth\",\n      \"contractAddress\": \"0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852\",\n      \"pageSize\": 2\n    }\n  }'"
          },
          {
            "lang": "javascript",
            "label": "JavaScript (fetch)",
            "source": "const apiKey = process.env.ANKR_API_KEY;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getTokenHoldersCount',\n    params: {\n      blockchain: 'eth',\n      contractAddress: '0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852',\n      pageSize: 2,\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = await res.json();\nconsole.log(data.result);"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import os\n\nimport requests\n\nresponse = requests.post(\n    f\"https://rpc.ankr.com/multichain/{os.environ['ANKR_API_KEY']}\",\n    json={\n        \"jsonrpc\": \"2.0\",\n        \"id\": 1,\n        \"method\": \"ankr_getTokenHoldersCount\",\n        \"params\": {\n            \"blockchain\": \"eth\",\n            \"contractAddress\": \"0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852\",\n            \"pageSize\": 2,\n        },\n    },\n    timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json()[\"result\"])"
          },
          {
            "lang": "go",
            "label": "Go (net/http)",
            "source": "package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"os\"\n)\n\nfunc main() {\n    body, _ := json.Marshal(map[string]any{\n        \"jsonrpc\": \"2.0\",\n        \"id\":      1,\n        \"method\":  \"ankr_getTokenHoldersCount\",\n        \"params\":  map[string]any{\n            \"blockchain\":       \"eth\",\n            \"contractAddress\":  \"0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852\",\n            \"pageSize\":         2,\n        },\n    })\n    url := fmt.Sprintf(\"https://rpc.ankr.com/multichain/%s\", os.Getenv(\"ANKR_API_KEY\"))\n    resp, err := http.Post(url, \"application/json\", bytes.NewReader(body))\n    if err != nil { panic(err) }\n    defer resp.Body.Close()\n    out, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(out))\n}"
          },
          {
            "lang": "typescript",
            "label": "TypeScript (fetch + types)",
            "source": "interface HolderCountEntry {\n  holderCount: number;\n  lastUpdatedAt: string;\n  totalAmount: string;\n  totalAmountRawInteger: string;\n}\n\ninterface Result {\n  blockchain: string;\n  contractAddress: string;\n  tokenDecimals: number;\n  holderCountHistory: HolderCountEntry[];\n  latestHoldersCount: number;\n  nextPageToken: string;\n}\n\ninterface JsonRpcResponse<T> {\n  jsonrpc: '2.0';\n  id: number | string | null;\n  result?: T;\n  error?: { code: number; message: string; data?: unknown };\n}\n\nconst apiKey = process.env.ANKR_API_KEY!;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getTokenHoldersCount',\n    params: {\n      blockchain: 'eth',\n      contractAddress: '0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852',\n      pageSize: 2,\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = (await res.json()) as JsonRpcResponse<Result>;\nif (data.error) throw new Error(data.error.message);\nconsole.log(data.result);"
          }
        ]
      }
    },
    "/?ankr_getTokenPrice": {
      "post": {
        "operationId": "ankr_getTokenPrice",
        "tags": [
          "Token API"
        ],
        "summary": "Look up the USD price of a token or native coin",
        "description": "Returns Ankr's current USD price for the specified token. Pass a `contractAddress` for an ERC-20 token, or omit it to fetch the price of the chain's native coin.\n\nPrices are normalized to decimal strings; treat them as USD per unit token. The same call returns the queried contract address so you can round-trip the result.\n\nPart of the **Token API** product (700 compute units per call, $0.00007 at base rate).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "jsonrpc",
                  "method",
                  "params"
                ],
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "Client-supplied request ID echoed in the response.",
                    "examples": [
                      1
                    ]
                  },
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ],
                    "examples": [
                      "2.0"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "ankr_getTokenPrice"
                    ],
                    "examples": [
                      "ankr_getTokenPrice"
                    ]
                  },
                  "params": {
                    "type": "object",
                    "required": [
                      "blockchain"
                    ],
                    "properties": {
                      "blockchain": {
                        "type": "string",
                        "enum": [
                          "arbitrum",
                          "avalanche",
                          "base",
                          "bsc",
                          "eth",
                          "fantom",
                          "flare",
                          "gnosis",
                          "linea",
                          "optimism",
                          "polygon",
                          "scroll",
                          "stellar",
                          "story_mainnet",
                          "taiko",
                          "telos",
                          "xai",
                          "xlayer",
                          "avalanche_fuji",
                          "base_sepolia",
                          "eth_holesky",
                          "eth_sepolia",
                          "optimism_testnet",
                          "polygon_amoy",
                          "story_aeneid_testnet"
                        ],
                        "description": "Target blockchain identifier.",
                        "examples": [
                          "eth"
                        ]
                      },
                      "contractAddress": {
                        "type": "string",
                        "description": "ERC-20 contract address. Omit to fetch the native coin price.",
                        "examples": [
                          "0xdac17f958d2ee523a2206206994597c13d831ec7"
                        ]
                      }
                    }
                  }
                },
                "examples": [
                  {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getTokenPrice",
                    "params": {
                      "blockchain": "eth",
                      "contractAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7"
                    }
                  }
                ]
              },
              "examples": {
                "USDT price": {
                  "summary": "USDT on Ethereum",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getTokenPrice",
                    "params": {
                      "blockchain": "eth",
                      "contractAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7"
                    }
                  }
                },
                "Native coin price": {
                  "summary": "Polygon native coin (MATIC)",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getTokenPrice",
                    "params": {
                      "blockchain": "polygon"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. JSON-RPC `result` contains chain, contract address, and a decimal-string USD price. JSON-RPC errors are returned with HTTP 200; check the response body for an `error` key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "jsonrpc",
                    "result"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "jsonrpc": {
                      "type": "string",
                      "enum": [
                        "2.0"
                      ]
                    },
                    "result": {
                      "type": "object",
                      "required": [
                        "usdPrice",
                        "blockchain"
                      ],
                      "properties": {
                        "blockchain": {
                          "type": "string",
                          "enum": [
                            "arbitrum",
                            "avalanche",
                            "base",
                            "bsc",
                            "eth",
                            "fantom",
                            "flare",
                            "gnosis",
                            "linea",
                            "optimism",
                            "polygon",
                            "scroll",
                            "stellar",
                            "story_mainnet",
                            "taiko",
                            "telos",
                            "xai",
                            "xlayer",
                            "avalanche_fuji",
                            "base_sepolia",
                            "eth_holesky",
                            "eth_sepolia",
                            "optimism_testnet",
                            "polygon_amoy",
                            "story_aeneid_testnet"
                          ]
                        },
                        "contractAddress": {
                          "type": "string",
                          "description": "Token contract address (echoed)."
                        },
                        "usdPrice": {
                          "type": "string",
                          "description": "Current USD price as a decimal string."
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "USDT price": {
                    "value": {
                      "id": 1,
                      "jsonrpc": "2.0",
                      "result": {
                        "blockchain": "eth",
                        "contractAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
                        "usdPrice": "1"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — malformed JSON-RPC envelope or invalid `params`. The gateway rejects before the JSON-RPC layer processes the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcError"
                },
                "examples": {
                  "Invalid Params": {
                    "value": {
                      "jsonrpc": "2.0",
                      "id": 1,
                      "error": {
                        "code": -32602,
                        "message": "Invalid params"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — missing or invalid API key in the server URL path. Verify that `{API_KEY}` is set to a valid project key."
          },
          "429": {
            "description": "Too Many Requests — the API key has exceeded its rate or quota limits. Back off and retry; consider upgrading the Premium tier for higher limits.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error — unexpected condition. Retry with exponential backoff; if it persists, file a ticket at https://www.ankr.com/support/."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X POST \"https://rpc.ankr.com/multichain/$ANKR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"method\": \"ankr_getTokenPrice\",\n    \"params\": {\n      \"blockchain\": \"eth\",\n      \"contractAddress\": \"0xdac17f958d2ee523a2206206994597c13d831ec7\"\n    }\n  }'"
          },
          {
            "lang": "javascript",
            "label": "JavaScript (fetch)",
            "source": "const apiKey = process.env.ANKR_API_KEY;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getTokenPrice',\n    params: {\n      blockchain: 'eth',\n      contractAddress: '0xdac17f958d2ee523a2206206994597c13d831ec7',\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = await res.json();\nconsole.log(data.result);"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import os\n\nimport requests\n\nresponse = requests.post(\n    f\"https://rpc.ankr.com/multichain/{os.environ['ANKR_API_KEY']}\",\n    json={\n        \"jsonrpc\": \"2.0\",\n        \"id\": 1,\n        \"method\": \"ankr_getTokenPrice\",\n        \"params\": {\n            \"blockchain\": \"eth\",\n            \"contractAddress\": \"0xdac17f958d2ee523a2206206994597c13d831ec7\",\n        },\n    },\n    timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json()[\"result\"])"
          },
          {
            "lang": "go",
            "label": "Go (net/http)",
            "source": "package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"os\"\n)\n\nfunc main() {\n    body, _ := json.Marshal(map[string]any{\n        \"jsonrpc\": \"2.0\",\n        \"id\":      1,\n        \"method\":  \"ankr_getTokenPrice\",\n        \"params\":  map[string]any{\n            \"blockchain\":       \"eth\",\n            \"contractAddress\":  \"0xdac17f958d2ee523a2206206994597c13d831ec7\",\n        },\n    })\n    url := fmt.Sprintf(\"https://rpc.ankr.com/multichain/%s\", os.Getenv(\"ANKR_API_KEY\"))\n    resp, err := http.Post(url, \"application/json\", bytes.NewReader(body))\n    if err != nil { panic(err) }\n    defer resp.Body.Close()\n    out, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(out))\n}"
          },
          {
            "lang": "typescript",
            "label": "TypeScript (fetch + types)",
            "source": "interface Result {\n  blockchain: string;\n  contractAddress?: string;\n  usdPrice: string;\n}\n\ninterface JsonRpcResponse<T> {\n  jsonrpc: '2.0';\n  id: number | string | null;\n  result?: T;\n  error?: { code: number; message: string; data?: unknown };\n}\n\nconst apiKey = process.env.ANKR_API_KEY!;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getTokenPrice',\n    params: {\n      blockchain: 'eth',\n      contractAddress: '0xdac17f958d2ee523a2206206994597c13d831ec7',\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = (await res.json()) as JsonRpcResponse<Result>;\nif (data.error) throw new Error(data.error.message);\nconsole.log(data.result);"
          }
        ]
      }
    },
    "/?ankr_getTokenTransfers": {
      "post": {
        "operationId": "ankr_getTokenTransfers",
        "tags": [
          "Token API"
        ],
        "summary": "List ERC-20 token transfers involving one or more wallets",
        "description": "Returns ERC-20 transfer events in which the specified wallet(s) appear as sender or recipient. Each entry includes contract address, token symbol, decimals, raw + normalized values, block height, and timestamp.\n\nPass an `address` array (single or multiple wallets). Scope by `blockchain`, block range (`fromBlock` / `toBlock`), or wall-clock range (`fromTimestamp` / `toTimestamp`). Paginate with `pageSize` (default `100`, max `10000`) and `pageToken`.\n\nPart of the **Token API** product (700 compute units per call, $0.00007 at base rate).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "jsonrpc",
                  "method",
                  "params"
                ],
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "Client-supplied request ID echoed in the response.",
                    "examples": [
                      1
                    ]
                  },
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ],
                    "examples": [
                      "2.0"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "ankr_getTokenTransfers"
                    ],
                    "examples": [
                      "ankr_getTokenTransfers"
                    ]
                  },
                  "params": {
                    "type": "object",
                    "properties": {
                      "address": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Wallet address(es) to query. ENS accepted on Ethereum.",
                        "examples": [
                          [
                            "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
                          ]
                        ]
                      },
                      "blockchain": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "arbitrum",
                            "avalanche",
                            "base",
                            "bsc",
                            "eth",
                            "fantom",
                            "flare",
                            "gnosis",
                            "linea",
                            "optimism",
                            "polygon",
                            "scroll",
                            "stellar",
                            "story_mainnet",
                            "taiko",
                            "telos",
                            "xai",
                            "xlayer",
                            "avalanche_fuji",
                            "base_sepolia",
                            "eth_holesky",
                            "eth_sepolia",
                            "optimism_testnet",
                            "polygon_amoy",
                            "story_aeneid_testnet"
                          ]
                        },
                        "description": "Chains to query. Omit or pass an empty array to query all supported chains.",
                        "examples": [
                          [
                            "eth",
                            "bsc"
                          ]
                        ]
                      },
                      "fromBlock": {
                        "type": [
                          "integer",
                          "string"
                        ],
                        "description": "Start block (integer or `earliest`, or hex).",
                        "minimum": 0
                      },
                      "toBlock": {
                        "type": [
                          "integer",
                          "string"
                        ],
                        "description": "End block (integer or `latest`, or hex)."
                      },
                      "fromTimestamp": {
                        "type": "integer",
                        "description": "UNIX timestamp lower bound.",
                        "minimum": 0,
                        "examples": [
                          1655197483
                        ]
                      },
                      "toTimestamp": {
                        "type": "integer",
                        "description": "UNIX timestamp upper bound.",
                        "minimum": 0,
                        "examples": [
                          1671974699
                        ]
                      },
                      "descOrder": {
                        "type": "boolean",
                        "description": "Sort newest first when `true`.",
                        "default": false
                      },
                      "pageSize": {
                        "type": "integer",
                        "description": "Entries per page. Default `100`, max `10000`.",
                        "minimum": 1,
                        "maximum": 10000,
                        "default": 100
                      },
                      "pageToken": {
                        "type": "string",
                        "description": "Opaque page token from a prior response's `nextPageToken`."
                      }
                    }
                  }
                },
                "examples": [
                  {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getTokenTransfers",
                    "params": {
                      "address": [
                        "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
                      ],
                      "blockchain": [
                        "eth",
                        "bsc"
                      ],
                      "fromTimestamp": 1655197483,
                      "toTimestamp": 1671974699
                    }
                  }
                ]
              },
              "examples": {
                "Multi-chain by timestamp": {
                  "summary": "ETH + BSC transfers in a time window",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getTokenTransfers",
                    "params": {
                      "address": [
                        "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
                      ],
                      "blockchain": [
                        "eth",
                        "bsc"
                      ],
                      "fromTimestamp": 1655197483,
                      "toTimestamp": 1671974699
                    }
                  }
                },
                "Newest first, small page": {
                  "summary": "Page of 10, descending",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getTokenTransfers",
                    "params": {
                      "address": [
                        "0xf16e9b0d03470827a95cdfd0cb8a8a3b46969b91"
                      ],
                      "blockchain": [
                        "eth"
                      ],
                      "descOrder": true,
                      "pageSize": 10
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. JSON-RPC `result` envelope contains the `transfers` array and pagination cursor. JSON-RPC errors are returned with HTTP 200; check the response body for an `error` key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "jsonrpc",
                    "result"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "jsonrpc": {
                      "type": "string",
                      "enum": [
                        "2.0"
                      ]
                    },
                    "result": {
                      "type": "object",
                      "required": [
                        "transfers"
                      ],
                      "properties": {
                        "nextPageToken": {
                          "type": "string"
                        },
                        "transfers": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "items": {
                            "type": "object",
                            "required": [
                              "value",
                              "valueRawInteger",
                              "blockchain",
                              "tokenDecimals",
                              "thumbnail",
                              "transactionHash",
                              "blockHeight",
                              "timestamp"
                            ],
                            "properties": {
                              "blockHeight": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "blockchain": {
                                "type": "string"
                              },
                              "contractAddress": {
                                "type": "string",
                                "description": "Token contract address."
                              },
                              "direction": {
                                "type": "string",
                                "description": "`in` or `out`."
                              },
                              "fromAddress": {
                                "type": "string"
                              },
                              "thumbnail": {
                                "type": "string"
                              },
                              "timestamp": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "toAddress": {
                                "type": "string"
                              },
                              "tokenDecimals": {
                                "type": "integer"
                              },
                              "tokenName": {
                                "type": "string"
                              },
                              "tokenSymbol": {
                                "type": "string"
                              },
                              "transactionHash": {
                                "type": "string"
                              },
                              "value": {
                                "type": "string",
                                "description": "Human-readable value transferred."
                              },
                              "valueRawInteger": {
                                "type": "string",
                                "description": "Raw integer value (`value × 10^decimals`)."
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Multichain transfers": {
                    "value": {
                      "id": 1,
                      "jsonrpc": "2.0",
                      "result": {
                        "transfers": [
                          {
                            "blockHeight": 4593859,
                            "blockchain": "eth",
                            "contractAddress": "0xdd974d5c2e2928dea5f71b9825b8b646686bd200",
                            "fromAddress": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
                            "thumbnail": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdd974D5C2e2928deA5F71b9825b8b646686BD200/logo.png",
                            "timestamp": 1511258315,
                            "toAddress": "0x0cfb686e114d478b055ce8614621f8bb62f70360",
                            "tokenDecimals": 18,
                            "tokenName": "Kyber Network Crystal",
                            "tokenSymbol": "KNC",
                            "transactionHash": "0xfc2192e9716490dbe46c3d59c7c99f81d3b685118b01e2812872a6aae7049c4b",
                            "value": "3420332",
                            "valueRawInteger": ""
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — malformed JSON-RPC envelope or invalid `params`. The gateway rejects before the JSON-RPC layer processes the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcError"
                },
                "examples": {
                  "Invalid Params": {
                    "value": {
                      "jsonrpc": "2.0",
                      "id": 1,
                      "error": {
                        "code": -32602,
                        "message": "Invalid params"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — missing or invalid API key in the server URL path. Verify that `{API_KEY}` is set to a valid project key."
          },
          "429": {
            "description": "Too Many Requests — the API key has exceeded its rate or quota limits. Back off and retry; consider upgrading the Premium tier for higher limits.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error — unexpected condition. Retry with exponential backoff; if it persists, file a ticket at https://www.ankr.com/support/."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X POST \"https://rpc.ankr.com/multichain/$ANKR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"method\": \"ankr_getTokenTransfers\",\n    \"params\": {\n      \"address\": [\"0xd8da6bf26964af9d7eed9e03e53415d37aa96045\"],\n      \"blockchain\": [\"eth\", \"bsc\"],\n      \"fromTimestamp\": 1655197483,\n      \"toTimestamp\": 1671974699\n    }\n  }'"
          },
          {
            "lang": "javascript",
            "label": "JavaScript (fetch)",
            "source": "const apiKey = process.env.ANKR_API_KEY;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getTokenTransfers',\n    params: {\n      address: ['0xd8da6bf26964af9d7eed9e03e53415d37aa96045'],\n      blockchain: ['eth', 'bsc'],\n      fromTimestamp: 1655197483,\n      toTimestamp: 1671974699,\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = await res.json();\nconsole.log(data.result);"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import os\n\nimport requests\n\nresponse = requests.post(\n    f\"https://rpc.ankr.com/multichain/{os.environ['ANKR_API_KEY']}\",\n    json={\n        \"jsonrpc\": \"2.0\",\n        \"id\": 1,\n        \"method\": \"ankr_getTokenTransfers\",\n        \"params\": {\n            \"address\": [\"0xd8da6bf26964af9d7eed9e03e53415d37aa96045\"],\n            \"blockchain\": [\"eth\", \"bsc\"],\n            \"fromTimestamp\": 1655197483,\n            \"toTimestamp\": 1671974699,\n        },\n    },\n    timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json()[\"result\"])"
          },
          {
            "lang": "go",
            "label": "Go (net/http)",
            "source": "package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"os\"\n)\n\nfunc main() {\n    body, _ := json.Marshal(map[string]any{\n        \"jsonrpc\": \"2.0\",\n        \"id\":      1,\n        \"method\":  \"ankr_getTokenTransfers\",\n        \"params\":  map[string]any{\n            \"address\":       []string{\"0xd8da6bf26964af9d7eed9e03e53415d37aa96045\"},\n            \"blockchain\":    []string{\"eth\", \"bsc\"},\n            \"fromTimestamp\": 1655197483,\n            \"toTimestamp\":   1671974699,\n        },\n    })\n    url := fmt.Sprintf(\"https://rpc.ankr.com/multichain/%s\", os.Getenv(\"ANKR_API_KEY\"))\n    resp, err := http.Post(url, \"application/json\", bytes.NewReader(body))\n    if err != nil { panic(err) }\n    defer resp.Body.Close()\n    out, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(out))\n}"
          },
          {
            "lang": "typescript",
            "label": "TypeScript (fetch + types)",
            "source": "interface TokenTransfer {\n  blockchain: string;\n  blockHeight: number;\n  contractAddress?: string;\n  direction?: 'in' | 'out' | string;\n  fromAddress: string;\n  toAddress: string;\n  thumbnail: string;\n  timestamp: number;\n  tokenDecimals: number;\n  tokenName?: string;\n  tokenSymbol?: string;\n  transactionHash: string;\n  value: string;\n  valueRawInteger: string;\n}\n\ninterface Result {\n  transfers: TokenTransfer[];\n  nextPageToken?: string;\n}\n\ninterface JsonRpcResponse<T> {\n  jsonrpc: '2.0';\n  id: number | string | null;\n  result?: T;\n  error?: { code: number; message: string; data?: unknown };\n}\n\nconst apiKey = process.env.ANKR_API_KEY!;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getTokenTransfers',\n    params: {\n      address: ['0xd8da6bf26964af9d7eed9e03e53415d37aa96045'],\n      blockchain: ['eth', 'bsc'],\n      fromTimestamp: 1655197483,\n      toTimestamp: 1671974699,\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = (await res.json()) as JsonRpcResponse<Result>;\nif (data.error) throw new Error(data.error.message);\nconsole.log(data.result);"
          }
        ]
      }
    },
    "/?ankr_getTransactionsByAddress": {
      "post": {
        "operationId": "ankr_getTransactionsByAddress",
        "tags": [
          "Query API"
        ],
        "summary": "List transactions sent or received by one or more wallets",
        "description": "Returns transactions in which the specified wallet(s) appear as sender or recipient — with full transaction objects including gas, value, and (optionally) nested logs.\n\nPass an `address` array. Scope by `blockchain`, block range (`fromBlock` / `toBlock`), or wall-clock range (`fromTimestamp` / `toTimestamp`). Enable `includeLogs: true` to embed each transaction's log array. Paginate with `pageSize` (default `100`, max `10000`) and `pageToken`.\n\nPart of the **Query API** product (700 compute units per call, $0.00007 at base rate).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "jsonrpc",
                  "method",
                  "params"
                ],
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "Client-supplied request ID echoed in the response.",
                    "examples": [
                      1
                    ]
                  },
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ],
                    "examples": [
                      "2.0"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "ankr_getTransactionsByAddress"
                    ],
                    "examples": [
                      "ankr_getTransactionsByAddress"
                    ]
                  },
                  "params": {
                    "type": "object",
                    "required": [
                      "address"
                    ],
                    "properties": {
                      "address": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Wallet address(es) to query.",
                        "examples": [
                          [
                            "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
                          ]
                        ]
                      },
                      "blockchain": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "arbitrum",
                            "avalanche",
                            "base",
                            "bsc",
                            "eth",
                            "fantom",
                            "flare",
                            "gnosis",
                            "linea",
                            "optimism",
                            "polygon",
                            "scroll",
                            "stellar",
                            "story_mainnet",
                            "taiko",
                            "telos",
                            "xai",
                            "xlayer",
                            "avalanche_fuji",
                            "base_sepolia",
                            "eth_holesky",
                            "eth_sepolia",
                            "optimism_testnet",
                            "polygon_amoy",
                            "story_aeneid_testnet"
                          ]
                        },
                        "description": "Chains to query. Omit or pass an empty array to query all supported chains.",
                        "examples": [
                          [
                            "eth"
                          ]
                        ]
                      },
                      "fromBlock": {
                        "type": [
                          "integer",
                          "string"
                        ],
                        "description": "Start block (integer, hex, or `earliest`).",
                        "minimum": 0
                      },
                      "toBlock": {
                        "type": [
                          "integer",
                          "string"
                        ],
                        "description": "End block (integer, hex, or `latest`)."
                      },
                      "fromTimestamp": {
                        "type": "integer",
                        "description": "UNIX timestamp lower bound.",
                        "minimum": 0
                      },
                      "toTimestamp": {
                        "type": "integer",
                        "description": "UNIX timestamp upper bound.",
                        "minimum": 0
                      },
                      "descOrder": {
                        "type": "boolean",
                        "description": "Sort newest first when `true`.",
                        "default": false,
                        "examples": [
                          true
                        ]
                      },
                      "includeLogs": {
                        "type": "boolean",
                        "description": "Embed each transaction's log array.",
                        "default": false
                      },
                      "pageSize": {
                        "type": "integer",
                        "description": "Entries per page. Default `100`, max `10000`.",
                        "minimum": 1,
                        "maximum": 10000,
                        "default": 100,
                        "examples": [
                          10
                        ]
                      },
                      "pageToken": {
                        "type": "string",
                        "description": "Opaque page token from a prior response's `nextPageToken`."
                      }
                    }
                  }
                },
                "examples": [
                  {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getTransactionsByAddress",
                    "params": {
                      "address": [
                        "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
                      ],
                      "blockchain": [
                        "eth"
                      ],
                      "pageSize": 10,
                      "descOrder": true
                    }
                  }
                ]
              },
              "examples": {
                "Latest 10 on Ethereum": {
                  "summary": "Page of 10 newest-first",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getTransactionsByAddress",
                    "params": {
                      "address": [
                        "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
                      ],
                      "blockchain": [
                        "eth"
                      ],
                      "pageSize": 10,
                      "descOrder": true
                    }
                  }
                },
                "BSC range with logs": {
                  "summary": "Single BSC block, embed logs",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getTransactionsByAddress",
                    "params": {
                      "address": [
                        "0x97242e3315c7ece760dc7f83a7dd8af6659f8c4c"
                      ],
                      "blockchain": [
                        "bsc"
                      ],
                      "fromBlock": 23593283,
                      "toBlock": 23593283,
                      "includeLogs": true,
                      "pageSize": 10
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. JSON-RPC `result` envelope contains the `transactions` array and pagination cursor. JSON-RPC errors are returned with HTTP 200; check the response body for an `error` key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "jsonrpc",
                    "result"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "jsonrpc": {
                      "type": "string",
                      "enum": [
                        "2.0"
                      ]
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "nextPageToken": {
                          "type": "string"
                        },
                        "transactions": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "description": "Transactions matching the query.",
                          "items": {
                            "type": "object",
                            "required": [
                              "blockNumber",
                              "from",
                              "to",
                              "transactionIndex",
                              "blockHash",
                              "value",
                              "status",
                              "blockchain",
                              "timestamp"
                            ],
                            "properties": {
                              "blockchain": {
                                "type": "string"
                              },
                              "blockHash": {
                                "type": "string"
                              },
                              "blockNumber": {
                                "type": "string"
                              },
                              "contractAddress": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "cumulativeGasUsed": {
                                "type": "string"
                              },
                              "from": {
                                "type": "string"
                              },
                              "gas": {
                                "type": "string"
                              },
                              "gasPrice": {
                                "type": "string"
                              },
                              "gasUsed": {
                                "type": "string"
                              },
                              "hash": {
                                "type": "string"
                              },
                              "input": {
                                "type": "string"
                              },
                              "nonce": {
                                "type": "string"
                              },
                              "r": {
                                "type": "string"
                              },
                              "s": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string",
                                "description": "`0x1` success / `0x0` failure."
                              },
                              "timestamp": {
                                "type": "string",
                                "description": "Hex-encoded UNIX timestamp."
                              },
                              "to": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "transactionIndex": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              },
                              "v": {
                                "type": "string"
                              },
                              "value": {
                                "type": "string"
                              },
                              "logs": {
                                "type": [
                                  "array",
                                  "null"
                                ],
                                "description": "Logs emitted by this transaction (when `includeLogs: true`).",
                                "items": {
                                  "type": "object"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "One transaction": {
                    "value": {
                      "id": 1,
                      "jsonrpc": "2.0",
                      "result": {
                        "transactions": [
                          {
                            "blockHash": "0x8ffa5d490184c95c830bb4fb47b76e1fd69eb35d100f93d36d7db131837c938f",
                            "blockNumber": "0xf823ad",
                            "blockchain": "eth",
                            "cumulativeGasUsed": "0x68f589",
                            "from": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
                            "gas": "0xbe98",
                            "gasPrice": "0x2babee650",
                            "gasUsed": "0xbd8d",
                            "hash": "0x9a70ccd1f8e0d5ddf8e78f68b477d4d5c15ddd17c66f05f820b4c67f5eb6f85a",
                            "input": "0xa9059cbb000000000000000000000000fe97e32a873aa2f926fbfc560abeef01f753c1280000000000000000000000000000000000000000000000000000002e90edd000",
                            "nonce": "0x3c4",
                            "r": "0xe5c2731e3a85d048b4adb0cf9c06cb51013728627525ce80e96c4f1317007104",
                            "s": "0x3a22f49130b59d832a6c9db79880b313e9ca2536a3fd5f10b8080e2e1c3bda97",
                            "status": "0x1",
                            "timestamp": "0x63a85033",
                            "to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
                            "transactionIndex": "0x3c",
                            "type": "0x2",
                            "v": "0x0",
                            "value": "0x0"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — malformed JSON-RPC envelope or invalid `params`. The gateway rejects before the JSON-RPC layer processes the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcError"
                },
                "examples": {
                  "Invalid Params": {
                    "value": {
                      "jsonrpc": "2.0",
                      "id": 1,
                      "error": {
                        "code": -32602,
                        "message": "Invalid params"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — missing or invalid API key in the server URL path. Verify that `{API_KEY}` is set to a valid project key."
          },
          "429": {
            "description": "Too Many Requests — the API key has exceeded its rate or quota limits. Back off and retry; consider upgrading the Premium tier for higher limits.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error — unexpected condition. Retry with exponential backoff; if it persists, file a ticket at https://www.ankr.com/support/."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X POST \"https://rpc.ankr.com/multichain/$ANKR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"method\": \"ankr_getTransactionsByAddress\",\n    \"params\": {\n      \"address\": [\"0xd8da6bf26964af9d7eed9e03e53415d37aa96045\"],\n      \"blockchain\": [\"eth\"],\n      \"pageSize\": 10,\n      \"descOrder\": true\n    }\n  }'"
          },
          {
            "lang": "javascript",
            "label": "JavaScript (fetch)",
            "source": "const apiKey = process.env.ANKR_API_KEY;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getTransactionsByAddress',\n    params: {\n      address: ['0xd8da6bf26964af9d7eed9e03e53415d37aa96045'],\n      blockchain: ['eth'],\n      pageSize: 10,\n      descOrder: true,\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = await res.json();\nconsole.log(data.result);"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import os\n\nimport requests\n\nresponse = requests.post(\n    f\"https://rpc.ankr.com/multichain/{os.environ['ANKR_API_KEY']}\",\n    json={\n        \"jsonrpc\": \"2.0\",\n        \"id\": 1,\n        \"method\": \"ankr_getTransactionsByAddress\",\n        \"params\": {\n            \"address\": [\"0xd8da6bf26964af9d7eed9e03e53415d37aa96045\"],\n            \"blockchain\": [\"eth\"],\n            \"pageSize\": 10,\n            \"descOrder\": True,\n        },\n    },\n    timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json()[\"result\"])"
          },
          {
            "lang": "go",
            "label": "Go (net/http)",
            "source": "package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"os\"\n)\n\nfunc main() {\n    body, _ := json.Marshal(map[string]any{\n        \"jsonrpc\": \"2.0\",\n        \"id\":      1,\n        \"method\":  \"ankr_getTransactionsByAddress\",\n        \"params\":  map[string]any{\n            \"address\":    []string{\"0xd8da6bf26964af9d7eed9e03e53415d37aa96045\"},\n            \"blockchain\": []string{\"eth\"},\n            \"pageSize\":   10,\n            \"descOrder\":  true,\n        },\n    })\n    url := fmt.Sprintf(\"https://rpc.ankr.com/multichain/%s\", os.Getenv(\"ANKR_API_KEY\"))\n    resp, err := http.Post(url, \"application/json\", bytes.NewReader(body))\n    if err != nil { panic(err) }\n    defer resp.Body.Close()\n    out, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(out))\n}"
          },
          {
            "lang": "typescript",
            "label": "TypeScript (fetch + types)",
            "source": "interface Transaction {\n  blockchain: string;\n  blockHash: string;\n  blockNumber: string;\n  hash: string;\n  from: string;\n  to: string | null;\n  value: string;\n  status: string;\n  timestamp: string;\n  gas: string;\n  gasPrice: string;\n  gasUsed: string;\n  cumulativeGasUsed: string;\n  nonce: string;\n  transactionIndex: string;\n  type: string;\n  input: string;\n  v: string;\n  r: string;\n  s: string;\n  contractAddress?: string | null;\n}\n\ninterface Result {\n  transactions: Transaction[];\n  nextPageToken?: string;\n}\n\ninterface JsonRpcResponse<T> {\n  jsonrpc: '2.0';\n  id: number | string | null;\n  result?: T;\n  error?: { code: number; message: string; data?: unknown };\n}\n\nconst apiKey = process.env.ANKR_API_KEY!;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getTransactionsByAddress',\n    params: {\n      address: ['0xd8da6bf26964af9d7eed9e03e53415d37aa96045'],\n      blockchain: ['eth'],\n      pageSize: 10,\n      descOrder: true,\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = (await res.json()) as JsonRpcResponse<Result>;\nif (data.error) throw new Error(data.error.message);\nconsole.log(data.result);"
          }
        ]
      }
    },
    "/?ankr_getTransactionsByHash": {
      "post": {
        "operationId": "ankr_getTransactionsByHash",
        "tags": [
          "Query API"
        ],
        "summary": "Look up a transaction by hash, optionally with decoded data and logs",
        "description": "Returns the transaction(s) matching a single hash. Optionally embeds logs and resolves method/event signatures to human-readable form.\n\nPass `transactionHash`. Multi-chain dispatch is automatic — Ankr will search across supported chains and return the transaction with its `blockchain` field populated. Use `includeLogs`, `decodeTxData`, and `decodeLogs` for richer responses; you can optionally scope the search with the `blockchain` array.\n\nPart of the **Query API** product (700 compute units per call, $0.00007 at base rate).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "jsonrpc",
                  "method",
                  "params"
                ],
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "Client-supplied request ID echoed in the response.",
                    "examples": [
                      1
                    ]
                  },
                  "jsonrpc": {
                    "type": "string",
                    "enum": [
                      "2.0"
                    ],
                    "examples": [
                      "2.0"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "ankr_getTransactionsByHash"
                    ],
                    "examples": [
                      "ankr_getTransactionsByHash"
                    ]
                  },
                  "params": {
                    "type": "object",
                    "required": [
                      "transactionHash"
                    ],
                    "properties": {
                      "transactionHash": {
                        "type": "string",
                        "description": "Transaction hash to look up.",
                        "examples": [
                          "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
                        ]
                      },
                      "blockchain": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "arbitrum",
                            "avalanche",
                            "base",
                            "bsc",
                            "eth",
                            "fantom",
                            "flare",
                            "gnosis",
                            "linea",
                            "optimism",
                            "polygon",
                            "scroll",
                            "stellar",
                            "story_mainnet",
                            "taiko",
                            "telos",
                            "xai",
                            "xlayer",
                            "avalanche_fuji",
                            "base_sepolia",
                            "eth_holesky",
                            "eth_sepolia",
                            "optimism_testnet",
                            "polygon_amoy",
                            "story_aeneid_testnet"
                          ]
                        },
                        "description": "Chains to query. Omit or pass an empty array to query all supported chains.",
                        "examples": [
                          [
                            "eth"
                          ]
                        ]
                      },
                      "decodeLogs": {
                        "type": "boolean",
                        "description": "Resolve event signatures and decode log inputs.",
                        "default": false,
                        "examples": [
                          true
                        ]
                      },
                      "decodeTxData": {
                        "type": "boolean",
                        "description": "Resolve method signatures and decode transaction inputs.",
                        "default": false,
                        "examples": [
                          true
                        ]
                      },
                      "includeLogs": {
                        "type": "boolean",
                        "description": "Embed the transaction's log array.",
                        "default": false
                      }
                    }
                  }
                },
                "examples": [
                  {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getTransactionsByHash",
                    "params": {
                      "blockchain": [
                        "eth"
                      ],
                      "transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
                      "decodeTxData": true,
                      "decodeLogs": true
                    }
                  }
                ]
              },
              "examples": {
                "With decoded tx data and logs": {
                  "summary": "Fully decoded lookup",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getTransactionsByHash",
                    "params": {
                      "blockchain": [
                        "eth"
                      ],
                      "transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
                      "decodeTxData": true,
                      "decodeLogs": true
                    }
                  }
                },
                "Minimal": {
                  "summary": "Hash on a single chain",
                  "value": {
                    "id": 1,
                    "jsonrpc": "2.0",
                    "method": "ankr_getTransactionsByHash",
                    "params": {
                      "blockchain": [
                        "eth"
                      ],
                      "transactionHash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. JSON-RPC `result` envelope contains the `transactions` array (usually a single entry). JSON-RPC errors are returned with HTTP 200; check the response body for an `error` key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "jsonrpc",
                    "result"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "jsonrpc": {
                      "type": "string",
                      "enum": [
                        "2.0"
                      ]
                    },
                    "result": {
                      "type": "object",
                      "required": [
                        "transactions"
                      ],
                      "properties": {
                        "transactions": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "items": {
                            "type": "object",
                            "required": [
                              "blockNumber",
                              "from",
                              "to",
                              "transactionIndex",
                              "blockHash",
                              "value",
                              "status",
                              "blockchain",
                              "timestamp"
                            ],
                            "properties": {
                              "blockchain": {
                                "type": "string"
                              },
                              "blockHash": {
                                "type": "string"
                              },
                              "blockNumber": {
                                "type": "string"
                              },
                              "contractAddress": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "cumulativeGasUsed": {
                                "type": "string"
                              },
                              "from": {
                                "type": "string"
                              },
                              "gas": {
                                "type": "string"
                              },
                              "gasPrice": {
                                "type": "string"
                              },
                              "gasUsed": {
                                "type": "string"
                              },
                              "hash": {
                                "type": "string"
                              },
                              "input": {
                                "type": "string"
                              },
                              "nonce": {
                                "type": "string"
                              },
                              "r": {
                                "type": "string"
                              },
                              "s": {
                                "type": "string"
                              },
                              "status": {
                                "type": "string"
                              },
                              "timestamp": {
                                "type": "string"
                              },
                              "to": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "transactionIndex": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              },
                              "v": {
                                "type": "string"
                              },
                              "value": {
                                "type": "string"
                              },
                              "logs": {
                                "type": [
                                  "array",
                                  "null"
                                ],
                                "items": {
                                  "type": "object"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Decoded transaction": {
                    "value": {
                      "id": 1,
                      "jsonrpc": "2.0",
                      "result": {
                        "transactions": [
                          {
                            "blockHash": "0x1e7b69036e5de4094839e186facabe2e3fb3586f52888bdb22f96e265f77aaeb",
                            "blockNumber": "0xf85b14",
                            "blockchain": "eth",
                            "cumulativeGasUsed": "0x57b86",
                            "from": "0x77223f67d845e3cbcd9cc19287e24e71f7228888",
                            "gas": "0x3012f",
                            "gasPrice": "0x298c22300",
                            "gasUsed": "0x200ca",
                            "hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060",
                            "input": "0x0372e988016462e1719eb1692cb7af7016172262cb287f37aa000d4f",
                            "nonce": "0x1182",
                            "r": "0x3857d29f619e161e00141abecf5f3420dfbda34dfaf7e10cac20758c5cdd2d0f",
                            "s": "0x7843a450a5f1224e9d6e10e7518b9aba67e6dd1b442c11b3e8926eaca3b72546",
                            "status": "0x1",
                            "timestamp": "0x63aaec8b",
                            "to": "0x00000000a991c429ee2ec6df19d40fe0c80088b8",
                            "transactionIndex": "0x5",
                            "type": "0x2",
                            "v": "0x1",
                            "value": "0x61321"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — malformed JSON-RPC envelope or invalid `params`. The gateway rejects before the JSON-RPC layer processes the call.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcError"
                },
                "examples": {
                  "Invalid Params": {
                    "value": {
                      "jsonrpc": "2.0",
                      "id": 1,
                      "error": {
                        "code": -32602,
                        "message": "Invalid params"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — missing or invalid API key in the server URL path. Verify that `{API_KEY}` is set to a valid project key."
          },
          "429": {
            "description": "Too Many Requests — the API key has exceeded its rate or quota limits. Back off and retry; consider upgrading the Premium tier for higher limits.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "500": {
            "description": "Server error — unexpected condition. Retry with exponential backoff; if it persists, file a ticket at https://www.ankr.com/support/."
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "cURL",
            "source": "curl -X POST \"https://rpc.ankr.com/multichain/$ANKR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"method\": \"ankr_getTransactionsByHash\",\n    \"params\": {\n      \"blockchain\": [\"eth\"],\n      \"transactionHash\": \"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060\",\n      \"decodeTxData\": true,\n      \"decodeLogs\": true\n    }\n  }'"
          },
          {
            "lang": "javascript",
            "label": "JavaScript (fetch)",
            "source": "const apiKey = process.env.ANKR_API_KEY;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getTransactionsByHash',\n    params: {\n      blockchain: ['eth'],\n      transactionHash: '0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060',\n      decodeTxData: true,\n      decodeLogs: true,\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = await res.json();\nconsole.log(data.result);"
          },
          {
            "lang": "python",
            "label": "Python (requests)",
            "source": "import os\n\nimport requests\n\nresponse = requests.post(\n    f\"https://rpc.ankr.com/multichain/{os.environ['ANKR_API_KEY']}\",\n    json={\n        \"jsonrpc\": \"2.0\",\n        \"id\": 1,\n        \"method\": \"ankr_getTransactionsByHash\",\n        \"params\": {\n            \"blockchain\": [\"eth\"],\n            \"transactionHash\": \"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060\",\n            \"decodeTxData\": True,\n            \"decodeLogs\": True,\n        },\n    },\n    timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json()[\"result\"])"
          },
          {
            "lang": "go",
            "label": "Go (net/http)",
            "source": "package main\n\nimport (\n    \"bytes\"\n    \"encoding/json\"\n    \"fmt\"\n    \"io\"\n    \"net/http\"\n    \"os\"\n)\n\nfunc main() {\n    body, _ := json.Marshal(map[string]any{\n        \"jsonrpc\": \"2.0\",\n        \"id\":      1,\n        \"method\":  \"ankr_getTransactionsByHash\",\n        \"params\":  map[string]any{\n            \"blockchain\":      []string{\"eth\"},\n            \"transactionHash\": \"0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060\",\n            \"decodeTxData\":    true,\n            \"decodeLogs\":      true,\n        },\n    })\n    url := fmt.Sprintf(\"https://rpc.ankr.com/multichain/%s\", os.Getenv(\"ANKR_API_KEY\"))\n    resp, err := http.Post(url, \"application/json\", bytes.NewReader(body))\n    if err != nil { panic(err) }\n    defer resp.Body.Close()\n    out, _ := io.ReadAll(resp.Body)\n    fmt.Println(string(out))\n}"
          },
          {
            "lang": "typescript",
            "label": "TypeScript (fetch + types)",
            "source": "interface Transaction {\n  blockchain: string;\n  blockHash: string;\n  blockNumber: string;\n  hash: string;\n  from: string;\n  to: string | null;\n  value: string;\n  status: string;\n  timestamp: string;\n  gas: string;\n  gasPrice: string;\n  gasUsed: string;\n  cumulativeGasUsed: string;\n  nonce: string;\n  transactionIndex: string;\n  type: string;\n  input: string;\n}\n\ninterface Result {\n  transactions: Transaction[];\n}\n\ninterface JsonRpcResponse<T> {\n  jsonrpc: '2.0';\n  id: number | string | null;\n  result?: T;\n  error?: { code: number; message: string; data?: unknown };\n}\n\nconst apiKey = process.env.ANKR_API_KEY!;\nconst res = await fetch(`https://rpc.ankr.com/multichain/${apiKey}`, {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\n    jsonrpc: '2.0',\n    id: 1,\n    method: 'ankr_getTransactionsByHash',\n    params: {\n      blockchain: ['eth'],\n      transactionHash: '0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060',\n      decodeTxData: true,\n      decodeLogs: true,\n    },\n  }),\n});\nif (!res.ok) throw new Error(`HTTP ${res.status}`);\nconst data = (await res.json()) as JsonRpcResponse<Result>;\nif (data.error) throw new Error(data.error.message);\nconsole.log(data.result);"
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "JsonRpcError": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id",
          "error"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "enum": [
              "2.0"
            ]
          },
          "id": {
            "type": [
              "integer",
              "string",
              "null"
            ]
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "integer",
                "description": "JSON-RPC 2.0 error code. Common: `-32600` invalid request, `-32601` method not found, `-32602` invalid params, `-32603` internal error."
              },
              "message": {
                "type": "string"
              },
              "data": {
                "description": "Optional vendor-specific detail. May be a string or an object."
              }
            }
          }
        }
      },
      "RateLimitError": {
        "type": "object",
        "description": "Returned by the Ankr gateway when the API key has exceeded its rate or quota limits. JSON-RPC-shaped error so clients can use a single error handler.",
        "required": [
          "jsonrpc",
          "id",
          "error"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "enum": [
              "2.0"
            ]
          },
          "id": {
            "type": [
              "integer",
              "string",
              "null"
            ]
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "integer",
                "examples": [
                  429
                ]
              },
              "message": {
                "type": "string",
                "examples": [
                  "too many requests"
                ]
              }
            }
          }
        }
      }
    }
  }
}
