# API Methods

The OpenGPU API provides JSON-RPC 2.0 interface methods for blockchain interaction.

## Block Information

* **eth\_blockNumber**: Retrieves the most recent block number
* **eth\_getBlockByHash**: Returns block data by hash identifier
* **eth\_getBlockByNumber**: Returns block data by block number
* **eth\_getBlockTransactionCountByHash**: Gets transaction count for a block via hash
* **eth\_getBlockTransactionCountByNumber**: Gets transaction count for a block via number

## Transaction Methods

* **eth\_getTransactionByHash**: Retrieves transaction details by hash
* **eth\_getTransactionByBlockHashAndIndex**: Gets transaction by block hash and position
* **eth\_getTransactionByBlockNumberAndIndex**: Gets transaction by block number and position
* **eth\_getTransactionCount**: Returns account transaction count
* **eth\_getTransactionReceipt**: Retrieves transaction receipt details
* **eth\_sendRawTransaction**: Submits signed transaction to network

## Account & Balance

* **eth\_getBalance**: Returns account balance in wei
* **eth\_getCode**: Retrieves contract bytecode at address

## Storage & State

* **eth\_getStorageAt**: Returns storage value at address and position
* **eth\_getProof**: Generates Merkle proof for account state

## Execution

* **eth\_call**: Executes message call without transaction creation
* **eth\_estimateGas**: Calculates gas required for transaction

## Network Information

* **eth\_gasPrice**: Returns current gas price in wei
* **eth\_chainId**: Returns chain identifier
* **eth\_syncing**: Returns synchronization status or false
* **eth\_getLogs**: Retrieves contract event logs

## Utility

* **net\_version**: Returns network version
* **web3\_clientVersion**: Returns client implementation version
* **web3\_sha3**: Computes Keccak-256 hash

## Request/Response Format

All methods use standard JSON-RPC 2.0 structure with `jsonrpc`, `method`, `params`, and `id` fields. Responses include `jsonrpc`, `id`, and `result` or `error` fields.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://opengpu-network.gitbook.io/opengpu-network/blockchain-reference/api-methods.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
