openapi: 3.1.0 info: title: Ankr RPC Service (Node API) description: | Ankr's RPC Service (Node API) provides HTTPS and WebSocket JSON-RPC endpoints for 80+ blockchain networks (EVM and non-EVM). The public endpoint is open; Premium and Enterprise plans use an API-key-scoped endpoint with x50 the rate limit of the public Node API. This specification documents the common EVM JSON-RPC envelope that ships behind every `https://rpc.ankr.com/{chain}` URL; non-EVM chains (Solana, Aptos, Stellar, etc.) expose their native JSON-RPC or REST surface at the same per-chain endpoint. version: "1.0.0" contact: name: Ankr url: https://www.ankr.com email: support@ankr.com license: name: Ankr Terms of Service url: https://www.ankr.com/terms/ servers: - url: https://rpc.ankr.com/{chain} description: Public Plan RPC endpoint variables: chain: default: eth enum: - eth - bsc - polygon - arbitrum - optimism - base - avalanche - fantom - gnosis - linea - scroll - taiko - solana - aptos - stellar - tron description: Chain identifier in the URL path. - url: https://rpc.ankr.com/{chain}/{API_KEY} description: Premium Plan RPC endpoint variables: chain: default: eth API_KEY: default: API_KEY tags: - name: EVM description: Standard Ethereum JSON-RPC envelope shared by every EVM chain. paths: /: post: summary: Ankr Execute JSON-RPC Call description: | Execute a JSON-RPC 2.0 call against the selected chain. The `method` field carries the EVM method name (`eth_blockNumber`, `eth_getBalance`, `eth_chainId`, `eth_call`, `eth_getLogs`, `eth_getTransactionByHash`, `eth_getTransactionReceipt`, `eth_sendRawTransaction`, etc.). operationId: callRpc tags: - EVM requestBody: required: true content: application/json: schema: oneOf: - $ref: '#/components/schemas/JsonRpcRequest' - type: array items: $ref: '#/components/schemas/JsonRpcRequest' responses: '200': description: JSON-RPC response (single or batched). content: application/json: schema: oneOf: - $ref: '#/components/schemas/JsonRpcResponse' - type: array items: $ref: '#/components/schemas/JsonRpcResponse' '429': description: Rate limit exceeded. Premium API keys raise the limit x50. '4XX': $ref: '#/components/responses/ErrorResponse' components: schemas: JsonRpcRequest: type: object required: - jsonrpc - method - id properties: jsonrpc: type: string default: "2.0" id: oneOf: - type: integer - type: string method: type: string example: eth_blockNumber params: type: array items: {} JsonRpcResponse: type: object properties: jsonrpc: type: string id: oneOf: - type: integer - type: string result: {} error: $ref: '#/components/schemas/JsonRpcError' JsonRpcError: type: object properties: code: type: integer message: type: string data: {} responses: ErrorResponse: description: JSON-RPC error envelope. content: application/json: schema: $ref: '#/components/schemas/JsonRpcResponse'