> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ots_getApiLevel | Hyperliquid EVM

> The ots_getApiLevel JSON-RPC method returns the Otterscan API version level supported by the Hyperliquid EVM node. On Hyperliquid EVM.

<Info>
  This method is available on Chainstack. Not all Hyperliquid methods are available on Chainstack, as the open-source node implementation does not support them yet — see [Hyperliquid methods](/docs/hyperliquid-methods) for the full availability breakdown.
</Info>

The `ots_getApiLevel` JSON-RPC method returns the Otterscan API version level supported by the Hyperliquid EVM node. This method allows clients, particularly the Otterscan block explorer, to determine which API features are available on the connected node.

## Parameters

This method accepts no parameters.

## Response

The method returns an integer representing the API level version.

### Response structure

* `result` — the API level number (e.g., 8 for the current version)

## Usage example

<CodeGroup>
  ```shell Shell theme={"system"}
  curl -X POST https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/evm \
    -H "Content-Type: application/json" \
    -d '{
      "jsonrpc": "2.0",
      "method": "ots_getApiLevel",
      "params": [],
      "id": 1
    }'
  ```

  ```python web3.py theme={"system"}
  from web3 import Web3

  w3 = Web3(Web3.HTTPProvider("YOUR_CHAINSTACK_ENDPOINT"))

  # ots_getApiLevel is an Otterscan-namespace method, so call it as a raw JSON-RPC request.
  response = w3.provider.make_request("ots_getApiLevel", [])
  print(response["result"])
  ```

  ```javascript ethers.js theme={"system"}
  import { JsonRpcProvider } from "ethers";

  const provider = new JsonRpcProvider("YOUR_CHAINSTACK_ENDPOINT");

  // ots_getApiLevel is an Otterscan-namespace method, so use the generic send call.
  const apiLevel = await provider.send("ots_getApiLevel", []);
  console.log(apiLevel);
  ```

  ```typescript viem theme={"system"}
  import { createPublicClient, http } from "viem";

  const client = createPublicClient({
    transport: http("YOUR_CHAINSTACK_ENDPOINT"),
  });

  // ots_getApiLevel is an Otterscan-namespace method, so issue it as a custom request.
  const apiLevel = await client.request({
    method: "ots_getApiLevel" as any,
    params: [],
  });
  console.log(apiLevel);
  ```
</CodeGroup>

<Note>
  **Use your own endpoint in your code.** The code examples use a placeholder Chainstack endpoint (YOUR\_CHAINSTACK\_ENDPOINT) — replace it with your own Hyperliquid node endpoint from the [Chainstack console](https://console.chainstack.com/). The curl above uses a shared public endpoint for quick checks only; do not use it in production.
</Note>

### Example response

```json theme={"system"}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": 8
}
```

## API level features

Different API levels indicate support for various Otterscan features:

### Level 8 (Current)

* Full Otterscan API support including:
  * Block and transaction tracing
  * Internal operations tracking
  * Contract creator identification
  * Transaction error retrieval
  * Paginated queries
  * Address transaction history

### Version compatibility

* Otterscan uses this method to:
  * Verify node compatibility
  * Enable/disable features based on API level
  * Provide appropriate fallbacks for missing features

## Use cases

The `ots_getApiLevel` method is essential for:

* **Compatibility checking**: Verify if a node supports required Otterscan features
* **Feature detection**: Enable or disable UI features based on available APIs
* **Version negotiation**: Ensure client-server compatibility
* **Graceful degradation**: Provide fallback functionality for older API versions
* **Development testing**: Verify API implementation completeness
* **Node validation**: Confirm nodes are running with Otterscan support
* **Explorer configuration**: Auto-configure block explorer features
* **API documentation**: Determine which methods are available
* **Integration testing**: Validate node setup for Otterscan compatibility
* **Monitoring tools**: Check API availability across multiple nodes

This method is typically the first call made by Otterscan to establish what features can be used with the connected node.


## OpenAPI

````yaml openapi/hyperliquid_node_api/hyperevm/evm_ots_get_api_level.json post /evm
openapi: 3.0.0
info:
  title: Hyperliquid EVM API - ots_getApiLevel
  version: 1.0.0
servers:
  - url: >-
      https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274
security: []
paths:
  /evm:
    post:
      summary: ots_getApiLevel
      description: >-
        Get the Otterscan API version level on Hyperliquid EVM. Check node
        compatibility with Otterscan block explorer features.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - method
                - params
                - id
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  default: '2.0'
                  description: JSON-RPC version
                method:
                  type: string
                  enum:
                    - ots_getApiLevel
                  default: ots_getApiLevel
                  description: The RPC method name
                params:
                  type: array
                  description: No parameters required
                  default: []
                id:
                  type: integer
                  default: 1
                  description: Request identifier
            example:
              jsonrpc: '2.0'
              method: ots_getApiLevel
              params: []
              id: 1
      responses:
        '200':
          description: Successful response with API level
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    description: JSON-RPC version
                  id:
                    type: integer
                    description: Request identifier
                  result:
                    type: integer
                    description: API level number
              example:
                jsonrpc: '2.0'
                id: 1
                result: 8

````