# API Overview

> Read and write to every blockchain Alchemy supports through our implementation of the standard JSON-RPC interface, plus WebSockets, gRPC streaming, and trace/debug tooling.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What are the Chain APIs?

Alchemy's Chain APIs are our implementation of the standard JSON-RPC interface (as defined by Ethereum) and compatible equivalents for non-EVM chains (e.g., Solana, Bitcoin). They provide direct, low-level access to blockchain data and functionality across all supported networks: read blockchain state, submit transactions, and build powerful decentralized applications.

> Looking for higher-level building blocks?
> For indexed, enriched queries use the **[Data APIs](/docs/reference/data-overview)**.
> For account-abstraction and smart-wallet flows use the **[Wallet APIs](/docs/wallets)**.

## Companion APIs

Use these alongside the standard JSON-RPC methods for streaming, performance, and deeper inspection. Chain coverage varies: check each page for supported networks.

<CardGroup>
  <Card title="WebSockets" icon="wave-square" href="/docs/reference/subscription-api">
    Subscribe to pending transactions, log events, new blocks, and more.
  </Card>

  <Card title="Trace API" icon="magnifying-glass-arrow-right" href="/docs/reference/trace-api-quickstart">
    Get insights into transaction processing and onchain activity.
  </Card>

  <Card title="Debug API" icon="bug" href="/docs/reference/debug-api-quickstart">
    Non-standard RPC methods for inspecting and debugging transactions.
  </Card>

  <Card title="Yellowstone gRPC" icon="bolt" href="/docs/reference/yellowstone-grpc-overview">
    High-performance real-time Solana data streaming interface.
  </Card>
</CardGroup>

## Key capabilities

* **Read Operations**: Query account balances, smart contract state, transaction history, block data, and more
* **Write Operations**: Submit transactions to the network and track their status
* **Event Monitoring**: Subscribe to real-time blockchain events via WebSockets
* **Gas Management**: Estimate transaction costs and optimize gas usage
* **Network Information**: Access chain-specific data like network version, block numbers, and protocol details

Most chains use the **same EVM JSON-RPC methods** (e.g., `eth_call`, `eth_getLogs`, `eth_sendRawTransaction`); non-EVM chains provide compatible JSON-RPC or equivalent endpoints, plus **chain-specific methods** where the protocol differs. Each chain's section in the sidebar covers its full method list, endpoint URLs, and chain-specific behavior and limits.

## Supported blockchains

### Ethereum & EVM layer 1s

* [**Ethereum**](/docs/ethereum/ethereum-api-overview) - The leading smart contract platform and home to DeFi, NFTs, and Web3
* [**BNB Smart Chain**](/docs/bnb-smart-chain/bnb-smart-chain-api-overview) - High-performance blockchain compatible with Ethereum tooling
* [**Avalanche**](/docs/reference/avalanche-api-quickstart) - Fast, low-cost blockchain with sub-second finality
* [**Fantom**](/docs/reference/fantom-deprecation-notice) - High-speed, scalable smart contract platform
* [**Gnosis**](/docs/gnosis/gnosis-api-overview) - Community-owned Ethereum sidechain focused on payments and prediction markets
* [**Rootstock**](/docs/rootstock/rootstock-api-overview) - Bitcoin-secured smart contract platform

### Layer 2 scaling solutions

#### Optimistic rollups

* [**Arbitrum**](/docs/arbitrum/arbitrum-api-overview) - Leading Ethereum L2 with EVM compatibility and lower fees
* [**OP Mainnet**](/docs/op-mainnet/op-mainnet-api-overview) - Optimistic rollup from Optimism Collective
* [**Base**](/docs/base/base-api-overview) - Coinbase's Ethereum L2 built on the OP Stack

#### ZK rollups

* [**Polygon zkEVM**](/docs/reference/polygon-zkevm-api-quickstart) - Zero-knowledge rollup with full EVM equivalence
* [**zkSync**](/docs/reference/zksync-api-quickstart) - Privacy-preserving and scalable ZK rollup
* [**Scroll**](/docs/scroll/scroll-api-overview) - Bytecode-level compatible zkEVM
* [**Linea**](/docs/linea/linea-api-overview) - ConsenSys zkEVM rollup
* [**Starknet**](/docs/starknet/starknet-api-overview) - Validity rollup using STARK proofs

#### Other L2s & sidechains

* [**Polygon PoS**](/docs/polygon-pos/polygon-pos-api-overview) - High-throughput Ethereum sidechain
* [**Mantle**](/docs/mantle/mantle-api-overview) - Modular L2 with low fees
* [**Metis**](/docs/metis/metis-api-overview) - Decentralized optimistic rollup
* [**Blast**](/docs/blast/blast-api-overview) - L2 with native yield for ETH and stablecoins
* [**Mode**](/docs/mode/mode-api-overview) - Optimistic L2 focused on DeFi
* [**Zora**](/docs/zora/zora-api-overview) - Creator-focused Ethereum L2
* [**Ink**](/docs/ink/ink-api-overview) - L2 solution for decentralized apps
* [**Shape**](/docs/shape/shape-api-overview) - Scalable L2 network
* [**Unichain**](/docs/unichain/unichain-api-overview) - Uniswap's L2 solution
* [**World Chain**](/docs/world-chain/world-chain-api-overview) - Identity-focused L2
* [**Abstract**](/docs/abstract/abstract-api-overview) - Application-specific L2
* [**Soneium**](/docs/soneium/soneium-api-overview) - Next-generation L2 platform

### Alternative layer 1 blockchains

* [**Solana**](/docs/solana/solana-api-overview) - High-performance blockchain with fast transactions and low fees
* [**Aptos**](/docs/reference/aptos-api-quickstart) - Secure, scalable blockchain using the Move language
* [**Sui**](/docs/reference/sui-api-quickstart) - Fast, private, and secure blockchain built on Move
* [**Celo**](/docs/celo/celo-api-overview) - Mobile-first blockchain for financial inclusion
* [**Bitcoin**](/docs/bitcoin/bitcoin-api-overview) - The original cryptocurrency and decentralized network
* [**Flow**](/docs/reference/flow-api-quickstart) - Blockchain built for NFTs, games, and digital assets
* [**Berachain**](/docs/berachain/berachain-api-overview) - DeFi-native blockchain with novel consensus
* [**Monad**](/docs/monad/monad-api-overview) - High-performance EVM-compatible blockchain
* [**Sei**](/docs/sei/sei-api-overview) - Purpose-built L1 for trading applications

### Emerging networks & testnets

Alchemy also supports many emerging chains and specialized networks including Astar, Hyperliquid, Lens, opBNB, Plasma, Rise, Ronin, Sonic, and many more. Visit our [full chain directory](https://www.alchemy.com/rpc) for a complete list.

## Getting started

1. **Create an Alchemy account** - Sign up for free at [alchemy.com](https://www.alchemy.com/signup)
2. **Create an app** - Set up a new app for your chosen blockchain
3. **Get your API key** - Use your unique API endpoint to start making requests
4. **Choose your chain** - Select a chain from the list above and follow its quickstart guide
5. **Start building** - Use our SDKs, documentation, and tools to build your dapp

------

# Chain API supported chains

> Use the Chain APIs for low-level access to Alchemy-supported blockchains

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Supported chains

Alchemy supports both EVM and non-EVM chains, view API references below:

<CardGroup cols={3}>
  <Card title="Ethereum" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764179980/docs/api-reference/node-api/api_icon.svg" alt="Ethereum logo" style={{width: "24px"}}/>} href="/docs/reference/ethereum-api-quickstart">
    View Ethereum API reference.
  </Card>

  <Card title="Polygon PoS" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764179983/docs/api-reference/node-api/api_icon2.svg" alt="Polygon logo"/>} href="/docs/reference/polygon-pos-api-quickstart">
    View Polygon PoS API reference.
  </Card>

  <Card title="OP Mainnet" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764179985/docs/api-reference/node-api/op-mainnet.svg" alt="Optimism logo"/>} href="/docs/reference/op-mainnet-api-quickstart">
    View OP Mainnet API reference.
  </Card>

  <Card title="Arbitrum" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764179954/docs/api-reference/alchemy-rollups/api_icon3.svg" alt="Arbitrum logo"/>} href="/docs/reference/arbitrum-api-quickstart">
    View Arbitrum API reference.
  </Card>

  <Card title="Astar" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764179986/docs/api-reference/node-api/astar-logo.png" alt="Astar logo"/>} href="/docs/reference/astar-api-quickstart">
    View Astar API reference.
  </Card>

  <Card title="Solana" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764179987/docs/api-reference/node-api/api_icon5.svg" alt="Solana logo"/>} href="/docs/reference/solana-api-quickstart">
    View Solana API reference.
  </Card>

  <Card title="Polygon zkEVM" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764179990/docs/api-reference/node-api/227805834-81551a59-b841-446f-b0ad-e3affc67aa98.svg" alt="Polygon zkEVM logo"/>} href="/docs/reference/polygon-zkevm-api-quickstart">
    View Polygon zkEVM API reference.
  </Card>

  <Card title="Starknet" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764179992/docs/api-reference/node-api/starknet.svg" alt="Starknet logo"/>} href="/docs/reference/starknet-api-quickstart">
    View Starknet API reference.
  </Card>

  <Card title="Base" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764179995/docs/api-reference/node-api/f7c7331e-d19f-4ffd-8172-47edfcb9cfd9.svg" alt="Base logo"/>} href="/docs/reference/base-api-quickstart">
    View Base API reference.
  </Card>

  <Card title="zkSync" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180005/docs/api-reference/node-api/6990bb3e-c2d2-4086-af31-41d12b4fd741.svg" alt="zkSync logo"/>} href="/docs/reference/zksync-api-quickstart">
    View zkSync API reference.
  </Card>

  <Card title="ZetaChain" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180007/docs/api-reference/node-api/zetachain.svg" alt="ZetaChain logo"/>} href="/docs/reference/zetachain-api-quickstart">
    View ZetaChain API reference.
  </Card>

  <Card title="Blast" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180010/docs/api-reference/node-api/blast.svg" alt="Blast logo"/>} href="/docs/reference/blast-chain-api-quickstart">
    View Blast API reference.
  </Card>

  <Card title="Sonic" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180011/docs/api-reference/node-api/sonic.svg" alt="Sonic logo"/>} href="/docs/reference/sonic-api-quickstart">
    View Sonic API reference.
  </Card>

  <Card title="Sei" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180013/docs/api-reference/node-api/Sei_Symbol_Gradient.svg" alt="Sei logo"/>} href="/docs/reference/sei-api-quickstart">
    View Sei API reference.
  </Card>

  <Card title="Linea" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180018/docs/api-reference/node-api/linea.svg" alt="Linea logo"/>} href="/docs/reference/linea-chain-api-quickstart">
    View Linea API reference.
  </Card>

  <Card title="Mantle" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180019/docs/api-reference/node-api/mantle.svg" alt="Mantle logo"/>} href="/docs/reference/mantle-chain-api-quickstart">
    View Mantle API reference.
  </Card>

  <Card title="Monad" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180022/docs/api-reference/node-api/monad_logo.png" alt="Monad logo"/>} href="/docs/reference/monad-chain-api-quickstart">
    View Monad API reference.
  </Card>

  <Card title="Celo" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180023/docs/api-reference/node-api/brand-kit-symbol-image-04.webp" alt="Celo logo"/>} href="/docs/reference/celo-chain-api-quickstart">
    View Celo API reference.
  </Card>

  <Card title="Berachain" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180024/docs/api-reference/node-api/berachain.svg" alt="Berachain logo"/>} href="/docs/reference/berachain-chain-api-quickstart">
    View Berachain API reference.
  </Card>

  <Card title="Flow" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180026/docs/api-reference/node-api/flow.svg" alt="Flow logo"/>} href="/docs/reference/flow-chain-api-quickstart">
    View Flow API reference.
  </Card>

  <Card title="CrossFi" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180028/docs/api-reference/node-api/crossfi.svg" alt="CrossFi logo"/>} href="/docs/reference/crossfi-api-quickstart">
    View CrossFi API reference.
  </Card>

  <Card title="Scroll" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180031/docs/api-reference/node-api/scroll.svg" alt="Scroll logo"/>} href="/docs/reference/scroll-api-quickstart">
    View Scroll API reference.
  </Card>

  <Card title="Soneium" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180034/docs/api-reference/node-api/soneium.svg" alt="Soneium logo"/>} href="/docs/reference/soneium-api-quickstart">
    View Soneium API reference.
  </Card>

  <Card title="World Chain" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180038/docs/api-reference/node-api/worldchain.svg" alt="World Chain logo"/>} href="/docs/reference/world-chain-api-quickstart">
    View World Chain API reference.
  </Card>

  <Card title="Rootstock" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180040/docs/api-reference/node-api/rootstock.svg" alt="Rootstock logo"/>} href="/docs/reference/rootstock-api-quickstart">
    View Rootstock API reference.
  </Card>

  <Card title="Shape" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180043/docs/api-reference/node-api/shape.svg" alt="Shape logo"/>} href="/docs/reference/shape-api-quickstart">
    View Shape API reference.
  </Card>

  <Card title="Unichain" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180045/docs/api-reference/node-api/unichain.svg" alt="Unichain logo"/>} href="/docs/reference/unichain-api-quickstart">
    View Unichain API reference.
  </Card>

  <Card title="ApeChain" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180047/docs/api-reference/node-api/apechain.svg" alt="ApeChain logo"/>} href="/docs/reference/apechain-api-quickstart">
    View ApeChain API reference.
  </Card>

  <Card title="Geist" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180050/docs/api-reference/node-api/geist.svg" alt="Geist logo"/>} href="/docs/reference/geist-api-quickstart">
    View Geist API reference.
  </Card>

  <Card title="Lens" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180052/docs/api-reference/node-api/lens.svg" alt="Lens logo"/>} href="/docs/reference/lens-api-quickstart">
    View Lens API reference.
  </Card>

  <Card title="Abstract" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180054/docs/api-reference/node-api/abstract.svg" alt="Abstract logo"/>} href="/docs/reference/abstract-api-quickstart">
    View Abstract API reference.
  </Card>

  <Card title="Ink" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180058/docs/api-reference/node-api/ink.svg" alt="Ink logo"/>} href="/docs/reference/ink-api-quickstart">
    View Ink API reference.
  </Card>

  <Card title="BSC" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180060/docs/api-reference/node-api/bnb-mainnet.svg" alt="BSC logo"/>} href="/docs/reference/bnb-smart-chain-api-quickstart">
    View BSC API reference.
  </Card>

  <Card title="Metis" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180062/docs/api-reference/node-api/metis.svg" alt="Metis logo"/>} href="/docs/reference/metis-chain-api-quickstart">
    View Metis API reference.
  </Card>

  <Card title="Avalanche C-Chain" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180064/docs/api-reference/node-api/avalanche.svg" alt="Avalanche logo"/>} href="/docs/reference/avalanche-api-quickstart">
    View Avalanche C-Chain API reference.
  </Card>

  <Card title="Gnosis" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180066/docs/api-reference/node-api/gnosis.svg" alt="Gnosis logo"/>} href="/docs/reference/gnosis-api-quickstart">
    View Gnosis API reference.
  </Card>

  <Card title="opBNB" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180067/docs/api-reference/node-api/opbnb.svg" alt="opBNB logo"/>} href="/docs/reference/opbnb-api-quickstart">
    View opBNB API reference.
  </Card>

  <Card title="Bitcoin" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180070/docs/api-reference/node-api/Bitcoin.svg" alt="Bitcoin logo"/>} href="/docs/reference/bitcoin-api-quickstart">
    View Bitcoin API reference.
  </Card>

  <Card title="Sui" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180072/docs/api-reference/node-api/SUI.svg" alt="Sui logo"/>} href="/docs/reference/sui-api-quickstart">
    View Sui API reference.
  </Card>

  <Card title="Superseed" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180075/docs/api-reference/node-api/Superseed.svg" alt="Superseed logo"/>} href="/docs/reference/superseed-api-quickstart">
    View Superseed API reference.
  </Card>

  <Card title="Aptos" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180077/docs/api-reference/node-api/Aptos.svg" alt="Aptos logo"/>} href="/docs/reference/aptos-api-quickstart">
    View Aptos API reference.
  </Card>

  <Card title="DATA Network" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180079/docs/api-reference/node-api/Story.svg" alt="DATA Network logo"/>} href="/docs/reference/data-network-api-quickstart">
    View DATA Network API reference.
  </Card>

  <Card title="Anime" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180081/docs/api-reference/node-api/Anime.svg" alt="Anime logo"/>} href="/docs/reference/anime-api-quickstart">
    View Anime API reference.
  </Card>

  <Card title="Botanix" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180083/docs/api-reference/node-api/Botanix.svg" alt="Botanix logo"/>} href="/docs/reference/botanix-api-quickstart">
    View Botanix API reference.
  </Card>

  <Card title="HyperEVM" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764180085/docs/api-reference/node-api/Hyperliquid.svg" alt="HyperEVM logo"/>} href="/docs/reference/hyperliquid-api-quickstart">
    View HyperEVM API reference.
  </Card>
</CardGroup>

## List of HTTP URLs by supported network

| Platform | Network Name | HTTPS URL |
| --- | --- | --- |
| World Chain | World Chain Mainnet | https://worldchain-mainnet.g.alchemy.com/v2/API_KEY |
| World Chain | World Chain Sepolia | https://worldchain-sepolia.g.alchemy.com/v2/API_KEY |
| Shape | Shape Mainnet | https://shape-mainnet.g.alchemy.com/v2/API_KEY |
| Shape | Shape Sepolia | https://shape-sepolia.g.alchemy.com/v2/API_KEY |
| Ethereum | Ethereum Mainnet | https://eth-mainnet.g.alchemy.com/v2/API_KEY |
| Ethereum | Ethereum Sepolia | https://eth-sepolia.g.alchemy.com/v2/API_KEY |
| Ethereum | Ethereum Holešky | https://eth-holesky.g.alchemy.com/v2/API_KEY |
| Ethereum | Ethereum Hoodi | https://eth-hoodi.g.alchemy.com/v2/API_KEY |
| Ethereum | Ethereum Mainnet Beacon | https://eth-mainnetbeacon.g.alchemy.com/v2/API_KEY |
| Ethereum | Ethereum Sepolia Beacon | https://eth-sepoliabeacon.g.alchemy.com/v2/API_KEY |
| Ethereum | Ethereum Holešky Beacon | https://eth-holeskybeacon.g.alchemy.com/v2/API_KEY |
| Ethereum | Ethereum Hoodi Beacon | https://eth-hoodibeacon.g.alchemy.com/v2/API_KEY |
| ZKsync | ZKsync Mainnet | https://zksync-mainnet.g.alchemy.com/v2/API_KEY |
| ZKsync | ZKsync Sepolia | https://zksync-sepolia.g.alchemy.com/v2/API_KEY |
| OP Mainnet | OP Mainnet Mainnet | https://opt-mainnet.g.alchemy.com/v2/API_KEY |
| OP Mainnet | OP Mainnet Sepolia | https://opt-sepolia.g.alchemy.com/v2/API_KEY |
| Polygon PoS | Polygon Mainnet | https://polygon-mainnet.g.alchemy.com/v2/API_KEY |
| Polygon PoS | Polygon Amoy | https://polygon-amoy.g.alchemy.com/v2/API_KEY |
| Arbitrum | Arbitrum Mainnet | https://arb-mainnet.g.alchemy.com/v2/API_KEY |
| Arbitrum | Arbitrum Sepolia | https://arb-sepolia.g.alchemy.com/v2/API_KEY |
| Starknet | Starknet Mainnet | https://starknet-mainnet.g.alchemy.com/starknet/version/rpc/v0_10/API_KEY |
| Starknet | Starknet Sepolia | https://starknet-sepolia.g.alchemy.com/starknet/version/rpc/v0_10/API_KEY |
| Astar | Astar Mainnet | https://astar-mainnet.g.alchemy.com/v2/API_KEY |
| Polygon zkEVM | Polygon zkEVM Mainnet (deprecating July 1, 2026 — [details](/docs/reference/polygon-zkevm-deprecation-notice)) | https://polygonzkevm-mainnet.g.alchemy.com/v2/API_KEY |
| Polygon zkEVM | Polygon zkEVM Cardona (deprecating July 1, 2026 — [details](/docs/reference/polygon-zkevm-deprecation-notice)) | https://polygonzkevm-cardona.g.alchemy.com/v2/API_KEY |
| ZetaChain | ZetaChain Mainnet | https://zetachain-mainnet.g.alchemy.com/v2/API_KEY |
| ZetaChain | ZetaChain Testnet | https://zetachain-testnet.g.alchemy.com/v2/API_KEY |
| Mantle | Mantle Mainnet | https://mantle-mainnet.g.alchemy.com/v2/API_KEY |
| Mantle | Mantle Sepolia | https://mantle-sepolia.g.alchemy.com/v2/API_KEY |
| Berachain | Berachain Mainnet | https://berachain-mainnet.g.alchemy.com/v2/API_KEY |
| Berachain | Berachain Bepolia | https://berachain-bepolia.g.alchemy.com/v2/API_KEY |
| Blast | Blast Mainnet | https://blast-mainnet.g.alchemy.com/v2/API_KEY |
| Blast | Blast Sepolia | https://blast-sepolia.g.alchemy.com/v2/API_KEY |
| Linea | Linea Mainnet | https://linea-mainnet.g.alchemy.com/v2/API_KEY |
| Linea | Linea Sepolia | https://linea-sepolia.g.alchemy.com/v2/API_KEY |
| Zora | Zora Mainnet | https://zora-mainnet.g.alchemy.com/v2/API_KEY |
| Zora | Zora Sepolia | https://zora-sepolia.g.alchemy.com/v2/API_KEY |
| Ronin | Ronin Mainnet | https://ronin-mainnet.g.alchemy.com/v2/API_KEY |
| Ronin | Ronin Saigon | https://ronin-saigon.g.alchemy.com/v2/API_KEY |
| Plasma | Plasma Mainnet | https://plasma-mainnet.g.alchemy.com/v2/API_KEY |
| Plasma | Plasma Testnet | https://plasma-testnet.g.alchemy.com/v2/API_KEY |
| Standard | Standard Mainnet | https://standard-mainnet.g.alchemy.com/v2/API_KEY |
| Commons | Commons Mainnet | https://commons-mainnet.g.alchemy.com/v2/API_KEY |
| Mythos | Mythos Mainnet | https://mythos-mainnet.g.alchemy.com/v2/API_KEY |
| Settlus | Settlus Mainnet | https://settlus-mainnet.g.alchemy.com/v2/API_KEY |
| Settlus | Settlus Sepolia | https://settlus-septestnet.g.alchemy.com/v2/API_KEY |
| Earnm | Earnm Sepolia | https://earnm-sepolia.g.alchemy.com/v2/API_KEY |
| Earnm | Earnm Mainnet | https://earnm-mainnet.g.alchemy.com/v2/API_KEY |
| X Protocol | X Protocol Mainnet | https://xprotocol-mainnet.g.alchemy.com/v2/API_KEY |
| BOB | BOB Mainnet | https://bob-mainnet.g.alchemy.com/v2/API_KEY |
| BOB | BOB Sepolia | https://bob-sepolia.g.alchemy.com/v2/API_KEY |
| MegaETH | MegaETH Mainnet | https://megaeth-mainnet.g.alchemy.com/v2/API_KEY |
| MegaETH | MegaETH Testnet | https://megaeth-testnet.g.alchemy.com/v2/API_KEY |
| Rootstock | Rootstock Mainnet | https://rootstock-mainnet.g.alchemy.com/v2/API_KEY |
| Rootstock | Rootstock Testnet | https://rootstock-testnet.g.alchemy.com/v2/API_KEY |
| Worldl3 | WorldL3 Devnet | https://worldl3-devnet.g.alchemy.com/v2/API_KEY |
| Citrea | Citrea Testnet | https://citrea-testnet.g.alchemy.com/v2/API_KEY |
| Citrea | Citrea Mainnet | https://citrea-mainnet.g.alchemy.com/v2/API_KEY |
| Tea | Tea Sepolia | https://tea-sepolia.g.alchemy.com/v2/API_KEY |
| Solana | Solana Mainnet | https://solana-mainnet.g.alchemy.com/v2/API_KEY |
| Solana | Solana Devnet | https://solana-devnet.g.alchemy.com/v2/API_KEY |
| Gensyn | Gensyn Testnet | https://gensyn-testnet.g.alchemy.com/v2/API_KEY |
| Gensyn | Gensyn Mainnet | https://gensyn-mainnet.g.alchemy.com/v2/API_KEY |
| Arc | Arc Testnet | https://arc-testnet.g.alchemy.com/v2/API_KEY |
| DATA Network | DATA Network Mainnet | https://story-mainnet.g.alchemy.com/v2/API_KEY |
| DATA Network | DATA Network Aeneid | https://story-aeneid.g.alchemy.com/v2/API_KEY |
| Clankermon | Clankermon Mainnet | https://clankermon-mainnet.g.alchemy.com/v2/API_KEY |
| Humanity | Humanity Mainnet | https://humanity-mainnet.g.alchemy.com/v2/API_KEY |
| Humanity | Humanity Testnet | https://humanity-testnet.g.alchemy.com/v2/API_KEY |
| Risa | Risa Testnet | https://risa-testnet.g.alchemy.com/v2/API_KEY |
| Base | Base Mainnet | https://base-mainnet.g.alchemy.com/v2/API_KEY |
| Base | Base Sepolia | https://base-sepolia.g.alchemy.com/v2/API_KEY |
| Tempo | Tempo Mainnet | https://tempo-mainnet.g.alchemy.com/v2/API_KEY |
| Tempo | Tempo Moderato | https://tempo-moderato.g.alchemy.com/v2/API_KEY |
| HyperEVM | Hyperliquid Mainnet | https://hyperliquid-mainnet.g.alchemy.com/v2/API_KEY |
| HyperEVM | Hyperliquid Testnet | https://hyperliquid-testnet.g.alchemy.com/v2/API_KEY |
| Galactica | Galactica Mainnet | https://galactica-mainnet.g.alchemy.com/v2/API_KEY |
| Galactica | Galactica Cassiopeia | https://galactica-cassiopeia.g.alchemy.com/v2/API_KEY |
| Lens | Lens Mainnet | https://lens-mainnet.g.alchemy.com/v2/API_KEY |
| Lens | Lens Sepolia | https://lens-sepolia.g.alchemy.com/v2/API_KEY |
| World Mobile Chain | WorldMobileChain Mainnet | https://worldmobilechain-mainnet.g.alchemy.com/v2/API_KEY |
| Frax | Frax Mainnet | https://frax-mainnet.g.alchemy.com/v2/API_KEY |
| Frax | Frax Hoodi | https://frax-hoodi.g.alchemy.com/v2/API_KEY |
| Ink | Ink Mainnet | https://ink-mainnet.g.alchemy.com/v2/API_KEY |
| Ink | Ink Sepolia | https://ink-sepolia.g.alchemy.com/v2/API_KEY |
| Avalanche | Avalanche Mainnet | https://avax-mainnet.g.alchemy.com/v2/API_KEY |
| Avalanche | Avalanche Fuji | https://avax-fuji.g.alchemy.com/v2/API_KEY |
| Botanix | Botanix Mainnet | https://botanix-mainnet.g.alchemy.com/v2/API_KEY |
| Botanix | Botanix Testnet | https://botanix-testnet.g.alchemy.com/v2/API_KEY |
| Gnosis | Gnosis Mainnet | https://gnosis-mainnet.g.alchemy.com/v2/API_KEY |
| Gnosis | Gnosis Chiado | https://gnosis-chiado.g.alchemy.com/v2/API_KEY |
| CelestiaBridge | CelestiaBridge Mainnet | https://celestiabridge-mainnet.g.alchemy.com/v2/API_KEY |
| CelestiaBridge | CelestiaBridge Mocha | https://celestiabridge-mocha.g.alchemy.com/v2/API_KEY |
| BNB Smart Chain | BNB Smart Chain Mainnet | https://bnb-mainnet.g.alchemy.com/v2/API_KEY |
| BNB Smart Chain | BNB Smart Chain Testnet | https://bnb-testnet.g.alchemy.com/v2/API_KEY |
| Alchemy Arbitrum | Alchemy Arbitrum Fam | https://alchemyarb-fam.g.alchemy.com/v2/API_KEY |
| Alchemy Arbitrum | Alchemy Arbitrum Sepolia | https://alchemyarb-sepolia.g.alchemy.com/v2/API_KEY |
| Boba | Boba Mainnet | https://boba-mainnet.g.alchemy.com/v2/API_KEY |
| Boba | Boba Sepolia | https://boba-sepolia.g.alchemy.com/v2/API_KEY |
| SUI | SUI Mainnet | https://sui-mainnet.g.alchemy.com/v2/API_KEY |
| SUI | SUI Testnet | https://sui-testnet.g.alchemy.com/v2/API_KEY |
| Syndicate | Syndicate Manchego | https://syndicate-manchego.g.alchemy.com/v2/API_KEY |
| Unichain | Unichain Mainnet | https://unichain-mainnet.g.alchemy.com/v2/API_KEY |
| Unichain | Unichain Sepolia | https://unichain-sepolia.g.alchemy.com/v2/API_KEY |
| Syndicate | Syndicate Mainnet | https://synd-mainnet.g.alchemy.com/v2/API_KEY |
| Superseed | Superseed Mainnet | https://superseed-mainnet.g.alchemy.com/v2/API_KEY |
| Superseed | Superseed Sepolia | https://superseed-sepolia.g.alchemy.com/v2/API_KEY |
| Rise | Rise Mainnet | https://rise-mainnet.g.alchemy.com/v2/API_KEY |
| Rise | Rise Testnet | https://rise-testnet.g.alchemy.com/v2/API_KEY |
| Monad | Monad Testnet | https://monad-testnet.g.alchemy.com/v2/API_KEY |
| Monad | Monad Mainnet | https://monad-mainnet.g.alchemy.com/v2/API_KEY |
| Flow EVM | Flow EVM Mainnet | https://flow-mainnet.g.alchemy.com/v2/API_KEY |
| Flow EVM | Flow EVM Testnet | https://flow-testnet.g.alchemy.com/v2/API_KEY |
| Openloot | Openloot Sepolia | https://openloot-sepolia.g.alchemy.com/v2/API_KEY |
| Worldmobile | WorldMobile Devnet | https://worldmobile-devnet.g.alchemy.com/v2/API_KEY |
| Worldmobile | WorldMobile Testnet | https://worldmobile-testnet.g.alchemy.com/v2/API_KEY |
| Tron | Tron Mainnet | https://tron-mainnet.g.alchemy.com/v2/API_KEY |
| Tron | Tron Testnet | https://tron-testnet.g.alchemy.com/v2/API_KEY |
| Unite | Unite Mainnet | https://unite-mainnet.g.alchemy.com/v2/API_KEY |
| Unite | Unite Testnet | https://unite-testnet.g.alchemy.com/v2/API_KEY |
| Degen | Degen Mainnet | https://degen-mainnet.g.alchemy.com/v2/API_KEY |
| Degen | Degen Sepolia | https://degen-sepolia.g.alchemy.com/v2/API_KEY |
| Bitcoin | Bitcoin Mainnet | https://bitcoin-mainnet.g.alchemy.com/v2/API_KEY |
| Bitcoin | Bitcoin Testnet | https://bitcoin-testnet.g.alchemy.com/v2/API_KEY |
| Bitcoin | Bitcoin Signet | https://bitcoin-signet.g.alchemy.com/v2/API_KEY |
| Polynomial | Polynomial Mainnet | https://polynomial-mainnet.g.alchemy.com/v2/API_KEY |
| Polynomial | Polynomial Sepolia | https://polynomial-sepolia.g.alchemy.com/v2/API_KEY |
| Mode | Mode Mainnet | https://mode-mainnet.g.alchemy.com/v2/API_KEY |
| Mode | Mode Sepolia | https://mode-sepolia.g.alchemy.com/v2/API_KEY |
| Edge | Edge Mainnet | https://edge-mainnet.g.alchemy.com/v2/API_KEY |
| Edge | Edge Testnet | https://edge-testnet.g.alchemy.com/v2/API_KEY |
| Moonbeam | Moonbeam Mainnet | https://moonbeam-mainnet.g.alchemy.com/v2/API_KEY |
| Alchemy | Alchemy Sepolia | https://alchemy-sepolia.g.alchemy.com/v2/API_KEY |
| Alchemy | Alchemy Internal | https://alchemy-internal.g.alchemy.com/v2/API_KEY |
| ApeChain | ApeChain Mainnet | https://apechain-mainnet.g.alchemy.com/v2/API_KEY |
| ApeChain | ApeChain Curtis | https://apechain-curtis.g.alchemy.com/v2/API_KEY |
| Celo | Celo Mainnet | https://celo-mainnet.g.alchemy.com/v2/API_KEY |
| Celo | Celo Sepolia | https://celo-sepolia.g.alchemy.com/v2/API_KEY |
| Aptos | Aptos Mainnet | https://aptos-mainnet.g.alchemy.com/v2/API_KEY |
| Aptos | Aptos Testnet | https://aptos-testnet.g.alchemy.com/v2/API_KEY |
| Anime | Anime Mainnet | https://anime-mainnet.g.alchemy.com/v2/API_KEY |
| Anime | Anime Sepolia | https://anime-sepolia.g.alchemy.com/v2/API_KEY |
| Alterscope | Alterscope Mainnet | https://alterscope-mainnet.g.alchemy.com/v2/API_KEY |
| Metis | Metis Mainnet | https://metis-mainnet.g.alchemy.com/v2/API_KEY |
| Sonic | Sonic Mainnet | https://sonic-mainnet.g.alchemy.com/v2/API_KEY |
| Sonic | Sonic Testnet | https://sonic-testnet.g.alchemy.com/v2/API_KEY |
| Sei | Sei Mainnet | https://sei-mainnet.g.alchemy.com/v2/API_KEY |
| Sei | Sei Testnet | https://sei-testnet.g.alchemy.com/v2/API_KEY |
| XMTP | XMTP Ropsten | https://xmtp-ropsten.g.alchemy.com/v2/API_KEY |
| XMTP | XMTP Mainnet | https://xmtp-mainnet.g.alchemy.com/v2/API_KEY |
| ADI | ADI Testnet AB | https://adi-testnet.g.alchemy.com/v2/API_KEY |
| ADI | ADI Mainnet | https://adi-mainnet.g.alchemy.com/v2/API_KEY |
| Scroll | Scroll Mainnet | https://scroll-mainnet.g.alchemy.com/v2/API_KEY |
| Scroll | Scroll Sepolia | https://scroll-sepolia.g.alchemy.com/v2/API_KEY |
| opBNB | opBNB Mainnet | https://opbnb-mainnet.g.alchemy.com/v2/API_KEY |
| opBNB | opBNB Testnet | https://opbnb-testnet.g.alchemy.com/v2/API_KEY |
| Race | Race Mainnet | https://race-mainnet.g.alchemy.com/v2/API_KEY |
| Race | Race Sepolia | https://race-sepolia.g.alchemy.com/v2/API_KEY |
| CrossFi | CrossFi Testnet | https://crossfi-testnet.g.alchemy.com/v2/API_KEY |
| CrossFi | CrossFi Mainnet | https://crossfi-mainnet.g.alchemy.com/v2/API_KEY |
| Abstract | Abstract Mainnet | https://abstract-mainnet.g.alchemy.com/v2/API_KEY |
| Abstract | Abstract Testnet | https://abstract-testnet.g.alchemy.com/v2/API_KEY |
| Soneium | Soneium Mainnet | https://soneium-mainnet.g.alchemy.com/v2/API_KEY |
| Soneium | Soneium Minato | https://soneium-minato.g.alchemy.com/v2/API_KEY |
| Stable | Stable Mainnet | https://stable-mainnet.g.alchemy.com/v2/API_KEY |
| Stable | Stable Testnet | https://stable-testnet.g.alchemy.com/v2/API_KEY |
| V | V Devnet | https://rpc.devnet.alchemy.com/API_KEY |

------

# MEV Protection

> Alchemy's RPC endpoints now come with built-in MEV protection on supported chains

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

Alchemy's RPC endpoints now come with built-in MEV protection on supported chains. This feature helps prevent frontrunning, sandwich attacks, and other forms of transaction manipulation with no additional code changes or tooling required.

## Why it matters

By default, most blockchain transactions are broadcast to the public mempool. This exposes them to MEV (Maximal Extractable Value) risks, where bots insert transactions to extract profit at the user’s expense.

MEV protection mitigates this risk by routing transactions through private infrastructure. This improves transaction privacy, protects ordering, and reduces block inclusion time.

## How MEV protection works

Transactions sent through Alchemy’s MEV-protected RPC endpoints are:

* Routed through private mempools — not broadcast publicly.  
* Hidden until block inclusion — keeping sensitive trade details private.  
* Ordered fairly — processed in the original sequence without manipulation.
* Shielded from frontrunning and sandwiching — keeping transaction intent intact.

This protection is powered through trusted Order Flow Auction (OFA) partners like Merkle and Blink.

## Supported networks

MEV protection is automatically enabled on:

* [Ethereum](/docs/reference/ethereum-api-endpoints)
* [Arbitrum](/docs/reference/arbitrum-api-endpoints)
* [BNB Smart Chain (BSC)](/docs/reference/bnb-smart-chain-api-quickstart)
* [Base](/docs/reference/base-api-quickstart)
* [Solana](/docs/reference/solana-api-endpoints)

No configuration changes are required. Just send transactions to the standard RPC endpoint.

## Key benefits

✅ Automatically protects transactions from MEV\
✅ Faster block inclusion through private routing\
✅ No changes required in your dApp logic\
✅ Included at no additional cost

------

# Subscription API Overview

> Learn how to subscribe to pending transactions, log events, new blocks, account and program updates, and more using WebSockets on Ethereum, Polygon, Arbitrum, Optimism, and Solana.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Getting started

The primary way to use the Subscription API is through standard JSON-RPC methods. See the [Using JSON-RPC requests section](#using-json-rpc-requests-to-access-websockets) below to get started.

# Subscription API endpoints

For a full list of Subscription API endpoints and supported chains see the [Subscription API Endpoints](/docs/reference/subscription-api-endpoints) doc. Below are the subscription endpoints available and the corresponding docs for each of them.

<Info>
  Note: `alchemy_minedTransactions` and `alchemy_pendingTransactions` are only
  supported on the following: Ethereum, Arbitrum, Polygon and Optimism.
</Info>

| Subscription Type                                                     | Description                                                                                                            |
| --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| [alchemy\_minedTransactions](/docs/reference/alchemy-minedtransactions)     | Emits full transaction objects or hashes that are mined on the network based on provided filters and block tags.       |
| [alchemy\_pendingTransactions](/docs/reference/alchemy-pendingtransactions) | Emits full transaction objects or hashes that are sent to the network, marked as "pending", based on provided filters. |
| [newPendingTransactions](/docs/reference/newpendingtransactions)           | Emits transaction hashes that are sent to the network and marked as "pending".                                         |
| [newHeads](/docs/reference/newheads)                                       | Emits new blocks that are added to the blockchain.                                                                     |
| [logs](/docs/reference/logs)                                               | Emits logs attached to a new block that match certain topic filters.                                                   |
| [monadNewHeads](/docs/reference/monadnewheads)                             | Fires a notification each time as soon as a block is Proposed and the node has a chance to speculatively execute.     |
| [monadLogs](/docs/reference/monadlogs)                                     | Emits logs attached to a new block that match certain topic filters as soon as the block is Proposed and the node has a chance to speculatively execute.                  |

## Solana subscription endpoints

Solana uses native `*Subscribe` / `*Unsubscribe` PubSub methods (not `eth_subscribe`). Each `*Subscribe` call returns a numeric subscription id that you pass to the matching `*Unsubscribe` to cancel the stream. See the [Solana Subscription API Endpoints](/docs/reference/solana-subscription-api-endpoints) index for shared request/notification format details.

<Info>
  **Pricing:** See the [Solana Subscription API Endpoints](/docs/reference/solana-subscription-api-endpoints#pricing) page for a full breakdown.
</Info>

**Accounts**

| Subscription Type                                         | Description                                                            |
| --------------------------------------------------------- | ---------------------------------------------------------------------- |
| [accountSubscribe](/docs/reference/account-subscribe)     | Subscribe to notifications when one account's lamports or data change. |
| [programSubscribe](/docs/reference/program-subscribe)     | Subscribe to notifications for accounts owned by a program.            |

**Transactions**

| Subscription Type                                             | Description                                                      |
| ------------------------------------------------------------- | ---------------------------------------------------------------- |
| [logsSubscribe](/docs/reference/logs-subscribe)               | Subscribe to transaction log messages that match a log filter.   |
| [signatureSubscribe](/docs/reference/signature-subscribe)     | Subscribe to status notifications for one transaction signature. |

**Cluster**

| Subscription Type                                                       | Description                                                          |
| ----------------------------------------------------------------------- | -------------------------------------------------------------------- |
| [rootSubscribe](/docs/reference/root-subscribe)                         | Subscribe to notifications when the validator sets a new root slot.  |
| [slotSubscribe](/docs/reference/slot-subscribe)                         | Subscribe to notifications when the validator processes a new slot.  |

# What are WebSockets and how do they differ from HTTP?

WebSocket is a bidirectional communication protocol that maintains a network connection between a server and a client. Unlike HTTP, with WebSocket you don't need to continuously make requests when you want information.

Instead, an open WebSocket connection can push network updates to you by allowing subscriptions to certain network states, such as new transactions or blocks being added to the blockchain.

<Warning>
  **Keep subscription scope narrow**

  WebSocket subscriptions on Alchemy are billed based on the bandwidth
  delivered as part of the subscription. Broad or unfiltered subscriptions can
  produce high event volumes, especially for pending or mined transaction
  streams.

  To keep usage predictable:

  * Prefer narrow filters when the subscription supports them.
  * Prefer smaller payloads, such as hashes, when you do not need full
    transaction objects.
  * Set [usage limits](/docs/how-to-set-usage-limits-and-alerts-for-your-account)
    and [usage alerts](/docs/dashboard-alerts) before running high-volume
    streams in production.

  For pricing details, see
  [Compute Unit Costs](/docs/reference/compute-unit-costs#webhooks-and-subscription-apis).
</Warning>

## Using JSON-RPC requests to access WebSockets

The `eth_subscribe` and `eth_unsubscribe` JSON-RPC methods allow you to access WebSockets.

To begin, open a WebSocket using the WebSocket URL for your app. You can find your app's WebSocket URL by opening the app's page in the [Alchemy Dashboard](https://dashboard.alchemy.com/signup) and clicking "View Key".

Note that your app's URL for WebSockets is different from its URL for HTTP requests, but both can be found in the app's "Network" tab.

![](https://alchemyapi-res.cloudinary.com/image/upload/v1764180092/docs/api-reference/websockets/2cbc56a-image.png)

Next, install a command line tool for making WebSocket requests such as [wscat](https://github.com/websockets/wscat). Using `wscat`, you can send requests as follows:

<CodeGroup>
  ```shell Shell
  $ wscat -c wss://eth-mainnet.g.alchemy.com/v2/demo

  // create subscription

  > {"id": 1, "method": "eth_subscribe", "params": ["newHeads"]}

  < {"jsonrpc":"2.0","id":1,"result":"0xcd0c3e8af590364c09d0fa6a1210faf5"}

  // incoming notifications

  < {"jsonrpc":"2.0","method":"eth_subscription","params":{"subscription":"0xcd0c3e8af590364c09d0fa6a1210faf5","result":{"difficulty":"0xd9263f42a87",<...>, "uncles":[]}}}
  < {"jsonrpc":"2.0","method":"eth_subscription","params":{"subscription":"0xcd0c3e8af590364c09d0fa6a1210faf5","result":{"difficulty":"0xd90b1a7ad02", <...>, "uncles":["0x80aacd1ea4c9da32efd8c2cc9ab38f8f70578fcd46a1a4ed73f82f3e0957f936"]}}}

  // cancel subscription

  > {"id": 1, "method": "eth_unsubscribe", "params": ["0xcd0c3e8af590364c09d0fa6a1210faf5"]}

  < {"jsonrpc":"2.0","id":1,"result":true}
  ```
</CodeGroup>

<Warning>
  **Don't use HTTP methods over WebSockets**

  Though it's currently possible to send all your HTTP requests over WebSocket connections, we discourage doing so. You should only send `eth_subscribe` and `eth_unsubscribe` requests over WebSockets.

  This is for several reasons:

  * You won't receive HTTP status codes in WebSocket responses, which can be useful and actionable.
  * Because individual HTTP requests are load-balanced in our infrastructure to the fastest possible server, you'll add additional latency by sending JSON-RPC requests over WebSocket connections.
  * WebSocket client-side handling has many tricky edge cases and silent failure modes, which can make your dApp less stable.
</Warning>

# WebSocket limits

The following limits apply for WebSocket connections:

* There is a limit of **100 WebSocket connections** for the FREE tier and **2,000 WebSocket connections** for all other tiers.
* There is a limit of **1,000 unique subscriptions** per WebSocket connection.
* The maximum size of a JSON-RPC `batch` request that can be sent over a WebSocket connection is 1000
* The maximum number of concurrent JSON-RPC requests (i.e. requests awaiting responses) on a single WebSocket connection is 200

***

# Error codes

| Error Code | Error Message                                                                                                                                         | Solution                                                                                                                                                         |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `32600`    | `"Sorry, the maximum batch request size is 1000. Please reduce the size of your request and try again."`                                              | Occurs when you attempt to send high-volume JSON-RPC traffic over WebSocket connections. We recommend sending this traffic over HTTP instead to optimize server backends. |
| `1008`     | `"WebSocket connection limit reached for this app. Please close existing connections and try again."`                                                 | Triggered when the number of open WebSocket connections for the app reaches the allowed limit. Close unused connections to restore access.                       |
| `1008`     | `"This app has exceeded its limit of open WebSockets. Please close some other connections first."`                                                    | Triggered when the team previously exceeded the limit and tries to reconnect again before the backoff interval expires. Close existing connections and wait.     |
| `1008`     | `"You have exceeded the maximum number of concurrent requests on a single WebSocket. At most 200 concurrent requests are allowed per WebSocket."`     | Triggered when a client has too many pending JSON-RPC requests on a single WebSocket. Ensure each request completes before sending more.                         |
| `32603`    | `"You have exceeded the maximum number of subscriptions on a single WebSocket."`                                                                      | Triggered when a client has too many subscriptions on a single WebSocket. Unsubscribe before creating new subscriptions.                                         |

------

# Best Practices for Using WebSockets in Web3

> How to use websockets when building on Ethereum, Polygon, Optimism, and Arbitrum.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## How WebSockets differ from HTTP

WebSockets is a bidirectional communication protocol that maintains a network connection between two parties, typically a server and a client. Unlike HTTP, with WebSockets clients don't need to continuously make requests when they want information.

Instead, in an open WebSocket connection, a server can push network updates to clients by allowing them to subscribe to certain network states, such as new transactions or blocks being added to the blockchain.

This dramatically improves the efficiency of certain HTTP “push” network requests - instead of making an HTTP request every second to pull the latest data, the client can simply open a WebSocket connection and wait for the updates to arrive.

***

## How can I set up a WebSocket connection?

It’s quite simple to set up a new WebSocket connection to Ethereum - try the command below in your terminal.

<CodeGroup>
  ```shell shell
  wscat -c wss://eth-mainnet.g.alchemy.com/v2/demo
  ```
</CodeGroup>

If you’d like an endpoint with higher rate limits, sign up for a free Alchemy account, grab a new API key to replace the command above, and get access to over 300 million compute units for free per month.

In addition to Ethereum, Alchemy currently supports WebSocket connections to these EVM-compatible blockchains:

* [Polygon](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-subscribe)
* [Optimism](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-subscribe)
* [Arbitrum](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-subscribe)
* [Astar](/docs/reference/eth-subscribe-astar)

***

## Subscribe to Ethereum blockchain updates

Once you’ve run the command above, you’ll have an open WebSocket connection to an Ethereum node. To start/stop receiving push updates on certain state changes in the Ethereum network, you’ll need to send one of the following methods:

1. [eth\_subscribe](/docs/reference/eth-subscribe)
2. [eth\_unsubscribe](/docs/reference/eth-unsubscribe)

These two requests enable blockchain app developers to create and delete subscriptions. By setting their parameters properly, you’ll get push updates whenever new transactions are sent or new blocks are created.

Here’s an example of an `eth_subscribe` request:

<CodeGroup>
  ```json json
  // initiate websocket stream first 
  wscat -c wss://eth-mainnet.g.alchemy.com/v2/demo

  // then call subscription 
  {"jsonrpc":"2.0","id": 2, 
   "method": "eth_subscribe", 
   "params": ["alchemy_minedTransactions"]
   }
  ```
</CodeGroup>

Using Alchemy’s [Subscription API](/docs/reference/subscription-api), there are five main types of WebSocket subscriptions you can make to receive push updates to an Ethereum node: ​

1. [alchemy\_minedTransactions](/docs/reference/alchemy-minedtransactions): Emits full transaction objects or hashes that are mined on the network based on provided filters and block tags.
2. [alchemy\_pendingTransactions](/docs/reference/alchemy-pendingtransactions): Emits full transactions that are sent to the network, marked as "pending", and are sent from or to a certain address. A custom Alchemy subscription.
3. [newPendingTransactions](/docs/reference/newpendingtransactions)​: Emits transaction hashes that are sent to the network and marked as "pending". ​
4. [newHeads](/docs/reference/newheads): Emits new blocks that are added to the blockchain.
5. ​[logs](/docs/reference/logs): Emits logs attached to a new block that match certain topic filters.

## Keep subscription scope narrow

WebSocket subscriptions are most effective when you only stream the updates you
actually need. On Alchemy, WebSocket subscriptions are billed based on the
bandwidth delivered as part of the subscription, so broad streams can scale
usage quickly.

To keep WebSocket usage predictable:

* Prefer filtered subscriptions over network-wide streams whenever possible.
* Prefer hashes or other smaller payloads when full transaction objects are not
  required.
* Set [usage limits](/docs/how-to-set-usage-limits-and-alerts-for-your-account)
  and [usage alerts](/docs/dashboard-alerts) before deploying high-volume
  streams.

For pricing details, see
[Compute Unit Costs](/docs/reference/compute-unit-costs#webhooks-and-subscription-apis).

## Subscribe to transaction updates

It's no different from initiating a subscription using the base Ethereum websocket API. You can use the exact same commands as the ones introduced above. To start/stop receiving push updates on certain transaction changes (primarily confirmation of a pending transaction and confirmation that it has been fully mined), you’ll need to send either [eth\_subscribe](/docs/reference/eth-subscribe) or [eth\_unsubscribe](/docs/reference/eth-unsubscribe).

Here’s an example of an `eth_subscribe` request for transaction-specific data: NOTE: You can be very expressive with your transaction-specific data subscriptions and can either have unfiltered or highly filtered parameters

<CodeGroup>
  ```json json
  // initiate websocket stream first 
  wscat -c wss://eth-mainnet.g.alchemy.com/v2/demo

  // then call subscription 
  {
    "jsonrpc": "2.0",
    "method": "eth_subscribe",
    "params": [
      "alchemy_minedTransactions",
      {
        "addresses": [
          {
            "to": "0x9f3ce0ad29b767d809642a53c2bccc9a130659d7",
            "from": "0x228f108fd09450d083bb33fe0cc50ae449bc7e11"
          },
          {
            "to": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
          }
        ],
        "includeRemoved": false,
        "hashesOnly": true
      }
    ],
    "id": 1
  }
  ```
</CodeGroup>

***

## When to use HTTPS over WebSockets

In general, the best practice that we recommend is that developers don’t send standard Ethereum JSON-RPC requests over WebSockets, and instead use HTTP(S) requests. Sending JSON-RPC requests over WebSockets may become unsupported in the future.

This is for four main reasons:

* Silent failures
* Load balancing
* Retries HTTP
* Status codes
* gZip compression

## 1. Silent failures

WebSockets client-side handling has many tricky edge cases and silent failure modes, which can make web3 dApp less stable.

## 2. Load balancing

When making requests to distributed systems such as Alchemy, individual HTTP requests are load-balanced to the fastest possible server.

When developers open a WebSocket connection, they incur additional latency by sending JSON-RPC requests only to a single node rather than the most available resource.

## 3. Retries

In most common request frameworks, support for retrying failed HTTP requests comes automatically and can be configured easily. Conversely, in WebSockets retrying failed requests typically requires custom JSON-RPC id-based tracking.

## 4. HTTP status codes

When web3 developers use WebSockets they won't receive HTTP status codes in WebSockets responses, which can be useful for debugging or sorting responses.

If you do need WebSockets for subscriptions, keep the stream scope narrow.
Broad subscription streams can generate much more ongoing traffic than an
equivalent HTTP polling pattern because the server continues pushing every
matching event until you unsubscribe.

## 5. gZip Compression

To provide users with better product experiences, we updated our infrastructure serving HTTP requests to offer Alchemy developers **support for gzip compression on all responses larger than 1kb in size**.

In practice, we’ve seen roughly a **75% improvement in the total latency of typical JSON-RPC replayTransaction calls**.

Go to this article to learn how to implement gZip compression:

[![How to Enable Compression to Speed Up JSON-RPC Blockchain Requests](https://alchemyapi-res.cloudinary.com/image/upload/v1764180090/docs/api-reference/websockets/62db7ae-Screen_Shot_2022-06-24_at_12.46.25_PM.png)](/docs/how-to-enable-compression-to-speed-up-json-rpc-blockchain-requests)

[![alchemy.com/docs](https://alchemyapi-res.cloudinary.com/image/upload/v1764180091/docs/api-reference/websockets/0c06bc6-small-alchemy-circle-logo.png)alchemy.com/docs](/docs/how-to-enable-compression-to-speed-up-json-rpc-blockchain-requests)

[How to Enable Compression to Speed Up JSON-RPC Blockchain Requests](/docs/how-to-enable-compression-to-speed-up-json-rpc-blockchain-requests)

***

## Conclusion

If you’re interested in getting pushed updates on the state of the Ethereum network and avoiding HTTP workaround strategies such as [long polling](https://www.educative.io/edpresso/what-is-http-long-polling), start using [WebSockets today](/docs/reference/subscription-api) to streamline your request workflow!

------

# Subscription API Endpoints

> List of subscription endpoints for web3 events

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Subscription Types

The following subscription types are accepted in all `eth_subscribe` WebSocket requests through your Alchemy endpoint.

<Info>
  Modern Web3 libraries like Viem and Ethers.js provide comprehensive WebSocket subscription functionality. Check out our WebSocket endpoint documentation for implementation examples.
</Info>

| Subscription Type                                                      | Description                                                                                                            |
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| [alchemy\_minedTransactions](/docs/reference/alchemy-minedtransactions)     | Emits full transaction objects or hashes that are mined on the network based on provided filters and block tags.       |
| [alchemy\_pendingTransactions](/docs/reference/alchemy-pendingtransactions) | Emits full transaction objects or hashes that are sent to the network, marked as "pending", based on provided filters. |
| [newPendingTransactions](/docs/reference/newpendingtransactions)            | Emits transaction hashes that are sent to the network and marked as "pending".                                         |
| [newHeads](/docs/reference/newheads)                                        | Emits new blocks that are added to the blockchain.                                                                     |
| [logs](/docs/reference/logs)                                                | Emits logs attached to a new block that match certain topic filters.                                                   |

<Warning>
  WebSocket subscriptions on Alchemy are billed based on the bandwidth
  delivered as part of the subscription. If you are choosing between
  subscription types, prefer the most specific stream available and keep
  payloads as small as your use case allows.

  For pricing details, see
  [Compute Unit Costs](/docs/reference/compute-unit-costs#webhooks-and-subscription-apis).
</Warning>

***

# Subscription Type Support Per Chain

<Info>
  Check the [Chains](https://dashboard.alchemy.com/chains) page for details about product and chain support!

  ![](https://alchemyapi-res.cloudinary.com/image/upload/v1764179964/docs/api-reference/alchemy-transact/transaction-simulation/523fb8a9a9d899921ee1046d0ff1b389967a9976d1c6112ebbbe071ddd1ef374-image.png)
</Info>

------

# alchemy_minedTransactions

> Emits full transaction objects or hashes that are mined on the network based on provided filters and block tags.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

The `alchemy_minedTransactions` subscription type subscribes to mined transactions via WebSockets, and filters those transactions based on specified `from` and/or `to` addresses. The subscription will return either full transaction objects or just transaction hashes depending on the request. It will also optionally include re-orged or removed transactions if specified.

# Supported Networks

<Info>
  Check the [Chains](https://dashboard.alchemy.com/chains) page for details about product and chain support!

  ![](https://alchemyapi-res.cloudinary.com/image/upload/v1764179964/docs/api-reference/alchemy-transact/transaction-simulation/523fb8a9a9d899921ee1046d0ff1b389967a9976d1c6112ebbbe071ddd1ef374-image.png)
</Info>

# Parameters

* `addresses` (optional): \[`array of objects`] list of addresses to filter mined transactions for specified by `to` or `from` in the following format: `[{"to": "string", "from": "string"}]`. Limit of 1000 total addresses.
* `includeRemoved` (optional): `boolean` specifier to include transactions that have been removed from the cannonical chain (or [re-orged](/docs/what-is-proof-of-stake#what-is-a-re-org-re-organization)).
* `hashesOnly` (optional): `boolean` default value is `false`, where the response will return a full transaction object (matches the payload of [eth\_getTransactionByHash](/docs/reference/eth-gettransactionbyhash)) . If set to `true`, the payload returned contains only the *hashes* of the transactions that are mined. Prefer `true` unless you need full transaction objects immediately.

<Info>
  Excluding all parameters returns the transaction information for **all transactions** that are mined on chain.
</Info>

<Info>
  A good starting point is to add address filters and set `hashesOnly` to
  `true`, then request full transaction objects only when you need them.
</Info>

# Returns

<Info>
  Mined transactions are returned once they are mined in the `latest` block. In the future we may add support to specify a given block tag confirmation.
</Info>

With `hashesOnly` = `true`

* `result`:

  * `removed` - `boolean` specifier if the transaction has been removed (re-orged)
  * `transaction` - transaction object for mined transaction
    * `hash` - `string` transaction hash

* `subscription`: `string` - subscription ID

With `hashesOnly` = `false`

* `result`:

  * `removed` - `boolean` specifier if the transaction has been removed (re-orged)
  * `transaction` - transaction object for mined transaction \*`blockHash`: `DATA`, 32 Bytes - hash of block that the transaction was mined in \*`blockNumber`: `QUANTITY` - `null` when it's pending. \*`from`: `DATA`, 20 Bytes - address of the sender. \*`gas`: `QUANTITY` - gas provided by the sender. \*`gasPrice`: `QUANTITY` - gas price provided by the sender in Wei. \*`hash`: `DATA`, 32 Bytes - hash of the transaction. \*`input`: `DATA` - the data send along with the transaction. \*`nonce`: `QUANTITY` - the number of transactions made by the sender prior to this one. \*`to`: `DATA`, 20 Bytes - address of the receiver. `null` when it's a contract creation transaction. \*`transactionIndex`: `QUANTITY` - `null` when its pending. \*`value`: `QUANTITY` - value transferred in Wei. \*`v`: `QUANTITY` - ECDSA recovery id \*`r`: `DATA`, 32 Bytes - ECDSA signature r \*`s`: `DATA`, 32 Bytes - ECDSA signature s

* `subscription`: `string` - subscription ID

### Request

<CodeGroup>
  ```shell wscat
  // initiate websocket stream first
  wscat -c wss://eth-mainnet.g.alchemy.com/v2/demo

  // to and from filters, hashesOnly = true
  {
    "jsonrpc": "2.0",
    "method": "eth_subscribe",
    "params": [
      "alchemy_minedTransactions",
      {
        "addresses": [
          {
            "to": "0x9f3ce0ad29b767d809642a53c2bccc9a130659d7",
            "from": "0x228f108fd09450d083bb33fe0cc50ae449bc7e11"
          },
          {
            "to": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
          }
        ],
        "includeRemoved": false,
        "hashesOnly": true
      }
    ],
    "id": 1
  }
  ```

  ```javascript Viem
  import { createPublicClient, webSocket } from 'viem'
  import { mainnet } from 'viem/chains'

  const client = createPublicClient({
    chain: mainnet,
    transport: webSocket('wss://eth-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->')
  })

  // Addresses to filter for
  const targetAddress = "0x473780deaf4a2ac070bbba936b0cdefe7f267dfc"

  // Subscribe to new blocks to get mined transactions
  const unsubscribe = client.watchBlocks({
    onBlock: async (block) => {
      try {
        const blockWithTxs = await client.getBlock({
          blockNumber: block.number,
          includeTransactions: true
        })

        // Filter transactions by from/to address
        const filteredTxs = blockWithTxs.transactions.filter(tx =>
          tx.from?.toLowerCase() === targetAddress.toLowerCase() ||
          tx.to?.toLowerCase() === targetAddress.toLowerCase()
        )

        if (filteredTxs.length > 0) {
          filteredTxs.forEach(tx => {
            console.log({
              removed: false, // Standard block subscriptions don't track re-orgs
              transaction: tx
            })
          })
        }
      } catch (error) {
        console.error('Error processing block:', error)
      }
    }
  })
  ```

  ```javascript Ethers.js
  import { WebSocketProvider } from 'ethers'

  const provider = new WebSocketProvider('wss://eth-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->')

  // Address to filter for
  const targetAddress = "0x473780deaf4a2ac070bbba936b0cdefe7f267dfc"

  // Listen for new blocks and filter mined transactions
  provider.on('block', async (blockNumber) => {
    try {
      const block = await provider.getBlock(blockNumber, true)

      if (block && block.transactions) {
        // Filter transactions by from/to address
        const filteredTxs = block.transactions.filter(tx =>
          tx.from?.toLowerCase() === targetAddress.toLowerCase() ||
          tx.to?.toLowerCase() === targetAddress.toLowerCase()
        )

        if (filteredTxs.length > 0) {
          filteredTxs.forEach(tx => {
            console.log({
              removed: false, // Standard block subscriptions don't track re-orgs
              transaction: tx
            })
          })
        }
      }
    } catch (error) {
      console.error('Error processing block:', error)
    }
  })
  ```
</CodeGroup>

### Result

<CodeGroup>
  ```json results
  {"id":1,"result":"0xf13f7073ddef66a8c1b0c9c9f0e543c3","jsonrpc":"2.0"}

  {
    "jsonrpc": "2.0",
    "method": "eth_subscription",
    "params": {
      "result": {
  			"removed": false
  			"transaction": {
  				"hash":"0xa8f2cf69e302da6c8100b80298ed77c37b6e75eed1177ca22acd5772c9fb9876",
  			}
      },
      "subscription": "0xf13f7073ddef66a8c1b0c9c9f0e543c3"
    }
  }
  ```
</CodeGroup>

------

# alchemy_pendingTransactions

> Emits full transaction objects or hashes that are sent to the network, marked as pending, based on provided filters.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

The `alchemy_pendingTransactions` subscription type subscribes to pending transactions via WebSockets, and filters those transactions based on specified `from` and/or `to` addresses. The subscription will return either full transaction objects or just transaction hashes depending on the request. It will also optionally include re-orged or removed transactions if specified.

<Info>
  When listening to pending transactions with this endpoint, you will only get
  pending transactions in Alchemy mempool.
</Info>

# Supported Networks

Please note that `alchemy_pendingTransactions` is only supported on **ETH Mainnet**, **ETH Sepolia** and **Matic Mainnet.**

# Limits

A maximum of 1000 addresses can be added in the addresses filter for `alchemy_pendingTransactions`.

# Parameters

* `fromAddress` (optional): `string` or \[`array of strings`]
  * Singular address or array of addresses to receive pending transactions sent **from** this address.
* `toAddress` (optional): `string` or \[`array of strings`]
  * Singular address or array of addresses to receive pending transactions **to** this address
* `hashesOnly` (optional): `boolean` default value is `false`, where the response matches the payload of [eth\_getTransactionByHash](/docs/reference/eth-gettransactionbyhash) . If set to `true`, the payload returned contains *only the hashes of the transactions* that are added to the pending state, which matches the payload of [newPendingTransactions](/docs/reference/newpendingtransactions). Prefer `true` unless you need full transaction objects immediately.

<Info>
  **Note: Parameter Specification**

  1. There is an address limit of 1k unique addresses (combination of
     `fromAddress` and `toAddress` lists)
  2. Excluding all parameters returns the transaction information for all transactions that are added to the pending state.
  3. If `fromAddress` and `toAddress` are both present, then this subscription
     will include transactions sent from the `fromAddress` OR received by the
     `toAddress`.
  4. A good starting point is to keep filters narrow and set `hashesOnly` to
     `true`, then request full transaction objects only when you need them.
</Info>

# Returns

With `hashesOnly` = `true`

* `result`: ***\[string]***- transaction hash for pending transaction
* `subscription`: ***\[string]*** - subscription ID

With `hashesOnly` = `false`

* `result` - ***\[object]*** A transaction object:

  * `blockHash`: `DATA`, 32 Bytes - `null` when it's pending.
  * `blockNumber`: `QUANTITY` - `null` when it's pending.
  * `from`: `DATA`, 20 Bytes - address of the sender.
  * `gas`: `QUANTITY` - gas provided by the sender.
  * `gasPrice`: `QUANTITY` - gas price provided by the sender in Wei.
  * `hash`: `DATA`, 32 Bytes - hash of the transaction.
  * `input`: `DATA` - the data send along with the transaction.
  * `nonce`: `QUANTITY` - the number of transactions made by the sender prior to this one.
  * `to`: `DATA`, 20 Bytes - address of the receiver. `null` when it's a contract creation transaction.
  * `transactionIndex`: `QUANTITY` - `null` when its pending.
  * `value`: `QUANTITY` - value transferred in Wei.
  * `v`: `QUANTITY` - ECDSA recovery id
  * `r`: `DATA`, 32 Bytes - ECDSA signature r
  * `s`: `DATA`, 32 Bytes - ECDSA signature s

* `subscription` - ***\[string]*** subscription ID

### Request

<CodeGroup>
  ```shell wscat
  // initiate websocket stream first
  wscat -c wss://eth-mainnet.g.alchemy.com/v2/demo

  // then call subscription
  {"jsonrpc":"2.0","id": 2, "method": "eth_subscribe", "params": ["alchemy_pendingTransactions", {"toAddress": ["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "0xdAC17F958D2ee523a2206206994597C13D831ec7"], "hashesOnly": true}]}

  ```

  ```javascript Viem
  import { createPublicClient, webSocket } from 'viem'
  import { mainnet } from 'viem/chains'

  const client = createPublicClient({
    chain: mainnet,
    transport: webSocket('wss://eth-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->')
  })

  // Addresses to filter for
  const fromAddress = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
  const toAddress = "0xdAC17F958D2ee523a2206206994597C13D831ec7"

  // Subscribe to pending transactions with filtering
  const unsubscribe = client.watchPendingTransactions({
    onTransactions: async (hashes) => {
      for (const hash of hashes) {
        try {
          const tx = await client.getTransaction({ hash })

          // Filter transactions by from/to address
          if (tx.from?.toLowerCase() === fromAddress.toLowerCase() ||
              tx.to?.toLowerCase() === toAddress.toLowerCase()) {
            console.log('Filtered pending transaction:', tx)
          }
        } catch (error) {
          continue // Skip transactions that can't be fetched
        }
      }
    }
  })
  ```

  ```javascript Ethers.js
  import { WebSocketProvider } from 'ethers'

  const provider = new WebSocketProvider('wss://eth-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->')

  // Addresses to filter for
  const fromAddress = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
  const toAddress = "0xdAC17F958D2ee523a2206206994597C13D831ec7"

  // Listen for pending transactions with filtering
  provider.on('pending', async (txHash) => {
    try {
      const tx = await provider.getTransaction(txHash)

      if (tx && (
        tx.from?.toLowerCase() === fromAddress.toLowerCase() ||
        tx.to?.toLowerCase() === toAddress.toLowerCase()
      )) {
        console.log('Filtered pending transaction:', tx)
      }
    } catch (error) {
      // Skip transactions that can't be fetched
    }
  })
  ```
</CodeGroup>

### Result

<CodeGroup>
  ```shell results
  {
      "id": 1,
      "result": "0xf13f7073ddef66a8c1b0c9c9f0e543c3",
      "jsonrpc": "2.0"
  }

  {
      "jsonrpc": "2.0",
      "method": "eth_subscription",
      "params": {
          "result": "0x10466101bd8979f3dcba18eb72155be87bdcd4962527d97c84ad93fc4ad5d461",
          "subscription": "0xf13f7073ddef66a8c1b0c9c9f0e543c3"
      }
  }
  ```
</CodeGroup>

------

# newPendingTransactions

> Emits transaction hashes that are sent to the network and marked as \pending\.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

The `newPendingTransactions` subscription type subscribes to all pending transactions via WebSockets (regardless if you sent them or not), and returns their transaction hashes.

<Info>
  When listening to pending transactions with this endpoint, you will only get pending transactions in Alchemy mempool.
</Info>

<Info>
  We highly recommend using `alchemy_pendingTransactions` instead of `newPendingTransactions` to receive more detailed information like full transaction objects as well as filtering on `from` and `to` addresses for pending transactions.
</Info>

# Supported Networks

<Info>
  Check the [Chains](https://dashboard.alchemy.com/chains) page for details about product and chain support!

  ![](https://alchemyapi-res.cloudinary.com/image/upload/v1764179964/docs/api-reference/alchemy-transact/transaction-simulation/523fb8a9a9d899921ee1046d0ff1b389967a9976d1c6112ebbbe071ddd1ef374-image.png)
</Info>

Returns the hash for all transactions that are added to the pending state (regardless if you sent them or not).

# Parameters

None

# Returns

* `result`: `string` - transaction hash for pending transaction
* `subscription`: `string` - subscription ID

# Request

<CodeGroup>
  ```curl wscat
  // initiate websocket stream first
  wscat -c wss://eth-mainnet.g.alchemy.com/v2/demo

  // then call subscription 
  {"jsonrpc":"2.0","id": 2, "method": "eth_subscribe", "params": ["newPendingTransactions"]}
  ```

  ```javascript alchemyweb3.js
  // Installation: https://github.com/alchemyplatform/alchemy-web3
  const { createAlchemyWeb3 } = require("@alch/alchemy-web3");

  // Initialize alchemy-web3 object.
  const web3 = createAlchemyWeb3(`wss://eth-mainnet.g.alchemy.com/v2/demo`);

  // Subcribes to the event and prints results 
  web3.eth.subscribe("newPendingTransactions").on("data", (data) => console.log(data));
  ```
</CodeGroup>

# Result

<CodeGroup>
  ```shell result
  {"id":1,"result":"0xc3b33aa549fb9a60e95d21862596617c","jsonrpc":"2.0"}

  {
      "jsonrpc":"2.0",
      "method":"eth_subscription",
      "params":{
          "subscription":"0xc3b33aa549fb9a60e95d21862596617c",
          "result":"0xd6fdc5cc41a9959e922f30cb772a9aef46f4daea279307bc5f7024edc4ccd7fa"
      }
  }
  ```
</CodeGroup>

------

# newHeads

> Emits new blocks that are added to the blockchain.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

The `newHeads` subscription type emits an event any time a new header (block) is added to the chain, including during a chain reorganization.

<Info>
  When a chain reorganization occurs, this subscription will emit an event containing all new headers (blocks) for the new chain. This means that you may see multiple headers emitted with the same height (block number), and when this happens the later (highest) block number should be taken as the correct one after a reorganization.
</Info>

# Supported Networks

<Info>
  Check the [Chains](https://dashboard.alchemy.com/chains) page for details about product and chain support!

  ![](https://alchemyapi-res.cloudinary.com/image/upload/v1764179964/docs/api-reference/alchemy-transact/transaction-simulation/523fb8a9a9d899921ee1046d0ff1b389967a9976d1c6112ebbbe071ddd1ef374-image.png)
</Info>

# Parameters

* None

# Response

* `result`

  * `number`: QUANTITY - The block number. Null when it's a pending block.
  * `parentHash`: DATA, 32 Bytes - Hash of the parent block.
  * `nonce`: DATA, 8 Bytes - Hash of the generated proof-of-work. Null when it's a pending block.
  * `sha3Uncles`: DATA, 32 Bytes - SHA3 of the uncles data in the block.
  * `logsBloom`: DATA, 256 Bytes - The bloom filter for the logs of the block. Null when it's a pending block.
  * `transactionsRoot`: DATA, 32 Bytes - The root of the transaction trie of the block.
  * `stateRoot`: DATA, 32 Bytes - The root of the final state trie of the block.
  * `receiptsRoot`: DATA, 32 Bytes - The root of the receipts trie of the block.
  * `miner`: DATA, 20 Bytes - The address of the beneficiary to whom the mining rewards were given.
  * `difficulty`: QUANTITY - Integer of the difficulty for this block.
  * `extraData`: DATA - The "extra data" field of this block.
  * `gasLimit`: QUANTITY - The maximum gas allowed in this block.
  * `gasUsed`: QUANTITY - The total used gas by all transactions in this block.
  * `timestamp`: QUANTITY - The Unix timestamp for when the block was collated.

* `subscription`: `string` - Subscription ID

# Request

<CodeGroup>
  ```shell wscat
  // initiate websocket stream first
  wscat -c wss://eth-mainnet.g.alchemy.com/v2/demo

  // then call subscription 
  {"jsonrpc":"2.0","id": 1, "method": "eth_subscribe", "params": ["newHeads"]}
  ```

  ```javascript Viem
  import { createPublicClient, webSocket } from 'viem'
  import { mainnet } from 'viem/chains'

  const client = createPublicClient({
    chain: mainnet,
    transport: webSocket('wss://eth-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->')
  })

  // Subscribe to new blocks (newHeads)
  const unsubscribe = client.watchBlocks({
    onBlock: (block) => {
      console.log('New block:', {
        number: block.number,
        hash: block.hash,
        timestamp: block.timestamp,
        gasUsed: block.gasUsed,
        gasLimit: block.gasLimit
      })
    }
  })

  // To unsubscribe later
  // unsubscribe()
  ```

  ```javascript Ethers.js
  import { WebSocketProvider } from 'ethers'

  const provider = new WebSocketProvider('wss://eth-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->')

  // Subscribe to new blocks (newHeads)
  provider.on('block', async (blockNumber) => {
    console.log('New block number:', blockNumber)

    // Get full block details if needed
    try {
      const block = await provider.getBlock(blockNumber)
      console.log('Block details:', {
        number: block.number,
        hash: block.hash,
        timestamp: block.timestamp,
        gasUsed: block.gasUsed?.toString(),
        gasLimit: block.gasLimit?.toString()
      })
    } catch (error) {
      console.error('Error fetching block details:', error)
    }
  })
  ```
</CodeGroup>

# Result

<CodeGroup>
  ```json result
  {"jsonrpc":"2.0", "id":1, "result":"0x9ce59a13059e417087c02d3236a0b1cc"}

  {
     "jsonrpc": "2.0",
     "method": "eth_subscription",
     "params": {
       "result": {
         "difficulty": "0x15d9223a23aa",
         "extraData": "0xd983010305844765746887676f312e342e328777696e646f7773",
         "gasLimit": "0x47e7c4",
         "gasUsed": "0x38658",
         "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
         "miner": "0xf8b483dba2c3b7176a3da549ad41a48bb3121069",
         "nonce": "0x084149998194cc5f",
         "number": "0x1348c9",
         "parentHash": "0x7736fab79e05dc611604d22470dadad26f56fe494421b5b333de816ce1f25701",
         "receiptRoot": "0x2fab35823ad00c7bb388595cb46652fe7886e00660a01e867824d3dceb1c8d36",
         "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
         "stateRoot": "0xb3346685172db67de536d8765c43c31009d0eb3bd9c501c9be3229203f15f378",
         "timestamp": "0x56ffeff8",
         "transactionsRoot": "0x0167ffa60e3ebc0b080cdb95f7c0087dd6c0e61413140e39d94d3468d7c9689f"
       },
     "subscription": "0x9ce59a13059e417087c02d3236a0b1cc"
     }
   }
  ```
</CodeGroup>

------

# logs

> Emits logs attached to a new block that match certain topic filters.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

The `logs` subscription type emits logs that match a specified topic filter and are included in newly added blocks. To learn more about logs on Ethereum and other EVM chains, check out [Understanding Logs: Deep Dive into eth\_getLogs](/docs/deep-dive-into-eth_getlogs).

<Info>
  When a chain reorganization occurs, logs that are part of blocks on the old chain will be emitted again with the property removed set to `true`. Logs that are part of the blocks on the new chain are also emitted so it is possible to see logs for the same transaction multiple times in the case of a reorganization.

  If `removed` is not included in the response payload then the logs are still a part of the canonical chain.
</Info>

# Supported networks

<Info>
  Check the [Chains](https://dashboard.alchemy.com/chains) page for details about product and chain support!

  ![](https://alchemyapi-res.cloudinary.com/image/upload/v1764179964/docs/api-reference/alchemy-transact/transaction-simulation/523fb8a9a9d899921ee1046d0ff1b389967a9976d1c6112ebbbe071ddd1ef374-image.png)
</Info>

# Parameters

An object with the following fields:

* `address` (optional): `string`] or `[array of strings]` Singular address or array of addresses. Only logs created from one of these addresses will be emitted.

* `topics`: an array of topic specifiers (**up to 4 topics allowed per address**).

  * Each topic specifier is either `null`, a single string, or an array of strings.
  * For every non `null` topic, a log will be emitted when activity associated with that topic occurs.

# Request

<CodeGroup>
  ```shell javascript
  // initiate websocket stream first
  wscat -c wss://eth-mainnet.g.alchemy.com/v2/demo

  // then call subscription 
  {"jsonrpc":"2.0","id": 1, "method": "eth_subscribe", "params": ["logs", {"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]}]}
  ```

  ```javascript Viem
  import { createPublicClient, webSocket, encodeEventTopics, parseAbiItem } from 'viem'
  import { mainnet } from 'viem/chains'

  const client = createPublicClient({
    chain: mainnet,
    transport: webSocket('wss://eth-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->')
  })

  // Watch for Transfer events on a specific contract
  const unsubscribe = client.watchEvent({
    address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', // USDC contract
    event: parseAbiItem('event Transfer(address indexed from, address indexed to, uint256 value)'),
    onLogs: (logs) => {
      logs.forEach((log) => {
        console.log('Transfer event detected:', {
          from: log.args.from,
          to: log.args.to,
          value: log.args.value,
          transactionHash: log.transactionHash
        })
      })
    }
  })

  // Watch for logs with specific topics (more flexible filtering)
  const unsubscribeTopics = client.watchEvent({
    address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
    events: [
      parseAbiItem('event Transfer(address indexed from, address indexed to, uint256 value)'),
      parseAbiItem('event Approval(address indexed owner, address indexed spender, uint256 value)')
    ],
    onLogs: (logs) => {
      console.log('Token events detected:', logs)
    }
  })
  ```

  ```javascript Ethers.js
  import { WebSocketProvider, Contract, Interface, id } from 'ethers'

  const provider = new WebSocketProvider('wss://eth-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->')

  // Create a contract instance for easier event filtering
  const contractAddress = '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' // USDC
  const abi = [
    'event Transfer(address indexed from, address indexed to, uint256 value)',
    'event Approval(address indexed owner, address indexed spender, uint256 value)'
  ]
  const contract = new Contract(contractAddress, abi, provider)

  // Listen for Transfer events
  contract.on('Transfer', (from, to, value, event) => {
    console.log('Transfer event detected:', {
      from: from,
      to: to,
      value: value.toString(),
      transactionHash: event.transactionHash
    })
  })

  // Listen for raw logs with topic filtering
  const transferTopic = id("Transfer(address,address,uint256)")
  const filter = {
    address: contractAddress,
    topics: [transferTopic]
  }

  provider.on(filter, (log) => {
    console.log('Raw log detected:', log)
  })
  ```
</CodeGroup>

# Result

<CodeGroup>
  ```json result
  {
      "jsonrpc":"2.0",
      "method":"eth_subscription",
      "params": {
          "subscription":"0x4a8a4c0517381924f9838102c5a4dcb7",
          "result":{
              "address":"0x8320fe7702b96808f7bbc0d4a888ed1468216cfd",
              "blockHash":"0x61cdb2a09ab99abf791d474f20c2ea89bf8de2923a2d42bb49944c8c993cbf04",
              "blockNumber":"0x29e87",
              "data":"0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003",
              "logIndex":"0x0",
              "topics":["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"],
              "transactionHash":"0xe044554a0a55067caafd07f8020ab9f2af60bdfe337e395ecd84b4877a3d1ab4",
              "transactionIndex":"0x0"
          }
      }
  }
  ```
</CodeGroup>

Here are the individual properties of the response:

* **`jsonrpc`**: The `jsonrpc` property specifies the version of the JSON-RPC protocol that is being used, which in this case is "2.0".
* **`method`**: The `method` property specifies the method that was called, which in this case is `eth_subscription`.
* **`params`**: The `params` property contains the parameters of the method call. In this case, it contains a `subscription` property, which specifies the subscription identifier, and a `result` property, which contains the result of the subscription.
* **`result`**: The `result` property contains information about a specific transaction on the Ethereum blockchain.
* **`address`**: The `address` property specifies the address from which this log originated.
* **`blockhash`**: The `blockHash` property specifies the hash of the block in which the transaction was included.
* **`blockNumber`**: The `blockNumber` property specifies the number of the block in which the transaction was included. It is encoded as a hexadecimal string.
* **`data`**: Contains one or more 32 Bytes non-indexed arguments of the log.
* **`logIndex`**: The `logIndex` property specifies the index or position of the log entry within the block. It is encoded as a hexadecimal string.
* **`topics`**: An array of 0 to 4 32 bytes topic hashes of indexed log arguments (up to 4 topics allowed per address).
* **`transactionHash`**: The `transactionHash` property specifies the hash of the transaction.
* **`transactionIndex`**: The `transactionIndex` property specifies the index or position of the transaction within the block. It is encoded as a hexadecimal string.

------

# monadNewHeads

> Fires a notification each time as soon as a block is Proposed and the node has a chance to speculatively execute.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

The `monadNewHeads` is the same as the [`newHeads`](/docs/reference/newheads) subscription type, but the notification emits as soon as the block is `Proposed` and the node has a chance to [speculatively execute](https://docs.monad.xyz/monad-arch/realtime-data/spec-realtime).

# Supported Networks

<Info>
  Check the [Chains](https://dashboard.alchemy.com/chains) page for details about product and chain support!

  ![](https://alchemyapi-res.cloudinary.com/image/upload/v1764179964/docs/api-reference/alchemy-transact/transaction-simulation/523fb8a9a9d899921ee1046d0ff1b389967a9976d1c6112ebbbe071ddd1ef374-image.png)
</Info>

# Parameters

* None

# Response

A `monadNewHeads` update looks the same as a `newHeads` update except that it contains the additional `blockId` and `commitState` fields:

* `result`

  * `blockId`: DATA, 32 Bytes - The unique identifier of the block. Example: "0x71ce47f39a1eb490354166f762d78bf6e2acaf80b24b4bcd756118d93ef81be0"
  * `commitState`: string - The current state of the block. Example: "Proposed"
  * `number`: QUANTITY - The block number. Null when it's a pending block.
  * `parentHash`: DATA, 32 Bytes - Hash of the parent block.
  * `nonce`: DATA, 8 Bytes - Hash of the generated proof-of-work. Null when it's a pending block.
  * `sha3Uncles`: DATA, 32 Bytes - SHA3 of the uncles data in the block.
  * `logsBloom`: DATA, 256 Bytes - The bloom filter for the logs of the block. Null when it's a pending block.
  * `transactionsRoot`: DATA, 32 Bytes - The root of the transaction trie of the block.
  * `stateRoot`: DATA, 32 Bytes - The root of the final state trie of the block.
  * `receiptsRoot`: DATA, 32 Bytes - The root of the receipts trie of the block.
  * `miner`: DATA, 20 Bytes - The address of the beneficiary to whom the mining rewards were given.
  * `difficulty`: QUANTITY - Integer of the difficulty for this block.
  * `extraData`: DATA - The "extra data" field of this block.
  * `gasLimit`: QUANTITY - The maximum gas allowed in this block.
  * `gasUsed`: QUANTITY - The total used gas by all transactions in this block.
  * `timestamp`: QUANTITY - The Unix timestamp for when the block was collated.

* `subscription`: `string` - Subscription ID

# Request

<CodeGroup>
  ```shell wscat
  // initiate websocket stream first
  wscat -c wss://eth-mainnet.g.alchemy.com/v2/demo

  // then call subscription 
  {"jsonrpc":"2.0","id": 1, "method": "eth_subscribe", "params": ["monadNewHeads"]}
  ```

  ```javascript Viem
  import { createPublicClient, webSocket } from 'viem'
  import { mainnet } from 'viem/chains'

  const client = createPublicClient({
    chain: mainnet,
    transport: webSocket('wss://eth-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->')
  })

  // Subscribe to new blocks (monadNewHeads provides earlier access)
  const unsubscribe = client.watchBlocks({
    onBlock: (block) => {
      console.log('Early block notification:', {
        number: block.number,
        hash: block.hash,
        timestamp: block.timestamp,
        gasUsed: block.gasUsed,
        gasLimit: block.gasLimit
      })
    }
  })
  ```

  ```javascript Ethers.js
  import { WebSocketProvider } from 'ethers'

  const provider = new WebSocketProvider('wss://eth-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->')

  // Subscribe to new blocks (monadNewHeads provides earlier access)
  provider.on('block', async (blockNumber) => {
    console.log('Early block notification:', blockNumber)

    // Get full block details if needed
    try {
      const block = await provider.getBlock(blockNumber)
      console.log('Early block details:', {
        number: block.number,
        hash: block.hash,
        timestamp: block.timestamp,
        gasUsed: block.gasUsed?.toString(),
        gasLimit: block.gasLimit?.toString()
      })
    } catch (error) {
      console.error('Error fetching early block details:', error)
    }
  })
  ```
</CodeGroup>

# Result

<CodeGroup>
  ```json result
  {"jsonrpc":"2.0", "id":1, "result":"0x9ce59a13059e417087c02d3236a0b1cc"}

  {
     "jsonrpc": "2.0",
     "method": "eth_subscription",
     "params": {
       "result": {
         "difficulty": "0x15d9223a23aa",
         "extraData": "0xd983010305844765746887676f312e342e328777696e646f7773",
         "gasLimit": "0x47e7c4",
         "gasUsed": "0x38658",
         "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
         "miner": "0xf8b483dba2c3b7176a3da549ad41a48bb3121069",
         "nonce": "0x084149998194cc5f",
         "number": "0x1348c9",
         "parentHash": "0x7736fab79e05dc611604d22470dadad26f56fe494421b5b333de816ce1f25701",
         "receiptRoot": "0x2fab35823ad00c7bb388595cb46652fe7886e00660a01e867824d3dceb1c8d36",
         "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
         "stateRoot": "0xb3346685172db67de536d8765c43c31009d0eb3bd9c501c9be3229203f15f378",
         "timestamp": "0x56ffeff8",
         "transactionsRoot": "0x0167ffa60e3ebc0b080cdb95f7c0087dd6c0e61413140e39d94d3468d7c9689f"
       },
     "subscription": "0x9ce59a13059e417087c02d3236a0b1cc"
     }
   }
  ```
</CodeGroup>

------

# monadLogs

> Returns logs (that match a given filter) as soon as the block is Proposed.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

The `monadLogs` subscription type emits logs that match a specified topic filter as soon as the block is Proposed and the node has speculatively executed the transactions. This provides earlier access to log data compared to regular [`logs`](/docs/reference/logs) subscriptions which wait for block finalization.

# Supported Networks

<Info>
  Check the [Chains](https://dashboard.alchemy.com/chains) page for details about product and chain support!

  ![](https://alchemyapi-res.cloudinary.com/image/upload/v1764179964/docs/api-reference/alchemy-transact/transaction-simulation/523fb8a9a9d899921ee1046d0ff1b389967a9976d1c6112ebbbe071ddd1ef374-image.png)
</Info>

# Parameters

An object with the following fields:

* `address` (optional): `string` or `array of strings` Singular address or array of addresses. Only logs created from one of these addresses will be emitted.

* `topics`: an array of topic specifiers (**up to 4 topics allowed per address**).

  * Each topic specifier is either `null`, a single string, or an array of strings.
  * For every non `null` topic, a log will be emitted when activity associated with that topic occurs.

# Request

<CodeGroup>
  ```shell javascript
  // initiate websocket stream first
  wscat -c wss://eth-mainnet.g.alchemy.com/v2/demo

  // then call subscription 
  {"jsonrpc":"2.0","id": 1, "method": "eth_subscribe", "params": ["logs", {"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]}]}
  ```

  ```javascript Viem
  import { createPublicClient, webSocket, parseAbiItem } from 'viem'
  import { mainnet } from 'viem/chains'

  const client = createPublicClient({
    chain: mainnet,
    transport: webSocket('wss://eth-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->')
  })

  // Watch for Transfer events (monadLogs provides earlier access)
  const unsubscribe = client.watchEvent({
    address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', // USDC contract
    event: parseAbiItem('event Transfer(address indexed from, address indexed to, uint256 value)'),
    onLogs: (logs) => {
      logs.forEach((log) => {
        console.log('Early Transfer event detected:', {
          from: log.args.from,
          to: log.args.to,
          value: log.args.value,
          blockNumber: log.blockNumber,
          transactionHash: log.transactionHash
        })
      })
    }
  })

  // Watch for multiple event types
  const unsubscribeMultiple = client.watchEvent({
    address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
    events: [
      parseAbiItem('event Transfer(address indexed from, address indexed to, uint256 value)'),
      parseAbiItem('event Approval(address indexed owner, address indexed spender, uint256 value)')
    ],
    onLogs: (logs) => {
      console.log('Early token events detected:', logs)
    }
  })
  ```

  ```javascript Ethers.js
  import { WebSocketProvider, Contract, id } from 'ethers'

  const provider = new WebSocketProvider('wss://eth-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->')

  // Create a contract instance for event filtering
  const contractAddress = '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' // USDC
  const abi = [
    'event Transfer(address indexed from, address indexed to, uint256 value)',
    'event Approval(address indexed owner, address indexed spender, uint256 value)'
  ]
  const contract = new Contract(contractAddress, abi, provider)

  // Listen for Transfer events (monadLogs provides earlier access)
  contract.on('Transfer', (from, to, value, event) => {
    console.log('Early Transfer event detected:', {
      from: from,
      to: to,
      value: value.toString(),
      blockNumber: event.blockNumber,
      transactionHash: event.transactionHash
    })
  })

  // Listen for raw logs with topic filtering
  const transferTopic = id("Transfer(address,address,uint256)")
  const filter = {
    address: contractAddress,
    topics: [transferTopic]
  }

  provider.on(filter, (log) => {
    console.log('Early raw log detected:', log)
  })
  ```
</CodeGroup>

# Result

<CodeGroup>
  ```json result
  {
      "jsonrpc":"2.0",
      "method":"eth_subscription",
      "params": {
          "subscription":"0x4a8a4c0517381924f9838102c5a4dcb7",
          "result":{
              "blockId": "0x71ce47f39a1eb490354166f762d78bf6e2acaf80b24b4bcd756118d93ef81be0",
              "commitState": "Proposed",
              "address":"0x8320fe7702b96808f7bbc0d4a888ed1468216cfd",
              "blockHash":"0x61cdb2a09ab99abf791d474f20c2ea89bf8de2923a2d42bb49944c8c993cbf04",
              "blockNumber":"0x29e87",
              "data":"0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003",
              "logIndex":"0x0",
              "topics":["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"],
              "transactionHash":"0xe044554a0a55067caafd07f8020ab9f2af60bdfe337e395ecd84b4877a3d1ab4",
              "transactionIndex":"0x0"
          }
      }
  }
  ```
</CodeGroup>

Below you can find the explanation for individual properties of the response:

* **`jsonrpc`**: The `jsonrpc` property specifies the version of the JSON-RPC protocol that is being used, which in this case is "2.0".
* **`method`**: The `method` property specifies the method that was called, which in this case is `eth_subscription`.
* **`params`**: The `params` property contains the parameters of the method call. In this case, it contains a `subscription` property, which specifies the subscription identifier, and a `result` property, which contains the result of the subscription.
* **`result`**: The `result` property contains information about a specific transaction on the Ethereum blockchain.
* **`address`**: The `address` property specifies the address from which this log originated.
* **`blockhash`**: The `blockHash` property specifies the hash of the block in which the transaction was included.
* **`blockNumber`**: The `blockNumber` property specifies the number of the block in which the transaction was included. It is encoded as a hexadecimal string.
* **`data`**: Contains one or more 32 Bytes non-indexed arguments of the log.
* **`logIndex`**: The `logIndex` property specifies the index or position of the log entry within the block. It is encoded as a hexadecimal string.
* **`topics`**: An array of 0 to 4 32 bytes topic hashes of indexed log arguments (up to 4 topics allowed per address).
* **`transactionHash`**: The `transactionHash` property specifies the hash of the transaction.
* **`transactionIndex`**: The `transactionIndex` property specifies the index or position of the transaction within the block. It is encoded as a hexadecimal string.

------

# Solana Subscription API Endpoints

> List of Solana PubSub WebSocket subscription methods, grouped by category.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Overview

Solana exposes a PubSub WebSocket API alongside its standard HTTP JSON-RPC. Each subscription opens a long-lived stream that pushes notifications when on-chain state changes (account data, program-owned accounts, transaction logs, signature status, slots, blocks, votes, and roots).

Connect to the PubSub endpoint using your Alchemy WebSocket URL:

```text
wss://solana-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->
```

<Info>
  Solana PubSub WebSocket subscriptions are supported on both Solana Mainnet and Solana Devnet. Swap `solana-mainnet` for `solana-devnet` in the URL above to connect to Devnet (e.g. `wss://solana-devnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->`). Pricing is the same on both networks.
</Info>

<Info>
  Solana uses native `*Subscribe` / `*Unsubscribe` methods instead of `eth_subscribe`. Each `*Subscribe` call returns a numeric subscription id which you pass to the matching `*Unsubscribe` to cancel the stream.
</Info>

# Request Format

Solana PubSub uses [JSON-RPC 2.0](https://www.jsonrpc.org/specification) over a persistent WebSocket connection.

| Field     | Type                       | Description                                                                          |
| --------- | -------------------------- | ------------------------------------------------------------------------------------ |
| `jsonrpc` | `string`                   | JSON-RPC version. Set this to `"2.0"`.                                               |
| `id`      | `string \| number \| null` | Client-supplied request identifier. The server echoes it in the subscribe response.  |
| `method`  | `string`                   | PubSub method name, such as `accountSubscribe` or `slotSubscribe`.                   |
| `params`  | `array`                    | Ordered method parameters. Use an empty array when the method takes no parameters.   |

Many subscription methods accept an optional `commitment` parameter. Subscriptions that accept commitment default to `finalized` when unspecified.

# Notification Format

After a subscribe request succeeds, the server returns a numeric subscription id in the JSON-RPC response. Later notifications are pushed as JSON-RPC messages with a method-specific notification name and the active subscription id.

| Field                 | Type     | Description                                                                                                  |
| --------------------- | -------- | ------------------------------------------------------------------------------------------------------------ |
| `jsonrpc`             | `string` | JSON-RPC version.                                                                                            |
| `method`              | `string` | Notification name, such as `accountNotification` or `slotNotification`.                                      |
| `params.result`       | `any`    | Method-specific notification payload. Many methods include a `context` object and a method-specific `value`. |
| `params.subscription` | `number` | Subscription id returned by the corresponding `*Subscribe` method.                                           |

# Method Reference

## Accounts

| Method                                                | Description                                                            |
| ----------------------------------------------------- | ---------------------------------------------------------------------- |
| [`accountSubscribe`](/docs/reference/account-subscribe) | Subscribe to notifications when one account's lamports or data change. |
| [`programSubscribe`](/docs/reference/program-subscribe) | Subscribe to notifications for accounts owned by a program.            |

## Transactions

| Method                                                    | Description                                                      |
| --------------------------------------------------------- | ---------------------------------------------------------------- |
| [`logsSubscribe`](/docs/reference/logs-subscribe)         | Subscribe to transaction log messages that match a log filter.   |
| [`signatureSubscribe`](/docs/reference/signature-subscribe) | Subscribe to status notifications for one transaction signature. |

## Cluster

| Method                                                                  | Description                                                          |
| ----------------------------------------------------------------------- | -------------------------------------------------------------------- |
| [`rootSubscribe`](/docs/reference/root-subscribe)                       | Subscribe to notifications when the validator sets a new root slot.  |
| [`slotSubscribe`](/docs/reference/slot-subscribe)                       | Subscribe to notifications when the validator processes a new slot.  |

# Pricing

Solana WebSocket subscriptions on Alchemy are billed by **bandwidth** — pro-rated to the exact byte. See [Compute Unit Costs](/docs/reference/compute-unit-costs#solana-websocket-subscriptions) for the per-byte CU rate and PAYG pricing.

<Warning>
  Broad streams can produce very high bandwidth, especially `programSubscribe` without filters. To keep usage predictable:

  * Prefer the most specific stream and scope with `mentions` / `mentionsAccountOrProgram` / `dataSize` / `memcmp` filters.
  * Keep payloads small (e.g. `encoding: "base64"`, `transactionDetails: "signatures"`).
  * Set [usage limits](/docs/how-to-set-usage-limits-and-alerts-for-your-account) and [usage alerts](/docs/dashboard-alerts) before running high-volume streams in production.
</Warning>

# Supported Networks

<Info>
  Check the [Chains](https://dashboard.alchemy.com/chains) page for details about product and chain support!

  ![](https://alchemyapi-res.cloudinary.com/image/upload/v1764179964/docs/api-reference/alchemy-transact/transaction-simulation/523fb8a9a9d899921ee1046d0ff1b389967a9976d1c6112ebbbe071ddd1ef374-image.png)
</Info>

------

# accountSubscribe

> Subscribe to notifications when one Solana account's lamports or data change.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

The `accountSubscribe` method opens a stream that emits a notification any time the lamports or data of a specified account change. Pair it with [`accountUnsubscribe`](#unsubscribe) to stop receiving notifications.

# Parameters

* `pubkey`: `string` - Account pubkey, as a base-58 encoded string.

* `config` (optional): `object` - Configuration object containing:

  * `commitment`: `string` - The commitment level to use. One of `processed`, `confirmed`, `finalized`. Defaults to `finalized`.
  * `encoding`: `string` - Account data encoding. One of `base58`, `base64`, `base64+zstd`, `jsonParsed`. Defaults to `base58`.

# Request

<CodeGroup>
  ```shell wscat
  // initiate websocket stream first
  wscat -c wss://solana-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->

  // then call subscription
  {"jsonrpc":"2.0","id":1,"method":"accountSubscribe","params":["CM78CPUeXjn8o3yroDHxUtKsZZgoy4GPkPPXfouKNH12",{"encoding":"jsonParsed","commitment":"finalized"}]}
  ```

  ```javascript @solana/web3.js
  import { Connection, PublicKey } from '@solana/web3.js'

  const connection = new Connection(
    'https://solana-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->',
    {
      wsEndpoint: 'wss://solana-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->',
      commitment: 'finalized'
    }
  )

  const accountPubkey = new PublicKey('CM78CPUeXjn8o3yroDHxUtKsZZgoy4GPkPPXfouKNH12')

  const subscriptionId = connection.onAccountChange(
    accountPubkey,
    (accountInfo, context) => {
      console.log('Account update at slot', context.slot, {
        lamports: accountInfo.lamports,
        owner: accountInfo.owner.toBase58(),
        dataLen: accountInfo.data.length
      })
    },
    'finalized'
  )

  // To unsubscribe later:
  // await connection.removeAccountChangeListener(subscriptionId)
  ```
</CodeGroup>

# Result

<CodeGroup>
  ```json result
  // subscribe response
  {"jsonrpc":"2.0","result":23784,"id":1}

  // notification
  {
    "jsonrpc": "2.0",
    "method": "accountNotification",
    "params": {
      "result": {
        "context": { "slot": 5199307 },
        "value": {
          "data": ["11116bv5nS2h3y12kD1yUKeMZvGcKLSjQgX6BeV7u1FrjeJcKfsHRTPuR3oZ1EioKtYGiYxpxMG5vpbZLsbcBYBEmZZcMKaSoGx9JZeAuWf", "base58"],
          "executable": false,
          "lamports": 33594,
          "owner": "11111111111111111111111111111111",
          "rentEpoch": 635,
          "space": 80
        }
      },
      "subscription": 23784
    }
  }
  ```
</CodeGroup>

# Unsubscribe

Use `accountUnsubscribe` with the subscription id returned by `accountSubscribe` to cancel the stream.

* `subscription_id`: `number` - The subscription id to cancel.

<CodeGroup>
  ```shell wscat
  {"jsonrpc":"2.0","id":1,"method":"accountUnsubscribe","params":[subscription_id]}
  ```
</CodeGroup>

```json result
{"jsonrpc":"2.0","result":true,"id":1}
```

When using `@solana/web3.js`, call `connection.removeAccountChangeListener(subscriptionId)` instead of sending the raw JSON-RPC request.

------

# programSubscribe

> Subscribe to notifications for accounts owned by a Solana program.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

The `programSubscribe` method opens a stream that emits a notification when the lamports or data of any account owned by a given program change. Pair it with [`programUnsubscribe`](#unsubscribe) to stop receiving notifications.

# Parameters

* `pubkey`: `string` - Program pubkey, as a base-58 encoded string.

* `config` (optional): `object` - Configuration object containing:

  * `commitment`: `string` - The commitment level. One of `processed`, `confirmed`, `finalized`. Defaults to `finalized`.
  * `encoding`: `string` - Account data encoding. One of `base58`, `base64`, `base64+zstd`, `jsonParsed`. Defaults to `base58`.
  * `filters`: `array` (optional) - An array of filter objects (`memcmp` and/or `dataSize`) to narrow which program-owned accounts trigger notifications.

<Warning>
  `programSubscribe` without filters can produce extremely high volumes of notifications. Use `dataSize` and `memcmp` filters to scope the stream to the accounts you care about.
</Warning>

# Request

<CodeGroup>
  ```shell wscat
  // initiate websocket stream first
  wscat -c wss://solana-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->

  // then call subscription
  {"jsonrpc":"2.0","id":1,"method":"programSubscribe","params":["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",{"encoding":"jsonParsed","filters":[{"dataSize":165}]}]}
  ```

  ```javascript @solana/web3.js
  import { Connection, PublicKey } from '@solana/web3.js'

  const connection = new Connection(
    'https://solana-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->',
    {
      wsEndpoint: 'wss://solana-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->',
      commitment: 'finalized'
    }
  )

  const programId = new PublicKey('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA')

  const subscriptionId = connection.onProgramAccountChange(
    programId,
    ({ accountId, accountInfo }, context) => {
      console.log('Program account update at slot', context.slot, {
        account: accountId.toBase58(),
        lamports: accountInfo.lamports,
        owner: accountInfo.owner.toBase58()
      })
    },
    'finalized',
    [{ dataSize: 165 }]
  )

  // To unsubscribe later:
  // await connection.removeProgramAccountChangeListener(subscriptionId)
  ```
</CodeGroup>

# Result

<CodeGroup>
  ```json result
  // subscribe response
  {"jsonrpc":"2.0","result":24040,"id":1}

  // notification
  {
    "jsonrpc": "2.0",
    "method": "programNotification",
    "params": {
      "result": {
        "context": { "slot": 5208469 },
        "value": {
          "pubkey": "H4vnBqifaSACnKa7acsxstsY1iV1bvJNxsCY7enrd1hq",
          "account": {
            "data": ["11116bv5nS2h3y12kD1yUKeMZvGcKLSjQgX6BeV7u1FrjeJcKfsHRTPuR3oZ1EioKtYGiYxpxMG5vpbZLsbcBYBEmZZcMKaSoGx9JZeAuWf", "base58"],
            "executable": false,
            "lamports": 33594,
            "owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
            "rentEpoch": 636,
            "space": 80
          }
        }
      },
      "subscription": 24040
    }
  }
  ```
</CodeGroup>

# Unsubscribe

Use `programUnsubscribe` with the subscription id returned by `programSubscribe` to cancel the stream.

* `subscription_id`: `number` - The subscription id to cancel.

<CodeGroup>
  ```shell wscat
  {"jsonrpc":"2.0","id":1,"method":"programUnsubscribe","params":[subscription_id]}
  ```
</CodeGroup>

```json result
{"jsonrpc":"2.0","result":true,"id":1}
```

When using `@solana/web3.js`, call `connection.removeProgramAccountChangeListener(subscriptionId)` instead of sending the raw JSON-RPC request.

------

# logsSubscribe

> Subscribe to Solana transaction log messages that match a log filter.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

The `logsSubscribe` method opens a stream that emits a notification any time a transaction is committed and its logs match the supplied filter. Pair it with [`logsUnsubscribe`](#unsubscribe) to stop receiving notifications.

# Parameters

* `filter`: filter criteria for log subscriptions. Accepts one of:

  * `"all"` - subscribe to all transactions except simple vote transactions.
  * `"allWithVotes"` - subscribe to all transactions including simple vote transactions.
  * An object: `{ "mentions": ["<pubkey>"] }` - subscribe to transactions that mention exactly one of the provided base-58 encoded pubkeys.

* `config` (optional): `object` - Configuration object containing:

  * `commitment`: `string` - The commitment level. One of `processed`, `confirmed`, `finalized`. Defaults to `finalized`.

# Request

<CodeGroup>
  ```shell wscat
  // initiate websocket stream first
  wscat -c wss://solana-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->

  // then call subscription
  {"jsonrpc":"2.0","id":1,"method":"logsSubscribe","params":[{"mentions":["11111111111111111111111111111111"]},{"commitment":"finalized"}]}
  ```

  ```javascript @solana/web3.js
  import { Connection, PublicKey } from '@solana/web3.js'

  const connection = new Connection(
    'https://solana-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->',
    {
      wsEndpoint: 'wss://solana-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->',
      commitment: 'finalized'
    }
  )

  const subscriptionId = connection.onLogs(
    new PublicKey('11111111111111111111111111111111'),
    (logs, context) => {
      console.log('Logs at slot', context.slot, {
        signature: logs.signature,
        err: logs.err,
        logs: logs.logs
      })
    },
    'finalized'
  )

  // To unsubscribe later:
  // await connection.removeOnLogsListener(subscriptionId)
  ```
</CodeGroup>

# Result

<CodeGroup>
  ```json result
  // subscribe response
  {"jsonrpc":"2.0","result":24040,"id":1}

  // notification
  {
    "jsonrpc": "2.0",
    "method": "logsNotification",
    "params": {
      "result": {
        "context": { "slot": 5208469 },
        "value": {
          "signature": "5h6xBEauJ3PK6SWCZ1PGjBvj8vDdWG3KpwATGy1ARAXFSDwt8GFXM7W5Ncn16wmqokgpiKRLuS83KUxyZyv2sUYv",
          "err": null,
          "logs": [
            "Program 11111111111111111111111111111111 invoke [1]",
            "Program 11111111111111111111111111111111 success"
          ]
        }
      },
      "subscription": 24040
    }
  }
  ```
</CodeGroup>

# Unsubscribe

Use `logsUnsubscribe` with the subscription id returned by `logsSubscribe` to cancel the stream.

* `subscription_id`: `number` - The subscription id to cancel.

<CodeGroup>
  ```shell wscat
  {"jsonrpc":"2.0","id":1,"method":"logsUnsubscribe","params":[subscription_id]}
  ```
</CodeGroup>

```json result
{"jsonrpc":"2.0","result":true,"id":1}
```

When using `@solana/web3.js`, call `connection.removeOnLogsListener(subscriptionId)` instead of sending the raw JSON-RPC request.

------

# signatureSubscribe

> Subscribe to status notifications for one Solana transaction signature.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

The `signatureSubscribe` method opens a stream that emits a single notification when a given transaction signature reaches the requested commitment level (or when transaction status changes if `enableReceivedNotification` is set). After the notification fires, the subscription is automatically cancelled. Pair it with [`signatureUnsubscribe`](#unsubscribe) to cancel a subscription before it fires.

# Parameters

* `signature`: `string` - Transaction signature, as a base-58 encoded string.

* `config` (optional): `object` - Configuration object containing:

  * `commitment`: `string` - The commitment level. One of `processed`, `confirmed`, `finalized`. Defaults to `finalized`.
  * `enableReceivedNotification`: `boolean` (optional) - When `true`, the subscription also fires a notification when the transaction has been `received` by the node, before reaching the requested commitment.

# Request

<CodeGroup>
  ```shell wscat
  // initiate websocket stream first
  wscat -c wss://solana-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->

  // then call subscription
  {"jsonrpc":"2.0","id":1,"method":"signatureSubscribe","params":["2EBVM6cB8vAAD93Ktr6Vd8p67XPbQzCJX47MpReuiCXJAtcjaxpvWpcg9Ege1Nr5Tk3a2GFrByT7WPBjdsTycY9b",{"commitment":"finalized","enableReceivedNotification":false}]}
  ```

  ```javascript @solana/web3.js
  import { Connection } from '@solana/web3.js'

  const connection = new Connection(
    'https://solana-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->',
    {
      wsEndpoint: 'wss://solana-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->',
      commitment: 'finalized'
    }
  )

  const signature = '2EBVM6cB8vAAD93Ktr6Vd8p67XPbQzCJX47MpReuiCXJAtcjaxpvWpcg9Ege1Nr5Tk3a2GFrByT7WPBjdsTycY9b'

  const subscriptionId = connection.onSignature(
    signature,
    (result, context) => {
      console.log('Signature status at slot', context.slot, result)
    },
    'finalized'
  )

  // The subscription is auto-removed by the node once it fires.
  // To remove it manually before it fires:
  // await connection.removeSignatureListener(subscriptionId)
  ```
</CodeGroup>

# Result

<CodeGroup>
  ```json result
  // subscribe response
  {"jsonrpc":"2.0","result":24006,"id":1}

  // notification (commitment reached)
  {
    "jsonrpc": "2.0",
    "method": "signatureNotification",
    "params": {
      "result": {
        "context": { "slot": 5207624 },
        "value": { "err": null }
      },
      "subscription": 24006
    }
  }
  ```
</CodeGroup>

# Unsubscribe

Use `signatureUnsubscribe` with the subscription id returned by `signatureSubscribe` to cancel a pending subscription. (After the notification has already fired, the subscription is removed automatically.)

* `subscription_id`: `number` - The subscription id to cancel.

<CodeGroup>
  ```shell wscat
  {"jsonrpc":"2.0","id":1,"method":"signatureUnsubscribe","params":[subscription_id]}
  ```
</CodeGroup>

```json result
{"jsonrpc":"2.0","result":true,"id":1}
```

When using `@solana/web3.js`, call `connection.removeSignatureListener(subscriptionId)` instead of sending the raw JSON-RPC request.

------

# rootSubscribe

> Subscribe to notifications when the Solana validator sets a new root slot.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

The `rootSubscribe` method opens a stream that emits a notification each time the validator sets a new root slot. The notification payload is a single number: the slot of the new root. Pair it with [`rootUnsubscribe`](#unsubscribe) to stop receiving notifications.

# Parameters

* None

# Request

<CodeGroup>
  ```shell wscat
  // initiate websocket stream first
  wscat -c wss://solana-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->

  // then call subscription
  {"jsonrpc":"2.0","id":1,"method":"rootSubscribe"}
  ```

  ```javascript @solana/web3.js
  import { Connection } from '@solana/web3.js'

  const connection = new Connection(
    'https://solana-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->',
    {
      wsEndpoint: 'wss://solana-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->'
    }
  )

  const subscriptionId = connection.onRootChange((rootSlot) => {
    console.log('New root slot:', rootSlot)
  })

  // To unsubscribe later:
  // await connection.removeRootChangeListener(subscriptionId)
  ```
</CodeGroup>

# Result

<CodeGroup>
  ```json result
  // subscribe response
  {"jsonrpc":"2.0","result":0,"id":1}

  // notification
  {
    "jsonrpc": "2.0",
    "method": "rootNotification",
    "params": {
      "result": 42,
      "subscription": 0
    }
  }
  ```
</CodeGroup>

# Unsubscribe

Use `rootUnsubscribe` with the subscription id returned by `rootSubscribe` to cancel the stream.

* `subscription_id`: `number` - The subscription id to cancel.

<CodeGroup>
  ```shell wscat
  {"jsonrpc":"2.0","id":1,"method":"rootUnsubscribe","params":[subscription_id]}
  ```
</CodeGroup>

```json result
{"jsonrpc":"2.0","result":true,"id":1}
```

When using `@solana/web3.js`, call `connection.removeRootChangeListener(subscriptionId)` instead of sending the raw JSON-RPC request.

------

# slotSubscribe

> Subscribe to notifications when the Solana validator processes a new slot.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

The `slotSubscribe` method opens a stream that emits a notification each time the validator processes a new slot. Pair it with [`slotUnsubscribe`](#unsubscribe) to stop receiving notifications.

# Parameters

* None

# Request

<CodeGroup>
  ```shell wscat
  // initiate websocket stream first
  wscat -c wss://solana-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->

  // then call subscription
  {"jsonrpc":"2.0","id":1,"method":"slotSubscribe"}
  ```

  ```javascript @solana/web3.js
  import { Connection } from '@solana/web3.js'

  const connection = new Connection(
    'https://solana-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->',
    {
      wsEndpoint: 'wss://solana-mainnet.g.alchemy.com/v2/<-- ALCHEMY APP API KEY -->'
    }
  )

  const subscriptionId = connection.onSlotChange((slotInfo) => {
    console.log('Slot update:', {
      slot: slotInfo.slot,
      parent: slotInfo.parent,
      root: slotInfo.root
    })
  })

  // To unsubscribe later:
  // await connection.removeSlotChangeListener(subscriptionId)
  ```
</CodeGroup>

# Result

<CodeGroup>
  ```json result
  // subscribe response
  {"jsonrpc":"2.0","result":0,"id":1}

  // notification
  {
    "jsonrpc": "2.0",
    "method": "slotNotification",
    "params": {
      "result": {
        "parent": 75,
        "root": 42,
        "slot": 76
      },
      "subscription": 0
    }
  }
  ```
</CodeGroup>

# Unsubscribe

Use `slotUnsubscribe` with the subscription id returned by `slotSubscribe` to cancel the stream.

* `subscription_id`: `number` - The subscription id to cancel.

<CodeGroup>
  ```shell wscat
  {"jsonrpc":"2.0","id":1,"method":"slotUnsubscribe","params":[subscription_id]}
  ```
</CodeGroup>

```json result
{"jsonrpc":"2.0","result":true,"id":1}
```

When using `@solana/web3.js`, call `connection.removeSlotChangeListener(subscriptionId)` instead of sending the raw JSON-RPC request.

------

# Trace API Quickstart

> The Trace API provides insights into transaction processing and on-chain activity.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

To use the Trace API your Alchemy plan must be set to the pay as you go or enterprise tiers. Upgrade [your plan](https://dashboard.alchemy.com/settings/billing) for access.

<Tip title="Don’t have an API key?" icon="star">
  Sign up or upgrade your plan for access. [Get started for free](https://dashboard.alchemy.com/signup)
</Tip>

## Trace API methods

The Trace API methods provide full externality trace functions on transactions executed in the Ethereum chain. You can filter by `address` information. The returned information includes the execution of the following:

* `CREATE`
* `SUICIDE`
* Variants of the `CALL`
* Input data
* Output data
* Gas usage
* Amount transferred
* Success status of individual actions

## Trace use cases

Common use cases for the Trace API include:

| Use case    | Description                                                             | Endpoint                                |
| ----------- | ----------------------------------------------------------------------- | --------------------------------------- |
| Trace call  | Executes the given call and returns a number of possible traces for it. | [`trace_call`](/docs/reference/trace-call)   |
| Trace block | Returns the traces executed in the block.                               | [`trace_block`](/docs/reference/trace-block) |
| Trace get   | Returns the traces for a transaction by its hash.                       | [`trace_get`](/docs/reference/trace-get)     |

## Trace types

| Type                            | Parameter   | Description                                                                                             | Network Support           |
| ------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------- | ------------------------- |
| Transaction Trace               | `trace`     | Trace of your transaction. See [trace actions](/docs/reference/trace-api#opcodes-trace-actions) for details. | Ethereum Mainnet & Sepolia |
| State difference                | `stateDiff` | Ethereum state changed values of a transaction.                                                         | Ethereum Mainnet & Sepolia |
| Virtual Machine Execution Trace | `vmTrace`   | Runs a full trace of the VM's state & subcalls in the transaction.                                      | None                      |

## Trace action types

### `CREATE`

* Creates a smart contract.

#### Example response

<CodeGroup>
  ```json json
  {
      "action": {
        "from": "0x6090a6e47849629b7245dfa1ca21d94cd15878ef",
        "gas": "0x6a7f1",
        "init": "0x606060405260405160208061051683398101604052515b60028054600160a060020a03808416600160a060020a0319928316179092556000805433909316929091169190911790554260019081556005805460ff19169091179055346004555b505b6104a6806100706000396000f300606060405236156100885763ffffffff60e060020a60003504166305b34410811461008a5780630b5ab3d5146100ac57806313af4035146100be5780632b20e397146100dc5780633fa4f24514610108578063674f220f1461012a5780638da5cb5b14610156578063b0c8097214610182578063bbe427711461019c578063faab9d39146101b1575bfe5b341561009257fe5b61009a6101cf565b60408051918252519081900360200190f35b34156100b457fe5b6100bc6101d5565b005b34156100c657fe5b6100bc600160a060020a036004351661021d565b005b34156100e457fe5b6100ec6102c3565b60408051600160a060020a039092168252519081900360200190f35b341561011057fe5b61009a6102d2565b60408051918252519081900360200190f35b341561013257fe5b6100ec6102d8565b60408051600160a060020a039092168252519081900360200190f35b341561015e57fe5b6100ec6102e7565b60408051600160a060020a039092168252519081900360200190f35b341561018a57fe5b6100bc60043560243515156102f6565b005b34156101a457fe5b6100bc600435610382565b005b34156101b957fe5b6100bc600160a060020a0360043516610431565b005b60015481565b60055460ff16156101e65760006000fd5b600254604051600160a060020a039182169130163180156108fc02916000818181858888f193505050501561021a5761deadff5b5b565b60005433600160a060020a039081169116146102395760006000fd5b600160a060020a038116151561024f5760006000fd5b600280546003805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03808516919091179092559084169116811790915560408051918252517fa2ea9883a321a3e97b8266c2b078bfeec6d50c711ed71f874a90d500ae2eaf369181900360200190a15b5b50565b600054600160a060020a031681565b60045481565b600354600160a060020a031681565b600254600160a060020a031681565b60005433600160a060020a039081169116146103125760006000fd5b60055460ff1615156103245760006000fd5b8160045410156103345760006000fd5b6004829055600254604051600160a060020a039182169130163184900380156108fc02916000818181858888f193505050501580156103705750805b1561037b5760006000fd5b5b5b5b5050565b60005433600160a060020a0390811691161461039e5760006000fd5b60055460ff1615156103b05760006000fd5b6005805460ff1916905561dead6108fc6103e883810330600160a060020a031631025b604051919004801590920291906000818181858888f1935050505015156103fa5760006000fd5b6040517fbb2ce2f51803bba16bc85282b47deeea9a5c6223eabea1077be696b3f265cf1390600090a16102bf6101d5565b5b5b5b50565b60005433600160a060020a0390811691161461044d5760006000fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b505600a165627a7a72305820fbfa6f8a2024760ef0e0eb29a332c9a820526e92f8b4fbcce6f00c7643234b140029000000000000000000000000a7f3659c53820346176f7e0e350780df304db179",
        "value": "0xe4b4b8af6a70000"
      },
      "blockHash": "0x6d00f7707938cca36b0730d8f7f090543242002b6fa0fe94bf85b9ab02e6bed6",
      "blockNumber": 4000036,
      "result": {
        "address": "0xfc9779d9a0f2715435a3e8ebf780322145d7546e",
        "code": "0x606060405236156100885763ffffffff60e060020a60003504166305b34410811461008a5780630b5ab3d5146100ac57806313af4035146100be5780632b20e397146100dc5780633fa4f24514610108578063674f220f1461012a5780638da5cb5b14610156578063b0c8097214610182578063bbe427711461019c578063faab9d39146101b1575bfe5b341561009257fe5b61009a6101cf565b60408051918252519081900360200190f35b34156100b457fe5b6100bc6101d5565b005b34156100c657fe5b6100bc600160a060020a036004351661021d565b005b34156100e457fe5b6100ec6102c3565b60408051600160a060020a039092168252519081900360200190f35b341561011057fe5b61009a6102d2565b60408051918252519081900360200190f35b341561013257fe5b6100ec6102d8565b60408051600160a060020a039092168252519081900360200190f35b341561015e57fe5b6100ec6102e7565b60408051600160a060020a039092168252519081900360200190f35b341561018a57fe5b6100bc60043560243515156102f6565b005b34156101a457fe5b6100bc600435610382565b005b34156101b957fe5b6100bc600160a060020a0360043516610431565b005b60015481565b60055460ff16156101e65760006000fd5b600254604051600160a060020a039182169130163180156108fc02916000818181858888f193505050501561021a5761deadff5b5b565b60005433600160a060020a039081169116146102395760006000fd5b600160a060020a038116151561024f5760006000fd5b600280546003805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03808516919091179092559084169116811790915560408051918252517fa2ea9883a321a3e97b8266c2b078bfeec6d50c711ed71f874a90d500ae2eaf369181900360200190a15b5b50565b600054600160a060020a031681565b60045481565b600354600160a060020a031681565b600254600160a060020a031681565b60005433600160a060020a039081169116146103125760006000fd5b60055460ff1615156103245760006000fd5b8160045410156103345760006000fd5b6004829055600254604051600160a060020a039182169130163184900380156108fc02916000818181858888f193505050501580156103705750805b1561037b5760006000fd5b5b5b5b5050565b60005433600160a060020a0390811691161461039e5760006000fd5b60055460ff1615156103b05760006000fd5b6005805460ff1916905561dead6108fc6103e883810330600160a060020a031631025b604051919004801590920291906000818181858888f1935050505015156103fa5760006000fd5b6040517fbb2ce2f51803bba16bc85282b47deeea9a5c6223eabea1077be696b3f265cf1390600090a16102bf6101d5565b5b5b5b50565b60005433600160a060020a0390811691161461044d5760006000fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b505600a165627a7a72305820fbfa6f8a2024760ef0e0eb29a332c9a820526e92f8b4fbcce6f00c7643234b140029",
        "gasUsed": "0x52ce0"
      },
      "subtraces": 0,
      "traceAddress": [
        0
      ],
      "transactionHash": "0xc9601ea5ca42e57c3ef1d770ab0b278d6aadf2511a4feb879cba573854443423",
      "transactionPosition": 70,
      "type": "create"
    },
  ```
</CodeGroup>

**Create parameter definitions**

| Parameter             | Description                                 | Example                                                              |
| --------------------- | ------------------------------------------- | -------------------------------------------------------------------- |
| `from`                | The address that created the contract.      | `0x6090a6e47849629b7245dfa1ca21d94cd15878ef`                         |
| `gas`                 | Contract gas fee to create the contract.    | `0x6a7f1`                                                            |
| `init`                | Initialization code to create the contract. | `0x6060604052604051602080610516833981016040...`                      |
| `value`               | The value sent to the contract.             | `0xe4b4b8af6a7000`                                                   |
| `blockHash`           | Block hash ID in the transaction.           | `0x6d00f7707938cca36b0730d8f7f090543242002b6fa0fe94bf85b9ab02e6bed6` |
| `blockNumber`         | Transaction block number.                   | `4000036`                                                            |
| `address`             | Location address of the new contract.       | `0xfc9779d9a0f2715435a3e8ebf780322145d7546e`                         |
| `code`                | The contract code.                          | `0x606060405236156100885763ffffffff60e060020...`                     |
| `gasUsed`             | Required fee (gas) to create the contract.  | `0x52ce0`                                                            |
| `subtraces`           | Total number of transaction child traces.   | `0`                                                                  |
| `traceAddress`        | Index of a trace & order of subcalls.       | `0`                                                                  |
| `transactionHash`     | Hash ID of the transaction.                 | `0xc9601ea5ca42e57c3ef1d770ab0b278d6aadf2511a4feb879cba573854443423` |
| `transactionPosition` | The transaction position in the block.      | `70`                                                                 |
| `type`                | Type of operation code (OPCODE).            | `create`                                                             |

### `SUICIDE`

* `SUICIDE` is captured when a smart contract is destroyed. That is when the [selfdestruct](https://solidity-by-example.org/hacks/self-destruct/) function of Solidity is used.
* `SUICIDE` transfers the contract's balance to the `address` specified in the `selfdestruct` function clearing onchain memory.
* The cleared memory is processed as a refund of the total gas cost to complete the transaction.

#### Example response

<CodeGroup>
  ```json json
  {
      "action": {
        "address": "0x87051f6ba0562fdb0485763562bf34cb2ad705b1",
        "refundAddress": "0x000000000000000000000000000000000000dead",
        "balance": "0x0"
      },
      "blockHash": "0x6d00f7707938cca36b0730d8f7f090543242002b6fa0fe94bf85b9ab02e6bed6",
      "blockNumber": 4000036,
      "result": null,
      "subtraces": 0,
      "traceAddress": [
        1,
        2,
        2
      ],
      "transactionHash": "0xbc15addb97490a168dc1d099ab8537caf2e4ff7d1deeff6d685d2d594a750037",
      "transactionPosition": 45,
      "type": "suicide"
    },
  ```
</CodeGroup>

**SUICIDE parameter definitions**

| Parameter             | Description                                      | Example                                                              |
| --------------------- | ------------------------------------------------ | -------------------------------------------------------------------- |
| `address`             | The address of contract to destroy.              | `0x87051f6ba0562fdb0485763562bf34cb2ad705b1`                         |
| `refundAddress`       | Address to send remainder of contract `balance`. | `0x000000000000000000000000000000000000dead`                         |
| `blockHash`           | Block hash ID of the transaction.                | `0x6d00f7707938cca36b0730d8f7f090543242002b6fa0fe94bf85b9ab02e6bed6` |
| `blockNumber`         | Transaction block number.                        | `4000036`                                                            |
| `result`              | Used for `SELFDESTRUCT` calls.                   | `null`                                                               |
| `subtraces`           | Total number of transaction child traces.        | `0`                                                                  |
| `traceAddress`        | Index of the trace & the order of subcalls.      | `1` and `2`                                                          |
| `transactionHash`     | Hash ID of the transaction.                      | `0xbc15addb97490a168dc1d099ab8537caf2e4ff7d1deeff6d685d2d594a750037` |
| `transactionPosition` | The position of the transaction in the block.    | `45`                                                                 |
| `type`                | Type of operation code (OPCODE).                 | `suicide`                                                            |

### `CALL`

* `CALL` is used for transferring ETH between [externally owned accounts](/docs/web3-glossary#externally-owned-account) (EOAs).
* Also used to `CALL` a smart contract function.

#### Example response

<CodeGroup>
  ```json json
  {
      "action": {
        "from": "0xbc9f06dd67578b0b8b4d87fda9acde453bc4c067",
        "callType": "call",
        "gas": "0x97478",
        "input": "0xfebefd610000000000000000000000000000000000000000000000000000000000000040cc849afc28894f79411f12309e75c71ded27d1666b75a2423633c204e671cb1e00000000000000000000000000000000000000000000000000000000000000036eaec0ff7c4899bec2db1479d7d195d614ca26819a301523d82daaaaf436122d2ceb36dfa12b359202b4dfd756478988f5023bf7297afa81f563d4b6242e36e707671a8bf38ee483a37feca948997dcfba17b3372e166ba5c824629beeed6b5c",
        "to": "0x6090a6e47849629b7245dfa1ca21d94cd15878ef",
        "value": "0x2386f26fc10000"
      },
      "blockHash": "0x6d00f7707938cca36b0730d8f7f090543242002b6fa0fe94bf85b9ab02e6bed6",
      "blockNumber": 4000036,
      "result": {
        "gasUsed": "0x7ad71",
        "output": "0x"
      },
      "subtraces": 4,
      "traceAddress": [],
      "transactionHash": "0x552b31a3a9c92577d65db62cf9f729e81571e10cad90e356423adcfa2caebacc",
      "transactionPosition": 71,
      "type": "call"
    }
  ```
</CodeGroup>

**`CALL` parameter definitions**

| Parameter             | Description                                     | Example                                                              |                                                        |
| --------------------- | ----------------------------------------------- | -------------------------------------------------------------------- | ------------------------------------------------------ |
| `from`                | Address of the sender.                          | `0xbc9f06dd67578b0b8b4d87fda9acde453bc4c067`                         |                                                        |
| `callType`            | The type of `CALL`.                             | `call`,`delegatecall`,`callcode` or `staticcall`                     |                                                        |
| `gas`                 | The gas included in the transaction.            | `0x97478`                                                            |                                                        |
| `input`               | Specific call function on the contract.         |                                                                      | `0xfebefd61000000000000000000000000000000000000000...` |
| `to`                  | Address of the receiver.                        | `0x6090a6e47849629b7245dfa1ca21d94cd15878ef`                         |                                                        |
| `value`               | Transferred value amount.                       | `0x2386f26fc10000`                                                   |                                                        |
| `blockHash`           | Transaction block hash ID.                      | `0x6d00f7707938cca36b0730d8f7f090543242002b6fa0fe94bf85b9ab02e6bed6` |                                                        |
| `blockNumber`         | Transaction block number.                       | `4000036`                                                            |                                                        |
| `gasUsed`             | gas used to execute the transaction.            | `0x7ad71`                                                            |                                                        |
| `output`              | The result of the smart contract function call. | `0x`                                                                 |                                                        |
| `subtraces`           | Total number of transaction child traces.       | `4`                                                                  |                                                        |
| `traceAddress`        | Index of a trace & the order of subcalls.       | `[]`                                                                 |                                                        |
| `transactionHash`     | Hash ID of the transaction.                     | `0x552b31a3a9c92577d65db62cf9f729e81571e10cad90e356423adcfa2caebacc` |                                                        |
| `transactionPosition` | The position of the transaction in the block.   | `71`                                                                 |                                                        |
| `type`                | Type of operation code (OPCODE).                | `call`                                                               |                                                        |

## How to read a `traceAddress`

Traces are structured in a tree format. The `traceAddress` field represents the position of the trace in the tree. Below is a diagram of the `traceAddress` set of tree results:

![768](https://alchemyapi-res.cloudinary.com/image/upload/v1764192957/docs/api-reference/trace-api/a0d248e-Docs_-_User_flow_1.png "Docs - User flow (1).png")

## Related resources

* [What are EVM Traces?](/docs/reference/what-are-evm-traces)
* [Trace API vs. Debug API](/docs/reference/trace-api-vs-debug-api)
* [trace\_call vs debug\_traceCall](/docs/reference/trace_call-vs-debug_tracecall)

------

# trace_block

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns traces created at a given block.

Reference: https://www.alchemy.com/docs/chains/trace-api/trace-api-endpoints/trace-block

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockIdentifier | string | Yes | Block identifier as a hex string block number or one of the tags: "earliest", "latest", "pending", "safe", or "finalized".  |

## Result

**Block Traces** (object): An object containing block trace details.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "trace_block",
  "params": [
    "0x2ed119"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "jsonrpc": "2.0",
    "id": 0,
    "result": {
      "output": "",
      "stateDiff": "",
      "trace": [
        {
          "name": "trace item",
          "value": {
            "action": {
              "callType": "call",
              "from": "0xaa7b131dc60b80d3cf5e59b5a21a666aa039c951",
              "gas": "0x0",
              "input": "0x",
              "to": "0xd40aba8166a212d6892125f079c33e6f5ca19814",
              "value": "0x4768d7effc3fbe"
            },
            "error": "",
            "subtraces": "0",
            "traceAddress": [],
            "type": "call"
          }
        }
      ],
      "vmTrace": ""
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "trace_block",
  "params": [
    "0x2ed119"
  ]
}'
```



------

# trace_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Executes a call and returns one or more possible traces.

Reference: https://www.alchemy.com/docs/chains/trace-api/trace-api-endpoints/trace-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| transaction | object | Yes | Transaction call object. Contains call parameters such as "from", "to", "gas", "gasPrice", "value", and "data".  |
| traceTypes | enum[] | Yes | Array of trace types to return. Valid values include "trace" and "stateDiff".  |
| blockIdentifier | string | No | Optional block identifier (block number in hex, block hash, or tag like "latest").  |

## Result

**Trace Object** (object): Returns the trace result for the given call.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "trace_call",
  "params": [
    {
      "from": "0x6f1FB6EFDf50F34bFA3F2bC0E5576EdD71631638",
      "to": "0x1E0447b19BB6EcFdAe1e4AE1694b0C3659614e4e",
      "value": "0x0",
      "data": "0xa67a6a45000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000"
    },
    [
      "trace"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "jsonrpc": "2.0",
    "id": 0,
    "result": {
      "output": "0x",
      "stateDiff": "",
      "trace": [
        {
          "name": "trace item",
          "value": {
            "action": {
              "callType": "call",
              "from": "0x6f1fb6efdf50f34bfa3f2bc0e5576edd71631638",
              "gas": "0x1dcd11f8",
              "input": "0xa67a6a45000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000",
              "to": "0x1e0447b19bb6ecfdae1e4ae1694b0C3659614e4e",
              "value": "0x0"
            },
            "error": "Reverted",
            "subtraces": "0",
            "traceAddress": [],
            "type": "call"
          }
        }
      ],
      "vmTrace": null
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "trace_call",
  "params": [
    {
      "from": "0x6f1FB6EFDf50F34bFA3F2bC0E5576EdD71631638",
      "to": "0x1E0447b19BB6EcFdAe1e4AE1694b0C3659614e4e",
      "value": "0x0",
      "data": "0xa67a6a45000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000"
    },
    [
      "trace"
    ],
    "latest"
  ]
}'
```



------

# trace_filter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns traces matching a given filter.

Reference: https://www.alchemy.com/docs/chains/trace-api/trace-api-endpoints/trace-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| filter | object | Yes | Filter object for retrieving traces.  |

## Result

**Filtered Traces** (object[]): Returns an array of traces that match the filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "trace_filter",
  "params": [
    {
      "fromBlock": "0xc26f54",
      "toBlock": "0xc26f54",
      "fromAddress": [
        "0x15dce17509846b420b1f5c158fe3d7518204abb6"
      ],
      "toAddress": [
        "0x15dce17509846b420b1f5c158fe3d7518204abb6"
      ],
      "after": "0x0",
      "count": 10
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "jsonrpc": "2.0",
    "id": 0,
    "result": [
      {
        "name": "trace item",
        "value": {
          "action": {
            "callType": "call",
            "from": "0x15dce17509846b420b1f5c158fe3d7518204abb6",
            "gas": "0xed2a4",
            "input": "0x00000000000000000000000000abc3136b63363200000000000000000000000000708a100000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001f0000000016128acb08000000cb0c5d9d92f4f2f80cce7aa271a1e148c226e19d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ae720a71622e824f576b4a8c03031066548a3b1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000075cf0c1848f9db946ab000000000000000000000000fffd8963efd1fc6a506488495d951d5263988d2500000000000000000000000000000000000000000000000000000000000000"
          },
          "blockHash": "0xe0583a364c20fa67748ca92e276df63919c67e12fdc9bdbc17deae8cf730cf35",
          "blockNumber": "12742484",
          "result": {
            "gasUsed": "0x4551d",
            "output": "0x00000000000000000000000000000000000000000000000000d96b96f61c5e87",
            "subtraces": 12,
            "traceAddress": [],
            "transactionHash": "0x87951d0547018db2c4817282a53e2015d91934b42d1b8d8bba1bef7cb480f263",
            "transactionPosition": "0",
            "type": "call"
          }
        }
      },
      {
        "name": "trace item",
        "value": {
          "action": {
            "callType": "call",
            "from": "0x000000000000abe945c436595ce765a8a261317b",
            "gas": "0xe87a4",
            "input": "0x70a08231000000000000000000000000000000000000abe945c436595ce765a8a261317b",
            "to": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
            "value": "0x0"
          },
          "blockHash": "0xe0583a364c20fa67748ca92e276df63919c67e12fdc9bdbc17deae8cf730cf35",
          "blockNumber": "12742484",
          "result": {
            "gasUsed": "0x4551d",
            "output": "0x00000000000000000000000000000000000000000000000000d96b96f61c5e87",
            "subtraces": 12,
            "traceAddress": [],
            "transactionHash": "0x87951d0547018db2c4817282a53e2015d91934b42d1b8d8bba1bef7cb480f263",
            "transactionPosition": "0",
            "type": "call"
          }
        }
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "trace_filter",
  "params": [
    {
      "fromBlock": "0xc26f54",
      "toBlock": "0xc26f54",
      "fromAddress": [
        "0x15dce17509846b420b1f5c158fe3d7518204abb6"
      ],
      "toAddress": [
        "0x15dce17509846b420b1f5c158fe3d7518204abb6"
      ],
      "after": "0x0",
      "count": 10
    }
  ]
}'
```



------

# trace_get

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the trace at a given position for a transaction.

Reference: https://www.alchemy.com/docs/chains/trace-api/trace-api-endpoints/trace-get

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| transactionHash | string | Yes | Transaction hash. |
| traceIndexes | string[] | Yes | Array of trace index positions (in hex) to retrieve from the transaction.  |

## Result

**Trace Object** (object): Returns the trace object corresponding to the provided index(es).

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "trace_get",
  "params": [
    "0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",
    [
      "0x0"
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "jsonrpc": "2.0",
    "id": 0,
    "result": {
      "action": {
        "callType": "call",
        "from": "0x1c39ba39e4735cb65978d4db400ddd70a72dc750",
        "gas": "0x13e99",
        "input": "0x16c72721",
        "to": "0x2bd2326c993dfaef84f696526064ff22eba5b362",
        "value": "0x0"
      },
      "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
      "blockNumber": 3068185,
      "result": {
        "gasUsed": "0x183",
        "output": "0x0000000000000000000000000000000000000000000000000000000000000001"
      },
      "subtraces": 0,
      "traceAddress": [
        "0x0"
      ],
      "transactionHash": "0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",
      "transactionPosition": 2,
      "type": "call"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "trace_get",
  "params": [
    "0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",
    [
      "0x0"
    ]
  ]
}'
```



------

# trace_rawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Traces a call to eth_sendRawTransaction without executing it, returning the traces.

Reference: https://www.alchemy.com/docs/chains/trace-api/trace-api-endpoints/trace-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| rawTransaction | string | Yes | Raw transaction data. |
| traceTypes | enum[] | Yes | Array of trace types to return. Valid values include "trace" and "stateDiff".  |

## Result

**Block Traces** (object): Returns the traces from the raw transaction call.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "trace_rawTransaction",
  "params": [
    "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",
    [
      "trace"
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "jsonrpc": "2.0",
    "id": 0,
    "result": {
      "output": "0x",
      "stateDiff": null,
      "trace": [
        {
          "name": "trace item",
          "value": {
            "action": {
              "callType": "call",
              "from": "0xaa7b131dc60b80d3cf5e59b5a21a666aa039c951",
              "gas": "0x0",
              "input": "0x",
              "to": "0xd40aba8166a212d6892125f079c33e6f5ca19814",
              "value": "0x4768d7effc3fbe"
            },
            "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
            "blockNumber": 3068185,
            "result": {
              "gasUsed": "0x0",
              "output": "0x"
            },
            "subtraces": "0",
            "traceAddress": [],
            "transactionHash": "0x07da28d752aba3b9dd7060005e554719c6205c8a3aea358599fc9b245c52f1f6",
            "transactionPosition": 0,
            "type": "call"
          }
        },
        {
          "name": "trace item",
          "value": {
            "action": {
              "callType": "call",
              "from": "0x4f11ba23bb526c0486d83c6a8f18f632f3fc172a",
              "gas": "0x0",
              "input": "0x",
              "to": "0x7ed1e469fcb3ee19c0366d829e291451be638e59",
              "value": "0x446cde325fbfbe"
            },
            "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
            "blockNumber": 3068185,
            "result": {
              "gasUsed": "0x0",
              "output": "0x"
            },
            "subtraces": "0",
            "traceAddress": [],
            "transactionHash": "0x056f11efb5da4ff7cf8523cfcef08393e5dd2ff3ab3223e4324426d285d7ae92",
            "transactionPosition": 1,
            "type": "call"
          }
        }
      ],
      "vmTrace": null
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "trace_rawTransaction",
  "params": [
    "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",
    [
      "trace"
    ]
  ]
}'
```



------

# trace_replayBlockTransactions

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Reference: https://www.alchemy.com/docs/chains/trace-api/trace-api-endpoints/trace-replay-block-transactions

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockIdentifier | string | Yes | Block identifier as a string. This can be a block hash, a block number (in hex), or a block tag (such as "latest", "finalized", etc.).  |
| traceTypes | enum[] | Yes | Array of trace types to return. Valid values include "trace" and "stateDiff".  |

## Result

**Block Transactions Traces** (object[]): Returns an array of trace objects for each transaction in the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "trace_replayBlockTransactions",
  "params": [
    "0x2ed119",
    [
      "trace"
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "jsonrpc": "2.0",
    "id": 0,
    "result": [
      {
        "name": "trace item",
        "value": {
          "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
          "blockNumber": 3068185,
          "action": {
            "callType": "call",
            "from": "0xaa7b131dc60b80d3cf5e59b5a21a666aa039c951",
            "gas": "0x0",
            "input": "0x",
            "to": "0xd40aba8166a212d6892125f079c33e6f5ca19814",
            "value": "0x4768d7effc3fbe"
          },
          "result": {
            "gasUsed": "0x0",
            "output": "0x"
          },
          "subtraces": 0,
          "traceAddress": [],
          "transactionHash": "0x07da28d752aba3b9dd7060005e554719c6205c8a3aea358599fc9b245c52f1f6",
          "transactionPosition": 0,
          "type": "call"
        }
      },
      {
        "name": "trace item",
        "value": {
          "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
          "blockNumber": 3068185,
          "action": {
            "callType": "call",
            "from": "0x4f11ba23bb526c0486d83c6a8f18f632f3fc172a",
            "gas": "0x0",
            "input": "0x",
            "to": "0x7ed1e469fcb3ee19c0366d829e291451be638e59",
            "value": "0x446cde325fbfbe"
          },
          "result": {
            "gasUsed": "0x0",
            "output": "0x"
          },
          "subtraces": 0,
          "traceAddress": [],
          "transactionHash": "0x056f11efb5da4ff7cf8523cfcef08393e5dd2ff3ab3223e4324426d285d7ae92",
          "transactionPosition": 1,
          "type": "call"
        }
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "trace_replayBlockTransactions",
  "params": [
    "0x2ed119",
    [
      "trace"
    ]
  ]
}'
```



------

# trace_replayTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Traces a call to eth_sendRawTransaction without executing it, returning the traces.

Reference: https://www.alchemy.com/docs/chains/trace-api/trace-api-endpoints/trace-replay-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| transactionHash | string | Yes | Transaction hash of the raw transaction to be replayed.  |
| traceTypes | enum[] | Yes | Array of trace types to return. Valid values include "trace" and "stateDiff".  |

## Result

**Trace Replay Result** (object): Returns the trace result from replaying the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "trace_replayTransaction",
  "params": [
    "0x02d4a872e096445e80d05276ee756cefef7f3b376bcec14246469c0cd97dad8f",
    [
      "trace"
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "jsonrpc": "2.0",
    "id": 0,
    "result": {
      "output": "0x",
      "stateDiff": null,
      "trace": [
        {
          "name": "trace item",
          "value": {
            "action": {
              "callType": "call",
              "from": "0x6f1fb6efdf50f34bfa3f2bc0e5576edd71631638",
              "gas": "0x1dcd11f8",
              "input": "0xa67a6a45000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000",
              "to": "0x1e0447b19bb6ecfdae1e4ae1694b0c3659614e4e",
              "value": "0x0"
            },
            "result": {
              "gasUsed": "0x0",
              "output": "0x"
            },
            "subtraces": 0,
            "traceAddress": [],
            "transactionHash": "0x02d4a872e096445e80d05276ee756cefef7f3b376bcec14246469c0cd97dad8f",
            "transactionPosition": 0,
            "type": "call"
          }
        }
      ],
      "vmTrace": null
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "trace_replayTransaction",
  "params": [
    "0x02d4a872e096445e80d05276ee756cefef7f3b376bcec14246469c0cd97dad8f",
    [
      "trace"
    ]
  ]
}'
```



------

# trace_transaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns all traces of a given transaction.

Reference: https://www.alchemy.com/docs/chains/trace-api/trace-api-endpoints/trace-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| transactionHash | string | Yes | 32 Bytes - Hash of a transaction.  |

## Result

**Traces** (object[]): Returns an array of trace objects for the given transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "trace_transaction",
  "params": [
    "0x8fc90a6c3ee3001cdcbbb685b4fbe67b1fa2bec575b15b0395fea5540d0901ae"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "jsonrpc": "2.0",
    "id": 0,
    "result": [
      {
        "name": "trace item",
        "value": {
          "action": {
            "callType": "call",
            "from": "0x83806d539d4ea1c140489a06660319c9a303f874",
            "gas": "0x1a1f8",
            "input": "0x",
            "to": "0x1c39ba39e4735cb65978d4db400ddd70a72dc750",
            "value": "0x7a16c911b4d00000"
          },
          "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
          "blockNumber": 3068185,
          "result": {
            "gasUsed": "0x2982",
            "output": "0x"
          },
          "subtraces": 2,
          "traceAddress": [],
          "transactionHash": "0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",
          "transactionPosition": 2,
          "type": "call"
        }
      },
      {
        "name": "trace item",
        "value": {
          "action": {
            "callType": "call",
            "from": "0x1c39ba39e4735cb65978d4db400ddd70a72dc750",
            "gas": "0x13e99",
            "input": "0x16c72721",
            "to": "0x2bd2326c993dfaef84f696526064ff22eba5b362",
            "value": "0x0"
          },
          "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
          "blockNumber": 3068185,
          "result": {
            "gasUsed": "0x183",
            "output": "0x0000000000000000000000000000000000000000000000000000000000000001"
          },
          "subtraces": 0,
          "traceAddress": [
            "0x0"
          ],
          "transactionHash": "0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",
          "transactionPosition": 2,
          "type": "call"
        }
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "trace_transaction",
  "params": [
    "0x8fc90a6c3ee3001cdcbbb685b4fbe67b1fa2bec575b15b0395fea5540d0901ae"
  ]
}'
```



------

# What are EVM Traces?

> A guide to understanding EVM traces, their types, and how to use them.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Prerequisites

Before reading about EVM traces, you should have a clear understanding of [EVM](https://www.alchemy.com/overviews/what-is-the-ethereum-virtual-machine-evm), [Execution Clients](https://www.alchemy.com/overviews/execution-layer-and-consensus-layer-node-clients), [Smart Contracts](https://ethereum.org/en/developers/docs/smart-contracts/) and [Nodes](https://ethereum.org/en/developers/docs/nodes-and-clients/). You can read about these topics in the official [Ethereum documentation](https://ethereum.org/en/developers/docs/) or [Alchemy documentation](/docs/). However, if you just need a refresher, you can find the one-line definitions for these topics below.

* **Smart Contracts:** Smart contracts are self-executing contracts with the terms of the agreement written into lines of code. The code and the agreements contained therein exist across a decentralized, distributed blockchain network.
* **Execution Client:** An Execution/Ethereum Client is a software program that connects to the Ethereum network to enable users to interact with the Ethereum blockchain. Some popular Ethereum clients include Geth, Parity, and Erigon.
* **EVM:** The Ethereum Virtual Machine (EVM) is a turing-complete virtual machine that allows for the execution of smart contracts on the Ethereum blockchain. The EVM is responsible for processing and executing all of the transactions that occur on the Ethereum network.
* **Node:** An Ethereum node is a computer that runs an Ethereum Client and maintains the Ethereum blockchain.

# The Problem

There are two types of transactions in EVM-compatible protocols:

1. **Value Transfers:** A value transfer just moves the native blockchain currency (Ether in the case of Ethereum) from one account to another.
2. **Contract Executions:** A contract execution involves calling a function of the smart contract that can change the state of the contract and even call functions of other smart contracts.

The downside of the contract execution is that it is very hard to tell what the transaction actually did. When a transaction is executed, you can get a transaction receipt that contains a status code to check whether the execution succeeded or not, besides looking at EVM traces there is no way to see what data was modified, or what external contracts were invoked.

Look at the transaction flow below:

![](https://alchemyapi-res.cloudinary.com/image/upload/v1764193603/docs/api-reference/trace-api/trace-api-resources/f9906e7-transaction-flow.png "transaction-flow.png")

Here is the [Etherscan link](https://etherscan.io/tx/0x0d13800319458a403500d407226328bbedbd8a10ff3d26a18c67872ac1f94ea7) for the transaction defined above. This is a transaction in which a user (externally owned account) invokes a contract which in turn invokes another contract and this is how the transaction receipt for this transaction looks like:

<CodeGroup>
  ```json transaction-receipt.json
  {
    to: '0xdE8BFD2b6E8F765710198fd10E7e87757B959F84',
    from: '0x80b4f0bc53F620141C16Bd209269aeC0D72B22c4', 
    contractAddress: null, 
    gasUsed: BigNumber { _hex: '0x7f54', _isBigNumber: true }, 
    blockHash: '0x985ab37352c3c8765c6f7b480e07e1eadef6dd53c06fa25cf72394cb8eae34', 
    transactionHash: '0x0d13800319458a403500d407226328bbedbd8a10ff3d26a18c67872ac1f94ea7',
    blockNumber: 15095426, 
    confirmations: 768898,
    effectiveGasPrice: BigNumber { _hex: '0x0454f97690', _isBigNumber: true },
    status: 1,
  }
  ```
</CodeGroup>

<Info>
  You can get the transaction receipt for any transaction using the **[eth\_getTransactionReceipt](/docs/reference/eth-gettransactionreceipt)** Alchemy API
</Info>

The transaction receipt has a couple of fields, let’s take a look at them one by one:

* `to`: The address the transaction is directed to. (In this case, Contract A address).
* `from`: Address of the caller (In this case, the user).
* `contractAddress`: If a new contract was created as part of this transaction then this field would have the address of the newly created contract, in this case, it is `null` because no new contract was created.
* `gasUsed`: Gas used for the execution of the transaction in big number format.
* `blockHash`: Hash of the block in which the transaction is included.
* `transactionHash`: The hash of the transaction itself. This is the unique identifier of the transaction.
* `blockNumber`: The block number in which the transaction is included.
* `confirmations`: The number of blocks that have been mined since the block containing the given transaction was mined.
* `effectiveGasPrice`: Gas price for the transaction.
* `status`: A status with the value `1` means that the transaction was successful while a value of `0` means that the transaction failed.

As you can see that the transaction receipt provides some information about the transaction but it does not tell that contract A further called contract B. This can be a problem depending on your use case. If you want information about all the steps involved in the transaction including calls to other contracts then transaction receipt will not be of much use to you. So how can this problem be solved?

# The Solution: EVM Traces

**EVM traces** provide a step-by-step record of what happened during the execution of a transaction, including which other contracts were invoked and what data was changed. They help give debugging information that can be used to troubleshoot issues with EVM-compatible smart contracts, which is useful for understanding why a contract behaved in a certain way, or for finding bugs.

When you trace a transaction you get back an array of objects also known as **EVM traces** for the transaction. Each step of the transaction is represented as an individual object in the array.

## Example

So, the EVM traces for [this](https://etherscan.io/tx/0x0d13800319458a403500d407226328bbedbd8a10ff3d26a18c67872ac1f94ea7) transaction which is also defined in "The Problem" section looks like this (We’ll learn how to retrieve EVM traces in a later section):

<CodeGroup>
  ```json evm-traces.json
  [
    {
      "action": {
        "from": "0x80b4f0bc53f620141c16bd209269aec0d72b22c4",
        "callType": "call",
        "gas": "0x7a37",
        "input": "0x",
        "to": "0xde8bfd2b6e8f765710198fd10e7e87757b959f84",
        "value": "0xb2ece213edb23a"
      },
      "blockHash": "0x985ab37352c3c8765c6f7b480e07e1eadef6dd53c06fa25cf72394cb8eae32b4",
      "blockNumber": 15095426,
      "result": {
        "gasUsed": "0x2d4c",
        "output": "0x"
      },
      "subtraces": 1,
      "traceAddress": [],
      "transactionHash": "0x0d13800319458a403500d407226328bbedbd8a10ff3d26a18c67872ac1f94ea7",
      "transactionPosition": 420,
      "type": "call"
    },
    {
      "action": {
        "from": "0xde8bfd2b6e8f765710198fd10e7e87757b959f84",
        "callType": "call",
        "gas": "0x8fc",
        "input": "0x",
        "to": "0xaf1931c20ee0c11bea17a41bfbbad299b2763bc0",
        "value": "0xb2ece213edb23a"
      },
      "blockHash": "0x985ab37352c3c8765c6f7b480e07e1eadef6dd53c06fa25cf72394cb8eae32b4",
      "blockNumber": 15095426,
      "result": {
        "gasUsed": "0x0",
        "output": "0x"
      },
      "subtraces": 0,
      "traceAddress": [
        0
      ],
      "transactionHash": "0x0d13800319458a403500d407226328bbedbd8a10ff3d26a18c67872ac1f94ea7",
      "transactionPosition": 420,
      "type": "call"
    }
  ]
  ```
</CodeGroup>

Here is an explanation of the above EVM traces (click on the image to zoom into it):

![](https://alchemyapi-res.cloudinary.com/image/upload/v1764193604/docs/api-reference/trace-api/trace-api-resources/652e40e-flow-of-transaction.png "flow-of-transaction.png")

Each step of the transaction is represented as a separate **Trace** and each trace has its own fields. A lot of the fields are the same as the fields of the transaction receipt, such as `from`, `to`, `blockHash`, `blockNumber` and `transactionHash` but there are additional fields as well.

The **type** field defines the type of the given action/trace and the structure of the given trace depends on the type of the action. Let’s take a look at the types of trace actions and their structures.

## Types of Trace Actions

There are many types of actions captured in transaction traces: Some common actions are [CREATE](#create), [SUICIDE](#suicide) and [CALL](#call). Below you will find the structure for these trace actions.

### **`CREATE`**

Captured when a new smart contract is created.

**Structure**

* `action`

  * `from`: address that created the contract
  * `gas`: gas cost to create the contract
  * `init`: initialization code for creating the contract
  * `value`: value sent to contract

* `blockHash`: block hash the transaction was included in

* `blockNumber`: block number the transaction was included in

* `result`

  * `address`: address for contract created
  * `code`: code for contract created
  * `gasUsed`: gas used in contract creation

* `subtraces`: number of child traces of the given trace

* `traceAddress`: index for the given trace in the trace tree

* `transactionHash`: hash for the transaction

* `transactionPosition`: position (or index) of transaction in the block

* `type`: type of action, in this case, `CREATE`

**Example:**

<CodeGroup>
  ```json create-evm-trace.json
  {
      "action": {
        "from": "0x6090a6e47849629b7245dfa1ca21d94cd15878ef",
        "gas": "0x6a7f1",
        "init": "0x606060405260405160208061051683398101604052515b60028054600160a060020a03808416600160a060020a0319928316179092556000805433909316929091169190911790554260019081556005805460ff19169091179055346004555b505b6104a6806100706000396000f300606060405236156100885763ffffffff60e060020a60003504166305b34410811461008a5780630b5ab3d5146100ac57806313af4035146100be5780632b20e397146100dc5780633fa4f24514610108578063674f220f1461012a5780638da5cb5b14610156578063b0c8097214610182578063bbe427711461019c578063faab9d39146101b1575bfe5b341561009257fe5b61009a6101cf565b60408051918252519081900360200190f35b34156100b457fe5b6100bc6101d5565b005b34156100c657fe5b6100bc600160a060020a036004351661021d565b005b34156100e457fe5b6100ec6102c3565b60408051600160a060020a039092168252519081900360200190f35b341561011057fe5b61009a6102d2565b60408051918252519081900360200190f35b341561013257fe5b6100ec6102d8565b60408051600160a060020a039092168252519081900360200190f35b341561015e57fe5b6100ec6102e7565b60408051600160a060020a039092168252519081900360200190f35b341561018a57fe5b6100bc60043560243515156102f6565b005b34156101a457fe5b6100bc600435610382565b005b34156101b957fe5b6100bc600160a060020a0360043516610431565b005b60015481565b60055460ff16156101e65760006000fd5b600254604051600160a060020a039182169130163180156108fc02916000818181858888f193505050501561021a5761deadff5b5b565b60005433600160a060020a039081169116146102395760006000fd5b600160a060020a038116151561024f5760006000fd5b600280546003805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03808516919091179092559084169116811790915560408051918252517fa2ea9883a321a3e97b8266c2b078bfeec6d50c711ed71f874a90d500ae2eaf369181900360200190a15b5b50565b600054600160a060020a031681565b60045481565b600354600160a060020a031681565b600254600160a060020a031681565b60005433600160a060020a039081169116146103125760006000fd5b60055460ff1615156103245760006000fd5b8160045410156103345760006000fd5b6004829055600254604051600160a060020a039182169130163184900380156108fc02916000818181858888f193505050501580156103705750805b1561037b5760006000fd5b5b5b5b5050565b60005433600160a060020a0390811691161461039e5760006000fd5b60055460ff1615156103b05760006000fd5b6005805460ff1916905561dead6108fc6103e883810330600160a060020a031631025b604051919004801590920291906000818181858888f1935050505015156103fa5760006000fd5b6040517fbb2ce2f51803bba16bc85282b47deeea9a5c6223eabea1077be696b3f265cf1390600090a16102bf6101d5565b5b5b5b50565b60005433600160a060020a0390811691161461044d5760006000fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b505600a165627a7a72305820fbfa6f8a2024760ef0e0eb29a332c9a820526e92f8b4fbcce6f00c7643234b140029000000000000000000000000a7f3659c53820346176f7e0e350780df304db179",
        "value": "0xe4b4b8af6a70000"
      },
      "blockHash": "0x6d00f7707938cca36b0730d8f7f090543242002b6fa0fe94bf85b9ab02e6bed6",
      "blockNumber": 4000036,
      "result": {
        "address": "0xfc9779d9a0f2715435a3e8ebf780322145d7546e",
        "code": "0x606060405236156100885763ffffffff60e060020a60003504166305b34410811461008a5780630b5ab3d5146100ac57806313af4035146100be5780632b20e397146100dc5780633fa4f24514610108578063674f220f1461012a5780638da5cb5b14610156578063b0c8097214610182578063bbe427711461019c578063faab9d39146101b1575bfe5b341561009257fe5b61009a6101cf565b60408051918252519081900360200190f35b34156100b457fe5b6100bc6101d5565b005b34156100c657fe5b6100bc600160a060020a036004351661021d565b005b34156100e457fe5b6100ec6102c3565b60408051600160a060020a039092168252519081900360200190f35b341561011057fe5b61009a6102d2565b60408051918252519081900360200190f35b341561013257fe5b6100ec6102d8565b60408051600160a060020a039092168252519081900360200190f35b341561015e57fe5b6100ec6102e7565b60408051600160a060020a039092168252519081900360200190f35b341561018a57fe5b6100bc60043560243515156102f6565b005b34156101a457fe5b6100bc600435610382565b005b34156101b957fe5b6100bc600160a060020a0360043516610431565b005b60015481565b60055460ff16156101e65760006000fd5b600254604051600160a060020a039182169130163180156108fc02916000818181858888f193505050501561021a5761deadff5b5b565b60005433600160a060020a039081169116146102395760006000fd5b600160a060020a038116151561024f5760006000fd5b600280546003805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03808516919091179092559084169116811790915560408051918252517fa2ea9883a321a3e97b8266c2b078bfeec6d50c711ed71f874a90d500ae2eaf369181900360200190a15b5b50565b600054600160a060020a031681565b60045481565b600354600160a060020a031681565b600254600160a060020a031681565b60005433600160a060020a039081169116146103125760006000fd5b60055460ff1615156103245760006000fd5b8160045410156103345760006000fd5b6004829055600254604051600160a060020a039182169130163184900380156108fc02916000818181858888f193505050501580156103705750805b1561037b5760006000fd5b5b5b5b5050565b60005433600160a060020a0390811691161461039e5760006000fd5b60055460ff1615156103b05760006000fd5b6005805460ff1916905561dead6108fc6103e883810330600160a060020a031631025b604051919004801590920291906000818181858888f1935050505015156103fa5760006000fd5b6040517fbb2ce2f51803bba16bc85282b47deeea9a5c6223eabea1077be696b3f265cf1390600090a16102bf6101d5565b5b5b5b50565b60005433600160a060020a0390811691161461044d5760006000fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b505600a165627a7a72305820fbfa6f8a2024760ef0e0eb29a332c9a820526e92f8b4fbcce6f00c7643234b140029",
        "gasUsed": "0x52ce0"
      },
      "subtraces": 0,
      "traceAddress": [
        0
      ],
      "transactionHash": "0xc9601ea5ca42e57c3ef1d770ab0b278d6aadf2511a4feb879cba573854443423",
      "transactionPosition": 70,
      "type": "create"
    }
  ```
</CodeGroup>

Here is the [link](https://etherscan.io/tx/0xc9601ea5ca42e57c3ef1d770ab0b278d6aadf2511a4feb879cba573854443423) for the transaction on Etherscan whose example EVM trace is given above.

### **`SUICIDE`**

Captured when a smart contract is destroyed, which transfers the contract's current balance to a specified `address` and clear the contract's data, freeing up memory on-chain. The freed space on-chain is processed as a refund towards the total gas cost for completing the transaction.

**Structure**

* `action`

  * `address`: address of contract to destroy
  * `refundAddress`: address to send the remainder of the contract `balance` to
  * `balance`: remaining balance in the contract

* `blockHash`: block hash the transaction was included in

* `blockNumber`: block number the transaction was included in

* `result:` `null` for `SUICIDE` actions

* `subtraces`: number of child traces of the given trace

* `traceAddress`: index for the given trace in the trace tree

* `transactionHash`: hash for the transaction

* `transactionPosition`: position (or index) of transaction in the block

* `type`: type of the action, in this case, `SUICIDE`

**Example:**

<CodeGroup>
  ```json suicide-evm-trace.json
  {
      "action": {
        "address": "0x87051f6ba0562fdb0485763562bf34cb2ad705b1",
        "refundAddress": "0x000000000000000000000000000000000000dead",
        "balance": "0x0"
      },
      "blockHash": "0x6d00f7707938cca36b0730d8f7f090543242002b6fa0fe94bf85b9ab02e6bed6",
      "blockNumber": 4000036,
      "result": null,
      "subtraces": 0,
      "traceAddress": [
        1,
        2,
        2
      ],
      "transactionHash": "0xbc15addb97490a168dc1d099ab8537caf2e4ff7d1deeff6d685d2d594a750037",
      "transactionPosition": 45,
      "type": "suicide"
    },
  ```
</CodeGroup>

Here is the [link](https://etherscan.io/tx/0xbc15addb97490a168dc1d099ab8537caf2e4ff7d1deeff6d685d2d594a750037) for the transaction on Etherscan whose example EVM trace is given above.

### **`CALL`**

Used for transferring ETH between [externally owned accounts](/docs/web3-glossary#externally-owned-account) (EOAs) or to call a smart contract function.

**Structure**

* `action`

  * `from`: address of the sender

  * `callType`: type of `CALL`, can be any of the following:

    * `call`
    * `delegatecall`
    * `callcode`
    * `staticcall`

  * `gas`: gas included in the transaction

  * `input`: the specific function to call on the contract with parameters specified, encoded. For transfers to an EOA, `input` will be `0x`

  * `to`: address the transaction is directed.

  * `value`: the amount of value to be transferred

* `blockHash`: block hash the transaction was included in

* `blockNumber`: block number the transaction was included in

* `result`

  * `gasUsed`: gas used to execute the transaction
  * `output`: the result of the smart contract function call, encoded. For transfers to an EOA or smart contract, the `output` will be `0x`.

* `subtraces`: number of child traces of the given trace

* `traceAddress`: index for a given trace in the trace tree

* `transactionHash`: hash for the transaction

* `transactionPosition`: position (or index) of transaction in the block

* `type`: type of the action, in this case, `CALL`

**Example:**

<CodeGroup>
  ```json call-evm-trace.json
  {
      "action": {
        "from": "0xbc9f06dd67578b0b8b4d87fda9acde453bc4c067",
        "callType": "call",
        "gas": "0x97478",
        "input": "0xfebefd610000000000000000000000000000000000000000000000000000000000000040cc849afc28894f79411f12309e75c71ded27d1666b75a2423633c204e671cb1e00000000000000000000000000000000000000000000000000000000000000036eaec0ff7c4899bec2db1479d7d195d614ca26819a301523d82daaaaf436122d2ceb36dfa12b359202b4dfd756478988f5023bf7297afa81f563d4b6242e36e707671a8bf38ee483a37feca948997dcfba17b3372e166ba5c824629beeed6b5c",
        "to": "0x6090a6e47849629b7245dfa1ca21d94cd15878ef",
        "value": "0x2386f26fc10000"
      },
      "blockHash": "0x6d00f7707938cca36b0730d8f7f090543242002b6fa0fe94bf85b9ab02e6bed6",
      "blockNumber": 4000036,
      "result": {
        "gasUsed": "0x7ad71",
        "output": "0x"
      },
      "subtraces": 4,
      "traceAddress": [],
      "transactionHash": "0x552b31a3a9c92577d65db62cf9f729e81571e10cad90e356423adcfa2caebacc",
      "transactionPosition": 71,
      "type": "call"
    }
  ```
</CodeGroup>

Here is the [link](https://etherscan.io/tx/0x552b31a3a9c92577d65db62cf9f729e81571e10cad90e356423adcfa2caebacc) for the transaction on Etherscan whose example EVM trace is given above.

## How to read `traceAddress`?

Traces are structured in a tree format. This helps in better understanding the flow of the transaction. The `traceAddress` field represents the position of the given trace in the tree. An empty array represents the root of the tree (the first trace). Furthermore, traces which are captured due to the first trace have their `traceAddress` in \[0], \[1], \[2] etc. format.

Here is a diagram of `traceAddress` results to help understand how to read this position:

![](https://alchemyapi-res.cloudinary.com/image/upload/v1764193606/docs/api-reference/trace-api/trace-api-resources/6c52e64-Reading_Trace_Tree.png "Reading_Trace_Tree.png")

# Applications of EVM Traces

There are many use cases for EVM traces some of them are listed below:

### **Transaction Tracers**

Etherscan and other transaction tracers help us better understand the flow of a transaction. They extract the EVM traces for a transaction and display them in a way that’s readable by us. For example here is the result for a USDT transfer transaction trace:

![](https://alchemyapi-res.cloudinary.com/image/upload/v1764193606/docs/api-reference/trace-api/trace-api-resources/f6f173b-txs-fyi.png "txs-fyi.png")

As you can see it’s clear from the execution trace that the caller called the transfer function of the `TetherToken` contract and the contract transferred 285 USDT from the caller to the target address.

### **Debugging Transactions**

When a transaction fails, you can find the reason for the failure of the transaction using EVM traces. For example, in the trace image below you can see that the transaction failed due to an "Out of gas" exception, which means that there was not enough gas to complete the transaction.

![](https://alchemyapi-res.cloudinary.com/image/upload/v1764193607/docs/api-reference/trace-api/trace-api-resources/aa4d8bc-debugged-transaction.png "debugged-transaction.png")

Here is the [link](https://etherscan.io/tx/0xda8c0b80d8e240a83c8f6b067c4656babeb13e8e0ece4fd4292aa06252f1285c) to the above-defined transaction on Etherscan.

### **Contract Performance Analysis**

Transaction traces can be used to analyze the performance of smart contracts by looking at the number of actions it takes for each transaction to be processed. This information can be used to identify bottlenecks and optimize the contract for better performance.

# How to retrieve EVM traces?

There are several ways to retrieve EVM traces of a transaction.

1. **Using Alchemy APIs:** Alchemy manages trace-enabled nodes and offers API endpoints to collect transaction traces. This is the simplest way of retrieving EVM traces since running your own node requires a lot of resources and maintenance. You can either use the [Trace API](/docs/reference/trace-api-quickstart) endpoints or the [Debug API](/docs/reference/debug-api-endpoints) endpoints to get the transaction traces. For getting the transaction traces using a transaction hash, you can use the [trace\_transaction](/docs/reference/trace-transaction) method.

2. **Replaying the transaction in a full/archive node:** Ethereum clients have methods that allow them to re-run transactions that have been executed previously. They collect traces from these transactions in order to get results. Even though it takes time to retrieve the results, nodes are not required to store the traces as long as they have enough information to run the transaction.

3. **Running an archive node with traces enabled:** Ethereum clients support running nodes with traces enabled. This allows nodes to store traces so that they can be retrieved quickly without having to re-execute the transaction. However, this comes at the expense of higher costs and slower node performance.

# Conclusion

In conclusion, EVM transaction traces are a valuable tool for debugging smart contracts. They provide a step-by-step record of the execution of a contract and can be used to identify errors and optimize code.

------

# Trace API vs. Debug API

> The differences between the Trace API by Openethereum and the Debug API by Geth

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Prerequisites

Before reading this article you should know about [Ethereum Clients](https://www.alchemy.com/overviews/execution-layer-and-consensus-layer-node-clients) and [EVM Traces](/docs/reference/what-are-evm-traces).

# Introduction

Geth and Openethereum are two popular Ethereum clients. In this article, we'll compare and contrast the [debug API](/docs/reference/debug-api-endpoints) offered by Geth with the [trace API](/docs/reference/trace-api-quickstart) offered by Openethereum and Erigon.

# Debug API

The [Debug API](/docs/reference/debug-api-endpoints) is a set of RPC methods developed by the Go-Ethereum team that provide deeper insights into transaction processing. Some common debug API methods are:

1. [debug\_traceTransaction](/docs/reference/debug-tracetransaction)
2. [debug\_traceCall](/docs/reference/debug-tracecall)
3. [debug\_traceBlockByNumber](/docs/reference/debug-traceblockbynumber)
4. [debug\_traceBlockByHash](/docs/reference/debug-traceblockbyhash)

# Trace API

[Trace API Quickstart](/docs/reference/trace-api-quickstart) is Openethereum's equivalent to Geth's Debug API. It is also a set of RPC methods that provide deeper insights into transaction processing. Some common Trace API methods are:

1. [trace\_transaction](/docs/reference/trace-transaction)
2. [trace\_call](/docs/reference/trace-call)
3. [trace\_block](/docs/reference/trace-block)
4. [trace\_filter](/docs/reference/trace-filter)
5. [trace\_get](/docs/reference/trace-get)
6. [trace\_rawTransaction](/docs/reference/trace-rawtransaction)
7. [trace\_replayBlockTransactions](/docs/reference/trace-replayblocktransactions)
8. [trace\_replayTransaction](/docs/reference/trace-replaytransaction)

# Difference between Trace API and Debug API

1. Geth offers debug API while Trace API is offered by Openethereum and Erigon.
2. Debug API has more methods than Trace API. [Here](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug) you can find a list of all the methods that Debug API supports.
3. Debug API is more accessible than Trace API as the majority of the Ethereum nodes run the Geth client.
4. Trace API does not include calls to the 9 precompiled contracts specified in the Ethereum chain specification, while debug API does.

<Info>
  Precompiled contracts are a feature of the Ethereum Virtual Machine (EVM) that allow for efficient execution of certain computationally expensive operations. These contracts are built into the EVM and can be called by other contracts to perform specific tasks. They are specified as a part of the Ethereum chain specification, and their addresses are hardcoded into the EVM.

  Currently, there are nine precompiled contracts in the Ethereum network. These precompiled contracts can be called by other smart contracts, and the gas cost of executing them is determined by the size of the input data, which is fixed and known in advance. It means that the execution cost of these contracts is constant, regardless of the specific input provided. This is useful for operations that are known to be computationally expensive, such as elliptic curve operations, modular exponentiation, and hash calculations.
</Info>

5. Trace API includes REWARDS for miners in the trace, but debug API does not.
6. The representation of the callstack is different between Trace and Debug API, trace API includes a field called [traceAddress](/docs/reference/what-are-evm-traces#how-to-read-traceaddress) which gives the exact location of the call trace, while the call stack is nested in the response in debug API.
7. The way error handling is done is different in Trace and Debug API, trace API uses [custom](https://github.com/erigontech/erigon/blob/main/rpc/jsonrpc/trace_api.go) error handling while debug API uses [predefined constants](https://github.com/ethereum/go-ethereum/blob/1fa91729f2a591df2baf2dc77e81711a6e61c028/core/vm/errors.go) to represent errors that can occur during EVM execution.

![6144](https://alchemyapi-res.cloudinary.com/image/upload/v1764192958/docs/api-reference/trace-api/trace-api-resources/65b8e7b-eth-nodes-illustration.png "eth-nodes-illustration.png")

------

# What is trace_transaction?

> Learn what the trace_transaction method is, how to use it on EVM blockchains, and test an example use case.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Prerequisites

Before reading this article you should have a clear understanding of [EVM Traces](/docs/reference/what-are-evm-traces).

# What is `trace_transaction`?

`trace_transaction` is an RPC method exposed by the Openethereum and Erigon [Ethereum clients](https://www.alchemy.com/overviews/execution-layer-and-consensus-layer-node-clients). You can get the EVM traces of a previously executed transaction using this method. This can be useful for debugging purposes, or for understanding how a transaction works.

## Parameters

This method only takes one parameter which is the transaction hash of the transaction whose traces you wish to get:

1. `Hash` - Transaction hash

<CodeGroup>
  ```json params
  params: ["0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3"]
  ```
</CodeGroup>

## Response

This method returns the traces of the given transaction as a response:

* `array` - Traces of the given transaction

# How to use trace\_transaction

To use the [trace\_transaction](/docs/reference/trace-transaction) method you need to be in pay as you go or enterprise tier. [Sign up for Alchemy](https://dashboard.alchemy.com/signup) or [upgrade your account](https://dashboard.alchemy.com/settings/billing).

You can call the [trace\_transaction](/docs/reference/trace-transaction) method by providing the transaction hash of the transaction you wish to trace. You can find this by looking up the transaction on a block explorer. Once you have the transaction hash, you can call the "trace\_transaction" method with it as follows:

## Request

<CodeGroup>
  ```curl cURL
  curl https://eth-mainnet.g.alchemy.com/v2/your-api-key \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"method":"trace_transaction","params":["0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3"],"id":1,"jsonrpc":"2.0"}'
  ```

  ```http postman
  URL: https://eth-mainnet.g.alchemy.com/v2/your-api-key
  RequestType: POST
  Body: 
  {
      "jsonrpc":"2.0",
      "method":"trace_transaction",
      "params":["0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3"],
      "id":1
  }
  ```

  ```javascript ethers.js
  const ethers = require("ethers");
  (async () => {
    const provider = new ethers.providers.JsonRpcProvider("https://eth-mainnet.g.alchemy.com/v2/your-api-key");
    const transaction = await provider.send("trace_transaction", [
      "0x3277c743c14e482243862c03a70e83ccb52e25cb9e54378b20a8303f15cb985d",
    ]);
    console.log(transaction);
  })();
  ```

  ```python web3py
  from web3 import HTTPProvider

  client = HTTPProvider('https://eth-mainnet.g.alchemy.com/v2/your-api-key/')
  result = client.make_request("trace_transaction", ["0x3277c743c14e482243862c03a70e83ccb52e25cb9e54378b20a8303f15cb985d"])
  print(result)
  ```
</CodeGroup>

## Response

<CodeGroup>
  ```json response
  {
    "jsonrpc": "2.0",
    "result": [
      {
        "action": {
          "callType": "call",
          "from": "0x83806d539d4ea1c140489a06660319c9a303f874",
          "gas": "0x1a1f8",
          "input": "0x",
          "to": "0x1c39ba39e4735cb65978d4db400ddd70a72dc750",
          "value": "0x7a16c911b4d00000"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": {
          "gasUsed": "0x2982",
          "output": "0x"
        },
        "subtraces": 2,
        "traceAddress": [],
        "transactionHash": "0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",
        "transactionPosition": 2,
        "type": "call"
      },
      {
        "action": {
          "callType": "call",
          "from": "0x1c39ba39e4735cb65978d4db400ddd70a72dc750",
          "gas": "0x13e99",
          "input": "0x16c72721",
          "to": "0x2bd2326c993dfaef84f696526064ff22eba5b362",
          "value": "0x0"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": {
          "gasUsed": "0x183",
          "output": "0x0000000000000000000000000000000000000000000000000000000000000001"
        },
        "subtraces": 0,
        "traceAddress": [
          0
        ],
        "transactionHash": "0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",
        "transactionPosition": 2,
        "type": "call"
      },
      {
        "action": {
          "callType": "call",
          "from": "0x1c39ba39e4735cb65978d4db400ddd70a72dc750",
          "gas": "0x8fc",
          "input": "0x",
          "to": "0x70faa28a6b8d6829a4b1e649d26ec9a2a39ba413",
          "value": "0x7a16c911b4d00000"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": {
          "gasUsed": "0x0",
          "output": "0x"
        },
        "subtraces": 0,
        "traceAddress": [
          1
        ],
        "transactionHash": "0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",
        "transactionPosition": 2,
        "type": "call"
      }
    ],
    "id": 0
  }
  ```
</CodeGroup>

Here is the [link](https://etherscan.io/tx/0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3) to the transaction on Etherscan whose EVM trace is given above in the Response.

# Use Cases

### **Understanding/Debugging a transaction**

You can get the whole trace tree for a transaction and analyze what exactly happened during the transaction execution. The trace tree also returns the gas used for each action, the output values, and the revert reason (if the transaction failed). For example, in the trace image below you can see that the transaction failed due to an "Out of gas" exception, which means that there was not enough gas to complete the transaction.

![2000](https://alchemyapi-res.cloudinary.com/image/upload/v1764192960/docs/api-reference/trace-api/trace-api-resources/1d84a56-gas-error.png "gas-error.png")

Here is the [link](https://etherscan.io/tx/0xda8c0b80d8e240a83c8f6b067c4656babeb13e8e0ece4fd4292aa06252f1285c) to the above-defined transaction on Etherscan.

### **Transaction Tracers**

You can get the traces for a previously executed transaction using `trace_call`. Transaction tracers help us better understand the flow of a transaction. They extract the EVM traces for a transaction and display them in a way that’s readable by us.

![1998](https://alchemyapi-res.cloudinary.com/image/upload/v1764192960/docs/api-reference/trace-api/trace-api-resources/3571567-txs-fyi.png "txs-fyi.png")

As you can see it’s clear from the execution trace that the caller called the transfer function of the TetherToken contract and the contract transferred 285 USDT from the caller to the target address.

### **Contract Performance Analysis**

Transaction traces can be used to analyze the performance of smart contracts by looking at the number of actions it takes for each transaction to be processed. This information can be used to identify bottlenecks and optimize the contract for better performance.

# Conclusion

In conclusion, the `trace_transaction` method is a valuable tool for debugging transactions. It provides a step-by-step record of the execution of a transaction and can be used to identify errors and optimize code.

------

# What is trace_block?

> Learn what the trace_block method is, how to use it on EVM blockchains, and test an example use case.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Prerequisites

Before reading this article you should have a clear understanding of [EVM Traces](/docs/reference/what-are-evm-traces).

# What is `trace_block`?

`trace_block` is an RPC method exposed by the Openethereum and Erigon [Ethereum clients](https://www.alchemy.com/overviews/execution-layer-and-consensus-layer-node-clients). It can be used to get a trace of all the transactions in a given block. This can be useful for debugging purposes or for analyzing the behavior of a blockchain.

## Parameters

1. `Quantity` or `Tag` - Integer formatted as a hex string that represents the block number, or the string `earliest`, `latest`, or `pending`.

* `earliest`: The lowest numbered block the client has available. Intuitively, you can think of this as the first block created.

* `latest`: The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions.

* `pending`: A sample next block built by the client on top of the latest and containing the set of transactions usually taken from the local mempool. Intuitively, you can think of these as blocks that have not been mined yet.

<CodeGroup>
  ```json params
  params: ['0xccb93d']
  ```
</CodeGroup>

## Response

* `array` - An array of block traces. It includes the traces for every transaction in the given block.

# How to Use trace\_block

To use the [trace\_block](/docs/reference/trace-block) method you need to be in pay as you go or enterprise tier. [Sign up for Alchemy](https://dashboard.alchemy.com/signup) or [upgrade your account](https://dashboard.alchemy.com/settings/billing).

You can call the [trace\_block](/docs/reference/trace-block) method, by providing an integer formatted as a hex string that represents the block number for which you wish to make the request. Once you have the block number (formatted as a hex string), you can call the "trace\_block" method with it as follows:

## Request

<CodeGroup>
  ```curl cURL
  curl https://eth-mainnet.g.alchemy.com/v2/your-api-key \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"method":"trace_block","params":["0xccb93d"],"id":1,"jsonrpc":"2.0"}'
  ```

  ```text postman
  URL: https://eth-mainnet.g.alchemy.com/v2/your-api-key
  RequestType: POST
  Body: 
  {
      "jsonrpc":"2.0",
      "method":"trace_block",
      "params":["0xccb93d"],
      "id":1
  }
  ```

  ```javascript ethers.js
  const ethers = require("ethers");
  (async () => {
    const provider = new ethers.providers.JsonRpcProvider("https://eth-mainnet.g.alchemy.com/v2/your-api-key");
    const block = await provider.send("trace_block", ["0xccb93d"]);
    console.log(block);
  })();
  ```

  ```python web3py
  from web3 import HTTPProvider

  client = HTTPProvider('https://eth-mainnet.g.alchemy.com/v2/your-api-key')
  result = client.make_request('trace_block', ['0xccb93d'])
  print(result)
  ```
</CodeGroup>

## Response

<CodeGroup>
  ```json response
  {
    "id": 1,
    "jsonrpc": "2.0",
    "result": [
      {
  			"action":{
  				"from":"0xe860d18528def30f6351308e71629e37fdbea70c"
  				"gas":"0x1e544e"
  				"init":"0x60806040523480156200001157600080fd5b50604051620026e8380380620026e8833981810160405260408110156200003757600080fd5b508051602090910151600080546001600160a01b031916331790558162000067816001600160e01b036200008416565b506200007c816001600160e01b03620000f316565b505062000175565b60028054604080518082018252600161ffff80851691909101168082526001600160a01b0395909516602091820181905261ffff19909316851762010000600160b01b0319166201000084021790935560009384526004909252912080546001600160a01b0319169091179055565b6000546001600160a01b0316331462000153576040805162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b61256380620001856000396000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c80638f6b4d91116100e3578063bc43cbaf1161008c578063f2fde38b11610066578063f2fde38b1461042b578063f8a2abd31461045e578063feaf968c146104915761018d565b8063bc43cbaf146103fa578063c159730414610402578063e8c4be30146104235761018d565b8063a928c096116100bd578063a928c0961461038d578063b5ab58dc146103c0578063b633620c146103dd5761018d565b80638f6b4d911461032957806392eefe9b146103315780639a6fc8f5146103645761018d565b80636001ac531161014557806379ba50971161011f57806379ba50971461030f5780638205bf6a146103195780638da5cb5b146103215761018d565b80636001ac5314610222578063668a0f021461028a5780637284e416146102925761018d565b806350d25bcd1161017657806350d25bcd146101e157806354fd4d50146101fb57806358303b10146102035761018d565b8063245a7bfc14610192578063313ce567146101c3575b600080fd5b61019a610499565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101cb6104bb565b6040805160ff9092168252519081900360200190f35b6101e9610559565b60408051918252519081900360200190f35b6101e96106e0565b61020b61074d565b6040805161ffff9092168252519081900360200190f35b61024b6004803603602081101561023857600080fd5b503569ffffffffffffffffffff16610757565b6040805169ffffffffffffffffffff96871681526020810195909552848101939093526060840191909152909216608082015290519081900360a00190f35b6101e9610978565b61029a610af9565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102d45781810151838201526020016102bc565b50505050905090810190601f1680156103015780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610317610c76565b005b6101e9610d78565b61019a610ef9565b61024b610f15565b6103176004803603602081101561034757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611134565b61024b6004803603602081101561037a57600080fd5b503569ffffffffffffffffffff16611201565b610317600480360360208110156103a357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661138b565b6101e9600480360360208110156103d657600080fd5b50356114ce565b6101e9600480360360208110156103f357600080fd5b5035611657565b61019a6117d9565b61019a6004803603602081101561041857600080fd5b503561ffff166117f5565b61019a61181d565b6103176004803603602081101561044157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611839565b6103176004803603602081101561047457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611935565b61024b611a02565b60025462010000900473ffffffffffffffffffffffffffffffffffffffff1690565b6000600260000160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561052857600080fd5b505afa15801561053c573d6000803e3d6000fd5b505050506040513d602081101561055257600080fd5b5051905090565b60055460009073ffffffffffffffffffffffffffffffffffffffff168015806106675750604080517f6b14daf8000000000000000000000000000000000000000000000000000000008152336004820181815260248301938452366044840181905273ffffffffffffffffffffffffffffffffffffffff861694636b14daf8946000939190606401848480828437600083820152604051601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909201965060209550909350505081840390508186803b15801561063a57600080fd5b505afa15801561064e573d6000803e3d6000fd5b505050506040513d602081101561066457600080fd5b50515b6106d257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f206163636573730000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6106da611b8b565b91505090565b6000600260000160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166354fd4d506040518163ffffffff1660e01b815260040160206040518083038186803b15801561052857600080fd5b60025461ffff1690565b600554600090819081908190819073ffffffffffffffffffffffffffffffffffffffff1680158061086d5750604080517f6b14daf8000000000000000000000000000000000000000000000000000000008152336004820181815260248301938452366044840181905273ffffffffffffffffffffffffffffffffffffffff861694636b14daf8946000939190606401848480828437600083820152604051601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909201965060209550909350505081840390508186803b15801561084057600080fd5b505afa158015610854573d6000803e3d6000fd5b505050506040513d602081101561086a57600080fd5b50515b6108d857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f206163636573730000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60035473ffffffffffffffffffffffffffffffffffffffff1661095c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4e6f2070726f706f7365642061676772656761746f722070726573656e740000604482015290519081900360640190fd5b61096587611bf8565b939b929a50909850965090945092505050565b60055460009073ffffffffffffffffffffffffffffffffffffffff16801580610a865750604080517f6b14daf8000000000000000000000000000000000000000000000000000000008152336004820181815260248301938452366044840181905273ffffffffffffffffffffffffffffffffffffffff861694636b14daf8946000939190606401848480828437600083820152604051601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909201965060209550909350505081840390508186803b158015610a5957600080fd5b505afa158015610a6d573d6000803e3d6000fd5b505050506040513d6020811015610a8357600080fd5b50515b610af157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f206163636573730000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6106da611d57565b6060600260000160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637284e4166040518163ffffffff1660e01b815260040160006040518083038186803b158015610b6657600080fd5b505afa158015610b7a573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526020811015610bc157600080fd5b8101908080516040519392919084640100000000821115610be157600080fd5b908301906020820185811115610bf657600080fd5b8251640100000000811182820188101715610c1057600080fd5b82525081516020918201929091019080838360005b83811015610c3d578181015183820152602001610c25565b50505050905090810190601f168015610c6a5780820380516001836020036101000a031916815260200191505b50604052505050905090565b60015473ffffffffffffffffffffffffffffffffffffffff163314610cfc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015290519081900360640190fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60055460009073ffffffffffffffffffffffffffffffffffffffff16801580610e865750604080517f6b14daf8000000000000000000000000000000000000000000000000000000008152336004820181815260248301938452366044840181905273ffffffffffffffffffffffffffffffffffffffff861694636b14daf8946000939190606401848480828437600083820152604051601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909201965060209550909350505081840390508186803b158015610e5957600080fd5b505afa158015610e6d573d6000803e3d6000fd5b505050506040513d6020811015610e8357600080fd5b50515b610ef157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f206163636573730000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6106da611e2e565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b600554600090819081908190819073ffffffffffffffffffffffffffffffffffffffff1680158061102b5750604080517f6b14daf8000000000000000000000000000000000000000000000000000000008152336004820181815260248301938452366044840181905273ffffffffffffffffffffffffffffffffffffffff861694636b14daf8946000939190606401848480828437600083820152604051601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909201965060209550909350505081840390508186803b158015610ffe57600080fd5b505afa158015611012573d6000803e3d6000fd5b505050506040513d602081101561102857600080fd5b50515b61109657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f206163636573730000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60035473ffffffffffffffffffffffffffffffffffffffff1661111a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4e6f2070726f706f7365642061676772656761746f722070726573656e740000604482015290519081900360640190fd5b611122611e9b565b95509550955095509550509091929394565b60005473ffffffffffffffffffffffffffffffffffffffff1633146111ba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015290519081900360640190fd5b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600554600090819081908190819073ffffffffffffffffffffffffffffffffffffffff168015806113175750604080517f6b14daf8000000000000000000000000000000000000000000000000000000008152336004820181815260248301938452366044840181905273ffffffffffffffffffffffffffffffffffffffff861694636b14daf8946000939190606401848480828437600083820152604051601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909201965060209550909350505081840390508186803b1580156112ea57600080fd5b505afa1580156112fe573d6000803e3d6000fd5b505050506040513d602081101561131457600080fd5b50515b61138257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f206163636573730000000000000000000000000000000000000000000000604482015290519081900360640190fd5b61096587611fe4565b60005473ffffffffffffffffffffffffffffffffffffffff16331461141157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015290519081900360640190fd5b60035473ffffffffffffffffffffffffffffffffffffffff82811691161461149a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f496e76616c69642070726f706f7365642061676772656761746f720000000000604482015290519081900360640190fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001690556114cb81612117565b50565b60055460009073ffffffffffffffffffffffffffffffffffffffff168015806115dc5750604080517f6b14daf8000000000000000000000000000000000000000000000000000000008152336004820181815260248301938452366044840181905273ffffffffffffffffffffffffffffffffffffffff861694636b14daf8946000939190606401848480828437600083820152604051601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909201965060209550909350505081840390508186803b1580156115af57600080fd5b505afa1580156115c3573d6000803e3d6000fd5b505050506040513d60208110156115d957600080fd5b50515b61164757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f206163636573730000000000000000000000000000000000000000000000604482015290519081900360640190fd5b611650836121de565b9392505050565b60055460009073ffffffffffffffffffffffffffffffffffffffff168015806117655750604080517f6b14daf8000000000000000000000000000000000000000000000000000000008152336004820181815260248301938452366044840181905273ffffffffffffffffffffffffffffffffffffffff861694636b14daf8946000939190606401848480828437600083820152604051601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909201965060209550909350505081840390508186803b15801561173857600080fd5b505afa15801561174c573d6000803e3d6000fd5b505050506040513d602081101561176257600080fd5b50515b6117d057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f206163636573730000000000000000000000000000000000000000000000604482015290519081900360640190fd5b611650836122d8565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60046020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146118bf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015290519081900360640190fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633146119bb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015290519081900360640190fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600554600090819081908190819073ffffffffffffffffffffffffffffffffffffffff16801580611b185750604080517f6b14daf8000000000000000000000000000000000000000000000000000000008152336004820181815260248301938452366044840181905273ffffffffffffffffffffffffffffffffffffffff861694636b14daf8946000939190606401848480828437600083820152604051601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909201965060209550909350505081840390508186803b158015611aeb57600080fd5b505afa158015611aff573d6000803e3d6000fd5b505050506040513d6020811015611b1557600080fd5b50515b611b8357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f206163636573730000000000000000000000000000000000000000000000604482015290519081900360640190fd5b61112261239b565b6000600260000160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166350d25bcd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561052857600080fd5b600354600090819081908190819073ffffffffffffffffffffffffffffffffffffffff16611c8757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4e6f2070726f706f7365642061676772656761746f722070726573656e740000604482015290519081900360640190fd5b600354604080517f9a6fc8f500000000000000000000000000000000000000000000000000000000815269ffffffffffffffffffff89166004820152905173ffffffffffffffffffffffffffffffffffffffff90921691639a6fc8f59160248082019260a092909190829003018186803b158015611d0457600080fd5b505afa158015611d18573d6000803e3d6000fd5b505050506040513d60a0811015611d2e57600080fd5b508051602082015160408301516060840151608090940151929a91995097509195509350915050565b6000611d61612516565b5060408051808201825260025461ffff81168083526201000090910473ffffffffffffffffffffffffffffffffffffffff16602080840182905284517f668a0f0200000000000000000000000000000000000000000000000000000000815294519394611e1c9463668a0f0292600480840193919291829003018186803b158015611deb57600080fd5b505afa158015611dff573d6000803e3d6000fd5b505050506040513d6020811015611e1557600080fd5b50516124b8565b69ffffffffffffffffffff1691505090565b6000600260000160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638205bf6a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561052857600080fd5b600354600090819081908190819073ffffffffffffffffffffffffffffffffffffffff16611f2a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4e6f2070726f706f7365642061676772656761746f722070726573656e740000604482015290519081900360640190fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b158015611f9257600080fd5b505afa158015611fa6573d6000803e3d6000fd5b505050506040513d60a0811015611fbc57600080fd5b5080516020820151604083015160608401516080909401519299919850965091945092509050565b60008060008060008060006120048869ffffffffffffffffffff166124d8565b61ffff821660009081526004602081905260408083205481517f9a6fc8f500000000000000000000000000000000000000000000000000000000815267ffffffffffffffff86169381019390935290519496509294509092839283928392839273ffffffffffffffffffffffffffffffffffffffff1691639a6fc8f59160248083019260a0929190829003018186803b1580156120a057600080fd5b505afa1580156120b4573d6000803e3d6000fd5b505050506040513d60a08110156120ca57600080fd5b508051602082015160408301516060840151608090940151929850909650945090925090506120fd85858585858c6124e0565b9b509b509b509b509b505050505050505091939590929450565b60028054604080518082018252600161ffff808516919091011680825273ffffffffffffffffffffffffffffffffffffffff9590951660209182018190527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000090931685177fffffffffffffffffffff0000000000000000000000000000000000000000ffff166201000084021790935560009384526004909252912080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055565b600069ffffffffffffffffffff8211156121fa575060006122d3565b600080612206846124d8565b61ffff8216600090815260046020526040902054919350915073ffffffffffffffffffffffffffffffffffffffff168061224657600093505050506122d3565b8073ffffffffffffffffffffffffffffffffffffffff1663b5ab58dc836040518263ffffffff1660e01b8152600401808267ffffffffffffffff16815260200191505060206040518083038186803b1580156122a157600080fd5b505afa1580156122b5573d6000803e3d6000fd5b505050506040513d60208110156122cb57600080fd5b505193505050505b919050565b600069ffffffffffffffffffff8211156122f4575060006122d3565b600080612300846124d8565b61ffff8216600090815260046020526040902054919350915073ffffffffffffffffffffffffffffffffffffffff168061234057600093505050506122d3565b8073ffffffffffffffffffffffffffffffffffffffff1663b633620c836040518263ffffffff1660e01b8152600401808267ffffffffffffffff16815260200191505060206040518083038186803b1580156122a157600080fd5b60008060008060006123ab612516565b5060408051808201825260025461ffff8116825262010000900473ffffffffffffffffffffffffffffffffffffffff166020820181905282517ffeaf968c0000000000000000000000000000000000000000000000000000000081529251919260009283928392839283929163feaf968c9160048083019260a0929190829003018186803b15801561243c57600080fd5b505afa158015612450573d6000803e3d6000fd5b505050506040513d60a081101561246657600080fd5b5080516020820151604083015160608401516080909401518a5193995091975095509193509091506124a190869086908690869086906124e0565b9a509a509a509a509a505050505050509091929394565b67ffffffffffffffff1660409190911b69ffff0000000000000000161790565b604081901c91565b60008060008060006124f2868c6124b8565b8a8a8a6124ff8a8c6124b8565b939f929e50909c509a509098509650505050505050565b60408051808201909152600080825260208201529056fea2646970667358221220c6148a0e63011d3b8b4f67078be31115256b163e26351db6fe3b70d7faf433f964736f6c6343000606003300000000000000000000000049f955caecefad202e5ee002387bee3303b6a7450000000000000000000000000000000000000000000000000000000000000000"
  				"value":"0x0"
  		}
  		"blockHash":"0x2df44a0952881cdb7469324d63f174b92ca9231f3e59d713fc4c5a3340e31d7e"
  		"blockNumber":15947694
  		"result":{
  		"address":"0xc8f19128c2cc35d66d90aa2a5b3254f01f9bfe77"
  		"code":"0x608060405234801561001057600080fd5b506004361061018d5760003560e01c80638f6b4d91116100e3578063bc43cbaf1161008c578063f2fde38b11610066578063f2fde38b1461042b578063f8a2abd31461045e578063feaf968c146104915761018d565b8063bc43cbaf146103fa578063c159730414610402578063e8c4be30146104235761018d565b8063a928c096116100bd578063a928c0961461038d578063b5ab58dc146103c0578063b633620c146103dd5761018d565b80638f6b4d911461032957806392eefe9b146103315780639a6fc8f5146103645761018d565b80636001ac531161014557806379ba50971161011f57806379ba50971461030f5780638205bf6a146103195780638da5cb5b146103215761018d565b80636001ac5314610222578063668a0f021461028a5780637284e416146102925761018d565b806350d25bcd1161017657806350d25bcd146101e157806354fd4d50146101fb57806358303b10146102035761018d565b8063245a7bfc14610192578063313ce567146101c3575b600080fd5b61019a610499565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101cb6104bb565b6040805160ff9092168252519081900360200190f35b6101e9610559565b60408051918252519081900360200190f35b6101e96106e0565b61020b61074d565b6040805161ffff9092168252519081900360200190f35b61024b6004803603602081101561023857600080fd5b503569ffffffffffffffffffff16610757565b6040805169ffffffffffffffffffff96871681526020810195909552848101939093526060840191909152909216608082015290519081900360a00190f35b6101e9610978565b61029a610af9565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102d45781810151838201526020016102bc565b50505050905090810190601f1680156103015780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610317610c76565b005b6101e9610d78565b61019a610ef9565b61024b610f15565b6103176004803603602081101561034757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611134565b61024b6004803603602081101561037a57600080fd5b503569ffffffffffffffffffff16611201565b610317600480360360208110156103a357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661138b565b6101e9600480360360208110156103d657600080fd5b50356114ce565b6101e9600480360360208110156103f357600080fd5b5035611657565b61019a6117d9565b61019a6004803603602081101561041857600080fd5b503561ffff166117f5565b61019a61181d565b6103176004803603602081101561044157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611839565b6103176004803603602081101561047457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611935565b61024b611a02565b60025462010000900473ffffffffffffffffffffffffffffffffffffffff1690565b6000600260000160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561052857600080fd5b505afa15801561053c573d6000803e3d6000fd5b505050506040513d602081101561055257600080fd5b5051905090565b60055460009073ffffffffffffffffffffffffffffffffffffffff168015806106675750604080517f6b14daf8000000000000000000000000000000000000000000000000000000008152336004820181815260248301938452366044840181905273ffffffffffffffffffffffffffffffffffffffff861694636b14daf8946000939190606401848480828437600083820152604051601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909201965060209550909350505081840390508186803b15801561063a57600080fd5b505afa15801561064e573d6000803e3d6000fd5b505050506040513d602081101561066457600080fd5b50515b6106d257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f206163636573730000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6106da611b8b565b91505090565b6000600260000160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166354fd4d506040518163ffffffff1660e01b815260040160206040518083038186803b15801561052857600080fd5b60025461ffff1690565b600554600090819081908190819073ffffffffffffffffffffffffffffffffffffffff1680158061086d5750604080517f6b14daf8000000000000000000000000000000000000000000000000000000008152336004820181815260248301938452366044840181905273ffffffffffffffffffffffffffffffffffffffff861694636b14daf8946000939190606401848480828437600083820152604051601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909201965060209550909350505081840390508186803b15801561084057600080fd5b505afa158015610854573d6000803e3d6000fd5b505050506040513d602081101561086a57600080fd5b50515b6108d857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f206163636573730000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60035473ffffffffffffffffffffffffffffffffffffffff1661095c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4e6f2070726f706f7365642061676772656761746f722070726573656e740000604482015290519081900360640190fd5b61096587611bf8565b939b929a50909850965090945092505050565b60055460009073ffffffffffffffffffffffffffffffffffffffff16801580610a865750604080517f6b14daf8000000000000000000000000000000000000000000000000000000008152336004820181815260248301938452366044840181905273ffffffffffffffffffffffffffffffffffffffff861694636b14daf8946000939190606401848480828437600083820152604051601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909201965060209550909350505081840390508186803b158015610a5957600080fd5b505afa158015610a6d573d6000803e3d6000fd5b505050506040513d6020811015610a8357600080fd5b50515b610af157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f206163636573730000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6106da611d57565b6060600260000160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637284e4166040518163ffffffff1660e01b815260040160006040518083038186803b158015610b6657600080fd5b505afa158015610b7a573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526020811015610bc157600080fd5b8101908080516040519392919084640100000000821115610be157600080fd5b908301906020820185811115610bf657600080fd5b8251640100000000811182820188101715610c1057600080fd5b82525081516020918201929091019080838360005b83811015610c3d578181015183820152602001610c25565b50505050905090810190601f168015610c6a5780820380516001836020036101000a031916815260200191505b50604052505050905090565b60015473ffffffffffffffffffffffffffffffffffffffff163314610cfc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015290519081900360640190fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60055460009073ffffffffffffffffffffffffffffffffffffffff16801580610e865750604080517f6b14daf8000000000000000000000000000000000000000000000000000000008152336004820181815260248301938452366044840181905273ffffffffffffffffffffffffffffffffffffffff861694636b14daf8946000939190606401848480828437600083820152604051601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909201965060209550909350505081840390508186803b158015610e5957600080fd5b505afa158015610e6d573d6000803e3d6000fd5b505050506040513d6020811015610e8357600080fd5b50515b610ef157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f206163636573730000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6106da611e2e565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b600554600090819081908190819073ffffffffffffffffffffffffffffffffffffffff1680158061102b5750604080517f6b14daf8000000000000000000000000000000000000000000000000000000008152336004820181815260248301938452366044840181905273ffffffffffffffffffffffffffffffffffffffff861694636b14daf8946000939190606401848480828437600083820152604051601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909201965060209550909350505081840390508186803b158015610ffe57600080fd5b505afa158015611012573d6000803e3d6000fd5b505050506040513d602081101561102857600080fd5b50515b61109657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f206163636573730000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60035473ffffffffffffffffffffffffffffffffffffffff1661111a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4e6f2070726f706f7365642061676772656761746f722070726573656e740000604482015290519081900360640190fd5b611122611e9b565b95509550955095509550509091929394565b60005473ffffffffffffffffffffffffffffffffffffffff1633146111ba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015290519081900360640190fd5b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600554600090819081908190819073ffffffffffffffffffffffffffffffffffffffff168015806113175750604080517f6b14daf8000000000000000000000000000000000000000000000000000000008152336004820181815260248301938452366044840181905273ffffffffffffffffffffffffffffffffffffffff861694636b14daf8946000939190606401848480828437600083820152604051601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909201965060209550909350505081840390508186803b1580156112ea57600080fd5b505afa1580156112fe573d6000803e3d6000fd5b505050506040513d602081101561131457600080fd5b50515b61138257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f206163636573730000000000000000000000000000000000000000000000604482015290519081900360640190fd5b61096587611fe4565b60005473ffffffffffffffffffffffffffffffffffffffff16331461141157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015290519081900360640190fd5b60035473ffffffffffffffffffffffffffffffffffffffff82811691161461149a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f496e76616c69642070726f706f7365642061676772656761746f720000000000604482015290519081900360640190fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001690556114cb81612117565b50565b60055460009073ffffffffffffffffffffffffffffffffffffffff168015806115dc5750604080517f6b14daf8000000000000000000000000000000000000000000000000000000008152336004820181815260248301938452366044840181905273ffffffffffffffffffffffffffffffffffffffff861694636b14daf8946000939190606401848480828437600083820152604051601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909201965060209550909350505081840390508186803b1580156115af57600080fd5b505afa1580156115c3573d6000803e3d6000fd5b505050506040513d60208110156115d957600080fd5b50515b61164757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f206163636573730000000000000000000000000000000000000000000000604482015290519081900360640190fd5b611650836121de565b9392505050565b60055460009073ffffffffffffffffffffffffffffffffffffffff168015806117655750604080517f6b14daf8000000000000000000000000000000000000000000000000000000008152336004820181815260248301938452366044840181905273ffffffffffffffffffffffffffffffffffffffff861694636b14daf8946000939190606401848480828437600083820152604051601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909201965060209550909350505081840390508186803b15801561173857600080fd5b505afa15801561174c573d6000803e3d6000fd5b505050506040513d602081101561176257600080fd5b50515b6117d057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f206163636573730000000000000000000000000000000000000000000000604482015290519081900360640190fd5b611650836122d8565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60046020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1633146118bf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015290519081900360640190fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633146119bb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015290519081900360640190fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600554600090819081908190819073ffffffffffffffffffffffffffffffffffffffff16801580611b185750604080517f6b14daf8000000000000000000000000000000000000000000000000000000008152336004820181815260248301938452366044840181905273ffffffffffffffffffffffffffffffffffffffff861694636b14daf8946000939190606401848480828437600083820152604051601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909201965060209550909350505081840390508186803b158015611aeb57600080fd5b505afa158015611aff573d6000803e3d6000fd5b505050506040513d6020811015611b1557600080fd5b50515b611b8357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f4e6f206163636573730000000000000000000000000000000000000000000000604482015290519081900360640190fd5b61112261239b565b6000600260000160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166350d25bcd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561052857600080fd5b600354600090819081908190819073ffffffffffffffffffffffffffffffffffffffff16611c8757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4e6f2070726f706f7365642061676772656761746f722070726573656e740000604482015290519081900360640190fd5b600354604080517f9a6fc8f500000000000000000000000000000000000000000000000000000000815269ffffffffffffffffffff89166004820152905173ffffffffffffffffffffffffffffffffffffffff90921691639a6fc8f59160248082019260a092909190829003018186803b158015611d0457600080fd5b505afa158015611d18573d6000803e3d6000fd5b505050506040513d60a0811015611d2e57600080fd5b508051602082015160408301516060840151608090940151929a91995097509195509350915050565b6000611d61612516565b5060408051808201825260025461ffff81168083526201000090910473ffffffffffffffffffffffffffffffffffffffff16602080840182905284517f668a0f0200000000000000000000000000000000000000000000000000000000815294519394611e1c9463668a0f0292600480840193919291829003018186803b158015611deb57600080fd5b505afa158015611dff573d6000803e3d6000fd5b505050506040513d6020811015611e1557600080fd5b50516124b8565b69ffffffffffffffffffff1691505090565b6000600260000160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638205bf6a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561052857600080fd5b600354600090819081908190819073ffffffffffffffffffffffffffffffffffffffff16611f2a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4e6f2070726f706f7365642061676772656761746f722070726573656e740000604482015290519081900360640190fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b158015611f9257600080fd5b505afa158015611fa6573d6000803e3d6000fd5b505050506040513d60a0811015611fbc57600080fd5b5080516020820151604083015160608401516080909401519299919850965091945092509050565b60008060008060008060006120048869ffffffffffffffffffff166124d8565b61ffff821660009081526004602081905260408083205481517f9a6fc8f500000000000000000000000000000000000000000000000000000000815267ffffffffffffffff86169381019390935290519496509294509092839283928392839273ffffffffffffffffffffffffffffffffffffffff1691639a6fc8f59160248083019260a0929190829003018186803b1580156120a057600080fd5b505afa1580156120b4573d6000803e3d6000fd5b505050506040513d60a08110156120ca57600080fd5b508051602082015160408301516060840151608090940151929850909650945090925090506120fd85858585858c6124e0565b9b509b509b509b509b505050505050505091939590929450565b60028054604080518082018252600161ffff808516919091011680825273ffffffffffffffffffffffffffffffffffffffff9590951660209182018190527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000090931685177fffffffffffffffffffff0000000000000000000000000000000000000000ffff166201000084021790935560009384526004909252912080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055565b600069ffffffffffffffffffff8211156121fa575060006122d3565b600080612206846124d8565b61ffff8216600090815260046020526040902054919350915073ffffffffffffffffffffffffffffffffffffffff168061224657600093505050506122d3565b8073ffffffffffffffffffffffffffffffffffffffff1663b5ab58dc836040518263ffffffff1660e01b8152600401808267ffffffffffffffff16815260200191505060206040518083038186803b1580156122a157600080fd5b505afa1580156122b5573d6000803e3d6000fd5b505050506040513d60208110156122cb57600080fd5b505193505050505b919050565b600069ffffffffffffffffffff8211156122f4575060006122d3565b600080612300846124d8565b61ffff8216600090815260046020526040902054919350915073ffffffffffffffffffffffffffffffffffffffff168061234057600093505050506122d3565b8073ffffffffffffffffffffffffffffffffffffffff1663b633620c836040518263ffffffff1660e01b8152600401808267ffffffffffffffff16815260200191505060206040518083038186803b1580156122a157600080fd5b60008060008060006123ab612516565b5060408051808201825260025461ffff8116825262010000900473ffffffffffffffffffffffffffffffffffffffff166020820181905282517ffeaf968c0000000000000000000000000000000000000000000000000000000081529251919260009283928392839283929163feaf968c9160048083019260a0929190829003018186803b15801561243c57600080fd5b505afa158015612450573d6000803e3d6000fd5b505050506040513d60a081101561246657600080fd5b5080516020820151604083015160608401516080909401518a5193995091975095509193509091506124a190869086908690869086906124e0565b9a509a509a509a509a505050505050509091929394565b67ffffffffffffffff1660409190911b69ffff0000000000000000161790565b604081901c91565b60008060008060006124f2868c6124b8565b8a8a8a6124ff8a8c6124b8565b939f929e50909c509a509098509650505050505050565b60408051808201909152600080825260208201529056fea2646970667358221220c6148a0e63011d3b8b4f67078be31115256b163e26351db6fe3b70d7faf433f964736f6c63430006060033"
  		"gasUsed":"0x1e4bb5"
  		}
  		"subtraces":0
  		"traceAddress":[]
  		"transactionHash":"0xfc7345c62b23f39d36ada799dd7cd7fc3a8392365f855be22e1a40e7eecdea33"
  		"transactionPosition":0
  		"type":"create"
  		},
      { ... }
    ]
  }
  ```
</CodeGroup>

The full response can't be included here due to it being so big since it contains the traces for all the transactions included in the given block. If you wish to inspect the full response you can do so on the [Alchemy Composer](https://composer.alchemy.com/?composer_state=%7B%22network%22%3A0%2C%22methodName%22%3A%22trace_transaction%22%2C%22paramValues%22%3A%5B%220x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3%22%5D%7D).

# Use Case

The `trace_block` method is used to analyze the behavior of a blockchain. For example, you can find the average `gasPrice` for a block by getting the traces of all the transactions in the block (traces contain the `gasPrice` for transactions). Then you can get the average `gasPrice` block by block and form a graph to visualize how the `gasPrice` has changed over time.

Graphing the average gas prices over time has already been done by websites like YCHARTS.

# Conclusion

In conclusion, the `trace_block` method is a valuable tool that can be used for analyzing the behavior of an EVM-compatible blockchain.

------

# What is trace_filter?

> Learn what the trace_filter method is, how to use it on EVM blockchains, and test an example use case.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Prerequisites

Before reading this article you should have a clear understanding of [EVM Traces](/docs/reference/what-are-evm-traces).

# What is `trace_filter`?

`trace_filter` is an RPC method exposed by the Openethereum and Erigon [Ethereum clients](https://www.alchemy.com/overviews/execution-layer-and-consensus-layer-node-clients). It allows you to get the traces of multiple transactions in a single request based on the filters provided by you. You can specify the `from` and `to` block numbers, and the `from` and `to` addresses. This is useful for debugging purposes or for monitoring specific addresses.

## **Parameters**

1. `Object` - The filter object

   * `fromBlock`: `Quantity` or `Tag` - (optional) From this block.
   * `toBlock`: `Quantity` or `Tag` - (optional) To this block.
   * `fromAddress`: `Array` - (optional) Sent from these addresses.
   * `toAddress`: `Array` - (optional) Sent to these addresses.
   * `after`: `Quantity` - (optional) The offset trace number.
   * `count`: `Quantity` - (optional) Integer number of traces to return.

## Response

* `array` - Traces of transactions based on the given filters.

# How to use trace\_filter

To use the [trace\_filter](/docs/reference/trace-filter) method you need to be in pay as you go or enterprise tier. [Sign up for Alchemy](https://dashboard.alchemy.com/signup) or [upgrade your account](https://dashboard.alchemy.com/settings/billing).

You can call the `trace_filter` method by passing a filter object as a parameter to it. An example request and response are given below:

## Request

This request will return traces of all the transactions sent by [0xEdC763b3e418cD14767b3Be02b667619a6374076](https://etherscan.io/txs?a=0xEdC763b3e418cD14767b3Be02b667619a6374076\&f=2) address after the block number `0xccb942` (13416770).

<CodeGroup>
  ```curl cURL
  curl https://eth-mainnet.g.alchemy.com/v2/your-api-key/ \
    -X POST \
    -H "Content-Type: application/json" \
    --data '{"method":"trace_filter","params":[{"fromBlock":"0xccb942","toBlock":"latest","fromAddress":["0xEdC763b3e418cD14767b3Be02b667619a6374076"]}],"id":1,"jsonrpc":"2.0"}'
  ```

  ```http postman
  URL: https://eth-mainnet.g.alchemy.com/v2/your-api-key
  RequestType: POST
  Body: 
  {
      "jsonrpc":"2.0",
      "method":"trace_filter",
      "params":[{"fromBlock":"0xccb942","toBlock":"latest","fromAddress":["0xEdC763b3e418cD14767b3Be02b667619a6374076"]}],
      "id":1
  }
  ```

  ```javascript ethers
  const ethers = require("ethers");
  (async () => {
    const provider = new ethers.providers.JsonRpcProvider("https://eth-mainnet.g.alchemy.com/v2/your-api-key/");
    const trace = await provider.send("trace_filter", [
      {
        "fromBlock": "0xccb942",
        "toBlock": "latest",
        "fromAddress": ["0xEdC763b3e418cD14767b3Be02b667619a6374076"],
      },
    ]);
    console.log(trace);
  })();
  ```

  ```python web3py
  from web3 import HTTPProvider

  client = HTTPProvider('https://eth-mainnet.g.alchemy.com/v2/your-api-key/')
  result = client.make_request('trace_filter', [{
      "fromBlock": "0xccb942",
      "toBlock": "latest",
      "fromAddress": ['0xEdC763b3e418cD14767b3Be02b667619a6374076'],
  }])
  print(result)
  ```
</CodeGroup>

## Response

<CodeGroup>
  ```json response
  [
    {
      "action": {
        "from": "0xedc763b3e418cd14767b3be02b667619a6374076",
        "callType": "call",
        "gas": "0x8462",
        "input": "0x095ea7b30000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
        "to": "0x7ff4169a6b5122b664c51c95727d87750ec07c84",
        "value": "0x0"
      },
      "blockHash": "0x351e7c06ec010c8f7e7358eb580238dd23e1e129be96822aa93ebb6da08558e6",
      "blockNumber": 13416771,
      "result": {
        "gasUsed": "0x6009",
        "output": "0x0000000000000000000000000000000000000000000000000000000000000001"
      },
      "subtraces": 0,
      "traceAddress": [],
      "transactionHash": "0x054bbb9fbb855bf23f755e548c7409f45fc5eff8a824b2ad06380bc038d7b049",
      "transactionPosition": 54,
      "type": "call"
    },
    {
      "action": {
        "from": "0xedc763b3e418cd14767b3be02b667619a6374076",
        "callType": "call",
        "gas": "0x7063a",
        "input": "0x2440fdc2000000000000000000000000edc763b3e418cd14767b3be02b667619a6374076000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000003753ab94a123aa7960",
        "to": "0xd2f6b9225ed446c1b445ac0656c8ccc97d096fb8",
        "value": "0x0"
      },
      "blockHash": "0xa6c8748136b5d22aabff34f71357f85911eddc5e772258f48d7d14fe30d2f87f",
      "blockNumber": 13556916,
      "result": {
        "gasUsed": "0x4926c",
        "output": "0x00000000000000000000000000000000000000000000000000000000000009f7"
      },
      "subtraces": 1,
      "traceAddress": [],
      "transactionHash": "0x1ff276fd4bbf32623b83653eb07352f76c5adf258d42190693d46669168b227a",
      "transactionPosition": 237,
      "type": "call"
    },
    {
      "action": {
        "from": "0xedc763b3e418cd14767b3be02b667619a6374076",
        "callType": "call",
        "gas": "0x0",
        "input": "0x",
        "to": "0xdbb2126e69d73203024002f427758557d2994c5e",
        "value": "0x611e091b07f64f"
      },
      "blockHash": "0x47b76a1db0bc39efc5f3fe9b2fe7975c4fbaa7de7f767a2cd4c345eac18a1e99",
      "blockNumber": 15561356,
      "result": {
        "gasUsed": "0x0",
        "output": "0x"
      },
      "subtraces": 0,
      "traceAddress": [],
      "transactionHash": "0x1c668319a54e2fc73241ae6f930deb824a34e48738e79cd8f5391e3c9ce0154f",
      "transactionPosition": 98,
      "type": "call"
    }
  ]
  ```
</CodeGroup>

As you can see that only three transactions are sent by this address after the block number `13416770`, that's why only three traces are returned in the response which are traces of these three transactions.

![6144](https://alchemyapi-res.cloudinary.com/image/upload/v1764192961/docs/api-reference/trace-api/trace-api-resources/3985069-transactions-sent.png "transactions-sent.png")

# Use Cases

The `trace_filter` method is useful for filtering traces based on certain criteria. You can use it to find traces that involve a particular address or to find traces that involve a particular contract.

An example is given above in the ["How to use trace\_filter"](#how-to-use-trace_filter) section where we filter the traces of all the transactions sent by an address after a particular block number.

# Conclusion

In conclusion, the `trace_filter` method is a valuable tool that can be used for monitoring the on-chain activity of addresses.

------

# trace_call vs debug_traceCall

> The differences between the trace_call method by OpenEthereum and the debug_traceCall method by Geth

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Introduction

Geth and OpenEthereum are two popular Ethereum clients. In this article, we'll compare and contrast the [trace\_call](/docs/reference/trace-call) method offered by OpenEthereum with the [debug\_traceCall](/docs/reference/debug-tracecall) method offered by Geth. Both of these methods are used for transaction tracing.

<Info>
  The `trace_call` method was initially supported by the OpenEthereum client but now OpenEthereum has been deprecated and a new client Erigon is supporting the trace methods.

  Going forward, we will only use the name of the Erigon Ethereum client when associating with the trace methods.
</Info>

# Prerequisites

Before reading this article you should know about [Ethereum Clients](https://www.alchemy.com/overviews/execution-layer-and-consensus-layer-node-clients) and [EVM Traces](/docs/reference/what-are-evm-traces).

# The trace\_call method

The [trace\_call](/docs/reference/trace-call) method executes the given call (transaction) and returns a number of possible traces for it. It’s helpful for debugging transactions and analyzing state changes due to a transaction. Under the hood, [trace\_call](/docs/reference/trace-call) is only supported by OpenEthereum or Erigon clients, but if you’re using an Alchemy API key we’ll automatically route the request for you so you don’t have to worry about the node client.

Here are the parameters and response payloads for `trace_call`

## Parameters

1. `Object` - Call options.

   * `from`: `Address` - (optional) - The address the transaction is sent from.
   * `to`: `Address` - (optional when creating a new contract) - The address the transaction is directed to.
   * `gas`: `Quantity` - (optional) Integer formatted as a hex string that represents the gas provided for the transaction execution.
   * `gasPrice`: `Quantity` - (optional) Integer formatted as a hex string that represents the gas price used for each paid gas.
   * `value`: `Quantity` - (optional) Integer formatted as a hex string that represents the value sent with the given transaction.
   * `data`: `Data` - (optional) 4-byte hash of the method signature followed by encoded parameters. This basically represents which function to call in the smart contract along with the function parameters, if it’s just a value transfer then this field can be empty.

2. `Array` - Type of trace, one or more of: `"vmTrace"`, `"trace"`, `"stateDiff"`.

   1. `trace`: Returns the basic trace for the given transaction.
   2. `stateDiff`: Provides information detailing all altered portions of the Ethereum state made due to the execution of the transaction.
   3. `vmTrace`: Provides a full trace of the Ethereum state throughout the execution of the transaction, including for any subcalls.

<Warning>
  `vmTrace` is no longer supported by Alchemy.
</Warning>

3. `Quantity` or `Tag` - (optional) Integer formatted as a hex string that represents a block number, or the string `'earliest'` or `'latest'`. If this parameter is supplied, the transaction is replayed in the context of the given parameter.

   1. `latest`: The latest block that the client has observed.
   2. `earliest`: The lowest number block that the client has available. Intuitively, you can think of this as the first block created.

## Example Request and Response

The `trace_call` method returns an array of traces. The structure of these traces is explained in [Types of Trace Actions and their Structure](/docs/reference/what-are-evm-traces#types-of-trace-actions). Below you can find an example.

### Request

<CodeGroup>
  ```curl cURL
  curl https://eth-mainnet.g.alchemy.com/v2/demo \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"method":"trace_call",
      "params":[{
        "from": "0x6f1FB6EFDf50F34bFA3F2bC0E5576EdD71631638",
        "to": "0x6b175474e89094c44da98b954eedeac495271d0f",
        "value": "0x0",
        "data": "0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"},
        ["trace"]],
      "id":1,
      "jsonrpc":"2.0"}]'
  ```

  ```javascript ethers
  const ethers = require("ethers");

  (async () => {
    const provider = new ethers.providers.JsonRpcProvider(
      "https://eth-mainnet.g.alchemy.com/v2/demo"
    );
    const response = await provider.send("trace_call", [
      {
        from: "0x6f1FB6EFDf50F34bFA3F2bC0E5576EdD71631638",
        to: "0x6b175474e89094c44da98b954eedeac495271d0f",
        data: "0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE",
      },
      ["trace"],
      "latest",
    ]);
    console.log(response);
  })();
  ```

  ```python web3py
  from web3 import HTTPProvider

  client = HTTPProvider('https://eth-mainnet.g.alchemy.com/v2/demo')
  result = client.make_request('trace_call', [{
      "to": "0x6b175474e89094c44da98b954eedeac495271d0f",
      "data": "0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"
      },["trace"], "latest"])
  print(result)
  ```
</CodeGroup>

### Response

<CodeGroup>
  ```json trace_call Response
  {
    "output": "0x0000000000000000000000000000000000000000000000000858898f93629000",
    "stateDiff": null,
    "trace": [
      {
        "action": {
          "from": "0x0000000000000000000000000000000000000000",
          "callType": "call",
          "gas": "0x1dcd1148",
          "input": "0x70a082310000000000000000000000006e0d01a76c3cf4288372a29124a26d4353ee51be",
          "to": "0x6b175474e89094c44da98b954eedeac495271d0f",
          "value": "0x0"
        },
        "result": {
          "gasUsed": "0xa2a",
          "output": "0x0000000000000000000000000000000000000000000000000858898f93629000"
        },
        "subtraces": 0,
        "traceAddress": [],
        "type": "call"
      }
    ],
    "vmTrace": null
  }
  ```
</CodeGroup>

# The debug\_traceCall method

The [debug\_traceCall](/docs/reference/debug-tracecall) method executes the given call (transaction) and returns a number of possible traces for it. It’s helpful for debugging transactions and analyzing state changes due to a transaction. Under the hood, `debug_traceCall` is supported by most Ethereum clients (Geth, Erigon, reth, and others).

Here are the parameters and response payloads for `debug_traceCall`

## Parameters

The parameters for the `debug_traceCall` method are:

1. `Object` - Transaction object with the following fields:

   * `from` - string - The address the transaction is sent from.
   * `to` - string, **\[required]** - The address the transaction is directed to.
   * `gasPrice` - string - Integer of the `gasPrice` used for each paid gas.
   * `value` - string - Integer of the value sent with the given transaction.
   * `data` - string - Hash of the method signature and encoded parameters.

2. `String` - One of the following options:

   1. **block hash**

   2. **block number** (in hex)

   3. **block tag** (one of the following):

      * `pending` - A sample next block built by the client on top of the latest and containing the set of transactions usually taken from the local mempool. Intuitively, you can think of these as blocks that have not been mined yet.
      * `latest` - The most recent block observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions.
      * `safe` - The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is “unlikely” to be re-orged. **Only available on Ethereum Sepolia**.
      * `finalized` - The most recent crypto-economically secure block, that has been accepted by >2/3 of validators. Cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is very unlikely to be re-orged. **Only available on Ethereum Goerli**.
      * `earliest` - The lowest numbered block the client has available. Intuitively, you can think of this as the first block created.

3. Object - tracer

* `tracer` - String to specify the type of tracer. Currently supports `callTracer` and `prestateTracer` (see below for definitions).
* `tracerConfig` - Object to specify configurations for the tracer
  * `onlyTopCall` - boolean - setting this to `true` will only trace the main (top-level) call and none of the sub-calls. This avoids extra processing for each call frame if only the top-level call info is required (useful for getting `revertReason`).

### `callTracer`

The `callTracer` tracks all the call frames executed during a transaction. The result will be a nested list of call frames. They form a tree with the top-level call at the root and sub-calls as children of the higher levels.

It’s similar to the `trace` option of the [trace\_call](/docs/reference/trace-call) method. Each call frame has the following fields:

| field        | type                 | description                          |
| ------------ | -------------------- | ------------------------------------ |
| type         | string               | CALL, CREATE or SUICIDE              |
| from         | string               | address                              |
| to           | string               | address                              |
| value        | string               | hex-encoded amount of value transfer |
| gas          | string               | hex-encoded gas provided for call    |
| gasUsed      | string               | hex-encoded gas used during call     |
| input        | string               | call data                            |
| output       | string               | return data                          |
| error        | string               | error, if any                        |
| revertReason | string               | Solidity revert reason, if any       |
| calls        | array of call frames | list of sub-calls                    |

### `prestateTracer`

The `prestateTracer` replays the transaction and tracks every part of state that is touched during that transaction.

This is similar to the `stateDiff` option of the [trace\_call](/docs/reference/trace-call) method. The result is an object. The keys are addresses of accounts. The value is an object with the following fields:

| field   | type               | description                   |
| ------- | ------------------ | ----------------------------- |
| balance | string             | balance in wei                |
| nonce   | uint64             | nonce                         |
| code    | string             | hex-encoded bytecode          |
| storage | map\[string]string | storage slots of the contract |

As you've seen that the `callTracer` and `prestateTracer` options of [debug\_traceCall](/docs/reference/debug-tracecall) are similar to `trace` and `stateDiff` options of [debug\_traceCall](/docs/reference/debug-tracecall), here's a table depicting this:

| Options of [trace\_call](/docs/reference/trace-call) | Similar options of [debug\_traceCall](/docs/reference/debug-tracecall) |
| ----------------------------------------------- | ----------------------------------------------------------------- |
| trace                                           | callTrace                                                         |
| stateDiff                                       | prestateTracer                                                    |

## Example Request and Response

### Request

<CodeGroup>
  ```curl cURL
  curl  https://eth-mainnet.g.alchemy.com/v2/demo \
    -X POST \
    -H "Content-Type: application/json" \
    --data '{"method":"debug_traceCall","params":[{"from":null,"to":"0x6b175474e89094c44da98b954eedeac495271d0f","data":"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"}, "latest"],"id":1,"jsonrpc":"2.0"}'
  ```

  ```javascript ethers
  const ethers = require("ethers");
  (async () => {
    const provider = new ethers.providers.JsonRpcProvider(
      "https://eth-mainnet.g.alchemy.com/v2/demo"
    );
    const response = await provider.send("debug_traceCall", [
      {
        from: "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8",
        to: "0xdc66567a990b7fa10730459537620857c9e03287",
        data: "0xae169a50000000000000000000000000000000000000000000000000000000000000000e",
      },
      "0xF118CE",
      { tracer: "callTracer", tracerConfig: { onlyTopCall: false } },
    ]);
    console.log(response);
  })();
  ```

  ```python web3py
  from web3 import Web3, HTTPProvider
  provider = Web3.HTTPProvider("https://eth-mainnet.g.alchemy.com/v2/demo")
  result = provider.make_request('debug_traceCall', [{
      "to": "0x6b175474e89094c44da98b954eedeac495271d0f",
      "data": "0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"
      }, "latest"])
  print(result)
  ```
</CodeGroup>

### Response

<CodeGroup>
  ```json debug_traceCall Response
  {
    "type": "CALL",
    "from": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8",
    "to": "0xdc66567a990b7fa10730459537620857c9e03287",
    "value": "0x0",
    "gas": "0x7fffffffffffad2b",
    "gasUsed": "0x19dd6",
    "input": "0xae169a50000000000000000000000000000000000000000000000000000000000000000e",
    "output": "0x0000000000000000000000000000000000000000000000000000000000000001",
    "calls": [
      {
        "type": "CALL",
        "from": "0xdc66567a990b7fa10730459537620857c9e03287",
        "to": "0xa2b885e7065ea59a3251489715ca80de5ff642f8",
        "gas": "0x7dffffffffff9207",
        "gasUsed": "0x1bb3",
        "input": "0x6352211e000000000000000000000000000000000000000000000000000000000000000e",
        "output": "0x000000000000000000000000e5cb067e90d5cd1f8052b83562ae670ba4a211a8"
      },
      {
        "type": "CALL",
        "from": "0xdc66567a990b7fa10730459537620857c9e03287",
        "to": "0xf418588522d5dd018b425e472991e52ebbeeeeee",
        "gas": "0x7dffffffffff5b32",
        "gasUsed": "0xa4e",
        "input": "0x70a08231000000000000000000000000dc66567a990b7fa10730459537620857c9e03287",
        "output": "0x0000000000000000000000000000000000000000000011b962d6ea64e3500000"
      }
    ]
  }
  ```
</CodeGroup>

# Difference between `trace_call` and `debug_traceCall`

Since [trace\_call](/docs/reference/trace-call) is OpenEthereum's (Now Erigon's) equivalent to Geth's [debug\_traceCall](/docs/reference/debug-tracecall) there are not many differences between them but there are some minor differences which are mentioned below:

* You can choose to trace only the main call (the top-level call) in `debug_traceCall` by setting the `onlyTopCall` option to `true`. This avoids extra processing if only the top-level info is required (like getting the revert reason). However, this is not possible using `trace_call` as you always get back the complete trace.

* You can replay a transaction in a particular block by providing the block hash in `debug_traceCall` but not in `trace_call`. (However, both methods accept the block number in hex format and the tags like `latest` and `earliest`).

* `trace_call` is accessible through Erigon while `debug_traceCall` is accessible through Geth.

* By using `trace_call` you can get the simple trace for a transaction (trace) and the state difference (stateDiff) in just one request by putting an array containing `trace` and `stateDiff` options in trace\_call's second parameter (`["trace", "stateDiff"]`) as mentioned below:

<CodeGroup>
  ```javascript ethers
  // Request using ethers.js in node.js
  const ethers = require("ethers");

  (async () => {
    const provider = new ethers.providers.JsonRpcProvider(
      "https://eth-mainnet.g.alchemy.com/v2/demo"
    );
    const response = await provider.send("trace_call", [
      {
        from: "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8",
        to: "0xdc66567a990b7fa10730459537620857c9e03287",
        data: "0xae169a50000000000000000000000000000000000000000000000000000000000000000e",
      },
      ["trace", "stateDiff"], // getting both "trace" and "stateDiff" in one request
      "latest",
    ]);
    console.log(response);
  })();
  ```
</CodeGroup>

In response for this request you will get both `trace` and `stateDiff`:

<CodeGroup>
  ```json response
  {
    "output": "0x",
    "stateDiff": { // ---> stateDiff
      "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8": {
        "balance": {
          "*": {
            "from": "0x43d1b8fda906d05",
            "to": "0x1c0671087043bf963a878705f"
          }
        },
        "code": "=",
        "nonce": {
          "*": {
            "from": "0x21",
            "to": "0x22"
          }
        },
        "storage": {}
      }
    },
    "trace": [ // // ---> trace
      {
        "action": {
          "from": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8",
          "callType": "call",
          "gas": "0x1dcd122c",
          "input": "0xae169a50000000000000000000000000000000000000000000000000000000000000000e",
          "to": "0xdc66567a990b7fa10730459537620857c9e03287",
          "value": "0x0"
        },
        "result": {
          "gasUsed": "0x0",
          "output": "0x"
        },
        "subtraces": 0,
        "traceAddress": [],
        "type": "call"
      }
    ],
    "vmTrace": {
      "code": "0x",
      "ops": []
    }
  }
  ```
</CodeGroup>

But by using [debug\_traceCall](/docs/reference/debug-tracecall) you can either get the traces using `callTracer` or the state difference using `prestateTracer` in one request.

# Conclusion

In conclusion, [trace\_call](/docs/reference/trace-call) and [debug\_traceCall](/docs/reference/debug-tracecall) are two important methods for transaction tracing. They are accessible through different Ethereum clients and are slightly different from each other.

------

# Debug API Quickstart

> The Debug API provides deeper insights into transaction processing and on-chain activity.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

To use the Debug API your Alchemy plan must be set to the pay as you go or enterprise tiers. ([Upgrade your plan](https://dashboard.alchemy.com/settings/billing)) for access.

<Tip title="Don’t have an API key?" icon="star">
  Sign up or upgrade your plan for access. [Get started for free](https://dashboard.alchemy.com/signup)
</Tip>

## Introduction

The debug API gives you access to several non-standard RPC methods, which will allow you to inspect and debug transactions. The returned information includes the execution of the following:

* `CREATE`
* `SUICIDE`
* Variants of the `CALL`
* Input data
* Output data
* Gas usage
* Amount transferred
* Success status of individual actions

## Debug API use cases

Common use cases for the Debug API come in all flavors. Below are popular ones:

| Use case                    | Description                                                                                | Endpoint                                                                                                                           |
| --------------------------- | ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
| Debug Trace Call            | Executes an [eth\_call](/docs/reference/eth-call) and returns number of possible traces for it. | \[`debug_tracecall`] ([/docs/reference/debug-tracecall](/docs/reference/debug-tracecall))                            |
| Debug Trace Transaction     | Returns the traces of a transaction.                                                       | \[`debug_traceTransaction`] ([/docs/reference/debug-tracetransaction](/docs/reference/debug-tracetransaction))       |
| Debug Trace Block by Number | Returns the traces executed in the block.                                                  | \[`debug_traceBlockByNumber`] ([/docs/reference/debug-traceblockbynumber](/docs/reference/debug-traceblockbynumber)) |

## Trace types

| Type              | Parameter                                                           | Description                                     |
| ----------------- | ------------------------------------------------------------------- | ----------------------------------------------- |
| Transaction Trace | [`callTracer`](/docs/reference/trace_call-vs-debug_tracecall#calltracer) | Trace of your transaction.                      |
| State difference  | [`prestatetracer`]()                                                | Ethereum state changed values of a transaction. |

## Trace actions types

### `CREATE`

* Used to create a smart contract.

#### Example response

<CodeGroup>
  ```json json
  {
    "type": "CREATE",
    "from": "0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8",
    "to": "0x3c9075f574edc2f630f918ebac5ccf1095d82cc2",
    "value": "0x0",
    "gas": "0x26384a",
    "gasUsed": "0x26384a",
    "input": "0x611e61600b55600c805460ff19166001179055662386f26fc10000600f5560c06040526005608081905264173539b7b760d91b60a090815262000046916012919062000178565b503480156200005457600080fd5b5060405162002ea038038062002ea08339810160408190526200007791620002eb565b8383620000843362000128565b81516200009990600390602085019062000178565b508051620000af90600490602084019062000178565b506001805550508351620000cb90601090602087019062000178565b508251620000e190601190602086019062000178565b508151620000f790600d90602085019062000178565b50601380546001600160a01b0390921661010002610100600160a81b031990921691909117905550620003da915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b82805462000186906200039e565b90600052602060002090601f016020900481019282620001aa5760008555620001f5565b82601f10620001c557805160ff1916838001178555620001f5565b82800160010185558215620001f5579182015b82811115620001f5578251825591602001919060010190620001d8565b506200020392915062000207565b5090565b5b8082111562000203576000815560010162000208565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200024657600080fd5b81516001600160401b03808211156200026357620002636200021e565b604051601f8301601f19908116603f011681019082821181831017156200028e576200028e6200021e565b81604052838152602092508683858801011115620002ab57600080fd5b600091505b83821015620002cf5785820183015181830184015290820190620002b0565b83821115620002e15760008385830101525b9695505050505050565b600080600080608085870312156200030257600080fd5b84516001600160401b03808211156200031a57600080fd5b620003288883890162000234565b955060208701519150808211156200033f57600080fd5b6200034d8883890162000234565b945060408701519150808211156200036457600080fd5b50620003738782880162000234565b606087015190935090506001600160a01b03811681146200039357600080fd5b939692955090935050565b600181811c90821680620003b357607f821691505b602082108103620003d457634e487b7160e01b600052602260045260246000fd5b50919050565b612ab680620003ea6000396000f3fe60806040526004361061029f5760003560e01c8063715018a61161016a578063a45ba8e7116100d5578063e0a8085311610084578063f2fde38b11610061578063f2fde38b146107fd578063f56bce831461081d578063f65747951461083057005b8063e0a8085314610781578063e985e9c5146107a1578063f254933d146107ea57005b8063c23dc68f116100b2578063c23dc68f1461071f578063c87b56dd1461074c578063cfc86f7b1461076c57005b8063a45ba8e7146106ca578063b88d4fde146106df578063bb866a59146106ff57005b806391b7f5ed1161013157806399a2557a1161010e57806399a2557a14610674578063a035b1fe14610694578063a22cb465146106aa57005b806391b7f5ed1461060f57806395d89b411461062f5780639907d22b1461064457005b8063715018a61461055f57806379c127491461057457806381b3e575146105a45780638462151c146105c45780638da5cb5b146105f157005b806342842e0e1161020a57806355f804b3116101d15780635f769621116101ae5780635f769621146105095780636352211e1461051f57806370a082311461053f57005b806355f804b31461049c5780635a446215146104bc5780635bbb2177146104dc57005b806342842e0e1461041a57806343ebf17b1461043a5780634fdd43cb1461044d578063518302271461046d5780635503a0e81461048757005b806316c38b3c1161026657806323b872dd1161024357806323b872dd146103d25780633ccfd60b146103f25780634029a3ce1461040757005b806316c38b3c1461037157806316c61ccc1461039157806318160ddd146103ab57005b806301ffc9a7146102a857806303524005146102dd57806306fdde03146102f7578063081812fc14610319578063095ea7b31461035157005b366102a657005b005b3480156102b457600080fd5b506102c86102c3366004612218565b610843565b60405190151581526020015b60405180910390f35b3480156102e957600080fd5b506013546102c89060ff1681565b34801561030357600080fd5b5061030c610895565b6040516102d4919061228d565b34801561032557600080fd5b506103396103343660046122a0565b610927565b6040516001600160a01b0390911681526020016102d4565b34801561035d57600080fd5b506102a661036c3660046122ce565b61096b565b34801561037d57600080fd5b506102a661038c36600461230f565b610a35565b34801561039d57600080fd5b50600c546102c89060ff1681565b3480156103b757600080fd5b5060025460015403600019015b6040519081526020016102d4565b3480156103de57600080fd5b506102a66103ed36600461232a565b610a95565b3480156103fe57600080fd5b506102a6610c4a565b6102a66104153660046123b7565b610d0f565b34801561042657600080fd5b506102a661043536600461232a565b610e0b565b6102a661044836600461246a565b610e26565b34801561045957600080fd5b506102a6610468366004612588565b610fdc565b34801561047957600080fd5b50600e546102c89060ff1681565b34801561049357600080fd5b5061030c61103b565b3480156104a857600080fd5b506102a66104b7366004612588565b6110c9565b3480156104c857600080fd5b506102a66104d73660046125bd565b611124565b3480156104e857600080fd5b506104fc6104f736600461246a565b611193565b6040516102d49190612621565b34801561051557600080fd5b506103c4600b5481565b34801561052b57600080fd5b5061033961053a3660046122a0565b611261565b34801561054b57600080fd5b506103c461055a36600461269e565b61126c565b34801561056b57600080fd5b506102a66112bb565b34801561058057600080fd5b506102c861058f3660046122a0565b60096020526000908152604090205460ff1681565b3480156105b057600080fd5b506102a66105bf366004612588565b61130f565b3480156105d057600080fd5b506105e46105df36600461269e565b61136a565b6040516102d491906126bb565b3480156105fd57600080fd5b506000546001600160a01b0316610339565b34801561061b57600080fd5b506102a661062a3660046122a0565b611473565b34801561063b57600080fd5b5061030c6114c0565b34801561065057600080fd5b506102c861065f3660046122a0565b60009081526009602052604090205460ff1690565b34801561068057600080fd5b506105e461068f3660046126f3565b6114cf565b3480156106a057600080fd5b506103c4600f5481565b3480156106b657600080fd5b506102a66106c5366004612728565b611657565b3480156106d657600080fd5b5061030c6116ec565b3480156106eb57600080fd5b506102a66106fa36600461275d565b6116f9565b34801561070b57600080fd5b506102a661071a36600461230f565b611743565b34801561072b57600080fd5b5061073f61073a3660046122a0565b61179e565b6040516102d491906127dd565b34801561075857600080fd5b5061030c6107673660046122a0565b611826565b34801561077857600080fd5b5061030c61196b565b34801561078d57600080fd5b506102a661079c36600461230f565b611978565b3480156107ad57600080fd5b506102c86107bc366004612822565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b6102a66107f83660046122ce565b6119d3565b34801561080957600080fd5b506102a661081836600461269e565b611a5f565b6102a661082b3660046122a0565b611b15565b6102a661083e3660046122a0565b611bee565b60006301ffc9a760e01b6001600160e01b03198316148061087457506380ac58cd60e01b6001600160e01b03198316145b8061088f5750635b5e139f60e01b6001600160e01b03198316145b92915050565b6060601080546108a49061285b565b80601f01602080910402602001604051908101604052809291908181526020018280546108d09061285b565b801561091d5780601f106108f25761010080835404028352916020019161091d565b820191906000526020600020905b81548152906001019060200180831161090057829003601f168201915b5050505050905090565b600061093282611d47565b61094f576040516333d1c03960e21b815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b600061097682611261565b9050336001600160a01b038216146109cc576001600160a01b038116600090815260086020908152604080832033845290915290205460ff166109cc576040516367d9dca160e11b815260040160405180910390fd5b600082815260076020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000546001600160a01b03163314610a825760405162461bcd60e51b81526020600482018190526024820152600080516020612a6183398151915260448201526064015b60405180910390fd5b600c805460ff1916911515919091179055565b6000610aa082611d7c565b9050836001600160a01b0316816001600160a01b031614610ad35760405162a1148160e81b815260040160405180910390fd5b60008281526007602052604090208054338082146001600160a01b03881690911417610b3d576001600160a01b038616600090815260086020908152604080832033845290915290205460ff16610b3d57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610b6457604051633a954ecd60e21b815260040160405180910390fd5b8015610b6f57600082555b6001600160a01b038681166000908152600660205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260056020526040812091909155600160e11b84169003610c0157600184016000818152600560205260408120549003610bff576001548114610bff5760008181526005602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b6000546001600160a01b03163314610c925760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b600080546040516001600160a01b03909116914791839083908381818185875af1925050503d8060008114610ce3576040519150601f19603f3d011682016040523d82523d6000602084013e610ce8565b606091505b5050905080610d0a57604051631d42c86760e21b815260040160405180910390fd5b505050565b6000546001600160a01b03163314610d575760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b60005b83811015610e0457600b54838383818110610d7757610d77612895565b90506020020135610d8b6001546000190190565b610d9591906128c1565b1115610db457604051637d3d824960e01b815260040160405180910390fd5b610dfc858583818110610dc957610dc9612895565b9050602002016020810190610dde919061269e565b848484818110610df057610df0612895565b90506020020135611deb565b600101610d5a565b5050505050565b610d0a838383604051806020016040528060008152506116f9565b600c5460ff1615610e4a5760405163ab35696f60e01b815260040160405180910390fd5b333214610e6a57604051634f19899d60e11b815260040160405180910390fd5b60005b8151811015610fcd5760096000838381518110610e8c57610e8c612895565b60209081029190910181015182528101919091526040016000205460ff1615610ec8576040516330ba573b60e21b815260040160405180910390fd5b6013548251339161010090046001600160a01b031690636352211e90859085908110610ef657610ef6612895565b60200260200101516040518263ffffffff1660e01b8152600401610f1c91815260200190565b602060405180830381865afa158015610f39573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5d91906128d9565b6001600160a01b031614610f8457604051630e1f609760e31b815260040160405180910390fd5b600160096000848481518110610f9c57610f9c612895565b6020908102919091018101518252810191909152604001600020805460ff1916911515919091179055600101610e6d565b50610fd9338251611deb565b50565b6000546001600160a01b031633146110245760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b805161103790600d906020840190612169565b5050565b601280546110489061285b565b80601f01602080910402602001604051908101604052809291908181526020018280546110749061285b565b80156110c15780601f10611096576101008083540402835291602001916110c1565b820191906000526020600020905b8154815290600101906020018083116110a457829003601f168201915b505050505081565b6000546001600160a01b031633146111115760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b805161103790600a906020840190612169565b6000546001600160a01b0316331461116c5760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b815161117f906010906020850190612169565b508051610d0a906011906020840190612169565b805160609060008167ffffffffffffffff8111156111b3576111b3612423565b60405190808252806020026020018201604052801561120557816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816111d15790505b50905060005b8281146112595761123485828151811061122757611227612895565b602002602001015161179e565b82828151811061124657611246612895565b602090810291909101015260010161120b565b509392505050565b600061088f82611d7c565b60006001600160a01b038216611295576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526006602052604090205467ffffffffffffffff1690565b6000546001600160a01b031633146113035760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b61130d6000611ecb565b565b6000546001600160a01b031633146113575760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b8051611037906012906020840190612169565b6060600080600061137a8561126c565b905060008167ffffffffffffffff81111561139757611397612423565b6040519080825280602002602001820160405280156113c0578160200160208202803683370190505b5090506113ed60408051608081018252600080825260208201819052918101829052606081019190915290565b60015b8386146114675761140081611f28565b9150816040015161145f5781516001600160a01b03161561142057815194505b876001600160a01b0316856001600160a01b03160361145f578083878060010198508151811061145257611452612895565b6020026020010181815250505b6001016113f0565b50909695505050505050565b6000546001600160a01b031633146114bb5760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b600f55565b6060601180546108a49061285b565b60608183106114f157604051631960ccad60e11b815260040160405180910390fd5b6000806114fd60015490565b9050600185101561150d57600194505b80841115611519578093505b60006115248761126c565b905084861015611543578585038181101561153d578091505b50611547565b5060005b60008167ffffffffffffffff81111561156257611562612423565b60405190808252806020026020018201604052801561158b578160200160208202803683370190505b509050816000036115a157935061165092505050565b60006115ac8861179e565b9050600081604001516115bd575080515b885b8881141580156115cf5750848714155b15611644576115dd81611f28565b9250826040015161163c5782516001600160a01b0316156115fd57825191505b8a6001600160a01b0316826001600160a01b03160361163c578084888060010199508151811061162f5761162f612895565b6020026020010181815250505b6001016115bf565b50505092835250909150505b9392505050565b336001600160a01b038316036116805760405163b06307db60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600d80546110489061285b565b611704848484610a95565b6001600160a01b0383163b1561173d5761172084848484611fa7565b61173d576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6000546001600160a01b0316331461178b5760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b6013805460ff1916911515919091179055565b60408051608081018252600080825260208201819052918101829052606081019190915260408051608081018252600080825260208201819052918101829052606081019190915260018310806117f757506001548310155b156118025792915050565b61180b83611f28565b905080604001511561181d5792915050565b61165083612093565b606061183182611d47565b61184e57604051631c29085d60e11b815260040160405180910390fd5b600e5460ff16151560000361189257600d6118688361210b565b601260405160200161187c9392919061298f565b6040516020818303038152906040529050919050565b600061189c61215a565b9050600081511161193757600d80546118b49061285b565b80601f01602080910402602001604051908101604052809291908181526020018280546118e09061285b565b801561192d5780601f106119025761010080835404028352916020019161192d565b820191906000526020600020905b81548152906001019060200180831161191057829003601f168201915b5050505050611650565b806119418461210b565b6012604051602001611955939291906129c2565b6040516020818303038152906040529392505050565b600a80546110489061285b565b6000546001600160a01b031633146119c05760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b600e805460ff1916911515919091179055565b6000546001600160a01b03163314611a1b5760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b600b5481611a2c6001546000190190565b611a3691906128c1565b1115611a5557604051637d3d824960e01b815260040160405180910390fd5b6110378282611deb565b6000546001600160a01b03163314611aa75760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b6001600160a01b038116611b0c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a79565b610fd981611ecb565b600c5460ff1615611b395760405163ab35696f60e01b815260040160405180910390fd5b333214611b5957604051634f19899d60e11b815260040160405180910390fd5b60135460ff16611b7c5760405163ac4d09c760e01b815260040160405180910390fd5b600b5481611b8d6001546000190190565b611b9791906128c1565b1115611bb657604051637d3d824960e01b815260040160405180910390fd5b80600f54611bc491906129e8565b341015611be4576040516335c20e3960e11b815260040160405180910390fd5b610fd93382611deb565b600c5460ff1615611c125760405163ab35696f60e01b815260040160405180910390fd5b333214611c3257604051634f19899d60e11b815260040160405180910390fd5b600b546001541115611c5757604051637d3d824960e01b815260040160405180910390fd5b60008181526009602052604090205460ff1615611c87576040516330ba573b60e21b815260040160405180910390fd5b6013546040516331a9108f60e11b815260048101839052339161010090046001600160a01b031690636352211e90602401602060405180830381865afa158015611cd5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf991906128d9565b6001600160a01b031614611d2057604051630e1f609760e31b815260040160405180910390fd5b6000818152600960205260409020805460ff19166001908117909155610fd9903390611deb565b600081600111158015611d5b575060015482105b801561088f575050600090815260056020526040902054600160e01b161590565b60008180600111611dd257600154811015611dd25760008181526005602052604081205490600160e01b82169003611dd0575b80600003611650575060001901600081815260056020526040902054611daf565b505b604051636f96cda160e11b815260040160405180910390fd5b6001546001600160a01b038316611e1457604051622e076360e81b815260040160405180910390fd5b81600003611e355760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038316600081815260066020526040902080546801000000000000000185020190554260a01b6001841460e11b1717600082815260056020526040902055808281015b6040516001830192906001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808210611e7f5760015550505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526005602052604090205461088f90604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611fdc903390899088908890600401612a07565b6020604051808303816000875af1925050508015612017575060408051601f3d908101601f1916820190925261201491810190612a43565b60015b612075573d808015612045576040519150601f19603f3d011682016040523d82523d6000602084013e61204a565b606091505b50805160000361206d576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60408051608081018252600080825260208201819052918101829052606081019190915261088f6120c383611d7c565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b604080516080810191829052607f0190826030600a8206018353600a90045b801561214857600183039250600a81066030018353600a900461212a565b50819003601f19909101908152919050565b6060600a80546108a49061285b565b8280546121759061285b565b90600052602060002090601f01602090048101928261219757600085556121dd565b82601f106121b057805160ff19168380011785556121dd565b828001600101855582156121dd579182015b828111156121dd5782518255916020019190600101906121c2565b506121e99291506121ed565b5090565b5b808211156121e957600081556001016121ee565b6001600160e01b031981168114610fd957600080fd5b60006020828403121561222a57600080fd5b813561165081612202565b60005b83811015612250578181015183820152602001612238565b8381111561173d5750506000910152565b60008151808452612279816020860160208601612235565b601f01601f19169290920160200192915050565b6020815260006116506020830184612261565b6000602082840312156122b257600080fd5b5035919050565b6001600160a01b0381168114610fd957600080fd5b600080604083850312156122e157600080fd5b82356122ec816122b9565b946020939093013593505050565b8035801515811461230a57600080fd5b919050565b60006020828403121561232157600080fd5b611650826122fa565b60008060006060848603121561233f57600080fd5b833561234a816122b9565b9250602084013561235a816122b9565b929592945050506040919091013590565b60008083601f84011261237d57600080fd5b50813567ffffffffffffffff81111561239557600080fd5b6020830191508360208260051b85010111156123b057600080fd5b9250929050565b600080600080604085870312156123cd57600080fd5b843567ffffffffffffffff808211156123e557600080fd5b6123f18883890161236b565b9096509450602087013591508082111561240a57600080fd5b506124178782880161236b565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561246257612462612423565b604052919050565b6000602080838503121561247d57600080fd5b823567ffffffffffffffff8082111561249557600080fd5b818501915085601f8301126124a957600080fd5b8135818111156124bb576124bb612423565b8060051b91506124cc848301612439565b81815291830184019184810190888411156124e657600080fd5b938501935b83851015612504578435825293850193908501906124eb565b98975050505050505050565b600067ffffffffffffffff83111561252a5761252a612423565b61253d601f8401601f1916602001612439565b905082815283838301111561255157600080fd5b828260208301376000602084830101529392505050565b600082601f83011261257957600080fd5b61165083833560208501612510565b60006020828403121561259a57600080fd5b813567ffffffffffffffff8111156125b157600080fd5b61208b84828501612568565b600080604083850312156125d057600080fd5b823567ffffffffffffffff808211156125e857600080fd5b6125f486838701612568565b9350602085013591508082111561260a57600080fd5b5061261785828601612568565b9150509250929050565b6020808252825182820181905260009190848201906040850190845b818110156114675761268b8385516001600160a01b03815116825267ffffffffffffffff602082015116602083015260408101511515604083015262ffffff60608201511660608301525050565b928401926080929092019160010161263d565b6000602082840312156126b057600080fd5b8135611650816122b9565b6020808252825182820181905260009190848201906040850190845b81811015611467578351835292840192918401916001016126d7565b60008060006060848603121561270857600080fd5b8335612713816122b9565b95602085013595506040909401359392505050565b6000806040838503121561273b57600080fd5b8235612746816122b9565b9150612754602084016122fa565b90509250929050565b6000806000806080858703121561277357600080fd5b843561277e816122b9565b9350602085013561278e816122b9565b925060408501359150606085013567ffffffffffffffff8111156127b157600080fd5b8501601f810187136127c257600080fd5b6127d187823560208401612510565b91505092959194509250565b81516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260608083015162ffffff16908201526080810161088f565b6000806040838503121561283557600080fd5b8235612840816122b9565b91506020830135612850816122b9565b809150509250929050565b600181811c9082168061286f57607f821691505b60208210810361288f57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156128d4576128d46128ab565b500190565b6000602082840312156128eb57600080fd5b8151611650816122b9565b8054600090600181811c908083168061291057607f831692505b6020808410820361293157634e487b7160e01b600052602260045260246000fd5b818015612945576001811461295657612983565b60ff19861689528489019650612983565b60008881526020902060005b8681101561297b5781548b820152908501908301612962565b505084890196505b50505050505092915050565b600061299b82866128f6565b84516129ab818360208901612235565b6129b7818301866128f6565b979650505050505050565b600084516129d4818460208901612235565b8451908301906129ab818360208901612235565b6000816000190483118215151615612a0257612a026128ab565b500290565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612a396080830184612261565b9695505050505050565b600060208284031215612a5557600080fd5b81516116508161220256fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220e104c159fe21a1728dc6323c64435ac8be0154e68f1e538673f6747fa16a941a64736f6c634300080d0033000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000007350271594848ab8c0371ef4afeef199c69c3e05000000000000000000000000000000000000000000000000000000000000001147756e736c696e67657220486f72736573000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000248530000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d617569345166576e78633846596265534e76427044485074627347366e4456695668723233465459766758532f00000000000000000000",
    "output": "0x60806040526004361061029f5760003560e01c8063715018a61161016a578063a45ba8e7116100d5578063e0a8085311610084578063f2fde38b11610061578063f2fde38b146107fd578063f56bce831461081d578063f65747951461083057005b8063e0a8085314610781578063e985e9c5146107a1578063f254933d146107ea57005b8063c23dc68f116100b2578063c23dc68f1461071f578063c87b56dd1461074c578063cfc86f7b1461076c57005b8063a45ba8e7146106ca578063b88d4fde146106df578063bb866a59146106ff57005b806391b7f5ed1161013157806399a2557a1161010e57806399a2557a14610674578063a035b1fe14610694578063a22cb465146106aa57005b806391b7f5ed1461060f57806395d89b411461062f5780639907d22b1461064457005b8063715018a61461055f57806379c127491461057457806381b3e575146105a45780638462151c146105c45780638da5cb5b146105f157005b806342842e0e1161020a57806355f804b3116101d15780635f769621116101ae5780635f769621146105095780636352211e1461051f57806370a082311461053f57005b806355f804b31461049c5780635a446215146104bc5780635bbb2177146104dc57005b806342842e0e1461041a57806343ebf17b1461043a5780634fdd43cb1461044d578063518302271461046d5780635503a0e81461048757005b806316c38b3c1161026657806323b872dd1161024357806323b872dd146103d25780633ccfd60b146103f25780634029a3ce1461040757005b806316c38b3c1461037157806316c61ccc1461039157806318160ddd146103ab57005b806301ffc9a7146102a857806303524005146102dd57806306fdde03146102f7578063081812fc14610319578063095ea7b31461035157005b366102a657005b005b3480156102b457600080fd5b506102c86102c3366004612218565b610843565b60405190151581526020015b60405180910390f35b3480156102e957600080fd5b506013546102c89060ff1681565b34801561030357600080fd5b5061030c610895565b6040516102d4919061228d565b34801561032557600080fd5b506103396103343660046122a0565b610927565b6040516001600160a01b0390911681526020016102d4565b34801561035d57600080fd5b506102a661036c3660046122ce565b61096b565b34801561037d57600080fd5b506102a661038c36600461230f565b610a35565b34801561039d57600080fd5b50600c546102c89060ff1681565b3480156103b757600080fd5b5060025460015403600019015b6040519081526020016102d4565b3480156103de57600080fd5b506102a66103ed36600461232a565b610a95565b3480156103fe57600080fd5b506102a6610c4a565b6102a66104153660046123b7565b610d0f565b34801561042657600080fd5b506102a661043536600461232a565b610e0b565b6102a661044836600461246a565b610e26565b34801561045957600080fd5b506102a6610468366004612588565b610fdc565b34801561047957600080fd5b50600e546102c89060ff1681565b34801561049357600080fd5b5061030c61103b565b3480156104a857600080fd5b506102a66104b7366004612588565b6110c9565b3480156104c857600080fd5b506102a66104d73660046125bd565b611124565b3480156104e857600080fd5b506104fc6104f736600461246a565b611193565b6040516102d49190612621565b34801561051557600080fd5b506103c4600b5481565b34801561052b57600080fd5b5061033961053a3660046122a0565b611261565b34801561054b57600080fd5b506103c461055a36600461269e565b61126c565b34801561056b57600080fd5b506102a66112bb565b34801561058057600080fd5b506102c861058f3660046122a0565b60096020526000908152604090205460ff1681565b3480156105b057600080fd5b506102a66105bf366004612588565b61130f565b3480156105d057600080fd5b506105e46105df36600461269e565b61136a565b6040516102d491906126bb565b3480156105fd57600080fd5b506000546001600160a01b0316610339565b34801561061b57600080fd5b506102a661062a3660046122a0565b611473565b34801561063b57600080fd5b5061030c6114c0565b34801561065057600080fd5b506102c861065f3660046122a0565b60009081526009602052604090205460ff1690565b34801561068057600080fd5b506105e461068f3660046126f3565b6114cf565b3480156106a057600080fd5b506103c4600f5481565b3480156106b657600080fd5b506102a66106c5366004612728565b611657565b3480156106d657600080fd5b5061030c6116ec565b3480156106eb57600080fd5b506102a66106fa36600461275d565b6116f9565b34801561070b57600080fd5b506102a661071a36600461230f565b611743565b34801561072b57600080fd5b5061073f61073a3660046122a0565b61179e565b6040516102d491906127dd565b34801561075857600080fd5b5061030c6107673660046122a0565b611826565b34801561077857600080fd5b5061030c61196b565b34801561078d57600080fd5b506102a661079c36600461230f565b611978565b3480156107ad57600080fd5b506102c86107bc366004612822565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b6102a66107f83660046122ce565b6119d3565b34801561080957600080fd5b506102a661081836600461269e565b611a5f565b6102a661082b3660046122a0565b611b15565b6102a661083e3660046122a0565b611bee565b60006301ffc9a760e01b6001600160e01b03198316148061087457506380ac58cd60e01b6001600160e01b03198316145b8061088f5750635b5e139f60e01b6001600160e01b03198316145b92915050565b6060601080546108a49061285b565b80601f01602080910402602001604051908101604052809291908181526020018280546108d09061285b565b801561091d5780601f106108f25761010080835404028352916020019161091d565b820191906000526020600020905b81548152906001019060200180831161090057829003601f168201915b5050505050905090565b600061093282611d47565b61094f576040516333d1c03960e21b815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b600061097682611261565b9050336001600160a01b038216146109cc576001600160a01b038116600090815260086020908152604080832033845290915290205460ff166109cc576040516367d9dca160e11b815260040160405180910390fd5b600082815260076020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000546001600160a01b03163314610a825760405162461bcd60e51b81526020600482018190526024820152600080516020612a6183398151915260448201526064015b60405180910390fd5b600c805460ff1916911515919091179055565b6000610aa082611d7c565b9050836001600160a01b0316816001600160a01b031614610ad35760405162a1148160e81b815260040160405180910390fd5b60008281526007602052604090208054338082146001600160a01b03881690911417610b3d576001600160a01b038616600090815260086020908152604080832033845290915290205460ff16610b3d57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610b6457604051633a954ecd60e21b815260040160405180910390fd5b8015610b6f57600082555b6001600160a01b038681166000908152600660205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260056020526040812091909155600160e11b84169003610c0157600184016000818152600560205260408120549003610bff576001548114610bff5760008181526005602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b6000546001600160a01b03163314610c925760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b600080546040516001600160a01b03909116914791839083908381818185875af1925050503d8060008114610ce3576040519150601f19603f3d011682016040523d82523d6000602084013e610ce8565b606091505b5050905080610d0a57604051631d42c86760e21b815260040160405180910390fd5b505050565b6000546001600160a01b03163314610d575760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b60005b83811015610e0457600b54838383818110610d7757610d77612895565b90506020020135610d8b6001546000190190565b610d9591906128c1565b1115610db457604051637d3d824960e01b815260040160405180910390fd5b610dfc858583818110610dc957610dc9612895565b9050602002016020810190610dde919061269e565b848484818110610df057610df0612895565b90506020020135611deb565b600101610d5a565b5050505050565b610d0a838383604051806020016040528060008152506116f9565b600c5460ff1615610e4a5760405163ab35696f60e01b815260040160405180910390fd5b333214610e6a57604051634f19899d60e11b815260040160405180910390fd5b60005b8151811015610fcd5760096000838381518110610e8c57610e8c612895565b60209081029190910181015182528101919091526040016000205460ff1615610ec8576040516330ba573b60e21b815260040160405180910390fd5b6013548251339161010090046001600160a01b031690636352211e90859085908110610ef657610ef6612895565b60200260200101516040518263ffffffff1660e01b8152600401610f1c91815260200190565b602060405180830381865afa158015610f39573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5d91906128d9565b6001600160a01b031614610f8457604051630e1f609760e31b815260040160405180910390fd5b600160096000848481518110610f9c57610f9c612895565b6020908102919091018101518252810191909152604001600020805460ff1916911515919091179055600101610e6d565b50610fd9338251611deb565b50565b6000546001600160a01b031633146110245760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b805161103790600d906020840190612169565b5050565b601280546110489061285b565b80601f01602080910402602001604051908101604052809291908181526020018280546110749061285b565b80156110c15780601f10611096576101008083540402835291602001916110c1565b820191906000526020600020905b8154815290600101906020018083116110a457829003601f168201915b505050505081565b6000546001600160a01b031633146111115760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b805161103790600a906020840190612169565b6000546001600160a01b0316331461116c5760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b815161117f906010906020850190612169565b508051610d0a906011906020840190612169565b805160609060008167ffffffffffffffff8111156111b3576111b3612423565b60405190808252806020026020018201604052801561120557816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816111d15790505b50905060005b8281146112595761123485828151811061122757611227612895565b602002602001015161179e565b82828151811061124657611246612895565b602090810291909101015260010161120b565b509392505050565b600061088f82611d7c565b60006001600160a01b038216611295576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526006602052604090205467ffffffffffffffff1690565b6000546001600160a01b031633146113035760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b61130d6000611ecb565b565b6000546001600160a01b031633146113575760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b8051611037906012906020840190612169565b6060600080600061137a8561126c565b905060008167ffffffffffffffff81111561139757611397612423565b6040519080825280602002602001820160405280156113c0578160200160208202803683370190505b5090506113ed60408051608081018252600080825260208201819052918101829052606081019190915290565b60015b8386146114675761140081611f28565b9150816040015161145f5781516001600160a01b03161561142057815194505b876001600160a01b0316856001600160a01b03160361145f578083878060010198508151811061145257611452612895565b6020026020010181815250505b6001016113f0565b50909695505050505050565b6000546001600160a01b031633146114bb5760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b600f55565b6060601180546108a49061285b565b60608183106114f157604051631960ccad60e11b815260040160405180910390fd5b6000806114fd60015490565b9050600185101561150d57600194505b80841115611519578093505b60006115248761126c565b905084861015611543578585038181101561153d578091505b50611547565b5060005b60008167ffffffffffffffff81111561156257611562612423565b60405190808252806020026020018201604052801561158b578160200160208202803683370190505b509050816000036115a157935061165092505050565b60006115ac8861179e565b9050600081604001516115bd575080515b885b8881141580156115cf5750848714155b15611644576115dd81611f28565b9250826040015161163c5782516001600160a01b0316156115fd57825191505b8a6001600160a01b0316826001600160a01b03160361163c578084888060010199508151811061162f5761162f612895565b6020026020010181815250505b6001016115bf565b50505092835250909150505b9392505050565b336001600160a01b038316036116805760405163b06307db60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600d80546110489061285b565b611704848484610a95565b6001600160a01b0383163b1561173d5761172084848484611fa7565b61173d576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6000546001600160a01b0316331461178b5760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b6013805460ff1916911515919091179055565b60408051608081018252600080825260208201819052918101829052606081019190915260408051608081018252600080825260208201819052918101829052606081019190915260018310806117f757506001548310155b156118025792915050565b61180b83611f28565b905080604001511561181d5792915050565b61165083612093565b606061183182611d47565b61184e57604051631c29085d60e11b815260040160405180910390fd5b600e5460ff16151560000361189257600d6118688361210b565b601260405160200161187c9392919061298f565b6040516020818303038152906040529050919050565b600061189c61215a565b9050600081511161193757600d80546118b49061285b565b80601f01602080910402602001604051908101604052809291908181526020018280546118e09061285b565b801561192d5780601f106119025761010080835404028352916020019161192d565b820191906000526020600020905b81548152906001019060200180831161191057829003601f168201915b5050505050611650565b806119418461210b565b6012604051602001611955939291906129c2565b6040516020818303038152906040529392505050565b600a80546110489061285b565b6000546001600160a01b031633146119c05760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b600e805460ff1916911515919091179055565b6000546001600160a01b03163314611a1b5760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b600b5481611a2c6001546000190190565b611a3691906128c1565b1115611a5557604051637d3d824960e01b815260040160405180910390fd5b6110378282611deb565b6000546001600160a01b03163314611aa75760405162461bcd60e51b81526020600482018190526024820152600080516020612a618339815191526044820152606401610a79565b6001600160a01b038116611b0c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a79565b610fd981611ecb565b600c5460ff1615611b395760405163ab35696f60e01b815260040160405180910390fd5b333214611b5957604051634f19899d60e11b815260040160405180910390fd5b60135460ff16611b7c5760405163ac4d09c760e01b815260040160405180910390fd5b600b5481611b8d6001546000190190565b611b9791906128c1565b1115611bb657604051637d3d824960e01b815260040160405180910390fd5b80600f54611bc491906129e8565b341015611be4576040516335c20e3960e11b815260040160405180910390fd5b610fd93382611deb565b600c5460ff1615611c125760405163ab35696f60e01b815260040160405180910390fd5b333214611c3257604051634f19899d60e11b815260040160405180910390fd5b600b546001541115611c5757604051637d3d824960e01b815260040160405180910390fd5b60008181526009602052604090205460ff1615611c87576040516330ba573b60e21b815260040160405180910390fd5b6013546040516331a9108f60e11b815260048101839052339161010090046001600160a01b031690636352211e90602401602060405180830381865afa158015611cd5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf991906128d9565b6001600160a01b031614611d2057604051630e1f609760e31b815260040160405180910390fd5b6000818152600960205260409020805460ff19166001908117909155610fd9903390611deb565b600081600111158015611d5b575060015482105b801561088f575050600090815260056020526040902054600160e01b161590565b60008180600111611dd257600154811015611dd25760008181526005602052604081205490600160e01b82169003611dd0575b80600003611650575060001901600081815260056020526040902054611daf565b505b604051636f96cda160e11b815260040160405180910390fd5b6001546001600160a01b038316611e1457604051622e076360e81b815260040160405180910390fd5b81600003611e355760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038316600081815260066020526040902080546801000000000000000185020190554260a01b6001841460e11b1717600082815260056020526040902055808281015b6040516001830192906001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808210611e7f5760015550505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526005602052604090205461088f90604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611fdc903390899088908890600401612a07565b6020604051808303816000875af1925050508015612017575060408051601f3d908101601f1916820190925261201491810190612a43565b60015b612075573d808015612045576040519150601f19603f3d011682016040523d82523d6000602084013e61204a565b606091505b50805160000361206d576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60408051608081018252600080825260208201819052918101829052606081019190915261088f6120c383611d7c565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b604080516080810191829052607f0190826030600a8206018353600a90045b801561214857600183039250600a81066030018353600a900461212a565b50819003601f19909101908152919050565b6060600a80546108a49061285b565b8280546121759061285b565b90600052602060002090601f01602090048101928261219757600085556121dd565b82601f106121b057805160ff19168380011785556121dd565b828001600101855582156121dd579182015b828111156121dd5782518255916020019190600101906121c2565b506121e99291506121ed565b5090565b5b808211156121e957600081556001016121ee565b6001600160e01b031981168114610fd957600080fd5b60006020828403121561222a57600080fd5b813561165081612202565b60005b83811015612250578181015183820152602001612238565b8381111561173d5750506000910152565b60008151808452612279816020860160208601612235565b601f01601f19169290920160200192915050565b6020815260006116506020830184612261565b6000602082840312156122b257600080fd5b5035919050565b6001600160a01b0381168114610fd957600080fd5b600080604083850312156122e157600080fd5b82356122ec816122b9565b946020939093013593505050565b8035801515811461230a57600080fd5b919050565b60006020828403121561232157600080fd5b611650826122fa565b60008060006060848603121561233f57600080fd5b833561234a816122b9565b9250602084013561235a816122b9565b929592945050506040919091013590565b60008083601f84011261237d57600080fd5b50813567ffffffffffffffff81111561239557600080fd5b6020830191508360208260051b85010111156123b057600080fd5b9250929050565b600080600080604085870312156123cd57600080fd5b843567ffffffffffffffff808211156123e557600080fd5b6123f18883890161236b565b9096509450602087013591508082111561240a57600080fd5b506124178782880161236b565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561246257612462612423565b604052919050565b6000602080838503121561247d57600080fd5b823567ffffffffffffffff8082111561249557600080fd5b818501915085601f8301126124a957600080fd5b8135818111156124bb576124bb612423565b8060051b91506124cc848301612439565b81815291830184019184810190888411156124e657600080fd5b938501935b83851015612504578435825293850193908501906124eb565b98975050505050505050565b600067ffffffffffffffff83111561252a5761252a612423565b61253d601f8401601f1916602001612439565b905082815283838301111561255157600080fd5b828260208301376000602084830101529392505050565b600082601f83011261257957600080fd5b61165083833560208501612510565b60006020828403121561259a57600080fd5b813567ffffffffffffffff8111156125b157600080fd5b61208b84828501612568565b600080604083850312156125d057600080fd5b823567ffffffffffffffff808211156125e857600080fd5b6125f486838701612568565b9350602085013591508082111561260a57600080fd5b5061261785828601612568565b9150509250929050565b6020808252825182820181905260009190848201906040850190845b818110156114675761268b8385516001600160a01b03815116825267ffffffffffffffff602082015116602083015260408101511515604083015262ffffff60608201511660608301525050565b928401926080929092019160010161263d565b6000602082840312156126b057600080fd5b8135611650816122b9565b6020808252825182820181905260009190848201906040850190845b81811015611467578351835292840192918401916001016126d7565b60008060006060848603121561270857600080fd5b8335612713816122b9565b95602085013595506040909401359392505050565b6000806040838503121561273b57600080fd5b8235612746816122b9565b9150612754602084016122fa565b90509250929050565b6000806000806080858703121561277357600080fd5b843561277e816122b9565b9350602085013561278e816122b9565b925060408501359150606085013567ffffffffffffffff8111156127b157600080fd5b8501601f810187136127c257600080fd5b6127d187823560208401612510565b91505092959194509250565b81516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260608083015162ffffff16908201526080810161088f565b6000806040838503121561283557600080fd5b8235612840816122b9565b91506020830135612850816122b9565b809150509250929050565b600181811c9082168061286f57607f821691505b60208210810361288f57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156128d4576128d46128ab565b500190565b6000602082840312156128eb57600080fd5b8151611650816122b9565b8054600090600181811c908083168061291057607f831692505b6020808410820361293157634e487b7160e01b600052602260045260246000fd5b818015612945576001811461295657612983565b60ff19861689528489019650612983565b60008881526020902060005b8681101561297b5781548b820152908501908301612962565b505084890196505b50505050505092915050565b600061299b82866128f6565b84516129ab818360208901612235565b6129b7818301866128f6565b979650505050505050565b600084516129d4818460208901612235565b8451908301906129ab818360208901612235565b6000816000190483118215151615612a0257612a026128ab565b500290565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612a396080830184612261565b9695505050505050565b600060208284031215612a5557600080fd5b81516116508161220256fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220e104c159fe21a1728dc6323c64435ac8be0154e68f1e538673f6747fa16a941a64736f6c634300080d0033"
  }
  ```
</CodeGroup>

**Create parameter definitions**

| Parameter | Description                                 | Example                                                |
| --------- | ------------------------------------------- | ------------------------------------------------------ |
| `from`    | The address that created the contract.      | `0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8`           |
| `gas`     | Contract gas fee to create the contract.    | `0x26384a`                                             |
| `input`   | Initialization code to create the contract. | `0x6060604052604051602080610516833981016040...`        |
| `value`   | The value sent to the contract.             | `0x0`                                                  |
| `to`      | Location address of the new contract.       | `0x3c9075f574edc2f630f918ebac5ccf1095d82cc2`           |
| `output`  | The contract code.                          | `0x60806040526004361061029f5760003560e01c806371501...` |
| `gasUsed` | Required fee (gas) to create the contract.  | `0x26384a`                                             |
| `type`    | Type of operation code (OPCODE).            | `CREATE`                                               |

### `SUICIDE`

* `SUICIDE` is captured when a smart contract is destroyed. That is when the [selfdestruct](https://solidity-by-example.org/hacks/self-destruct/) function of Solidity is used.
* `SUICIDE` transfers the contract's balance to the `address` specified in the `selfdestruct` function clearing onchain memory.
* The cleared memory is processed as a refund of the total gas cost to complete the transaction.

#### Example response

<CodeGroup>
  ```json json
  {
    "type": "SELFDESTRUCT",
    "from": "0x87051f6ba0562fdb0485763562bf34cb2ad705b1",
    "to": "0x000000000000000000000000000000000000dead",
    "value": "0x0",
    "gas": "0x0",
    "gasUsed": "0x0",
    "input": "0x",
    "output": "0x"
  }
  ```
</CodeGroup>

**SUICIDE parameter definitions**

| Parameter | Description                                                                                   | Example                                      |
| --------- | --------------------------------------------------------------------------------------------- | -------------------------------------------- |
| `from`    | The address of contract destroyed.                                                            | `0x87051f6ba0562fdb0485763562bf34cb2ad705b1` |
| `to`      | Address to send the remainder of contract `balance`.                                          | `0x000000000000000000000000000000000000dead` |
| `value`   | Value sent with the given transaction.                                                        | `0x0`                                        |
| `gas`     | Gas fee for the given trace action (SUICIDE trace actions do not cost any gas to be executed) | `0x0`                                        |
| `gasUsed` | Required fee (gas) to execute the given trace action.                                         | `0x0`                                        |
| `input`   | `null` for `SUICIDE`                                                                          | `0x0`                                        |
| `output`  | `null` for `SUICIDE`                                                                          | `0x0`                                        |
| `type`    | Type of operation code (OPCODE).                                                              | `SUICIDE`                                    |

### `CALL`

* `CALL` is used for transferring ETH between [externally owned accounts](/docs/web3-glossary#externally-owned-account) (EOAs).
* Also used to `CALL` a smart contract function.

#### Example response

<CodeGroup>
  ```json json
  {
    "type": "CALL",
    "from": "0xdead682186dff1408c169b7b36974af55d8c8473",
    "to": "0x6066150a2070cc165222141b47fd2ba0642b57a1",
    "value": "0x0",
    "gas": "0x173a8",
    "gasUsed": "0x124b0",
    "input": "0x15b6a37100000000000000000000000098b17e440c844e1d0f99897145828d3cd91890761e59117ba15350e0740348cfd4378065bce49b9951cbdd5fe19ebb2181e9bde0",
    "output": "0x",
    "calls": [
      {
        "type": "CALL",
        "from": "0x6066150a2070cc165222141b47fd2ba0642b57a1",
        "to": "0x6090a6e47849629b7245dfa1ca21d94cd15878ef",
        "value": "0x0",
        "gas": "0x165cf",
        "gasUsed": "0x3f4",
        "input": "0x5e43170900000000000000000000000098b17e440c844e1d0f99897145828d3cd91890761e59117ba15350e0740348cfd4378065bce49b9951cbdd5fe19ebb2181e9bddf",
        "output": "0x00000000000000000000000087051f6ba0562fdb0485763562bf34cb2ad705b1"
      }
    ]
  }
  ```
</CodeGroup>

**`CALL` parameter definitions**

| Parameter  | Description                                                         | Example                                      |
| ---------- | ------------------------------------------------------------------- | -------------------------------------------- |
| `from`     | Address of the sender.                                              | `0xdead682186dff1408c169b7b36974af55d8c8473` |
| `callType` | The type of `CALL`.                                                 | `CALL`                                       |
| `gas`      | The gas included in the transaction.                                | `0x173a8`                                    |
| `input`    | Specific call function on the contract.                             | `0x15b6a37100000000000000000000000098b...`   |
| `to`       | Address of the receiver.                                            | `0x6066150a2070cc165222141b47fd2ba0642b57a1` |
| `value`    | Transferred value amount.                                           | `0x0`                                        |
| `gasUsed`  | gas used to execute the transaction.                                | `0x124b0`                                    |
| `output`   | The result of the smart contract function call.                     | `0x`                                         |
| `calls`    | Array of trace actions that were executed due to this trace action. | `[{...}, {...}]`                             |
| `type`     | Type of operation code (OPCODE).                                    | `call`                                       |

## Helpful Resources

* [What are EVM Traces?](/docs/reference/what-are-evm-traces)
* [Trace API vs. Debug API](/docs/reference/trace-api-vs-debug-api)
* [trace\_call vs debug\_traceCall](/docs/reference/trace_call-vs-debug_tracecall)

------

# debug_getRawBlock

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns an RLP-encoded block.

Reference: https://www.alchemy.com/docs/chains/debug-api/debug-api-endpoints/debug-get-raw-block

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| BlockNumberOrTag | string or enum | Yes | The block number or tag (e.g., "latest", "earliest"). |

## Result

**RLP-encoded block** (string): RLP-encoded block as a hexadecimal string

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "debug_getRawBlock",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf90236a09f73691f6dabca4f0a99b05d0a701995506aa311dcaa9ce9833d6f4ca474c162a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794c6e2459991bfe27cca6d86722f35da23a1e4cb97a078103ea8c47231886481d72ec1afae6eeb06c3773ce24a91323d5c9eed69d4cca0008992da2531db404f07b0871dd620a94ba346963e1b1c6dc7b00748e8593a1ea0b6c3890d9604434fc52f722848c84d1770add20cd75bbc28cdedff42940dbb56b90100200800000400000002000e0000000401000000440100000000c0400600000002000801000000040480020840048000000000400000000000000020004220000011002000000000000204000800000010010002000002000000000040a000000000000400020000010885000000000808000000008800001004002010020300005000000010002110410402000000000000000890000008000000000000000000020040000002000000000000810400000040006000004000004080020000000000000022001000000000000840400000000220250000000000080402000420000418000000000000000400040000004080040010200000000000108020020000808332026e8401c9c380833e3c3c846436f93899d883010b05846765746888676f312e32302e32856c696e7578a0112d8f15793e7df7f8dcdb21c891cff78c0d1839cb5b6dcd06116cdbb99536ae88000000000000000008a0cdb97712af6685bb9650d21d609525913293c48adda7c45990926daada335c9b",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "debug_getRawBlock",
  "params": [
    "string"
  ]
}'
```



------

# debug_getRawHeader

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns an RLP-encoded header.

Reference: https://www.alchemy.com/docs/chains/debug-api/debug-api-endpoints/debug-get-raw-header

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| BlockNumberOrTag | string or enum | Yes | The block number or tag (e.g., "latest", "earliest"). |

## Result

**RLP-encoded header** (string): RLP-encoded header as a hexadecimal string

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "debug_getRawHeader",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf90236a09f73691f6dabca4f0a99b05d0a701995506aa311dcaa9ce9833d6f4ca474c162a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794c6e2459991bfe27cca6d86722f35da23a1e4cb97a078103ea8c47231886481d72ec1afae6eeb06c3773ce24a91323d5c9eed69d4cca0008992da2531db404f07b0871dd620a94ba346963e1b1c6dc7b00748e8593a1ea0b6c3890d9604434fc52f722848c84d1770add20cd75bbc28cdedff42940dbb56b90100200800000400000002000e0000000401000000440100000000c0400600000002000801000000040480020840048000000000400000000000000020004220000011002000000000000204000800000010010002000002000000000040a000000000000400020000010885000000000808000000008800001004002010020300005000000010002110410402000000000000000890000008000000000000000000020040000002000000000000810400000040006000004000004080020000000000000022001000000000000840400000000220250000000000080402000420000418000000000000000400040000004080040010200000000000108020020000808332026e8401c9c380833e3c3c846436f93899d883010b05846765746888676f312e32302e32856c696e7578a0112d8f15793e7df7f8dcdb21c891cff78c0d1839cb5b6dcd06116cdbb99536ae88000000000000000008a0cdb97712af6685bb9650d21d609525913293c48adda7c45990926daada335c9b",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "debug_getRawHeader",
  "params": [
    "string"
  ]
}'
```



------

# debug_getRawReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of EIP-2718 binary-encoded receipts.

Reference: https://www.alchemy.com/docs/chains/debug-api/debug-api-endpoints/debug-get-raw-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| BlockNumberOrTag | string or enum | Yes | The block number or tag (e.g., "latest", "earliest"). |

## Result

**RLP-encoded receipts** (string[]): Array of EIP-2718 binary-encoded receipts as hexadecimal strings.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "debug_getRawReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xf901a60182c70eb9010000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000002000000000000000000000008000000000000000000000000000000000040000000001000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000100000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000002000000000100000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000020000000000000000f89df89b947753cfad258efbc52a9a1452e42ffbce9be486cbf863a0ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa00000000000000000000000000828d0386c1122e565f07dd28c7d1340ed5b3315a000000000000000000000000021849e99c31e3113a489d7eb0fd4d8c0edbe47afa00000000000000000000000000000000000000000000000000000000029b92700",
    "0xf901a70183018e1cb9010000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000002000000000000000000000008000000000000000000000000000000000040000000001000000000000000000000000000000000000000000000000010000000000000000000000000000000008000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000002000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000020000000000000000f89df89b947753cfad258efbc52a9a1452e42ffbce9be486cbf863a0ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa00000000000000000000000000828d0386c1122e565f07dd28c7d1340ed5b3315a000000000000000000000000069cda9d6cc6ce05982d0b4fdf9480f2991f39b5aa00000000000000000000000000000000000000000000000000000000029b92700"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "debug_getRawReceipts",
  "params": [
    "string"
  ]
}'
```



------

# debug_traceBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Replays the block that is already present in the database.

Reference: https://www.alchemy.com/docs/chains/debug-api/debug-api-endpoints/debug-trace-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | Block hash for the block to be traced. |
| Tracer | object | No | Tracer object for the call. |

## Result

**Block traces** (object[]): Array of block traces.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "debug_traceBlockByHash",
  "params": [
    "0x7bd8357213af34d3fe7f725d9b21187a5a58127e39aac5776fd0594e3391ea6e"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "type": "CALL",
    "from": "0xe088776deabb472ffd2843e330e79c880a5f979e",
    "to": "0x70526cc7a6d6320b44122ea9d2d07670accc85a1",
    "value": "0xec5162",
    "gas": "0x7df99",
    "gasUsed": "0x34e29",
    "input": "0x00e051479210030000000000000000000000f160594a405d53811d3bc4766596efd80fd545a27000000000000000000000128acb080000000000000000000000000000000000007f150bd6f54c40a34d7c3d5e9f56000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009cc54410f805000000000000000000000000000fffd8963efd1fc6a506488495d951d5263988d2500000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002d6b175474e89094c44da98b954eedeac495271d0fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc20001f4010001c4ba12222222228d8ba445958a75a0704d566bf2c80000000000000000000052bbbe2900000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000007f150bd6f54c40a34d7c3d5e9f56000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009cc54410f805000000000000000000000000000fffd8963efd1fc6a506488495d951d5263988d2500000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002d6b175474e89094c44da98b954eedeac495271d0fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc20001f4010001c4ba12222222228d8ba445958a75a0704d566bf2c80000000000000000000052bbbe2900000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000007f150bd6f54c40a34d7c3d5e9f56000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009cc54410f805000000000000000000000000000fffd8963efd1fc6a506488495d951d5263988d2500000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002d6b175474e89094c44da98b954eedeac495271d0fc02aaa39b223fe8d0a0e5c4f27ead9083c756cc20001f4010001c4ba12222222228d8ba445958a75a0704d566bf2c80000000000000000000052bbbe2900000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000007f150bd6f54c40a34d7c3d5e9f56000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000ff00000000000000000000000000000000008485b36623632ffa5e486008df4d0b6d363defdb00020000000000000000034a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000005f98805a4e8be255a32880fdec7f6728c6568ba000000000000000000000000000000000000000000000003acbfe2488ff5c000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000000f19663f2ca0454accad3e094448ea6f7744388045400000000000000000000128acb08000000000000000000000000dfee68a9adb981cd08699891a11cabe10f25ec44000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000003a6d6cd1833904000000000000000000000000000000000000000000000000000000000001000276a400000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002d5f98805a4e8be255a32880fdec7f6728c6568ba0c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000bb80000"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "debug_traceBlockByHash",
  "params": [
    "0x7bd8357213af34d3fe7f725d9b21187a5a58127e39aac5776fd0594e3391ea6e",
    {
      "tracer": "callTracer",
      "tracerConfig": {
        "onlyTopCall": false
      }
    }
  ]
}'
```



------

# debug_traceBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Replays the block that is already present in the database.

Reference: https://www.alchemy.com/docs/chains/debug-api/debug-api-endpoints/debug-trace-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number | string or enum | Yes | The block number or tag (e.g., "latest", "earliest"). |
| Tracer | object | No | Tracer object for the call. |

## Result

**Block traces** (object[]): Array of block traces.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "debug_traceBlockByNumber",
  "params": [
    "0xccde12"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "type": "CALL",
    "from": "0xe088776deabb472ffd2843e330e79c880a5f979e",
    "to": "0x70526cc7a6d6320b44122ea9d2d07670accc85a1",
    "value": "0x0",
    "gas": "0x7fffffffffffadf7",
    "gasUsed": "0x0",
    "input": "0x",
    "output": "0x"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "debug_traceBlockByNumber",
  "params": [
    "0xccde12",
    {
      "tracer": "callTracer",
      "tracerConfig": {
        "onlyTopCall": false
      }
    }
  ]
}'
```



------

# debug_traceCall

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Runs an eth_call within the context of the given block execution using the final state of parent block as the base.

Reference: https://www.alchemy.com/docs/chains/debug-api/debug-api-endpoints/debug-trace-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction Object | object | Yes | The transaction call object. |
| Block identifier | string or enum | Yes | Block hash, block number (in hex), or block tag. |
| Options | object | No | Options for the call including tracer and state overrides. |

## Result

**Call traces** (object[]): Array of call traces.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "debug_traceCall",
  "params": [
    {
      "type": "0x02",
      "from": "0xcdd37ada79f589c15bd4f8fd2083dc88e34a2af2",
      "to": "0xdac17f958d2ee523a2206206994597c13d831ec7",
      "gas": "0xb59b",
      "value": "0x0",
      "data": "0xa9059cbb000000000000000000000000b29d1cef6da3262df35fdee71a176c62687e747d000000000000000000000000000000000000000000000000000000001e3f0ccc",
      "nonce": "0x8eaee",
      "accessList": [],
      "maxPriorityFeePerGas": "0xb2d05e00",
      "maxFeePerGas": "0x1ceb1eec4"
    },
    "0x154bd82",
    {
      "tracer": "callTracer",
      "stateOverrides": {
        "0xdac17f958d2ee523a2206206994597c13d831ec7": {
          "stateDiff": {
            "0x0000000000000000000000000000000000000000000000000000000000000007": "0x000000000000000000000000000000000000000000000000000000746a528800"
          }
        }
      }
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "type": "CALL",
    "from": "0xe088776deabb472ffd2843e330e79c880a5f979e",
    "to": "0x70526cc7a6d6320b44122ea9d2d07670accc85a1",
    "value": "0x0",
    "gas": "0x7fffffffffffadf7",
    "gasUsed": "0x0",
    "input": "0x",
    "output": "0x"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "debug_traceCall",
  "params": [
    {
      "type": "0x02",
      "from": "0xcdd37ada79f589c15bd4f8fd2083dc88e34a2af2",
      "to": "0xdac17f958d2ee523a2206206994597c13d831ec7",
      "gas": "0xb59b",
      "value": "0x0",
      "data": "0xa9059cbb000000000000000000000000b29d1cef6da3262df35fdee71a176c62687e747d000000000000000000000000000000000000000000000000000000001e3f0ccc",
      "nonce": "0x8eaee",
      "accessList": [],
      "maxPriorityFeePerGas": "0xb2d05e00",
      "maxFeePerGas": "0x1ceb1eec4"
    },
    "string",
    {
      "tracer": {
        "tracer": "callTracer",
        "tracerConfig": {
          "onlyTopCall": false
        }
      },
      "stateOverrides": {
        "property1": {
          "balance": "string",
          "nonce": "string",
          "code": "string",
          "state": {
            "property1": "string"
          },
          "stateDiff": {
            "property1": "string"
          },
          "movePrecompileToAddress": "string"
        }
      }
    }
  ]
}'
```



------

# debug_traceCallMany

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Runs multiple eth_call requests within the context of the given block execution using the final state of the parent block as the base. Each bundle can contain multiple transactions and optional block overrides. Returns nested arrays of traces (outer array per bundle, inner array per transaction).

Reference: https://www.alchemy.com/docs/chains/debug-api/debug-api-endpoints/debug-trace-call-many

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Bundles | object[] | Yes | An array of call bundles. Each bundle is an object containing an array of transaction call objects and optional block header overrides. |
| Simulation Context | object | Yes | The simulation context specifying the block to simulate against. |
| Options | object | No | Options for the trace including tracer type and state overrides. |

## Result

**Call traces** (object[][]): Nested array of call traces. The outer array corresponds to each bundle and the inner array corresponds to each transaction within a bundle.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "debug_traceCallMany",
  "params": [
    [
      {
        "transactions": [
          {
            "from": "0xcdd37ada79f589c15bd4f8fd2083dc88e34a2af2",
            "to": "0xdac17f958d2ee523a2206206994597c13d831ec7",
            "gas": "0xb59b",
            "value": "0x0",
            "data": "0xa9059cbb000000000000000000000000b29d1cef6da3262df35fdee71a176c62687e747d000000000000000000000000000000000000000000000000000000001e3f0ccc"
          }
        ]
      },
      {
        "transactions": [
          {
            "from": "0xe088776deabb472ffd2843e330e79c880a5f979e",
            "to": "0x70526cc7a6d6320b44122ea9d2d07670accc85a1",
            "value": "0x0",
            "data": "0x"
          }
        ]
      }
    ],
    {
      "blockNumber": "0x154bd82",
      "transactionIndex": -1
    },
    {
      "tracer": "callTracer"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    [
      {
        "type": "CALL",
        "from": "0xcdd37ada79f589c15bd4f8fd2083dc88e34a2af2",
        "to": "0xdac17f958d2ee523a2206206994597c13d831ec7",
        "value": "0x0",
        "gas": "0xb59b",
        "gasUsed": "0x5d5a",
        "input": "0xa9059cbb000000000000000000000000b29d1cef6da3262df35fdee71a176c62687e747d000000000000000000000000000000000000000000000000000000001e3f0ccc",
        "output": "0x"
      }
    ],
    [
      {
        "type": "CALL",
        "from": "0xe088776deabb472ffd2843e330e79c880a5f979e",
        "to": "0x70526cc7a6d6320b44122ea9d2d07670accc85a1",
        "value": "0x0",
        "gas": "0x7fffffffffffadf7",
        "gasUsed": "0x0",
        "input": "0x",
        "output": "0x"
      }
    ]
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "debug_traceCallMany",
  "params": [
    [
      {
        "transactions": [
          {
            "from": "0xcdd37ada79f589c15bd4f8fd2083dc88e34a2af2",
            "to": "0xdac17f958d2ee523a2206206994597c13d831ec7",
            "gas": "0xb59b",
            "value": "0x0",
            "data": "0xa9059cbb000000000000000000000000b29d1cef6da3262df35fdee71a176c62687e747d000000000000000000000000000000000000000000000000000000001e3f0ccc"
          }
        ]
      },
      {
        "transactions": [
          {
            "from": "0xe088776deabb472ffd2843e330e79c880a5f979e",
            "to": "0x70526cc7a6d6320b44122ea9d2d07670accc85a1",
            "value": "0x0",
            "data": "0x"
          }
        ]
      }
    ],
    {
      "blockNumber": "0x154bd82",
      "transactionIndex": -1
    },
    {
      "tracer": "callTracer"
    }
  ]
}'
```



------

# debug_traceTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Attempts to run the transaction in the exact same manner as it was executed on the network.

Reference: https://www.alchemy.com/docs/chains/debug-api/debug-api-endpoints/debug-trace-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | Hash of the transaction to be traced. |
| Options | object | No | Options for the call. |

## Result

**Transaction trace** (object[]): Trace for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "debug_traceTransaction",
  "params": [
    "0x8fc90a6c3ee3001cdcbbb685b4fbe67b1fa2bec575b15b0395fea5540d0901ae"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "name": "transaction trace",
      "value": {
        "type": "CALL",
        "from": "0xe088776deabb472ffd2843e330e79c880a5f979e",
        "to": "0x70526cc7a6d6320b44122ea9d2d07670accc85a1",
        "value": "0x0",
        "gas": "0x7fffffffffffadf7",
        "gasUsed": "0x0",
        "input": "0x",
        "output": "0x"
      }
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "debug_traceTransaction",
  "params": [
    "0x8fc90a6c3ee3001cdcbbb685b4fbe67b1fa2bec575b15b0395fea5540d0901ae",
    {
      "tracer": "callTracer",
      "tracerConfig": {
        "onlyTopCall": false
      },
      "timeout": "string"
    }
  ]
}'
```



------

# Yellowstone gRPC Overview

> Overview of Yellowstone gRPC - High-performance real-time Solana data streaming

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

Yellowstone gRPC is a high-performance streaming interface for Solana blockchain data, built on the Geyser plugin architecture. It provides real-time access to accounts, transactions, blocks, and slots through efficient gRPC streaming connections.

<Info>
  Yellowstone gRPC is supported on both Solana Mainnet (`https://solana-mainnet.g.alchemy.com`) and Solana Devnet (`https://solana-devnet.g.alchemy.com`). Both endpoints use the same `X-Token` authentication and the same `SubscribeRequest` API. Pricing is the same on both networks.
</Info>

## Why Yellowstone gRPC?

Yellowstone gRPC offers significant advantages over traditional REST and WebSocket APIs:

* **Real-time streaming**: Receive blockchain data as it happens with minimal latency
* **Efficient filtering**: Subscribe only to the specific data you need with powerful filter options
* **High throughput**: Handle large volumes of blockchain data efficiently
* **Persistent connections**: Maintain long-lived streaming connections for continuous data flow
* **Type safety**: Leverage Protocol Buffers for strongly-typed data structures

## Alchemy's Yellowstone gRPC enhancements

Alchemy's implementation of Yellowstone gRPC provides enterprise-grade reliability and features beyond standard implementations:

### High availability architecture

Our **multi-producer and multi-consumer architecture** ensures minimal downtime for your applications:

* Multiple Solana nodes feed data to the gRPC service simultaneously
* If one producer node goes down, others seamlessly continue providing data
* Client connections are automatically load-balanced across multiple consumer endpoints
* No single point of failure in the data pipeline

### Historical data replay (6000 slots)

Access historical blockchain data with our **6000-slot replayability capacity**:

* Use the `from_slot` field in `SubscribeRequest` to replay data from any slot within the last 6000 slots
* Perfect for recovering from application restarts or processing historical events
* Test and validate your application logic against real historical data
* Fill data gaps if your application experienced temporary downtime

### Block lag mitigation

Our multi-producer architecture **eliminates single-node block lag issues**:

* Data is sourced from multiple Solana nodes simultaneously
* If one node falls behind, data continues flowing from healthy nodes
* Consensus mechanism ensures data consistency across producers
* Provides the freshest possible blockchain data to your applications

## Common use cases

Yellowstone gRPC is ideal for:

* **DeFi applications**: Monitor liquidity pools, token accounts, and price feeds in real-time
* **NFT platforms**: Track mints, transfers, and marketplace activities
* **Wallets**: Monitor account balances and transaction confirmations
* **Analytics platforms**: Collect comprehensive blockchain data for analysis
* **Trading bots**: React to market conditions with minimal latency
* **Indexers**: Build custom blockchain indexing solutions

## Getting started

Ready to start streaming Solana data? Check out the [Quickstart guide](/docs/reference/yellowstone-grpc-quickstart) to make your first connection.

------

# Yellowstone gRPC Quickstart

> Get started with Yellowstone gRPC streaming in minutes

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Quickstart guide

This guide walks you through making your first Yellowstone gRPC connection and streaming real-time Solana data.

<Info>
  Yellowstone gRPC is supported on both Solana Mainnet and Solana Devnet. The examples below use the Mainnet endpoint (`https://solana-mainnet.g.alchemy.com`); to target Devnet, replace it with `https://solana-devnet.g.alchemy.com`. Both endpoints use the same `X-Token` auth header and the same pricing.
</Info>

## Prerequisites

Before you begin, ensure you have:

* **Alchemy Team with PAYG or Enterprise Plan**: Yellowstone gRPC is only available to PAYG (Pay-As-You-Go) and Enterprise teams
* **Create an Alchemy app**: You'll need to create an app in the Alchemy Dashboard to get your endpoint URL and API key
* **Get your API key**: Your Alchemy API key will be used as the `X-Token` header for authentication
* Basic understanding of gRPC concepts
* Understanding of Solana's slot and commitment level concepts

## Authentication

Get your endpoint URL and API key from the Alchemy Dashboard.
![](https://alchemyapi-res.cloudinary.com/image/upload/v1764192955/docs/api-reference/yellowstone/yellowstone-get_api_key.png "Yellowstone Get API Key")

**Important**: Your Alchemy API key must be passed as the `X-Token` header in your gRPC requests (not in the URL).

```rust
let endpoint = "https://solana-mainnet.g.alchemy.com";
let x_token = "ALCHEMY_API_KEY";

let client = GeyserGrpcClient::build_from_shared(endpoint)?
        .tls_config(ClientTlsConfig::new().with_native_roots())?
        .x_token(Some(x_token))?
        .connect()
        .await?;
```

## Your first connection

### Rust example

Below is a basic example of connecting to Yellowstone gRPC with Rust and streaming all transactions.

```rust
use anyhow::Result;
use futures::{sink::SinkExt, stream::StreamExt};
use solana_signature::Signature;
use std::collections::HashMap;
use yellowstone_grpc_client::{ClientTlsConfig, GeyserGrpcClient};
use yellowstone_grpc_proto::geyser::{
    CommitmentLevel, SubscribeRequest, SubscribeRequestFilterTransactions,
    subscribe_update::UpdateOneof,
};

#[tokio::main]
async fn main() -> Result<()> {
    // Set up connection parameters
    let endpoint = "https://solana-mainnet.g.alchemy.com";
    let x_token = "ALCHEMY_API_KEY"; // Replace with your Alchemy API key
    
    // Build and connect the gRPC client with TLS and authentication
    let mut client = GeyserGrpcClient::build_from_shared(endpoint)?
        .tls_config(ClientTlsConfig::new().with_native_roots())?
        .x_token(Some(x_token))? // API key passed as X-Token header
        .connect()
        .await?;

    // Create a bidirectional stream for subscribing to updates
    let (mut tx, mut stream) = client.subscribe().await?;

    // Send subscription request to filter for non-vote, non-failed transactions
    tx.send(SubscribeRequest {
        transactions: HashMap::from([(
            "all_transactions".to_string(),
            SubscribeRequestFilterTransactions {
                vote: Some(false),   // Exclude vote transactions
                failed: Some(false), // Exclude failed transactions
                ..Default::default()
            },
        )]),
        commitment: Some(CommitmentLevel::Confirmed as i32), // Use confirmed commitment level
        ..Default::default()
    })
    .await?;

    // Process incoming transaction updates
    while let Some(Ok(msg)) = stream.next().await {
        if let Some(UpdateOneof::Transaction(tx)) = msg.update_oneof {
            // Extract and display transaction signature
            let sig = tx
                .transaction
                .and_then(|t| Some(Signature::try_from(t.signature.as_slice()).unwrap()))
                .unwrap_or_default();
            println!("Slot: {} | Signature: {}", tx.slot, sig);
        }
    }

    Ok(())
}
```

### Other languages

Yellowstone gRPC supports multiple programming languages. Choose the client that fits your stack:

**Official Examples Available:**

* **Rust** - [Official Rust Example](https://github.com/rpcpool/yellowstone-grpc/tree/master/examples/rust)
* **Python** - [Official Python Example](https://github.com/rpcpool/yellowstone-grpc/tree/master/examples/python)
* **TypeScript/JavaScript** - [Official TypeScript Example](https://github.com/rpcpool/yellowstone-grpc/tree/master/examples/typescript)
* **Go** - [Official Go Example](https://github.com/rpcpool/yellowstone-grpc/tree/master/examples/golang)

## Next steps

Now that you've established your first connection, explore:

* [API Reference](/docs/reference/yellowstone-grpc-api-overview) - Detailed documentation of all filters and options
* [Code Examples](/docs/reference/yellowstone-grpc-examples) - See complete working examples
* [Best Practices](/docs/reference/yellowstone-grpc-best-practices) - Learn production patterns and optimization tips

------

# API Reference Overview

> Yellowstone gRPC subscription types and filtering options

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# API reference

Yellowstone gRPC provides real-time streaming of Solana blockchain data through a flexible subscription API.

## Subscription types

<CardGroup>
  <Card title="Subscribe Request" href="/docs/reference/yellowstone-grpc-subscribe-request">
    The base structure for all subscriptions. Defines filters, commitment levels, and combines multiple subscription types in a single request.
  </Card>

  <Card title="Subscribe to Slots" href="/docs/reference/yellowstone-grpc-subscribe-slots">
    Track slot progression and chain state. Essential for understanding confirmations and synchronizing with blockchain time.
  </Card>

  <Card title="Subscribe to Transactions" href="/docs/reference/yellowstone-grpc-subscribe-transactions">
    Stream transactions with filters for accounts, vote/non-vote, and success/failure status.
  </Card>

  <Card title="Subscribe to Accounts" href="/docs/reference/yellowstone-grpc-subscribe-accounts">
    Monitor account changes with filters for addresses, owners, data patterns, and balances.
  </Card>

  <Card title="Subscribe to Blocks" href="/docs/reference/yellowstone-grpc-subscribe-blocks">
    Stream complete blocks with all transactions and metadata.
  </Card>
</CardGroup>

------

# Subscribe Request

> Comprehensive guide to the SubscribeRequest structure and configuration

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Subscribe request

The `SubscribeRequest` message is the foundation of all Yellowstone gRPC subscriptions. It defines what data you want to receive and how you want to filter it.

## Request structure

A `SubscribeRequest` contains multiple subscription types that can be combined in a single request:

```rust
message SubscribeRequest {
    map<string, SubscribeRequestFilterAccounts> accounts = 1;
    map<string, SubscribeRequestFilterSlots> slots = 2;
    map<string, SubscribeRequestFilterTransactions> transactions = 3;
    map<string, SubscribeRequestFilterTransactions> transactions_status = 10;
    map<string, SubscribeRequestFilterBlocks> blocks = 4;
    map<string, SubscribeRequestFilterBlocksMeta> blocks_meta = 5;
    map<string, SubscribeRequestFilterEntry> entry = 8;
    optional CommitmentLevel commitment = 6;
    repeated SubscribeRequestAccountsDataSlice accounts_data_slice = 7;
    optional SubscribeRequestPing ping = 9;
    optional uint64 from_slot = 11;
}
```

## Key parameters

### `accounts`

Map of account subscription filters. The key is a user-defined identifier for the subscription.

**Type**: `map<string, SubscribeRequestFilterAccounts>`

See [Subscribe to Accounts](/docs/reference/yellowstone-grpc-subscribe-accounts) for details.

### `slots`

Map of slot subscription filters. The key is a user-defined identifier for the subscription.

**Type**: `map<string, SubscribeRequestFilterSlots>`

See [Subscribe to Slots](/docs/reference/yellowstone-grpc-subscribe-slots) for details.

### `transactions`

Map of transaction subscription filters. The key is a user-defined identifier for the subscription.

**Type**: `map<string, SubscribeRequestFilterTransactions>`

See [Subscribe to Transactions](/docs/reference/yellowstone-grpc-subscribe-transactions) for details.

### `blocks`

Map of full block subscription filters. The key is a user-defined identifier for the subscription.

**Type**: `map<string, SubscribeRequestFilterBlocks>`

See [Subscribe to Blocks](/docs/reference/yellowstone-grpc-subscribe-blocks) for details.

### `blocks_meta`

Map of block metadata subscription filters. The key is a user-defined identifier for the subscription.

**Type**: `map<string, SubscribeRequestFilterBlocksMeta>`

### `entry`

Map of entry subscription filters. The key is a user-defined identifier for the subscription.

**Type**: `map<string, SubscribeRequestFilterEntry>`

Entries represent the unit of blockchain data between transactions and blocks. Entry subscriptions are advanced use cases for low-level block construction monitoring.

### `transactions_status`

Map of transaction status subscription filters. Similar to transaction subscriptions but for transaction status updates.

**Type**: `map<string, SubscribeRequestFilterTransactions>`

Transaction status updates provide information about transaction execution status separately from full transaction data.

### `commitment`

The commitment level for the subscription. Controls when updates are sent based on Solana's confirmation status.

**Type**: `optional CommitmentLevel`

**Values**:

* `PROCESSED` - Fastest updates, can be rolled back
* `CONFIRMED` - Supermajority vote received (recommended for most use cases)
* `FINALIZED` - Fully finalized, cannot be rolled back

**Default**: `CONFIRMED`

### `accounts_data_slice`

Specify which portions of account data to include in responses. Reduces bandwidth when you only need specific data ranges.

**Type**: `repeated SubscribeRequestAccountsDataSlice`

**Structure**:

```rust
message SubscribeRequestAccountsDataSlice {
    uint64 offset = 1;
    uint64 length = 2;
}
```

Each slice specifies an offset and length to extract from account data.

### `from_slot`

**Start streaming from a historical slot.** This allows you to replay up to 6000 slots of historical data.

**Type**: `optional uint64`

**Behavior**:

* If specified, streaming begins from this slot number
* All matching data from `from_slot` onwards will be sent
* Historical data up to **6000 slots** back is available (~40 minutes)
* If not specified, streaming begins from the current slot

**Use Cases**:

* Recover from application downtime
* Backfill historical data
* Test application logic against real historical events
* Debug specific slot ranges

### `ping`

Can be used to send a ping to the server to maintain connection health.

**Type**: `optional SubscribeRequestPing`

## Filter identifiers

Each filter map uses string keys that you define. These identifiers are included in `SubscribeUpdate` messages, allowing you to determine which filter matched the data.

**Best Practices**:

* Use descriptive identifiers (e.g., "usdc\_accounts", "swap\_transactions")
* Keep identifiers consistent across your application
* Use identifiers to route data to different handlers

## Combining multiple subscriptions

You can combine multiple subscription types in a single request:

```rust
// Create a subscription request that combines multiple subscription types
SubscribeRequest {
    // Subscribe to all slot updates
    // The key "all_slots" is a user-defined identifier that will be included in responses
    slots: HashMap::from([(
        "all_slots".to_string(),
        SubscribeRequestFilterSlots {
            // Use default filter settings to receive all slot updates
            ..Default::default()
        },
    )]),
    
    // Subscribe to transactions with specific filters
    // The key "all_transactions" identifies this subscription in responses
    transactions: HashMap::from([(
        "all_transactions".to_string(),
        SubscribeRequestFilterTransactions {
            vote: Some(false),   // Exclude vote transactions to reduce data volume
            failed: Some(false), // Exclude failed transactions (only successful ones)
            // Use default values for other filter fields (no account/signature filters)
            ..Default::default()
        },
    )]),
    
    // Set commitment level to CONFIRMED for balance between speed and reliability
    // CONFIRMED means supermajority vote has been received
    commitment: Some(CommitmentLevel::Confirmed as i32),
    
    // Use default values for other subscription types (accounts, blocks, etc.)
    ..Default::default()
}
```

## Response: `SubscribeUpdate`

The server responds with a stream of `SubscribeUpdate` messages containing:

```rust
message SubscribeUpdate {
    repeated string filters = 1;
    oneof update_oneof {
        SubscribeUpdateAccount account = 2;
        SubscribeUpdateSlot slot = 3;
        SubscribeUpdateTransaction transaction = 4;
        SubscribeUpdateTransactionStatus transaction_status = 10;
        SubscribeUpdateBlock block = 5;
        SubscribeUpdatePing ping = 6;
        SubscribeUpdatePong pong = 9;
        SubscribeUpdateBlockMeta block_meta = 7;
        SubscribeUpdateEntry entry = 8;
    }
    google.protobuf.Timestamp created_at = 11;
}
```

The `filters` field contains the identifiers of the filters that matched this update.

## Next steps

Explore specific subscription types:

* [Subscribe to Accounts](/docs/reference/yellowstone-grpc-subscribe-accounts) - Real-time account updates
* [Subscribe to Transactions](/docs/reference/yellowstone-grpc-subscribe-transactions) - Transaction streaming
* [Subscribe to Slots](/docs/reference/yellowstone-grpc-subscribe-slots) - Slot progression tracking
* [Subscribe to Blocks](/docs/reference/yellowstone-grpc-subscribe-blocks) - Full block data

------

# Subscribe to Slots

> Track Solana slot progression and chain state in real-time

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Subscribe to slots

Slot subscriptions provide real-time updates about Solana's slot progression. This is essential for understanding chain state, tracking confirmations, and synchronizing your application with the blockchain.

## Overview

A slot represents a period of time (400ms) during which a leader can produce a block. Slot subscriptions notify you as slots progress through different states:

* When a slot is first created
* When a slot becomes frozen (no more transactions can be added)
* When a slot reaches different commitment levels
* Parent-child relationships between slots

## Filter structure

```rust
message SubscribeRequestFilterSlots {
    optional bool filter_by_commitment = 1;
    optional bool interslot_updates = 2;
}
```

## Filter options

### Filter by commitment

Control whether to receive updates only for specific commitment levels.

**Field**: `filter_by_commitment`\
**Type**: `bool`\
**Default**: `false`

**When `false`**:

* Receive updates for all slot state changes
* Most comprehensive view of chain progression

**When `true`**:

* Only receive updates matching the commitment level specified in the main `SubscribeRequest`
* Reduces update volume
* Useful when you only care about confirmed or finalized slots

### Interslot updates

Control whether to receive updates during slot progression (before slot completion).

**Field**: `interslot_updates`\
**Type**: `optional bool`\
**Default**: `false`

**When `true`**:

* Receive multiple updates as slot progresses through different states
* More granular view of slot lifecycle
* Higher update volume

**When `false`**:

* Receive updates only at major slot state transitions
* Lower update volume

## Response structure

Slot updates arrive as `SubscribeUpdateSlot` messages:

```rust
message SubscribeUpdateSlot {
    uint64 slot = 1;
    optional uint64 parent = 2;
    SlotStatus status = 3;
    optional string dead_error = 4;
}

enum SlotStatus {
    SLOT_PROCESSED = 0;
    SLOT_CONFIRMED = 1;
    SLOT_FINALIZED = 2;
    SLOT_FIRST_SHRED_RECEIVED = 3;
    SLOT_COMPLETED = 4;
    SLOT_CREATED_BANK = 5;
    SLOT_DEAD = 6;
}
```

### Fields

**`slot`**: The slot number\
**`parent`**: Parent slot number (optional)\
**`status`**: Current status of the slot (see SlotStatus enum)\
**`dead_error`**: If present, error message indicating why the slot is dead/skipped

### Slot status values

**`SLOT_PROCESSED`** (0): Slot has been processed by the validator\
**`SLOT_CONFIRMED`** (1): Slot has received supermajority confirmation\
**`SLOT_FINALIZED`** (2): Slot is finalized and cannot be rolled back\
**`SLOT_FIRST_SHRED_RECEIVED`** (3): First shred (data fragment) of the slot received\
**`SLOT_COMPLETED`** (4): Slot has been completed\
**`SLOT_CREATED_BANK`** (5): Bank (account state) created for this slot\
**`SLOT_DEAD`** (6): Slot has been marked as dead/skipped

------

# Subscribe to Transactions

> Stream Solana transactions in real-time with powerful filtering options

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Subscribe to transactions

Transaction subscriptions allow you to monitor Solana transactions in real-time. This is crucial for DEX integrations, wallet monitoring, program event tracking, and transaction-based analytics.

## Overview

Transaction subscriptions provide real-time updates for transactions matching your filter criteria. You can filter by:

* Transactions involving specific accounts
* Transactions calling specific programs
* Vote vs non-vote transactions
* Failed vs successful transactions
* Complex account inclusion/exclusion rules

## Filter structure

```rust
message SubscribeRequestFilterTransactions {
    optional bool vote = 1;
    optional bool failed = 2;
    optional string signature = 3;
    repeated string account_include = 4;
    repeated string account_exclude = 5;
    repeated string account_required = 6;
}
```

## Filter options

### Vote transactions

Control whether to include vote transactions (validator voting).

**Field**: `vote`\
**Type**: `optional bool`

**Values**:

* `true` - Only vote transactions
* `false` - Only non-vote transactions
* `null` (unset) - Both vote and non-vote transactions

**Use Cases**:

* Set to `false` for most application use cases (excludes validator voting spam)
* Set to `true` only for validator monitoring or consensus analytics

### Failed transactions

Control whether to include failed transactions.

**Field**: `failed`\
**Type**: `optional bool`

**Values**:

* `true` - Only failed transactions
* `false` - Only successful transactions
* `null` (unset) - Both successful and failed transactions

**Use Cases**:

* Set to `false` to monitor only successful transactions
* Set to `true` to analyze failure patterns
* Leave unset to see all transaction attempts

### Signature filter

Filter for a specific transaction signature.

**Field**: `signature`\
**Type**: `optional string`

**Use Cases**:

* Track a specific transaction through confirmation stages
* Monitor a transaction you just submitted
* Verify transaction inclusion

**Note**: This filter is rarely used in streaming contexts because you must know the transaction signature ahead of time.

If you want to track the confirmation status of a transaction you are about to send (for example, a payment or program interaction),
you can set up a subscription for the expected signature before submitting the transaction. This way, you will receive real-time updates as soon as the transaction is processed by the network.

### Account include

Receive transactions involving any of these accounts.

**Field**: `account_include`\
**Type**: `repeated string`

**Behavior**: Transaction matches if it involves **any** of the specified accounts.

**Use Cases**:

* Monitor a user's wallet for any activity
* Track transactions for a set of token accounts
* Watch multiple DEX programs

### Account exclude

Exclude transactions involving these accounts.

**Field**: `account_exclude`\
**Type**: `repeated string`

**Behavior**: Transaction is excluded if it involves **any** of these accounts.

**Use Cases**:

* Exclude noise from specific accounts
* Filter out unwanted program interactions
* Remove specific token account activity

### Account required

Require all of these accounts to be present.

**Field**: `account_required`\
**Type**: `repeated string`

**Behavior**: Transaction matches only if it involves **all** specified accounts.

**Use Cases**:

* Match specific program interactions (program + user account)
* Find transactions involving multiple specific accounts
* Narrow down to very specific transaction patterns

## Combining account filters

Account filters work together:

1. Transaction must include at least one `account_include` (if specified)
2. Transaction must **not** include any `account_exclude` (if specified)
3. Transaction must include **all** `account_required` (if specified)

**Example Logic**:

```text
if account_include is set:
    must match at least one
    
if account_exclude is set:
    must match none
    
if account_required is set:
    must match all
```

## Response structure

Transaction updates arrive as `SubscribeUpdateTransaction` messages:

```rust
message SubscribeUpdateTransaction {
    SubscribeUpdateTransactionInfo transaction = 1;
    uint64 slot = 2;
}

message SubscribeUpdateTransactionInfo {
    bytes signature = 1;
    bool is_vote = 2;
    solana.storage.ConfirmedBlock.Transaction transaction = 3;
    solana.storage.ConfirmedBlock.TransactionStatusMeta meta = 4;
    uint64 index = 5;
}
```

### Key fields

**`signature`**: Transaction signature (unique identifier)\
**`is_vote`**: Whether this is a vote transaction\
**`meta`**: Transaction metadata including status, fees, logs, and account changes\
**`transaction`**: The full transaction data including instructions\
**`slot`**: Slot number where transaction was included\
**`index`**: Transaction index within the block

------

# Subscribe to Accounts

> Monitor Solana account changes in real-time with account subscriptions

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Subscribe to accounts

Account subscriptions allow you to monitor changes to Solana accounts in real-time. This is essential for tracking token balances, program state changes, and any other onchain data stored in accounts.

## Overview

Account subscriptions provide real-time updates whenever an account's data, lamports, or owner changes. You can filter accounts by:

* Specific account addresses
* Account owner (program)
* Data size
* Memory comparisons (byte patterns at specific offsets)

## Filter structure

```rust
message SubscribeRequestFilterAccounts {
    repeated string account = 2;
    repeated string owner = 3;
    repeated SubscribeRequestFilterAccountsFilter filters = 4;
    optional bool nonempty_txn_signature = 5;
}

message SubscribeRequestFilterAccountsFilter {
    oneof filter {
        SubscribeRequestFilterAccountsFilterMemcmp memcmp = 1;
        uint64 datasize = 2;
        bool token_account_state = 3;
        SubscribeRequestFilterAccountsFilterLamports lamports = 4;
    }
}

message SubscribeRequestFilterAccountsFilterMemcmp {
    uint64 offset = 1;
    oneof data {
        bytes bytes = 2;
        string base58 = 3;
        string base64 = 4;
    }
}

message SubscribeRequestFilterAccountsFilterLamports {
    oneof cmp {
        uint64 eq = 1;
        uint64 ne = 2;
        uint64 lt = 3;
        uint64 gt = 4;
    }
}
```

## Filter options

### Account address filter

Monitor specific accounts by their public key addresses.

**Field**: `account`\
**Type**: `repeated string`

**Use Cases**:

* Track a specific token account balance
* Monitor a user's wallet
* Watch a liquidity pool account
* Track NFT metadata accounts

### Owner filter

Subscribe to all accounts owned by a specific program.

**Field**: `owner`\
**Type**: `repeated string`

**Use Cases**:

* Monitor all accounts for a specific program
* Track all token accounts (Token Program owned)
* Watch all accounts for a custom program
* Monitor DEX program accounts

### Memcmp filter

Filter accounts by matching byte patterns at specific offsets in the account data.

**Field**: `memcmp` (within `filters`)\
**Type**: `SubscribeRequestFilterAccountsFilterMemcmp`

**Use Cases**:

* Filter token accounts for a specific mint
* Match accounts with specific discriminators
* Find accounts containing specific pubkeys

### Data size filter

Filter accounts by their data size.

**Field**: `datasize` (within `filters`)\
**Type**: `uint64`

**Use Cases**:

* Filter by account type based on size
* Optimize bandwidth by excluding large accounts
* Target specific program account types

### Token account state filter

Filter only for token accounts.

**Field**: `token_account_state` (within `filters`)\
**Type**: `bool`

### Lamports filter

Filter accounts by their lamport balance.

**Field**: `lamports` (within `filters`)\
**Type**: `SubscribeRequestFilterAccountsFilterLamports`

**Comparison operators**:

* `eq` - Equal to
* `ne` - Not equal to
* `lt` - Less than
* `gt` - Greater than

**Use Cases**:

* Find accounts with specific balance
* Monitor accounts above/below threshold
* Filter out empty accounts

### Nonempty transaction signature

Only receive account updates that are associated with a transaction.

**Field**: `nonempty_txn_signature`\
**Type**: `optional bool`

## Combining filters

You can combine multiple filters to narrow your subscription to match specific patterns.

## Response structure

When an account changes, you receive a `SubscribeUpdateAccount` message:

```rust
message SubscribeUpdateAccount {
    SubscribeUpdateAccountInfo account = 1;
    uint64 slot = 2;
    bool is_startup = 3;
}

message SubscribeUpdateAccountInfo {
    bytes pubkey = 1;
    uint64 lamports = 2;
    bytes owner = 3;
    bool executable = 4;
    uint64 rent_epoch = 5;
    bytes data = 6;
    uint64 write_version = 7;
    optional bytes txn_signature = 8;
}
```

------

# Subscribe to Blocks

> Stream complete Solana block data in real-time

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Subscribe to blocks

Block subscriptions provide real-time access to complete Solana blocks, including all transactions, account updates, and metadata. This is ideal for indexers, analytics platforms, and applications that need comprehensive blockchain data.

## Overview

A block contains:

* All transactions included in a slot
* Block metadata (hash, parent, height, etc.)
* Transaction ordering and execution results
* Block rewards
* Commitment status

Block subscriptions give you the complete picture of what happened in each slot.

## Filter structure

```rust
message SubscribeRequestFilterBlocks {
    repeated string account_include = 1;
    bool include_transactions = 2;
    bool include_accounts = 3;
    bool include_entries = 4;
}
```

## Filter options

### Account include

Filter blocks to only those containing transactions that involve specific accounts.

**Field**: `account_include`\
**Type**: `repeated string`

**Behavior**:

* If empty/unset: Receive all blocks
* If specified: Only receive blocks containing transactions involving at least one of these accounts

**Use Cases**:

* Index only blocks relevant to specific programs
* Track blocks containing activity for watched accounts
* Reduce data volume by filtering at the source

### Include transactions

Control whether full transaction data is included.

**Field**: `include_transactions`\
**Type**: `bool`\
**Default**: `true`

**When `true`**:

* Full transaction details included in each block
* Larger payload size
* Complete transaction information available

**When `false`**:

* Only transaction signatures included
* Smaller payload size
* Useful when you only need block structure

### Include accounts

Control whether account update information is included.

**Field**: `include_accounts`\
**Type**: `bool`\
**Default**: `false`

**When `true`**:

* Account state changes included
* Shows which accounts were modified in each transaction
* Larger payload size

**When `false`**:

* No account update information
* Smaller payload size

### Include entries

Control whether entry data is included.

**Field**: `include_entries`\
**Type**: `bool`\
**Default**: `false`

**When `true`**:

* Raw entry data included
* Detailed block construction information
* Largest payload size

**When `false`**:

* No entry data
* Smaller payload size

## Response structure

Block updates arrive as `SubscribeUpdateBlock` messages:

```rust
message SubscribeUpdateBlock {
    uint64 slot = 1;
    string blockhash = 2;
    solana.storage.ConfirmedBlock.Rewards rewards = 3;
    solana.storage.ConfirmedBlock.UnixTimestamp block_time = 4;
    solana.storage.ConfirmedBlock.BlockHeight block_height = 5;
    uint64 parent_slot = 7;
    string parent_blockhash = 8;
    uint64 executed_transaction_count = 9;
    repeated SubscribeUpdateTransactionInfo transactions = 6;
    uint64 updated_account_count = 10;
    repeated SubscribeUpdateAccountInfo accounts = 11;
    uint64 entries_count = 12;
    repeated SubscribeUpdateEntry entries = 13;
}
```

### Key fields

**`slot`**: The slot number for this block\
**`blockhash`**: Unique hash identifying this block\
**`rewards`**: Validator rewards for this block\
**`block_time`**: Unix timestamp when block was produced\
**`block_height`**: Block height in the ledger\
**`parent_slot`**: Previous slot number\
**`parent_blockhash`**: Hash of parent block\
**`executed_transaction_count`**: Number of transactions in this block\
**`transactions`**: Full transaction details (if `include_transactions=true`)\
**`updated_account_count`**: Number of accounts updated in this block\
**`accounts`**: Account update information (if `include_accounts=true`)\
**`entries_count`**: Number of entries in this block\
**`entries`**: Entry data (if `include_entries=true`)

## Block vs block meta

Choose between full blocks and block metadata:

| Feature | Full Blocks | Block Meta |
|---------|-------------|------------|
| **Size** | Large | Small |
| **Transactions** | Full details | Count only |
| **Use case** | Indexing, analytics | Monitoring, lightweight tracking |
| **Bandwidth** | High | Low |

------

# Code Examples

> Practical Rust examples for Yellowstone gRPC

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

This page provides practical code examples for common Yellowstone gRPC use cases. All examples are in Rust and include placeholders that will be filled with complete working code.

## Prerequisites and authentication

See [Quickstart](/docs/reference/yellowstone-grpc-quickstart) for prerequisites & authentication.

## Basic subscription that streams all transactions

```rust
use anyhow::Result;
use futures::{sink::SinkExt, stream::StreamExt};
use solana_signature::Signature;
use std::collections::HashMap;
use yellowstone_grpc_client::{ClientTlsConfig, GeyserGrpcClient};
use yellowstone_grpc_proto::geyser::{
    CommitmentLevel, SubscribeRequest, SubscribeRequestFilterTransactions,
    subscribe_update::UpdateOneof,
};
#[tokio::main]
async fn main() -> Result<()> {
    // Set up connection parameters
    let endpoint = "https://solana-mainnet.g.alchemy.com";
    let x_token = "ALCHEMY_API_KEY"; // Replace with your Alchemy API key
    
    // Build and connect the gRPC client with TLS and authentication
    let mut client = GeyserGrpcClient::build_from_shared(endpoint)?
        .tls_config(ClientTlsConfig::new().with_native_roots())?
        .x_token(Some(x_token))? // API key passed as X-Token header
        .connect()
        .await?;
    // Create a bidirectional stream for subscribing to updates
    let (mut tx, mut stream) = client.subscribe().await?;
    // Send subscription request to filter for non-vote, non-failed transactions
    tx.send(SubscribeRequest {
        transactions: HashMap::from([(
            "all_transactions".to_string(),
            SubscribeRequestFilterTransactions {
                vote: Some(false),   // Exclude vote transactions
                failed: Some(false), // Exclude failed transactions
                ..Default::default()
            },
        )]),
        commitment: Some(CommitmentLevel::Confirmed as i32), // Use confirmed commitment level
        ..Default::default()
    })
    .await?;
    // Process incoming transaction updates
    while let Some(Ok(msg)) = stream.next().await {
        if let Some(UpdateOneof::Transaction(tx)) = msg.update_oneof {
            // Extract and display transaction signature
            let sig = tx
                .transaction
                .and_then(|t| Some(Signature::try_from(t.signature.as_slice()).unwrap()))
                .unwrap_or_default();
            println!("Slot: {} | Signature: {}", tx.slot, sig);
        }
    }
    Ok(())
}
```

## Durable client

Implement a robust client with reconnection logic & gap recovery with `from_slot`:

```rust
use anyhow::Result;
use futures::stream::StreamExt;
use std::collections::HashMap;
use yellowstone_grpc_client::{ClientTlsConfig, GeyserGrpcClient};
use yellowstone_grpc_proto::geyser::{
    CommitmentLevel, SlotStatus, SubscribeRequest, SubscribeRequestFilterSlots,
    subscribe_update::UpdateOneof,
};

#[tokio::main]
async fn main() -> Result<()> {
    // Alchemy Solana Mainnet endpoint
    let endpoint = "https://solana-mainnet.g.alchemy.com";
    let x_token = "ALCHEMY_API_KEY"; // Replace with your Alchemy API key

    // Build a subscription request to receive slot updates
    // We subscribe to all slots with confirmed commitment level
    let mut subscribe_request = SubscribeRequest {
        slots: HashMap::from([(
            "slots".to_string(),
            SubscribeRequestFilterSlots {
                ..Default::default()
            },
        )]),
        commitment: Some(CommitmentLevel::Confirmed as i32),
        ..Default::default()
    };

    // Track the latest slot we've seen for gap recovery
    let mut tracked_slot: u64 = 0;

    // Main reconnection loop - continuously reconnect
    loop {
        // Build and connect to the Yellowstone gRPC client
        let mut client = GeyserGrpcClient::build_from_shared(endpoint)?
            .tls_config(ClientTlsConfig::new().with_native_roots())?
            .x_token(Some(x_token))?
            .connect()
            .await?;

        // This ensures that even if we disconnect and miss updates, we can
        // recover the missed data when we reconnect (assuming the server has
        // retention for those slots).
        if tracked_slot > 0 {
            subscribe_request.from_slot = Some(tracked_slot);
        } else {
            subscribe_request.from_slot = None;
        }

        // Subscribe to slot updates with our configured request
        let (mut _update_subscription, mut stream) = client
            .subscribe_with_request(Some(subscribe_request.clone()))
            .await?;

        // Process incoming slot updates until an error occurs
        loop {
            match stream.next().await {
                Some(Ok(msg)) => {
                    // Extract and print slot information if this update contains slot data
                    if let Some(UpdateOneof::Slot(slot)) = msg.update_oneof {
                        println!(
                            "Received slot: {} with status {:?}",
                            slot.slot,
                            SlotStatus::try_from(slot.status).unwrap()
                        );
                        // Update our tracked slot to use for the next reconnection
                        tracked_slot = slot.slot;
                    }
                }
                Some(Err(e)) => {
                    // On error, log and break to reconnect (outer loop will restart)
                    println!("Error receiving updates: {}", e);
                    break;
                }
                _ => {}
            }
        }
    }
}
```

## Stream accounts

### Stream token accounts by mint

```rust
SubscribeRequest {
    accounts: HashMap::from([(
        "token_accounts_by_mint".to_string(),
        SubscribeRequestFilterAccounts {
            filters: vec![
                // Filter for token accounts
                SubscribeRequestFilterAccountsFilter {
                    filter: Some(Filter::TokenAccountState(true)),
                },
                // Filter for the specific mint based on the token account structure
                SubscribeRequestFilterAccountsFilter {
                    filter: Some(Filter::Memcmp(SubscribeRequestFilterAccountsFilterMemcmp {
                        offset: 0, // Mint is located at the beginning of the account data
                        data: Some(Data::Base58(
                            "pumpCmXqMfrsAkQ5r49WcJnRayYRqmXz6ae8H7H9Dfn".to_string(), // Replace with the specific mint address
                        )),
                    })),
                },
            ],
            ..Default::default()
        },
    )]),
    commitment: Some(CommitmentLevel::Confirmed as i32), // Use confirmed commitment level
    ..Default::default()
}
```

## Stream transactions

### Stream successful non-vote transactions

```rust
SubscribeRequest {
    transactions: HashMap::from([(
        "all_transactions".to_string(),
        SubscribeRequestFilterTransactions {
            vote: Some(false),   // Exclude vote transactions
            failed: Some(false), // Exclude failed transactions
            ..Default::default()
        },
    )]),
    commitment: Some(CommitmentLevel::Confirmed as i32), // Use confirmed commitment level
    ..Default::default()
}
```

## Production-grade client

* Durable client
* Gap recovery with `from_slot`
* Async processing with tokio channels
* Dynamic management of subscription
* Error handling

```rust
use futures::{SinkExt, stream::StreamExt};
use solana_signature::Signature;
use std::{collections::HashMap, sync::Arc};
use tokio::sync::{RwLock, mpsc};
use yellowstone_grpc_client::{ClientTlsConfig, GeyserGrpcClient};
use yellowstone_grpc_proto::geyser::{
    CommitmentLevel, SubscribeRequest, SubscribeRequestFilterSlots,
    SubscribeRequestFilterTransactions, SubscribeRequestPing, SubscribeUpdate,
    subscribe_update::UpdateOneof,
};

// Channel capacity for buffering updates from the ingress loop to the dispatcher.
// This allows the ingress loop to continue receiving data even if the dispatcher
// is temporarily slower, preventing backpressure to the gRPC stream.
const UPDATE_CHANNEL_CAPACITY: usize = 10000;

#[tokio::main]
async fn main() {
    // Configure the Yellowstone gRPC endpoint and authentication token
    // In production, these should be loaded from environment variables or a config file
    let endpoint = "https://solana-mainnet.g.alchemy.com".to_string();
    let x_token = "ALCHEMY_API_KEY".to_string(); // Replace with your Alchemy API key

    // This is the initial subscription request. This can be updated and sent to the ingress loop through the `subscribe_rx` channel.
    let subscribe_request = Arc::new(RwLock::new(SubscribeRequest {
        slots: HashMap::from([(
            "slots".to_string(),
            SubscribeRequestFilterSlots {
                ..Default::default()
            },
        )]),
        transactions: HashMap::from([(
            "all_transactions".to_string(),
            SubscribeRequestFilterTransactions {
                vote: Some(false),   // Exclude vote transactions
                failed: Some(false), // Exclude failed transactions
                ..Default::default()
            },
        )]),
        commitment: Some(CommitmentLevel::Confirmed as i32),
        // from_slot will be set dynamically in the ingress loop for gap recovery
        ..Default::default()
    }));

    // Create a bounded channel for updates from ingress to dispatcher.
    // Ingress will drop updates if the channel is full.
    let (updates_tx, updates_rx) = mpsc::channel::<SubscribeUpdate>(UPDATE_CHANNEL_CAPACITY);

    // Create an unbounded channel for dynamic subscription updates.
    // This allows any part of your application to send new subscription requests
    // to modify what data you're receiving at runtime (e.g., add new account filters).
    let (subscribe_tx, subscribe_rx) = mpsc::unbounded_channel::<SubscribeRequest>();

    // Spawn the dispatcher task: processes updates and implements business logic
    // In production, this could write to a database, forward to other services, etc.
    let dispatcher_handle = tokio::spawn(async move {
        dispatcher_loop(updates_rx).await;
    });

    // Spawn the ingress task: manages gRPC connection, reconnection, and gap recovery
    let ingress_handle = tokio::spawn(async move {
        ingress_loop(
            updates_tx,
            subscribe_rx,
            endpoint,
            x_token,
            subscribe_request,
        )
        .await;
    });

    // Wait for both tasks to complete (they run indefinitely in this example)
    // In production, you might want to handle graceful shutdown with signal handlers
    if let Err(e) = tokio::join!(dispatcher_handle, ingress_handle).0 {
        println!("Error: {:?}", e);
    }
}

// - Automatic reconnection on any error or disconnect
// - Gap recovery using from_slot to resume from last known position
// - Ping/pong handling to keep connection alive
// - Dynamic subscription management via subscribe_rx channel
//
// The outer loop ensures the client never stops - it will continuously
// attempt to reconnect if the connection drops for any reason.
async fn ingress_loop(
    updates_tx: mpsc::Sender<SubscribeUpdate>,
    mut subscribe_rx: mpsc::UnboundedReceiver<SubscribeRequest>,
    endpoint: String,
    x_token: String,
    subscribe_request: Arc<RwLock<SubscribeRequest>>,
) {
    // Configure TLS for secure connection to Yellowstone gRPC server
    let tls_config = ClientTlsConfig::new().with_native_roots();

    // Track the last slot we successfully processed for gap recovery
    // This is critical for ensuring no data is missed across reconnections
    let mut tracked_slot: u64 = 0;

    // This infinite loop ensures the client is DURABLE - it will never give up.
    // On any error or disconnect, we simply reconnect and resume from where we left off.
    loop {
        // Build the gRPC client with authentication and TLS configuration
        let builder = GeyserGrpcClient::build_from_shared(endpoint.clone())
            .unwrap()
            .x_token(Some(x_token.clone()))
            .unwrap()
            .tls_config(tls_config.clone())
            .unwrap();

        let mut client = builder.connect().await.unwrap();

        // This ensures that even if we disconnect and miss updates, we can
        // recover the missed data when we reconnect (assuming the server has
        // retention for those slots).
        subscribe_request.write().await.from_slot = if tracked_slot > 0 {
            Some(tracked_slot)
        } else {
            None
        };

        // Attempt to subscribe with our configured request (including from_slot)
        // Returns a tuple of (sink, stream):
        // - sink: For sending requests to the server (pings, subscription updates)
        // - stream: For receiving updates from the server
        match client
            .subscribe_with_request(Some(subscribe_request.read().await.clone()))
            .await
        {
            Ok((mut subscribe_tx, mut stream)) => {
                // This loop runs as long as the connection is healthy.
                // It concurrently handles:
                // 1. Dynamic subscription updates from subscribe_rx
                // 2. Stream updates from the gRPC server
                loop {
                    tokio::select! {
                        // Branch 1: Dynamic Subscription Management
                        //
                        // Listen for new subscription requests sent via subscribe_tx
                        // This allows runtime modification of subscriptions without
                        // disconnecting (e.g., add/remove account filters)
                        Some(subscribe_request) = subscribe_rx.recv() => {
                            // Forward the updated subscription request to the gRPC server
                            if let Err(e) = subscribe_tx.send(subscribe_request).await {
                                println!("Error sending subscribe request to grpc: {:?}", e);
                                // Connection issue - break to outer loop for reconnect
                                break;
                            }
                        }

                        // Branch 2: Process Stream Updates
                        Some(result) = stream.next() => {
                            match result {
                                Ok(update) => {
                                    // Yellowstone gRPC servers send pings to ensure
                                    // the client is alive. We must respond with a pong.
                                    if matches!(update.update_oneof, Some(UpdateOneof::Ping(_))) {
                                        if let Err(e) = subscribe_tx
                                            .send(SubscribeRequest {
                                                ping: Some(SubscribeRequestPing { id: 1 }),
                                                ..Default::default()
                                            })
                                            .await
                                        {
                                            println!("Error sending ping to grpc: {:?}", e);
                                        }
                                    }

                                    // Ping/pong are internal protocol messages,
                                    // not business data, so we don't forward them
                                    if matches!(update.update_oneof, Some(UpdateOneof::Ping(_)) | Some(UpdateOneof::Pong(_))) {
                                        continue;
                                    }

                                    // Update tracked_slot with every slot update.
                                    // This is essential for gap recovery - if we
                                    // disconnect, we know exactly which slot to
                                    // resume from when reconnecting.
                                    if let Some(UpdateOneof::Slot(ref slot_update)) = update.update_oneof {
                                        tracked_slot = slot_update.slot;
                                        continue; // Slot updates are tracked but not forwarded
                                    }

                                    // Send the update through the channel to the
                                    // dispatcher for processing.
                                    //
                                    // Error handling: If the channel is full or
                                    // the receiver is dropped, log and continue.
                                    // This prevents ingress from blocking.
                                    if let Err(e) = updates_tx.send(update.clone()).await {
                                        println!("Slow consumer, dropping update {:?} with error: {:?}", update, e);
                                    }
                                }
                                // Any error on the stream (network issue, server
                                // restart, etc.) triggers a reconnection attempt.
                                Err(e) => {
                                    println!("Error receiving update from stream: {:?}", e);
                                    break; // Break to outer loop for reconnect
                                }
                            }
                        }
                    }
                }
            }
            // If we can't subscribe (e.g., auth failure, invalid request),
            // log the error and loop back to reconnect. In production, you
            // might want exponential backoff here to avoid hammering the server.
            Err(e) => {
                println!("Error subscribing to Yellowstone gRPC server: {:?}", e);
            }
        };

        // If we reach here, the connection was lost or subscription failed.
        // The outer loop will automatically reconnect and resume from tracked_slot.
        // In production, consider adding:
        // - Exponential backoff to avoid rapid reconnection attempts
        // - Connection metrics/monitoring
        // - Alerting on repeated failures
        println!("Disconnected from Yellowstone gRPC server, reconnecting...");
    }
}

// In production, this is where you would:
// - Write to databases
// - Forward to other services
// - Apply complex business logic
// - Aggregate metrics
// - Trigger alerts
async fn dispatcher_loop(mut updates_rx: mpsc::Receiver<SubscribeUpdate>) {
    loop {
        tokio::select! {
            // This receives updates sent from the ingress loop via the channel.
            // The bounded channel provides backpressure - if this loop is too
            // slow, the ingress will drop updates.
            Some(update) = updates_rx.recv() => {
                match update.update_oneof {
                    Some(UpdateOneof::Transaction(tx)) => {
                        // Extract the transaction signature for display/logging
                        let sig = tx
                            .transaction
                            .and_then(|t| Some(Signature::try_from(t.signature.as_slice()).unwrap()))
                            .unwrap_or_default();
                        println!("Slot: {} | Signature: {}", tx.slot, sig);

                        // In production, you might:
                        // - Parse transaction instructions
                        // - Store in database
                        // - Check for specific program interactions
                        // - Calculate metrics
                        // - Forward to downstream services
                    }

                    // --------------------------------------------------------
                    // Account Updates
                    // --------------------------------------------------------
                    //
                    // Uncomment to handle account updates:
                    // Some(UpdateOneof::Account(account)) => {
                    //     // TODO: Implement account updates
                    // }

                    // --------------------------------------------------------
                    // Block Updates
                    // --------------------------------------------------------
                    //
                    // Uncomment to handle block updates:
                    // Some(UpdateOneof::Block(block)) => {
                    //     // TODO: Implement block updates
                    // }

                    // --------------------------------------------------------
                    // Other Updates
                    // --------------------------------------------------------
                    _ => {
                        println!("Received unknown update from Yellowstone gRPC server: {:?}", update);
                    }
                }
            }
        }
    }
}
```

## Contributing examples

Found a useful pattern? Consider contributing it to these [docs](https://github.com/alchemyplatform/docs/)!

------

# Best Practices

> Essential tips and patterns for production Yellowstone gRPC applications

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Best practices

This guide covers essential patterns and best practices for building robust, production-ready applications with Yellowstone gRPC.

## Getting started

### Start simple

Begin with slot subscriptions before moving to more complex filters. Slots are lightweight and help you understand the streaming model.

### Use filters wisely

Only subscribe to the data you need to reduce bandwidth and processing overhead.

**Pro tip:** Vote transactions make up about 70% of all Solana transactions. Filter them out with `vote: Some(false)` to significantly reduce bandwidth if you don't need them.

```rust
SubscribeRequestFilterTransactions {
    vote: Some(false),   // Exclude ~70% of transactions
    failed: Some(false), // Exclude failed transactions
    ..Default::default()
}
```

## Connection management

### Implement automatic reconnection

Network issues happen - implement automatic reconnection logic to ensure your application stays resilient. Use exponential backoff to avoid hammering the server.

### Handle ping/pong messages

Yellowstone gRPC servers send ping messages to check if clients are alive. Always respond with pong, otherwise the server may close your connection.

```rust
if matches!(update.update_oneof, Some(UpdateOneof::Ping(_))) {
    subscribe_tx.send(SubscribeRequest {
        ping: Some(SubscribeRequestPing { id: 1 }),
        ..Default::default()
    }).await?;
}
```

### Implement gap recovery

Use `from_slot` to recover from disconnections without missing data. This may result in duplicate updates, but ensures no data loss.

```rust
subscribe_request.from_slot = if tracked_slot > 0 {
    Some(tracked_slot) // can subtract 32 slots to avoid blockchain reorgs
} else {
    None
};
```

## Architecture patterns

### Separate ingress and processing

Use channels to decouple data ingestion from processing:

```rust
let (tx, rx) = mpsc::channel::<SubscribeUpdate>(10000);

// Ingress task: receives data from gRPC
tokio::spawn(async move {
    while let Some(Ok(update)) = stream.next().await {
        tx.send(update).await.ok();
    }
});

// Processing task: handles business logic
tokio::spawn(async move {
    while let Some(update) = rx.recv().await {
        process_update(update).await;
    }
});
```

**Benefits:**

* Prevents slow processing from blocking ingestion
* Enables parallel processing of updates
* Provides natural backpressure mechanism

### Use bounded channels with backpressure

Choose channel capacity based on your processing speed and tolerance for data loss:

* **Smaller capacity** (1K-10K): Lower memory usage, faster recovery from slow processing -- higher chance of dropping updates
* **Larger capacity** (50K-100K): Better handling of processing spikes, more memory usage

## Performance optimization

### Monitor processing latency

Track the time between receiving updates and processing them. Log warnings if latency exceeds your thresholds.

### Batch database writes

Instead of writing every update individually, batch them for better throughput. Flush when batch size reaches a threshold (e.g., 1000 updates) or after a time interval (e.g., 1 second).

### Use async processing for I/O

Leverage async/await for concurrent processing of updates when doing I/O operations.

### Optimize memory usage

For high-throughput scenarios, reuse subscription requests instead of creating new hashmaps on every send.

### Offload compute-intensive work

If processing task is too compute intensive, consider leveraging the async processing capabilities of the tokio runtime to offload the work to a separate / multiple threads.

## Error handling

### Distinguish error types

Handle different error types appropriately:

* **Stream errors**: Network or protocol errors - reconnect immediately
* **Processing errors**: Log and continue or implement dead letter queue
* **Channel errors**: Handle full channels (drop or block) and closed channels (exit gracefully)

### Implement exponential backoff

Start with short delays (100ms) and double on each failure up to a maximum (e.g., 60 seconds). Reset backoff on successful connection.

### Log dropped updates

Monitor when updates are dropped due to slow processing. Track metrics to understand system health.

## Data management

### Handle duplicate updates

When using `from_slot` for gap recovery, you may receive duplicate updates. Use a time-bounded cache or database unique constraints to handle duplicates efficiently.

### Choose appropriate commitment levels

* **Processed**: Real-time dashboards, exploratory data analysis (fastest, may see rolled back data)
* **Confirmed**: Most production applications, indexers (good balance of speed and finality)
* **Finalized**: Financial applications requiring absolute certainty (slower, guaranteed finality)

## Testing and debugging

### Test reconnection logic

Simulate connection failures to verify your reconnection logic works as expected. Test with different failure scenarios.

### Add structured logging

Use structured logging (e.g., `tracing` crate) to debug subscription issues. Log key events like reconnections, slot tracking, and subscription updates.

### Monitor stream health

Track metrics like:

* Updates received per second
* Time since last update
* Reconnection count
* Processing latency
* Dropped updates

Alert if the stream appears stalled (e.g., no updates for 30+ seconds).

## Dynamic subscription management

You can update subscriptions at runtime using the bidirectional stream without reconnecting. This is useful for:

* Hot-swapping filters based on user actions
* Progressive subscription expansion

## Production checklist

Before deploying to production, ensure you have:

* ✅ Automatic reconnection with exponential backoff
* ✅ Gap recovery using `from_slot`
* ✅ Ping/pong handling
* ✅ Separate ingress and processing tasks
* ✅ Bounded channels with backpressure handling
* ✅ Error logging and monitoring
* ✅ Processing latency tracking
* ✅ Graceful shutdown handling
* ✅ Duplicate update handling
* ✅ Filter optimization to reduce bandwidth
* ✅ Database write batching (if applicable)
* ✅ Health check endpoints
* ✅ Metrics and alerting

## Additional resources

* [Quickstart Guide](/docs/reference/yellowstone-grpc-quickstart) - Get started quickly
* [Code Examples](/docs/reference/yellowstone-grpc-examples) - See complete working examples including a full production-grade client
* [API Reference](/docs/reference/yellowstone-grpc-api-overview) - Detailed API documentation

------

# Alchemy Rollups Overview

> Introduction to Alchemy Rollups: deploy a rollup in minutes, no code required, using our all-in-one infrastructure.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Intro

Alchemy Rollups helps you run a dedicated optimistic rollup with full control over transaction speed, cost, and functionality.

Before diving in, here's what a rollup is and how it works.

# What is a Rollup?

A rollup is a blockchain solution that processes transactions off the main chain while using a Layer-1 blockchain for security. Instead of processing each transaction on the main chain, rollups batch transactions together and post a summary or proof to the Layer-1 network. This approach reduces fees and increases throughput while maintaining the security of the main chain.

Optimistic rollups assume transactions are valid by default and use a challenge period to allow for fraud proofs in case of invalid transactions. They provide strong security guarantees through economic incentives while maintaining full EVM compatibility.

**Launching a rollup helps you make more money by unlocking new revenue streams, enabling novel use cases, and providing a better user experience.**

# Why a Rollup?

### 🚄 Faster, More Reliable Transactions

* **Speed & Predictability:** With a dedicated chain, transactions are processed quickly and reliably. Unlike crowded public networks that can lead to slow confirmations, rising fees, and unpredictable processing times, your own rollup ensures a smoother experience.

### 🆕 Unlock Novel Use Cases

* **Tailored Functionality:** When you control your chain, you can customize its behavior to suit your specific needs. This flexibility enables innovative integrations—like linking onchain identities with external verification systems—to power entirely new applications.

### 💸 Make Money

* **Revenue Streams:** Operators earn revenue from transaction fees and potential MEV opportunities. Additionally, by using a native gas token on your chain, you can create intrinsic value and boost your token’s utility.

### ✂️ Save Money

* **Cost Efficiency:** Running your own dedicated blockspace can dramatically lower gas fees. Instead of competing with high fees on popular L1s or shared L2s, you can optimize costs for both you and your users.

## Why Alchemy Rollups?

**TLDR:** Alchemy is your best partner for scaling to millions, reducing technical and financial risk through integrated developer tools and built-in distribution.

### For Everyone

* **Integrated Developer Tools:** Ship products faster with instant RPCs, APIs, and wallets. Save months of engineering time and bypass lengthy business development cycles.
* **Reliability:** Enjoy a platform with 99.99% uptime, protecting you from revenue loss and reducing engineering overhead.

### For Ecosystem Chains

* **Instant Access to Developers:** Gain immediate reach to a vast network of developers, from independent projects to major protocols, ensuring your chain is noticed from Day 1.

### For Enterprises

* **White-Glove Customization & Support:** Benefit from deep technical onboarding, customized solutions (such as alternative data availability layers or unique precompiles), and 24/7 support from our experienced engineering team.

With Alchemy Rollups, you gain a partner who not only provides the technology to launch your own chain but also helps you unlock new opportunities—whether through cost savings, new revenue models, or innovative use cases.

# Supported Frameworks

<CardGroup cols={1}>
  <Card title="Arbitrum Chain" icon={<img src="https://alchemyapi-res.cloudinary.com/image/upload/v1764179954/docs/api-reference/alchemy-rollups/api_icon3.svg" alt="Arbitrum Chain logo"/>} href="/docs/reference/supported-stacks">
    View Arbitrum Stack rollup framework.
  </Card>
</CardGroup>

# Looking for an enterprise-grade chain?

Get in touch with us directly:

Reach out through the [Rollups Contact Page](https://www.alchemy.com/contact-sales-rollups), email Isaac at isaac@alchemy.com, or message him on Telegram: @pileofscraps

------

# Supported Frameworks

> List of supported frameworks / stacks for Alchemy Rollups

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

Alchemy Rollups currently supports **Arbitrum Nitro (Orbit)** as its rollup framework.

## Arbitrum Nitro (Orbit)

* **Overview:** A robust optimistic rollup with enhancements for performance.

* **Key Benefits:**

  * Ultra-low transaction fees with options for even lower costs through alternative data availability models.
  * Fast block times and efficient batching.
  * Full EVM compatibility, with optional support for additional smart contract languages.
  * Interoperability with other chains in the Arbitrum ecosystem.
  * [**Stylus**](https://medium.com/offchainlabs/hello-stylus-6b18fecc3a22), which will allow you to write smart contracts in a more performant VM with Rust, C++, or other languages that can compile to WASM. These contracts can interoperate synchronously with the EVM.

* **Use Case:** Best suited for high-throughput applications with diverse transaction requirements.

------

# Using your Rollup

> How to connect to your Rollup RPCs, bridge assets, and deploy smart contracts.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

This guide covers the following:

* [How to connect to your rollup RPCs](#1-rpc-endpoints--api-access)
* [How to bridge assets (deposit/withdraw) to your rollup / from parent chain](#2-bridging-assets)
* [How to inspect your rollup via a block explorer](#3-block-explorer)
* [How to connect a wallet like MetaMask to your rollup](#4-wallet-configuration)
* [How to deploy smart contracts on your rollup](#5-deploying-smart-contracts-on-your-rollup)

# 1. RPC Endpoints & API Access

* Your rollup’s RPC URL is available in the Alchemy Dashboard.
* Use this URL in your web3 libraries (e.g., viem, ethers.js, web3.js) to interact with the blockchain.
* Standard JSON-RPC methods are supported for reading state and sending transactions.

# 2. Bridging Assets

## Depositing to Rollup

* Use the Bridge UI provided in the Alchemy Dashboard or an external bridge provider.
* Send assets (e.g., ETH, ERC-20 tokens) from your parent chain to your rollup. This involves locking tokens on the parent chain and minting corresponding tokens on rollup.

## Withdrawing to Parent Chain

* Initiate a withdrawal through the Bridge UI.
* Withdrawals from your optimistic rollup have a challenge period before funds are released on the parent chain.

# 3. Block Explorer

* Each rollup includes a block explorer for inspecting transactions, blocks, and smart contracts.
* Use the explorer to verify contract deployments, monitor transactions, and assess network health.

# 4. Wallet Configuration

* To connect your wallet (e.g., MetaMask), add your rollup as a custom network using:

  * Network Name
  * RPC URL
  * Chain ID
  * Currency Symbol
  * Block Explorer URL

These steps ensure you can fully use your rollup for development and testing.

# 5. Deploying Smart Contracts on Your Rollup

Deploying smart contracts on your rollup is similar to deploying on Ethereum. This guide covers popular tools such as Hardhat and Foundry.

## Using Hardhat

1. **Setup Hardhat:** Initialize a new Hardhat project and install the necessary packages.

2. **Configure Network:** Update your `hardhat.config.js` file with a network configuration using your rollup’s RPC URL and Chain ID.

3. **Write a Contract:** Create your Solidity contract in the `contracts/` folder.

4. **Deploy Script:** Write a deployment script (e.g., `scripts/deploy.js`) that utilizes Hardhat’s ethers plugin to deploy your contract.

5. **Deploy:** Execute the deployment script with:

   <CodeGroup>
     ```bash bash
     npx hardhat run scripts/deploy.js --network <your_rollup>
     ```
   </CodeGroup>

6. **Verification:** After deployment, verify your contract on the rollup’s block explorer by uploading your source code.

## Using Foundry (Forge)

1. **Install Foundry:** Set up Foundry on your system.

2. **Initialize Project:** Scaffold a new project with `forge init`.

3. **Configure Network:** Set your RPC URL and private key in your configuration.

4. **Deploy:** Use Forge to compile and deploy your contract:

   <CodeGroup>
     ```bash bash
     forge create --rpc-url $ROLLUP_RPC_URL --private-key $PRIVATE_KEY path/to/YourContract.sol:YourContract
     ```
   </CodeGroup>

# Alternative Tools

* **Remix:** Connect Remix to your rollup via your wallet’s custom RPC settings and deploy directly through the browser.
* **Other Frameworks:** Tools like Truffle or Brownie can also be configured to deploy contracts using your rollup’s RPC endpoint.

Follow these instructions to deploy and verify your contracts, enabling you to build and interact with your new rollup.

------

# Operating your Rollup

> How to monitor &amp; keep your rollup running smoothly after launching with Alchemy.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

Keep your rollup running smoothly with robust operational practices. This guide covers the following:

* [Reliability & uptime](#1-reliability--uptime)
* [Upgrades & governance](#2-upgrades--governance)
* [Security best practices](#3-security-best-practices)
* [Monitoring & analytics](#4-monitoring--analytics)
* [Billing & costs](#5-billing--costs)
* [Support](#6-support--contact)

This guide covers reliability, upgrades, security, and monitoring.

# 1. Reliability & Uptime

* Our platform is designed to target high uptime using a multi-cloud, multi-region infrastructure.
* Features include autoscaling, redundancy, and real-time monitoring to ensure continuous service.
* A dedicated status page provides real-time updates on network performance.

# 2. Upgrades & Governance

* Upgrades are managed in coordination with your team to roll out new features and improvements.
* Software updates and L1 contract upgrades are conducted via a secure multisignature process.
* Parameter adjustments (such as gas limits and sequencer settings) can be made through governance contracts.
* Options for future decentralization are available if you wish to transition control over time.

# 3. Security Best Practices

* Our rollup implementations are built on audited frameworks and secure infrastructure.
* Critical components are protected through encryption, DDoS mitigation, and secure key management.
* A multisignature wallet is recommended for administering sensitive contracts.
* Regular monitoring and security testing ensure the overall safety of your network.

# 4. Monitoring & Analytics

* The Alchemy Dashboard provides detailed metrics including TPS, gas usage, and RPC performance.
* Log data and alerts help identify issues and trigger maintenance actions.
* Integration with external analytics tools is supported for deeper insights.

# 5. Billing & Costs

* Costs include deployment fees, monthly subscriptions, and usage-based charges.
* Infrastructure costs, L1 posting fees, and additional services are clearly reflected in your monthly billing.
* Transparent pricing and usage reports are available in your account dashboard.

# 6. Support & Contact

* Access dedicated support channels for immediate assistance.
* Engage with our community through forums or chat channels.
* Comprehensive documentation and troubleshooting guides are available online.

By following these operational practices, you can ensure that your rollup remains secure, efficient, and reliable over time.

------

# Customizations & Integrations

> List of available customizations &amp; add-on integrations for your rollup.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

This page explains how you can tailor your rollup environment with three key components: configuring your own chain, leveraging our instant developer tools, and integrating with our partner ecosystem.

***

# 1. Rollup Configuration

Customize your rollup to meet your specific business and technical requirements. With full control over your chain settings, you can adjust performance, security, and economic parameters to optimize your network.

**Key Features:**

* **Custom Native Gas Token:** Choose or deploy a native token for transaction fees to boost utility and token value.
* **Chain Parameters:** Configure settings like chain ID, block time, gas limits, and data availability to match your workload.
* **Enhanced Security & Scalability:** Tailor performance settings and security features (e.g., multisig administration) to support infinite scalability and reliable operations.

***

# 2. Instant Alchemy Developer Tools

Leverage our full suite of developer tools—the same ones powering leading platforms—to build and interact with your rollup quickly and efficiently.

### Supernode (Node API)

* **High-Performance API:** Instantly fetch network data and execute blockchain operations.
* **Scalable Infrastructure:** Designed to handle high volumes of requests reliably.
* **Consistent Performance:** Delivers real-time data with predictable performance.

### Embedded Wallets

* **Seamless Onboarding:** Offer frictionless, non-custodial wallet experiences directly embedded in your app.
* **Invisible Wallets:** Provide a smooth web2-like experience where wallet management happens behind the scenes.
* **User-Friendly Integration:** Simplifies account creation and authentication without sacrificing security.

### Webhooks

* **Real-Time Notifications:** Receive immediate updates for specific blockchain events.
* **Reliable Data Delivery:** Ensures that critical events are pushed instantly to your applications.
* **Cost-Efficient:** Reduces the need for constant polling, lowering operational overhead.

### Token API

* **Comprehensive Token Data:** Retrieve token balances and metadata across supported chains.
* **No Token List Required:** Automatically provides accurate token information.
* **Simplified Integration:** Streamlines the process of displaying token data in your applications.

### Gas Manager

* **Gas Sponsorship:** Enable transactions to be sponsored, lowering the barrier for user interactions.
* **Optimized Throughput:** Ensures transactions are processed quickly by mitigating gas fee spikes.
* **Enhanced User Experience:** Reduces friction, making it easier to engage with your dApp.

***

# 3. Partner Marketplace

Expand your rollup’s functionality by integrating with top-tier partners in the blockchain ecosystem. Our [Partner Marketplace](https://www.alchemy.com/integrations) connects you with a range of services and tools to enhance your network without additional development overhead.

**Key Offerings:**

* **Seamless Integrations:** Add capabilities such as oracles, data indexers, cross-chain bridges, and more.
* **Ecosystem Growth:** Access a vast network of developers and partners to accelerate your project’s adoption.
* **Enterprise-Grade Features:** Enjoy white-glove customization, rapid support, and co-marketing opportunities to grow your rollup’s ecosystem.

*[Explore the marketplace](https://www.alchemy.com/integrations) to:*

* Integrate specialized services that enhance your blockchain functionality.
* Customize your rollup with plug-and-play modules.
* Accelerate growth through strategic partnerships and co-marketing initiatives.

------

# Tutorial: Bridging Assets

> The bridge contract address is essential for facilitating communication and asset transfers between Layer 1 (L1) and Layer 2 (L2) networks

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# OP Stack

To bridge funds using **OP Stack**, follow these steps:

1. **Select Sepolia Network in MetaMask**

   * Ensure that your MetaMask wallet is connected to the **Sepolia Test Network**

2. **Send Tokens to the Bridge Address**

   * Obtain the **bridge contract address** for your OP Stack devnet from the **Alchemy Rollup page**

     * Log in to your Alchemy account
     * Go to the Rollups page from the Chain section
     * Access or create your OP Stack rollup
     * Copy the Bridge Address

   * Send **ETH** or **ERC-20 tokens** from Ethereum (Sepolia) to the bridge address

***

# Arbitrum Stack

To bridge funds using **Arbitrum Stack**, follow these steps:

1. **Obtain the Configuration File**

   * Download the configuration file from the **Alchemy Rollup page**

     * Log in to your Alchemy account
     * Go to the Rollups page from the Chain section
     * Access or create your Arbitrum Chain rollup
     * Click on the View Bridge Config button
     * Copy the configuration

2. **Visit the Arbitrum Bridge**

   * Navigate to the official Arbitrum bridge at [https://bridge.arbitrum.io/](https://bridge.arbitrum.io/)

3. **Connect Your Wallet**

   * Open your **MetaMask** wallet and connect it to the bridge

4. **Enable Developer Mode**

   * Go to **Settings** from the top-right corner
   * On the **Developer** section, enable **Testnet Mode**

![](https://alchemyapi-res.cloudinary.com/image/upload/v1764179951/docs/api-reference/alchemy-rollups/c263fbb82bb318747837fc077c426d17c1e6b0eb7dd43759f4fc36ae63675f9a-Screenshot_2025-01-09_at_16.29.03.png)

5. **Import the Configuration File**

* Paste the configuration file details into the bridge interface
* Click **Add Chain** to register your custom rollup network

6. **Bridge Funds**

* In the **bridge interface**, select your custom rollup chain
* Move funds from **Ethereum (L1)** to your **Arbitrum Rollup (L2)**

![](https://alchemyapi-res.cloudinary.com/image/upload/v1764179953/docs/api-reference/alchemy-rollups/de51c446cc59a7c37fa5efa953d6e52d379608caf10d1408e6cebccb9f070d70-Screenshot_2025-01-09_at_16.30.18.png)

------

# Rollups FAQ

> Frequently asked questions about Alchemy Rollups.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

This section addresses frequently asked questions and common troubleshooting topics for your Alchemy Rollup.

**Q: How is a rollup different from a sidechain or appchain?**

A: A rollup leverages Layer-1 security by posting transaction data or proofs to the main chain, reducing costs while ensuring high throughput. Sidechains, on the other hand, operate with their own validators and separate security assumptions.

**Q: Do I need to manage validators or sequencers myself?**

A: No. The sequencer and associated infrastructure are managed as part of the service.

**Q: What happens if the sequencer goes down?**

A: Our system includes robust redundancy and failover mechanisms to minimize downtime. In the rare event of an outage, users can still withdraw funds once normal operations resume.

**Q: How do I connect my wallet to the rollup?**

A: Add the rollup as a custom network in your wallet by using the RPC URL, Chain ID, currency symbol, and block explorer URL provided in your Alchemy Dashboard.

**Q: Can I run my own full node?**

A: Yes. Running a full node allows you to independently verify transactions and maintain a trustless view of the network. Detailed instructions for setting up a node are available in our technical guides.

**Q: How can I increase the transaction throughput of my rollup?**

A: Throughput can be optimized by adjusting parameters such as block gas limits, employing data compression techniques, and increasing batch sizes. Our team is available to provide performance tuning guidance.

**Q: How do I calculate transaction fees?**

A: Transaction fees consist of an L2 execution cost and an L1 inclusion cost. The platform calculates these fees dynamically, and detailed fee breakdowns are available in the Alchemy Dashboard.

**Q: Can I change the gas token after deployment?**

A: Changing the gas token post-deployment is complex and typically requires launching a new rollup. It is best to decide on the token during the initial configuration.

**Q: How do I get help if I encounter issues?**

A: For support, use the dedicated channels provided in the Alchemy Dashboard or join our community forums. Detailed troubleshooting guides are also available online.

------

# Ethereum API Quickstart

> How to get started building on Ethereum using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

The Ethereum API lets your application connect to an Ethereum node that is part of the Ethereum blockchain. You can interact with onchain data and send different types of transactions to the network using the endpoints provided by the API.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an Ethereum client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { mainnet } from "viem/chains";

const client = createPublicClient({
  chain: mainnet,
  transport: http("https://eth-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (ETH):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Ethereum tutorials

Check out the following tutorials to learn how to build with Ethereum:

* [Build a Web3 Dashboard](/docs/web3-dashboard-prompt)
* [What is Proof of Stake?](/docs/what-is-proof-of-stake)
* [How do I distinguish between a contract address and wallet address?](/docs/reference/ethereum-api-faq#contract-vs-wallet-address)

For full documentation on Web3 libraries, check out the official documentation:

* [Viem Documentation](https://viem.sh) - Modern TypeScript interface for Ethereum
* [Ethers.js Documentation](https://docs.ethers.org) - Complete Ethereum wallet implementation

------

# Ethereum API Overview

> Overview of available Ethereum API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Ethereum APIs

📙 Get started with our [Ethereum API Quickstart Guide](/docs/reference/ethereum-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`erigon_forks`](/docs/chains/ethereum/ethereum-api-endpoints/erigon-forks)                     | [`erigon_getHeaderByHash`](/docs/chains/ethereum/ethereum-api-endpoints/erigon-get-header-by-hash) |
| [`erigon_getHeaderByNumber`](/docs/chains/ethereum/ethereum-api-endpoints/erigon-get-header-by-number) | [`erigon_getLogsByHash`](/docs/chains/ethereum/ethereum-api-endpoints/erigon-get-logs-by-hash) |
| [`erigon_issuance`](/docs/chains/ethereum/ethereum-api-endpoints/erigon-issuance)               | [`eth_accounts`](/docs/chains/ethereum/ethereum-api-endpoints/eth-accounts)                 |
| [`eth_blobBaseFee`](/docs/chains/ethereum/ethereum-api-endpoints/eth-blob-base-fee)             | [`eth_blockNumber`](/docs/chains/ethereum/ethereum-api-endpoints/eth-block-number)          |
| [`eth_call`](/docs/chains/ethereum/ethereum-api-endpoints/eth-call)                             | [`eth_callBundle`](/docs/chains/ethereum/ethereum-api-endpoints/eth-call-bundle)            |
| [`eth_callMany`](/docs/chains/ethereum/ethereum-api-endpoints/eth-call-many)                    | [`eth_chainId`](/docs/chains/ethereum/ethereum-api-endpoints/eth-chain-id)                  |
| [`eth_createAccessList`](/docs/chains/ethereum/ethereum-api-endpoints/eth-create-access-list)   | [`eth_estimateGas`](/docs/chains/ethereum/ethereum-api-endpoints/eth-estimate-gas)          |
| [`eth_feeHistory`](/docs/chains/ethereum/ethereum-api-endpoints/eth-fee-history)                | [`eth_fillTransaction`](/docs/chains/ethereum/ethereum-api-endpoints/eth-fill-transaction)  |
| [`eth_gasPrice`](/docs/chains/ethereum/ethereum-api-endpoints/eth-gas-price)                    | [`eth_getAccount`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-account)            |
| [`eth_getAccountInfo`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-account-info)       | [`eth_getBalance`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-balance)            |
| [`eth_getBlockByHash`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-block-by-hash)      | [`eth_getBlockByNumber`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-block-by-number) |
| [`eth_getBlockReceipts`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-block-receipts)   | [`eth_getBlockTransactionCountByHash`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-code)                  |
| [`eth_getFilterChanges`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-filter-changes)   | [`eth_getFilterLogs`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-filter-logs)     |
| [`eth_getLogs`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-logs)                      | [`eth_getProof`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-proof)                |
| [`eth_getRawTransactionByHash`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-raw-transaction-by-hash) | [`eth_getStorageAt`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-storage-at)       |
| [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-transaction-by-block-hash-and-index) | [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-transaction-by-block-number-and-index) |
| [`eth_getTransactionByHash`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-transaction-by-hash) | [`eth_getTransactionCount`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-transaction-count) |
| [`eth_getTransactionReceipt`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-transaction-receipt) | [`eth_getUncleByBlockHashAndIndex`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-uncle-by-block-hash-and-index) |
| [`eth_getUncleByBlockNumberAndIndex`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-uncle-by-block-number-and-index) | [`eth_getUncleCountByBlockHash`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-uncle-count-by-block-hash) |
| [`eth_getUncleCountByBlockNumber`](/docs/chains/ethereum/ethereum-api-endpoints/eth-get-uncle-count-by-block-number) | [`eth_maxPriorityFeePerGas`](/docs/chains/ethereum/ethereum-api-endpoints/eth-max-priority-fee-per-gas) |
| [`eth_newBlockFilter`](/docs/chains/ethereum/ethereum-api-endpoints/eth-new-block-filter)       | [`eth_newFilter`](/docs/chains/ethereum/ethereum-api-endpoints/eth-new-filter)              |
| [`eth_newPendingTransactionFilter`](/docs/chains/ethereum/ethereum-api-endpoints/eth-new-pending-transaction-filter) | [`eth_protocolVersion`](/docs/chains/ethereum/ethereum-api-endpoints/eth-protocol-version)  |
| [`eth_sendRawTransaction`](/docs/chains/ethereum/ethereum-api-endpoints/eth-send-raw-transaction) | [`eth_simulateV1`](/docs/chains/ethereum/ethereum-api-endpoints/eth-simulate-v-1)           |
| [`eth_submitWork`](/docs/chains/ethereum/ethereum-api-endpoints/eth-submit-work)                | [`eth_subscribe`](/docs/chains/ethereum/ethereum-api-endpoints/eth-subscribe)               |
| [`eth_syncing`](/docs/chains/ethereum/ethereum-api-endpoints/eth-syncing)                       | [`eth_uninstallFilter`](/docs/chains/ethereum/ethereum-api-endpoints/eth-uninstall-filter)  |
| [`eth_unsubscribe`](/docs/chains/ethereum/ethereum-api-endpoints/eth-unsubscribe)               | [`net_listening`](/docs/chains/ethereum/ethereum-api-endpoints/net-listening)               |
| [`net_version`](/docs/chains/ethereum/ethereum-api-endpoints/net-version)                       | [`web3_clientVersion`](/docs/chains/ethereum/ethereum-api-endpoints/web-3-client-version)   |
| [`web3_sha3`](/docs/chains/ethereum/ethereum-api-endpoints/web-3-sha-3)                         |                                                                                             |

## Related APIs

The following Alchemy APIs are also supported on Ethereum:

* [Bundler API](/docs/wallets/transactions/low-level-infra/bundler/overview)
* [Gas Manager API](/docs/wallets/api-reference/gas-manager-admin-api/gas-abstraction-api-endpoints/alchemy-request-gas-and-paymaster-and-data)
* [Token API](/docs/reference/token-api-overview)
* [Transfers API](/docs/reference/transfers-api-quickstart)
* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)
* [NFT API](/docs/reference/nft-api-overview)
* [UserOp Simulation API](/docs/wallets/api-reference/bundler-api/useroperation-simulation-endpoints/alchemy-simulate-user-operation-asset-changes)

------

# erigon_forks

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the genesis hash and lists of all height-based and time-based forks that the node is aware of.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/erigon-forks

## Result

**forks** (object): Object containing genesis hash and fork activation points.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "erigon_forks"
}'
```



------

# erigon_getHeaderByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the block header for the given block hash.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/erigon-get-header-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hash | string | Yes | The block hash. |

## Result

**header** (object): The block header object.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "erigon_getHeaderByHash",
  "params": [
    "string"
  ]
}'
```



------

# erigon_getHeaderByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the block header for the given block number.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/erigon-get-header-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockNumber | string or enum | Yes | The block number or tag. |

## Result

**header** (object): The block header object.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "erigon_getHeaderByNumber",
  "params": [
    "string"
  ]
}'
```



------

# erigon_getLogsByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns all logs generated by transactions in the block with the given hash, grouped by transaction.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/erigon-get-logs-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hash | string | Yes | The block hash. |

## Result

**logs** (object[][]): Array of arrays of log objects, grouped by transaction.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "erigon_getLogsByHash",
  "params": [
    "string"
  ]
}'
```



------

# erigon_issuance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the issuance and burn information for the given block, including block reward, uncle reward, total issuance, total burned, and tips.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/erigon-issuance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockNumber | string or enum | Yes | The block number or tag. |

## Result

**issuance** (object): Issuance and burn information.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "erigon_issuance",
  "params": [
    "string"
  ]
}'
```



------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blobBaseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the base fee per blob gas in wei for the current block.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-blob-base-fee

## Result

**Blob Base Fee** (string): The base fee per blob gas, in wei, as a hexadecimal encoded unsigned integer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blobBaseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_callBundle

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Simulates a bundle of signed transactions against a specific block number, including simulating a bundle at the top of the next block. This method allows you to test transaction bundles before submitting them to the network.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-call-bundle

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Bundle parameters | object | Yes | The bundle simulation parameters containing the transactions to simulate and the block context for the simulation.  |

## Result

**Bundle simulation result** (object): The result of the bundle simulation containing gas usage, fees, and individual transaction results. 

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_callBundle",
  "params": [
    {
      "txs": [
        "0x123abc...",
        "0x456def..."
      ],
      "blockNumber": "0xb63dcd",
      "stateBlockNumber": "latest",
      "timestamp": 1615920932
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "bundleGasPrice": "476190476193",
    "bundleHash": "0x73b1e258c7a42fd0230b2fd05529c5d4b6fcb66c227783f8bece8aeacdd1db2e",
    "coinbaseDiff": "20000000000126000",
    "ethSentToCoinbase": "20000000000000000",
    "gasFees": "126000",
    "results": [
      {
        "coinbaseDiff": "10000000000063000",
        "ethSentToCoinbase": "10000000000000000",
        "fromAddress": "0x02A727155aeF8609c9f7F2179b2a1f560B39F5A0",
        "gasFees": "63000",
        "gasPrice": "476190476193",
        "gasUsed": 21000,
        "toAddress": "0x73625f59CAdc5009Cb458B751b3E7b6b48C06f2C",
        "txHash": "0x669b4704a7d993a946cdd6e2f95233f308ce0c4649d2e04944e8299efcaa098a",
        "value": "0x"
      },
      {
        "coinbaseDiff": "10000000000063000",
        "ethSentToCoinbase": "10000000000000000",
        "fromAddress": "0x02A727155aeF8609c9f7F2179b2a1f560B39F5A0",
        "gasFees": "63000",
        "gasPrice": "476190476193",
        "gasUsed": 21000,
        "toAddress": "0x73625f59CAdc5009Cb458B751b3E7b6b48C06f2C",
        "txHash": "0xa839ee83465657cac01adc1d50d96c1b586ed498120a84a64749c0034b4f19fa",
        "value": "0x"
      }
    ],
    "stateBlockNumber": 5221585,
    "totalGasUsed": 42000
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_callBundle",
  "params": [
    {
      "txs": [
        "0x123abc...",
        "0x456def..."
      ],
      "blockNumber": "0xb63dcd",
      "stateBlockNumber": "latest",
      "timestamp": 1615920932
    }
  ]
}'
```



------

# eth_callMany

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Executes a list of transaction bundles without creating transactions on the blockchain. This method is particularly useful for simulating transactions to understand their potential outcomes. It supports simulating transactions at an intermediate state of a block, simulating multiple transactions with sequential dependencies, and overwriting block headers.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-call-many

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Bundles | object[] | Yes | A list of bundles where each bundle contains transactions and optional block overrides.  |
| Simulation context | object | Yes | The context for the simulation, specifying the blockNumber or Tag and transactionIndex.  |
| State overrides | object | No | An optional mapping for state overrides, following the eth_call standard.  |
| Timeout | integer | No | The maximum running time for the simulations in milliseconds, defaulting to 5000 milliseconds.  |

## Result

**Call results** (object[][]): A list of lists containing either the return value of the executed contract call or the reverted error code. Each bundle returns an array with one result per transaction. 

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "from": "0x1985ea6e9c68e1c272d8209f3b478ac2fdb25c87",
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gas": "0x0f4240",
            "gasPrice": "0x7896e72a",
            "data": "0xa9059cbb000000000000000000000000bc0e63965946815d105e7591407704e6e1964e590000000000000000000000000000000000000000000000000000000005f5e100"
          },
          {
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gasPrice": "0x7896e72a",
            "data": "0x70a08231000000000000000000000000bc0e63965946815d105e7591407704e6e1964e59"
          }
        ],
        "blockOverride": {
          "blockNumber": "0xbb5fe9"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    [
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000000000001"
      },
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000005f5e100"
      }
    ]
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "type": "string",
            "nonce": "string",
            "to": null,
            "from": "string",
            "gas": "string",
            "value": "string",
            "input": "string",
            "gasPrice": "string",
            "maxPriorityFeePerGas": "string",
            "maxFeePerGas": "string",
            "maxFeePerBlobGas": "string",
            "accessList": [
              {
                "address": "string",
                "storageKeys": [
                  "string"
                ]
              }
            ],
            "blobVersionedHashes": [
              "string"
            ],
            "blobs": [
              "string"
            ],
            "chainId": "string"
          }
        ],
        "blockOverride": {
          "blockNumber": "string",
          "blockHash": "string",
          "coinbase": "string",
          "timestamp": "string",
          "difficulty": "string",
          "gasLimit": "string",
          "baseFee": "string"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves account information including balance, code, and nonce for a given address at a specified block.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the account information. |

## Result

**Account information** (object): An object containing the account's balance, code, and nonce.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "balance": "0x1cfe56f3795885980000",
    "code": "0x",
    "nonce": "0x5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_newPendingTransactionFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new pending transactions arrive.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-new-pending-transaction-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newPendingTransactionFilter"
}'
```



------

# eth_protocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current protocol version used by the client.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-protocol-version

## Result

**Protocol Version** (string): The protocol version as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3f",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_protocolVersion"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_simulateV1

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Enables simulation of complex transactions and state changes without modifying the blockchain.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-simulate-v-1

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Simulation object | object | Yes | The object containing all simulation details such as calls, overrides, etc. |

## Result

**Simulation result** (object[]): The result of the simulation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "baseFeePerGas": "0x9",
      "blobGasUsed": "0x0",
      "calls": [
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000001"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
              "transactionIndex": "0x0",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x0",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        },
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000002"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd",
              "transactionIndex": "0x1",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x1",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        }
      ],
      "difficulty": "0x0",
      "excessBlobGas": "0x3b80000",
      "extraData": "0x",
      "gasLimit": "0x22550dd",
      "gasUsed": "0xa410",
      "hash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "miner": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
      "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "nonce": "0x0000000000000000",
      "number": "0x1530a5e",
      "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "parentHash": "0x513a0aa73024f294cdbcb0312af0c920850035f0552d7349ebb30717de30b1cc",
      "receiptsRoot": "0x75308898d571eafb5cd8cde8278bf5b3d13c5f6ec074926de3bb895b519264e1",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "size": "0x29c",
      "stateRoot": "0x65ea44c8bd5f9edbf269b6446b460b3e7378abb25c78fd5d70f0e2ef59296b25",
      "timestamp": "0x67f43327",
      "transactions": [
        "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
        "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd"
      ],
      "transactionsRoot": "0xd6902f31ae9d2169b77cd88611c6afd691ea5a7e604e44c71f663fda0c5d1c28",
      "uncles": [],
      "withdrawals": [],
      "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    }
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# /v2/beacon/blocks/{block_id}/attestations

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v2/beacon/blocks/{block_id}/attestations

Retrieves attestations included in the requested block.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-2-beacon-blocks-block-id-attestations

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| block_id | string | Yes | Block identifier.   Can be one of:   `head` (canonical head in node's view),   `genesis`,   `finalized`,   `<slot>`,   `<hex encoded blockRoot with 0x prefix>`.  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v2/beacon/blocks/head/attestations
```



------

# /v1/beacon/blocks/{block_id}/root

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/blocks/{block_id}/root

Retrieves the hashTreeRoot of a BeaconBlock or BeaconBlockHeader.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-beacon-blocks-block-id-root

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| block_id | string | Yes | Block identifier.   Can be one of:   `head` (canonical head in node's view),   `genesis`,   `finalized`,   `<slot>`,   `<hex encoded blockRoot with 0x prefix>`.  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/blocks/head/root
```



------

# /v1/beacon/blob_sidecars/{block_id}

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/blob_sidecars/{block_id}

Retrieves blob sidecars for a given block.  
If the `indices` query parameter is specified, only the blob sidecars with the given indices will be returned.   Ordering of returned blob sidecars is not guaranteed.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-beacon-blob-sidecars-block-id

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| block_id | string | Yes | Block identifier.   Can be one of:   `head` (canonical head in node's view),   `genesis`,   `finalized`,   `<slot>`,   `<hex encoded blockRoot with 0x prefix>`.  |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| indices | string[] | No | Array of indices for blob sidecars to request.   If not provided, all blob sidecars in the block will be returned.  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/blob_sidecars/head
```



------

# /v2/beacon/blocks/{block_id}

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v2/beacon/blocks/{block_id}

Retrieves full block details for the given block identifier.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-2-beacon-blocks-block-id

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| block_id | string | Yes | Block identifier.   Can be one of:   `head` (canonical head in node's view),   `genesis`,   `finalized`,   `<slot>`,   `<hex encoded blockRoot with 0x prefix>`.  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v2/beacon/blocks/head
```



------

# /v1/beacon/genesis

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/genesis

Retrieve details of the chain's genesis which can be used to identify the chain.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-beacon-genesis

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/genesis
```



------

# /v1/beacon/headers

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/headers

Retrieves block headers matching the given query.   By default, it will fetch the current head slot blocks.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-beacon-headers

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| slot | string | No | Slot number. If provided, returns headers for this slot.  |
| parent_root | string | No | Parent root hash to filter block headers by.  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/headers
```



------

# /v1/beacon/headers/{block_id}

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/headers/{block_id}

Retrieves the block header for the given block identifier.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-beacon-headers-block-id

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| block_id | string | Yes | Block identifier.   Can be one of:   `head` (canonical head in node's view),   `genesis`,   `finalized`,   `<slot>`,   `<hex encoded blockRoot with 0x prefix>`  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/headers/head
```



------

# /v1/beacon/pool/voluntary_exits

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/pool/voluntary_exits

Retrieves voluntary exits known by the node, but not necessarily incorporated into any block.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-beacon-pool-voluntary-exits

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/pool/voluntary_exits
```



------

# /v2/beacon/pool/attestations

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v2/beacon/pool/attestations

Retrieves attestations known by the beacon node but not necessarily incorporated into any block.
This endpoint returns attestations currently present in the node’s operation pool.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-2-beacon-pool-attestations

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v2/beacon/pool/attestations
```



------

# /v1/beacon/states/{state_id}/committees

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/states/{state_id}/committees

Retrieves the committees for the given state.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-beacon-states-state-id-committees

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| state_id | string | Yes | State identifier.   Can be one of:   `head` (canonical head in node's view),   `genesis`, `finalized`,  `justified`, `<slot>`, `<hex encoded stateRoot with 0x prefix>`  |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| epoch | string | No | Fetch committees for the given epoch. If not present, committees for the epoch of the state will be returned. |
| index | string | No | Restrict returned values to those matching the supplied committee index. |
| slot | string | No | Restrict returned values to those matching the supplied slot. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/states/head/committees
```



------

# /v1/beacon/states/{state_id}/finality_checkpoints

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/states/{state_id}/finality_checkpoints

Returns finality checkpoints for the given state.   If finality is not yet achieved, the checkpoint will return epoch `0` and `ZERO_HASH` as root.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-beacon-states-state-id-finality-checkpoints

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| state_id | string | Yes | State identifier.   Can be one of:   `head` (canonical head in node's view),   `genesis`,   `finalized`,   `justified`,   `<slot>`,   `<hex encoded stateRoot with 0x prefix>`.  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/states/head/finality_checkpoints
```



------

# /v1/beacon/states/{state_id}/fork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/states/{state_id}/fork

Returns the Fork object for the given state.   The Fork contains information about protocol versioning (previous and current fork versions, plus the epoch at which they apply).


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-beacon-states-state-id-fork

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| state_id | string | Yes | State identifier.   Can be one of:   `head` (canonical head in node's view),   `genesis`,   `finalized`,   `justified`,   `<slot>`,   `<hex encoded stateRoot with 0x prefix>`.  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/states/head/fork
```



------

# /v1/beacon/states/{state_id}/pending_consolidations

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/states/{state_id}/pending_consolidations

Returns pending consolidations for the given state.   Pending consolidations represent validator indices that are scheduled to consolidate.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-beacon-states-state-id-pending-consolidations

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| state_id | string | Yes | State identifier.   Can be one of:   `head` (canonical head in node's view),   `genesis`,   `finalized`,   `justified`,   `<slot>`,   `<hex encoded stateRoot with 0x prefix>`.  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/states/head/pending_consolidations
```



------

# /v1/beacon/states/{state_id}/root

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/states/{state_id}/root

Calculates the `HashTreeRoot` for the state with the given `stateId`.   If `stateId` itself is a root, the same value will be returned.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-beacon-states-state-id-root

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| state_id | string | Yes | State identifier.   Can be one of:   `head` (canonical head in node's view),   `genesis`,   `finalized`,   `justified`,   `<slot>`,   `<hex encoded stateRoot with 0x prefix>`.  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/states/head/root
```



------

# /v1/beacon/states/{state_id}/sync_committees

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/states/{state_id}/sync_committees

Retrieves the current sync committee for the given state.   Also returns the subcommittee assignments.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-beacon-states-state-id-sync-committees

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| state_id | string | Yes | State identifier.   Can be one of:   `head` (canonical head in node's view),   `genesis`,   `finalized`,   `justified`,   `<slot>`,   `<hex encoded stateRoot with 0x prefix>`.  |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| epoch | string | No | Fetch sync committees for the given epoch.   If not provided, the sync committees for the epoch of the state will be returned.  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/states/head/sync_committees
```



------

# /v1/beacon/states/{state_id}/randao

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/states/{state_id}/randao

Fetches the RANDAO mix for the requested epoch from the state identified by `state_id`.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-beacon-states-state-id-randao

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| state_id | string | Yes | State identifier. Can be one of: `head` (canonical head in node's view), `genesis`, `finalized`, `justified`, `<slot>`, `<hex encoded stateRoot with 0x prefix>`.  |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| epoch | string | Yes | Epoch for which to retrieve the RANDAO mix.  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url 'https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/states/head/randao?epoch=387896'
```



------

# /v1/beacon/states/{state_id}/validator_balances

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/states/{state_id}/validator_balances

Returns a filterable list of validator balances.   Balances will be returned for all indices or public keys that match known validators.   If an index or public key does not match any known validator, no balance will be returned,   but this will not cause an error.   The response does not guarantee ordering, so the `index` should be used to match inputs.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-beacon-states-state-id-validator-balances

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| state_id | string | Yes | State identifier.   Can be one of:   `head` (canonical head in node's view),   `genesis`,   `finalized`,   `justified`,   `<slot>`,   `<hex encoded stateRoot with 0x prefix>`.  |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| id | string[] | No | Optional filter: hex-encoded validator public key (`bytes48` with 0x prefix)   or validator index. Multiple values can be provided.  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/states/head/validator_balances
```



------

# /v1/beacon/states/{state_id}/validators

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/states/{state_id}/validators

Returns a filterable list of validators with their balance, status, and index.   Information will be returned for all indices or public keys that match known validators.   If an index or public key does not match any known validator, no information will be returned,   but this will not cause an error.   The response does not guarantee ordering, so both the `index` and `pubkey` can be used to confirm inputs.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-beacon-states-state-id-validators

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| state_id | string | Yes | State identifier.   Can be one of:   `head` (canonical head in node's view),   `genesis`,   `finalized`,   `justified`,   `<slot>`,   `<hex encoded stateRoot with 0x prefix>`.  |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| id | string[] | No | Optional filter: validator index or hex-encoded public key (`bytes48` with 0x prefix).   Multiple values can be provided.  |
| status | string[] | No | Optional filter: restrict results to validators with the given status.   Status values include:   `pending_initialized`, `pending_queued`, `active_ongoing`, `active_exiting`, `active_slashed`,   `exited_unslashed`, `exited_slashed`, `withdrawal_possible`, `withdrawal_done`.  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/states/head/validators
```



------

# /v1/beacon/states/{state_id}/validators/{validator_id}

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/states/{state_id}/validators/{validator_id}

Returns validator specified by state and ID or public key,   along with its status and balance.   The validator can be referenced by its index (numeric) or hex-encoded public key (`bytes48` with 0x prefix).


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-beacon-states-state-id-validators-validator-id

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| state_id | string | Yes | State identifier.   Can be one of:   `head` (canonical head in node's view),   `genesis`,   `finalized`,   `justified`,   `<slot>`,   `<hex encoded stateRoot with 0x prefix>`.  |
| validator_id | string | Yes | Validator identifier.   Either validator index (integer) or hex-encoded public key (bytes48 with `0x` prefix).  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/states/head/validators/474200
```



------

# /v1/beacon/rewards/sync_committee/{block_id}

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/rewards/sync_committee/{block_id}

Retrieves rewards info for sync committee members specified by array of public keys or validator indices.   If no array is provided, the rewards for **all sync committee members** are returned.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-beacon-rewards-sync-committee-block-id

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| block_id | string | Yes | Block identifier.   Can be one of:   `head` (canonical head in node's view),   `genesis`,   `finalized`,   `<slot>`,   `<hex encoded blockRoot with 0x prefix>`.  |

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/rewards/sync_committee/head \
  --header 'Content-Type: application/json' \
  --data '[
  "string"
]'
```



------

# /v1/beacon/rewards/blocks/{block_id}

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/rewards/blocks/{block_id}

Retrieve block reward info for a single block.   The `total` reward is the sum of proposer rewards from **attestations**, **sync committees**, and **slashings** included in the proposal.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-beacon-rewards-blocks-block-id

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| block_id | string | Yes | Block identifier.   Can be one of:   `head` (canonical head in node's view),   `genesis`,   `finalized`,   `<slot>`,   `<hex encoded blockRoot with 0x prefix>`.  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/rewards/blocks/head
```



------

# /v1/beacon/rewards/attestations/{epoch}

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/rewards/attestations/{epoch}

Retrieve attestation reward info for validators specified by an array of **public keys** or **validator indices**.   If no array is provided, reward info for **every validator** will be returned.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-beacon-rewards-attestations-epoch

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| epoch | string | Yes | Epoch identifier from which to retrieve rewards info. |

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/rewards/attestations/1 \
  --header 'Content-Type: application/json' \
  --data '[
  "string"
]'
```



------

# /v1/beacon/blinded_blocks/{block_id}

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/blinded_blocks/{block_id}

Retrieves a blinded beacon block for the given block identifier.   The response can be returned as JSON or SSZ bytes depending on the Accept header.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-beacon-blinded-blocks-block-id

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| block_id | string | Yes | Block identifier.   Can be one of:   `head` (canonical head in node's view),   `genesis`,   `finalized`,   `<slot>`,   `<hex encoded blockRoot with 0x prefix>`.  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/beacon/blinded_blocks/head
```



------

# /v1/config/deposit_contract

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/config/deposit_contract

Retrieve the **Ethereum 1.0 deposit contract** address and chain ID.   This contract is used for staking deposits into the Beacon Chain.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-config-deposit-contract

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/config/deposit_contract
```



------

# /v1/config/fork_schedule

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/config/fork_schedule

Retrieve all forks (past, present, and future) known to the node.   Each fork entry contains the previous and current protocol version along with the epoch at which the fork occurred.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-config-fork-schedule

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/config/fork_schedule
```



------

# /v1/config/spec

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/config/spec

Retrieve the specification configuration used on this node.  
The configuration includes: - Constants for all hard forks known by the beacon node (e.g. Phase0, Altair, Bellatrix, Capella, Deneb, Electra, etc.) - Presets for hard forks supplied to the node - Mainnet or testnet specific configuration values  
**Format rules:** - Any value starting with `0x` is returned as a hex string. - Numeric values are returned as a quoted integer.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-config-spec

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/config/spec
```



------

# /v1/events

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/events

Stream real-time beacon chain events from the beacon node. Subscribe by specifying one or more event topics using the
`topics` query parameter.

<Info>
**Note:** This is an EventSource (Server-Sent Events) style endpoint.
The HTTP connection remains open and continuously pushes events as they
occur.
</Info>


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-events

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| topics | string | Yes | Comma-separated list of event topics to subscribe to. Valid topics include: `head`, `block`, `finalized_checkpoint`, `chain_reorg`, `voluntary_exit`, and others depending on the beacon node implementation.  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url 'https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/events?topics=head'
```



------

# /v1/node/peer_count

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/node/peer_count

Retrieves the number of peers the beacon node knows about, grouped by connection status.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-node-peer-count

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/node/peer_count
```



------

# /v1/node/peers

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/node/peers

Retrieves data about the node's network peers.   By default this returns all peers.   Multiple query params are combined using **AND** conditions.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-node-peers

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| state | enum[] | No | Filter peers by their connection state.   Available values: `disconnected`, `connecting`, `connected`, `disconnecting`.  |
| direction | enum[] | No | Filter peers by their connection direction.   Available values: `inbound`, `outbound`.  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/node/peers
```



------

# /v1/node/syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/node/syncing

Requests the beacon node to describe if it's currently syncing or not, and if it is,   what block it is up to.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-node-syncing

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/node/syncing
```



------

# /v1/node/version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/node/version

Requests that the beacon node identify information about its implementation,   in a format similar to a HTTP `User-Agent` field.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-node-version

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/node/version
```



------

# /v2/debug/beacon/states/{state_id}

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v2/debug/beacon/states/{state_id}

Returns the full BeaconState object for the given state identifier. This is a debug endpoint intended for advanced inspection and troubleshooting.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-2-debug-beacon-states-state-id

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| state_id | string | Yes | State identifier. Can be one of: `head` (canonical head in node's view), `genesis`, `finalized`, `justified`, `<slot>`, `<hex encoded stateRoot with 0x prefix>`.  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v2/debug/beacon/states/head
```



------

# /v1/debug/fork_choice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/debug/fork_choice

Retrieves the current fork choice context of the beacon node. This debug endpoint exposes internal fork choice data and is intended for advanced inspection and troubleshooting.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-debug-fork-choice

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/debug/fork_choice
```



------

# /v2/validator/aggregate_attestation

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v2/validator/aggregate_attestation

Aggregates all attestations matching the given attestation data root, slot and committee index. Returns a single aggregated attestation. 503 is returned if the block identified by the response `beacon_block_root` is optimistic (i.e., the aggregated attestation attests to a block not fully verified by an execution engine). 404 is returned if no attestation is available for the requested `attestation_data_root`.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-2-validator-aggregate-attestation

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| attestation_data_root | string | Yes | HashTreeRoot (hex) of the AttestationData to aggregate. |
| slot | string | Yes | Slot of the attestation. |
| committee_index | string | Yes | Committee index of the attestation. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url 'https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v2/validator/aggregate_attestation?attestation_data_root=0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2&slot=1&committee_index=1'
```



------

# /v1/validator/duties/attester/{epoch}

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/validator/duties/attester/{epoch}

Requests the beacon node to provide a set of attestation duties, which should be performed by validators, for a particular epoch. Duties should only need to be checked once per epoch, however a chain reorganization could occur, resulting in a change of duties.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-validator-duties-attester-epoch

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| epoch | string | Yes | Should only be allowed 1 epoch ahead.  |

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/validator/duties/attester/387896 \
  --header 'Content-Type: application/json' \
  --data '[
  "string"
]'
```



------

# /v1/validator/duties/proposer/{epoch}

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/validator/duties/proposer/{epoch}

Return all validators scheduled to propose a block in the given epoch. Duties are typically stable within an epoch, but may change after a chain reorg. For full safety, monitor head events and confirm the dependent root in this response matches:
  • event.current_duty_dependent_root when compute_epoch_at_slot(event.slot) == epoch
  • event.block otherwise
The dependent_root is get_block_root_at_slot(state, compute_start_slot_at_epoch(epoch) - 1), or the genesis block root in case of underflow.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-validator-duties-proposer-epoch

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| epoch | string | Yes | Epoch to query proposer duties for. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/validator/duties/proposer/1
```



------

# /v1/validator/duties/sync/{epoch}

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/validator/duties/sync/{epoch}

Returns the sync committee duties for the given epoch and the specified validator indices. The `epoch` must satisfy: ``` EPOCHS_PER_SYNC_COMMITTEE_PERIOD <= current_epoch <= EPOCHS_PER_SYNC_COMMITTEE_PERIOD + 1 ```


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-validator-duties-sync-epoch

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| epoch | string | Yes | Epoch to query sync committee duties for. |

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/validator/duties/sync/1 \
  --header 'Content-Type: application/json' \
  --data '[
  "1"
]'
```



------

# /v1/validator/sync_committee_contribution

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/validator/sync_committee_contribution

Requests that the beacon node produce a sync committee contribution.
- Return **503** if the block identified by the response `beacon_block_root` is optimistic
  (i.e., the contribution refers to a block not fully verified by an execution engine).
- Return **404** if no sync committee contribution is available for the requested `beacon_block_root`.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-validator-sync-committee-contribution

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| slot | string | Yes | The slot for which a sync committee contribution should be created. |
| subcommittee_index | string | Yes | The subcommittee index for which to produce the contribution. |
| beacon_block_root | string | Yes | The block root (hex) for which to produce the contribution. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url 'https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/validator/sync_committee_contribution?slot=1&subcommittee_index=1&beacon_block_root=0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2'
```



------

# /v1/validator/contribution_and_proofs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/validator/contribution_and_proofs

Publishes multiple signed sync committee contribution and proofs to the beacon node.


Reference: https://www.alchemy.com/docs/chains/ethereum/ethereum-beacon-api-endpoints/ethereum-beacon-api-endpoints/v-1-validator-contribution-and-proofs

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnetbeacon.g.alchemy.com/v2/docs-demo/eth/v1/validator/contribution_and_proofs \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "message": {
      "aggregator_index": "474200",
      "contribution": {
        "slot": "12412675",
        "beacon_block_root": "0x3cf2223424524bf1094e2b010ea50b75e7914919c677d2702287bd423fd0f9b0",
        "subcommittee_index": "1",
        "aggregation_bits": "0xffffffffffffffffffffffffffffffff",
        "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
      },
      "selection_proof": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
    },
    "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
  }
]
'
```



------

# Ethereum API FAQ

> Frequently Asked Questions about the Ethereum API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What testnet should you use for Ethereum development?

If you're getting started on Alchemy, use **Sepolia** as your testnet of choice for development.

The Ethereum Foundation winded down support for the Rinkeby, Ropsten, and Kovan networks after Ethereum's transition to a proof-of-stake model and the Goerli testnet is also deprecated. To ensure that your testnet applications remain fully functional after the transition, we recommend using Sepolia, which will remain unchanged. Learn more at [Choosing a Web3 Network](/docs/choosing-a-web3-network).

## What API does Ethereum use?

Ethereum uses the JSON-RPC API standard. The Ethereum JSON-RPC API serves as the backbone for the Ethereum network and powers any blockchain interaction. This API suite lets you read block/transaction data, query chain information, execute smart contracts, store data onchain, and more. You interact with Ethereum’s base JSON-RPC APIs to communicate with its decentralized network of nodes.

## What is an Ethereum API key?

When accessing the Ethereum network via a node provider, API services like Alchemy require an API key, which lets you monitor your apps and access usage metrics.

While many Ethereum development environments have a set of default shared API keys, they are often throttled during periods of high usage leading to slower response times and a higher likelihood of request failures.

For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup).

With a dedicated API key, you can:

* access **higher request throughput** and **increased concurrent requests**.
* query [Data APIs](/docs/reference/data-overview), gaining access to free archive data, logs, and higher-level API abstractions.
* leverage **individualized usage metrics**.

## Does Ethereum only use JSON-RPC?

The raw Ethereum client only uses JSON-RPC notation to encode remote procedure calls for interpreting requests and serving up responses. However, most libraries actually abstract away the JSON-RPC standard.

## How does Alchemy's Ethereum API work?

Alchemy's Ethereum API gives developers and users access to read and write data to the Ethereum blockchain.

If you’re not familiar with [how a blockchain works](/docs/blockchain-101), here’s a quick recap:

* The Ethereum blockchain is made up of blocks of data.
* Blocks are stored on distributed Ethereum nodes.
* Each node in the network serves as a “mini-server” that allows its operator to read/write blocks of data.

Alchemy provides access to our higher-level infrastructure that lets you interface with the Ethereum network. With API access, you can send read/write requests to the blockchain.

We take care of the hard stuff so you can focus on your product.

## Can you use Python for Ethereum?

Yes! While JavaScript libraries have historically gained traction in the Ethereum development community, you can also use Python to read and write the same data. One commonly used blockchain interaction library is web3.py which wraps many of the same methods featured in web3.js and Ethers.js.

For Python-based EVM development, [Brownie](https://eth-brownie.readthedocs.io/en/stable/) offers a full suite of Web3 developer tools for compiling, testing, and deploying dApps similar to its peer environments Hardhat and Truffle.

## How do I get the timestamp for a transaction?

There are three steps to get the timestamp for a transaction:

1. Grab the `blockNumber` field in your transaction object
   1. If you only have the transaction hash, you can get the full object by making a request to [`eth_getTransactionByHash`](/docs/reference/eth-gettransactionbyhash).
2. Get the block info by calling \[ref:eth-getblockbynumber)
3. Grab the `timestamp` field in the returned block object

Here is an [example request](https://composer.alchemy.com/?composer_state=%7B%22network%22%3A0%2C%22methodName%22%3A%22eth_getBlockByNumber%22%2C%22paramValues%22%3A%5B%22latest%22%2Cfalse%5D%7D).

Block numbers themselves are Ethereum's measure of time, however standard timestamps are available by looking at the block data.

## Contract vs wallet address

A quick way to distinguish between a contract address and a wallet address is by calling [eth\_getCode](/docs/reference/eth-getcode), which returns contract code if it's a contract and nothing if it's a wallet. Here's an example of both using our composer tool:

* [**0x Contract Address**](https://composer.alchemy.com/?composer_state=%7B%22network%22%3A0%2C%22methodName%22%3A%22eth_getCode%22%2C%22paramValues%22%3A%5B%220xe41d2489571d322189246dafa5ebde1f4699f498%22%2C%22latest%22%5D%7D)
* [**Vitalik's Wallet Address**](https://composer.alchemy.com/?composer_state=%7B%22network%22%3A0%2C%22methodName%22%3A%22eth_getCode%22%2C%22paramValues%22%3A%5B%220xAb5801a7D398351b8bE11C439e05C5B3259aeC9B%22%2C%22latest%22%5D%7D)

## What is the difference between `DATA` and `QUANTITY`?

The difference between the types “`DATA`” and “`QUANTITY`” is that “`DATA`” always comes specified with a required length (ex: 20 Bytes), so you'll need to make sure the string you pass in is the right length. In contrast, `QUANTITY` does not have length requirements.

For example given a parameter type: “DATA, 20 Bytes”, a valid input would be:

```text
"0x0000000000000000000000000000000000000003"
```

*note: every two hex characters make one byte, so that string is `0x` followed by forty hex characters*

However, if this were a QUANTITY, a valid input would be:

```text
"0x3"
```

## What is the default block parameter?

The default block parameter is used to specify the block height in your request. It is an additional parameter on all of the following methods:

* [eth\_getBalance](/docs/reference/eth-getbalance)
* [eth\_getCode](/docs/reference/eth-getcode)
* [eth\_getTransactionCount](/docs/reference/eth-gettransactioncount)
* [eth\_getStorageAt](/docs/reference/eth-getstorageat)
* [eth\_call](/docs/reference/eth-call)

The following options are possible for the defaultBlock parameter:

* HEX String - an integer block number
* String `earliest` for the earliest/genesis block
* String `latest` - for the latest mined block
* String `pending` - for the pending state/transactions

## What methods does Alchemy support for the Ethereum API?

You can find the list of all the methods Alchemy support for the Ethereum API on the [Ethereum API Endpoints Overview](/docs/chains#ethereum-apis).

## My question isn't here, where can I get help?

If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Solana API Quickstart

> How to get started building on Solana using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

## Send your first request on Alchemy

Let's use [`@solana/web3.js`](https://www.npmjs.com/package/@solana/web3.js) package to set up a `Connection` with Alchemy and get the latest slot on Solana!

<CodeGroup>
  ```text npm
  npm install --save @solana/web3.js
  ```

  ```text yarn
  yarn add @solana/web3.js
  ```
</CodeGroup>

## Create a connection to Alchemy

<CodeGroup>
  ```js
  import { Connection } from "@solana/web3.js";

  const connection = new Connection(
    "https://solana-devnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY",
    "confirmed"
  );

  const slot = await connection.getSlot();
  console.log("Current slot:", slot);
  ```
</CodeGroup>

Now that you've set up a connection to Alchemy, you can continue with some basics:

## Create a wallet

<CodeGroup>
  ```js
  import { Keypair } from "@solana/web3.js";

  const wallet = Keypair.generate();
  console.log("Public Key:", wallet.publicKey.toBase58());
  ```
</CodeGroup>

## Check wallet balance

<CodeGroup>
  ```js
  const balance = await connection.getBalance(wallet.publicKey);
  console.log("Balance:", balance / 1e9, "SOL");
  ```
</CodeGroup>

## Fetch account info

<CodeGroup>
  ```js
  const info = await connection.getAccountInfo(wallet.publicKey);
  console.log(info);
  ```
</CodeGroup>

## Find Solana methods by category

<CardGroup>
  <Card title="Current State Methods" icon="clock" href="/docs/solana-api-faq#current-state-methods">
    Query live blockchain data and network status
  </Card>

  <Card title="Historical Data (Archival)" icon="box-archive" href="/docs/solana-api-faq#historical-data-archival">
    Access complete transaction and block history
  </Card>

  <Card title="Transaction Submission" icon="paper-plane" href="/docs/solana-api-faq#transaction-submission">
    Send and simulate transactions with fee estimation
  </Card>

  <Card title="Network & Cluster Info" icon="network-wired" href="/docs/solana-api-faq#network-performance-economics">
    Monitor validators, epochs and network performance
  </Card>
</CardGroup>

# CU Calculator

Want to estimate your Solana Compute Units (CUs) before running transactions?\
**Try the CU Calculator now:** [Open CU Calculator →](https://solana-demo-sigma.vercel.app/)

# Solana Tutorials

Check out the following tutorials to learn how to build with Solana:

* [Hello World Solana Program](/docs/hello-world-solana-program)
* [How to Integrate a Solana Program with a Web3 Application](/docs/hello-world-solana-application)

------

# Leverage AccountsDB Infrastructure for Solana RPC Requests

> Leverage Alchemy’s AccountsDB Infrastructure for Solana RPC Requests!

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

The most expensive Solana RPC requests involve account scans, such as `getProgramAccounts` and `getLargestTokenAccounts`. These methods are incredibly useful but non-performant methods since they induce a heavy RPC load on Solana validator nodes, often resulting in a 5XX response due to timeout or a response with high latency.

Alchemy has built core infrastructure that sits atop our Solana validator nodes to support these methods at scale, through what we call the AccountsDB Infrastructure. This infrastructure provides **faster**, **scalable**, and more **reliable** responses to these methods by paginating the response with a `pageKey`. You can then loop through the same request with a scan and aggregate the full response from our validator nodes.

You can see `pageKey` is now an optional parameter in each account-scanning method in our Solana [docs](/docs/reference/getprogramaccounts), and you may also include an `order` optional parameter that would sort the accounts in the response by their `pubkey` field.

Here's an example with `getProgramAccounts`:

<CodeGroup>
  ```typescript typescript
  const axios = require("axios");

  async function getProgramAccountsExample() {
    let gPAExampleRequest = {
      method: "getProgramAccounts",
      params: [
        "ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD",
        {
          encoding: "base64",
          withContext: true,
          order: "desc",
          dataSlice: {
            offset: 0,
            length: 10,
          },
        },
      ],
      id: 0,
      jsonrpc: "2.0",
    };
    let programAccounts = [];

    const alchemyRPCUrl =
      "https://solana-mainnet.g.alchemy.com/v2/<YOUR-API-KEY>";
    try {
      let response = await axios.post(alchemyRPCUrl, gPAExampleRequest);
      let responseData = response.data["result"];

      // continue aggregating if there's a new pageKey present in the latest response
      while (responseData["pageKey"]) {
        programAccounts = programAccounts.concat(responseData["value"]);

        // place the pagekey within the optional config object
        // (you may need to create that config object if you didn't have it originally)
        gPAExampleRequest["params"][1]["pageKey"] = responseData["pageKey"];

        // make another call to getProgramAccounts with the pageKey
        response = await axios.post(alchemyRPCUrl, gPAExampleRequest);
        responseData = response.data["result"];
      }

      programAccounts = programAccounts.concat(responseData["value"]);
      console.log(programAccounts);
      return programAccounts;
    } catch (err) {
      console.log(err.message);
      return [];
    }
  }
  ```
</CodeGroup>

------

# Snapshotting historical Solana account state

> Patterns for capturing Solana account state at regular intervals (hourly, daily, or arbitrary slot cadence) using Alchemy's Yellowstone gRPC streams and archival JSON-RPC methods.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

Many Solana workloads need to know what an account looked like at a previous point in time: portfolio analytics, TVL history, vault accounting, oracle audits, treasury reporting, ML feature stores. Standard Solana JSON-RPC does not expose a "read this account as of slot N" primitive. This page covers the two patterns Alchemy supports today for reconstructing historical account state, how to combine them, and how to land at common cadences like hourly snapshots.

## Why Solana RPC alone is not enough

`getAccountInfo` returns the **current** state of an account. The `minContextSlot` parameter is a freshness floor (the read must be evaluated at a slot greater than or equal to `minContextSlot`), not a historical lookup. Solana validators do not retain prior versions of an account's data once the account is updated, so no JSON-RPC method can answer "what did this account hold at slot N" directly.

What Solana **does** retain is the full transaction and block history. Alchemy's archival infrastructure exposes that history through `getTransaction`, `getBlock`, and `getSignaturesForAddress`, which means you can reconstruct historical account state by:

1. **Capturing it forward** as the chain advances, persisting periodic snapshots to your own store.
2. **Reconstructing it backward** by replaying the transactions that wrote to the account.

Most production indexers combine both: stream forward from "now" while backfilling history for the period before the stream started.

## Workflow A: forward snapshotting via Yellowstone gRPC

[Yellowstone gRPC](/docs/reference/yellowstone-grpc-overview) is the recommended path for ongoing state capture. A single subscription receives every account update for the addresses or programs you care about, with the slot number attached to each update, and persists at minimal latency.

### How it works

1. Open a Yellowstone gRPC subscription with an account filter ([`accounts`](/docs/reference/yellowstone-grpc-subscribe-accounts) in the [`SubscribeRequest`](/docs/reference/yellowstone-grpc-subscribe-request)).
2. On every `SubscribeUpdateAccount` your handler receives, write a row containing `(pubkey, slot, write_version, data, lamports, owner, txn_signature)` to your store.
3. Index the resulting table by `(pubkey, slot, write_version)` so you can query the latest version at or before any target slot.

A single Solana slot can contain multiple transactions that write to the same account. The `write_version` field is a monotonically increasing counter that disambiguates those intra-slot updates: the final state for a slot is the row with the highest `write_version` at that slot. Always tie-break by `(slot, write_version)` rather than `slot` alone.

To produce hourly snapshots, you do not need a separate sampling job. Solana blocks land at roughly 400 ms, so an active account may have many writes per hour and a quiet account may have none. Both cases are handled the same way: a query for "the state of this account at hour H" returns the row with the largest `(slot, write_version)` pair where `slot` is less than or equal to the slot corresponding to the timestamp at the end of hour H. In SQL that is `ORDER BY slot DESC, write_version DESC LIMIT 1`. Use `getBlockTime` or `getBlocks` to map wall-clock timestamps to slots.

### Filter options

The Yellowstone account filter supports three styles, in order of selectivity:

* **Specific addresses** ([`account`](/docs/reference/yellowstone-grpc-subscribe-accounts#account-address-filter)): pass a list of pubkeys to watch. Best when you know the accounts upfront.
* **Program owner** ([`owner`](/docs/reference/yellowstone-grpc-subscribe-accounts#owner-filter)): receive every account owned by a given program. Use this when the account set is dynamic (for example, all vault accounts under a single program).
* **Memcmp / data-size / lamports / `token_account_state`** ([`filters`](/docs/reference/yellowstone-grpc-subscribe-accounts#memcmp-filter)): narrow further by byte patterns, account discriminator, or balance ranges. Combine with `owner` to watch a specific subset of a program's accounts.

If you need to enumerate the initial set of accounts before subscribing (for example, all program-derived accounts under a vault program), use `getProgramAccounts` paginated via Alchemy's [AccountsDB Infrastructure](/docs/solana/accounts-db-infra). The `pageKey` and `order` parameters let you scan large account sets without timing out.

### Minimal Rust example

```rust
use anyhow::Result;
use futures::{sink::SinkExt, stream::StreamExt};
use std::collections::HashMap;
use yellowstone_grpc_client::{ClientTlsConfig, GeyserGrpcClient};
use yellowstone_grpc_proto::geyser::{
    CommitmentLevel, SubscribeRequest, SubscribeRequestFilterAccounts,
    subscribe_update::UpdateOneof,
};

#[tokio::main]
async fn main() -> Result<()> {
    let endpoint = "https://solana-mainnet.g.alchemy.com";
    let x_token = "YOUR_ALCHEMY_API_KEY";

    let mut client = GeyserGrpcClient::build_from_shared(endpoint)?
        .tls_config(ClientTlsConfig::new().with_native_roots())?
        .x_token(Some(x_token))?
        .connect()
        .await?;

    let (mut tx, mut stream) = client.subscribe().await?;

    // Subscribe to a specific set of account pubkeys
    let mut accounts = HashMap::new();
    accounts.insert(
        "accounts_to_snapshot".to_string(),
        SubscribeRequestFilterAccounts {
            account: vec![
                "AccountPubkey1...".to_string(),
                "AccountPubkey2...".to_string(),
            ],
            owner: vec![],
            filters: vec![],
            nonempty_txn_signature: Some(true),
        },
    );

    tx.send(SubscribeRequest {
        accounts,
        commitment: Some(CommitmentLevel::Confirmed as i32),
        ..Default::default()
    })
    .await?;

    while let Some(Ok(msg)) = stream.next().await {
        if let Some(UpdateOneof::Account(update)) = msg.update_oneof {
            if let Some(info) = update.account {
                // Persist this snapshot. Index by (pubkey, slot, write_version).
                println!(
                    "slot={} pubkey={} lamports={} data_len={}",
                    update.slot,
                    bs58::encode(&info.pubkey).into_string(),
                    info.lamports,
                    info.data.len()
                );
            }
        }
    }

    Ok(())
}
```

For client setup, authentication details, and language samples in TypeScript and Go, see the [Yellowstone gRPC Quickstart](/docs/reference/yellowstone-grpc-quickstart).

### Recovering from disconnects

Yellowstone supports replaying historical updates by setting `from_slot` on the `SubscribeRequest`. The replay window is up to **6000 slots (~40 minutes)** of history. Persist the slot of the last update you successfully wrote, and on reconnect resubscribe with `from_slot` set to that slot. If your downtime exceeds the replay window, fall back to the backfill workflow below for the gap.

## Workflow B: historical backfill via transaction replay

Snapshotting forward only captures state from the moment your subscription starts. For periods before that, the available primitive is the transaction history exposed through `getTransaction`. This workflow is best understood by what each `getTransaction` response actually contains and what it does not.

### What `getTransaction` provides

For each transaction, `getTransaction` returns:

* `meta.preBalances` and `meta.postBalances`: SOL lamport balances per account (indexed against `transaction.message.accountKeys`).
* `meta.preTokenBalances` and `meta.postTokenBalances`: SPL token balances per account.
* `meta.innerInstructions`: CPIs invoked by the top-level instructions.
* `meta.logMessages`: program log output.
* `transaction.message.instructions` and `transaction.message.accountKeys`: the instructions and the accounts they touched.

What `getTransaction` does **not** return: pre or post account `data` blobs. There is no `preAccountData` / `postAccountData` field. That is the central constraint on this workflow.

<Warning>
  Transaction replay can reliably reconstruct three things: **SOL lamport balances** (from pre/post balances), **SPL token balances** (from pre/post token balances), and **events emitted via program logs** (Anchor `emit!` macros, custom `msg!` lines).

  It **cannot** reconstruct arbitrary program account `data` blobs from `getTransaction` alone. To rebuild full account `data` for historical periods, you need either (a) a starting `data` snapshot from before the period of interest, plus program-specific decoding of each touching instruction to derive the new state, or (b) the program emitting comprehensive event logs that cover every state mutation. If neither applies, the supported path is to start workflow A as early as possible and accept that history before the subscription start is not recoverable from transactions alone.
</Warning>

### Pattern

1. Call [`getSignaturesForAddress`](/docs/chains/solana/solana-api-endpoints/get-signatures-for-address) for the target account, paging through history with `before` and `until` cursors. Returns signatures plus block times.
2. For each signature, call [`getTransaction`](/docs/chains/solana/solana-api-endpoints/get-transaction) and locate the target account's index in `transaction.message.accountKeys`.
3. Read `meta.postBalances[i]` (and `meta.postTokenBalances` for token accounts) for the state immediately after this transaction's writes. Persist a row keyed by `(pubkey, slot, signature)` so you can later answer "balance at hour H" as the row with the largest slot less than or equal to `block_at(H)`.

`meta.preBalances` and `meta.postBalances` are consistent across adjacent transactions: the `preBalances[i]` of the transaction at slot T+1 equals the `postBalances[i]` of the most recent earlier transaction that touched account `i`. Use the post-side of each transaction as the canonical value for its slot.

Alchemy's Solana archival surface is optimized for this kind of historical scan. Per the [Built for Solana](https://www.alchemy.com/blog/solana-infrastructure) release, `getTransaction` is up to 20x faster than other providers on historical calls, and `getSignaturesForAddress` supports recency-first ordering so you can walk from the present backward without scanning from genesis.

### When you need program-account state, not just balances

For lending position values, vault share prices, oracle values, market state, and any other field that lives inside a program account's `data` blob, workflow B is not sufficient on its own (see the warning above). The supported path is:

1. Enumerate the account set with paginated [`getProgramAccounts`](/docs/chains/solana/solana-api-endpoints/get-program-accounts) calls using Alchemy's [AccountsDB Infrastructure](/docs/solana/accounts-db-infra) (`pageKey` + `order`). This gives you every account and its **current** `data`.
2. Start a Yellowstone gRPC subscription (workflow A) filtered by program owner. From that point forward, every state change is captured with the full new `data` bytes.
3. Treat the moment the subscription starts as your "history begins here" marker. Reads at any slot at or after that marker resolve against the snapshot table; reads before it are not supported by this workflow.

The earlier you start workflow A, the smaller the unsupported window. If a backfill before the subscription start is required, the practical options are to bootstrap from an external historical-snapshot source for the program or to model the program's instructions program-side and replay them against a starting snapshot. Both are out of scope for this guide.

### Minimal TypeScript example: lamport balance backfill

This example walks one account's signature history and persists post-balance per transaction, which is what workflow B reliably supports.

```typescript
import { Connection, PublicKey } from "@solana/web3.js";

const connection = new Connection(
  "https://solana-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY",
  "confirmed"
);

type BalanceRow = {
  pubkey: string;
  slot: number;
  signature: string;
  lamports: number;
};

async function backfillLamportHistory(
  address: string,
  untilSlot: number
): Promise<BalanceRow[]> {
  const pubkey = new PublicKey(address);
  const rows: BalanceRow[] = [];
  let before: string | undefined = undefined;

  while (true) {
    const sigs = await connection.getSignaturesForAddress(pubkey, {
      before,
      limit: 1000,
    });
    if (sigs.length === 0) break;

    for (const sig of sigs) {
      if (sig.slot < untilSlot) return rows;

      const tx = await connection.getTransaction(sig.signature, {
        maxSupportedTransactionVersion: 0,
      });
      if (!tx || !tx.meta) continue;

      // Locate the target account's index in the message account keys.
      const keys = tx.transaction.message.getAccountKeys({
        accountKeysFromLookups: tx.meta.loadedAddresses,
      });
      const index = keys
        .keySegments()
        .flat()
        .findIndex((k) => k.equals(pubkey));
      if (index === -1) continue;

      // Post-balance is the canonical lamport value after this transaction's writes.
      rows.push({
        pubkey: address,
        slot: sig.slot,
        signature: sig.signature,
        lamports: tx.meta.postBalances[index],
      });
    }

    before = sigs[sigs.length - 1].signature;
  }

  return rows;
}
```

For SPL token balances, swap `meta.postBalances[index]` for the matching entry in `meta.postTokenBalances` (which is indexed by `accountIndex` and includes `mint`, `owner`, and `uiTokenAmount`). For program log events, parse `meta.logMessages` against your program's known event format.

## Choosing a sampling cadence

The two workflows above give you per-update granularity. Picking a coarser cadence (hourly, daily) is a query-time concern, not an ingest-time one. Two common approaches:

* **Store every update, derive snapshots at query time.** Recommended when the account set is small or update volume is moderate. Lets you change cadence later without re-ingesting.
* **Materialize fixed-cadence rollups.** Run a periodic job that, for each tracked account, writes the latest value at or before each cadence boundary into a separate table. Reduces query cost when you only ever read at fixed intervals.

To map wall-clock timestamps to slots for the boundaries, call [`getBlockTime`](/docs/chains/solana/solana-api-endpoints/get-block-time) on a candidate slot, or use [`getBlocks`](/docs/chains/solana/solana-api-endpoints/get-blocks) to find the slot range that bounds a target timestamp.

## Workflow comparison

| Aspect                | Yellowstone gRPC (Workflow A)                     | Transaction replay (Workflow B)                                                       |
| --------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------- |
| Time horizon          | From subscription start, forward                  | From any point in history, backward                                                   |
| Latency to new data   | Real-time (sub-second)                            | As fast as you can page archival history                                              |
| Filter granularity    | Address, owner, memcmp, data size, lamports       | Per-address (via `getSignaturesForAddress`)                                           |
| Data captured         | Full account bytes (data, lamports, owner)        | SOL balance, SPL token balance, program log events only (no account `data` blobs)     |
| Replay after gap      | `from_slot`, up to 6000 slots (~40 min)           | Unbounded, limited only by archival depth                                             |
| Best for              | Ongoing capture of a known account or program set | Backfilling SOL/token balance history; not sufficient for arbitrary program state     |
| Plan requirement      | PAYG or Enterprise                                | Available on all paid plans                                                           |

Combine the two: turn on the gRPC subscription first, persist its slot as your "snapshot start", then run workflow B in parallel to backfill SOL and SPL token balance history before that slot. For full account `data` history before the subscription start, see the warning under [Workflow B](#workflow-b-historical-backfill-via-transaction-replay): start workflow A as early as possible, or source a starting snapshot from an external historical-data product.

## Related references

* [AccountsDB Infrastructure](/docs/solana/accounts-db-infra) — paginated `getProgramAccounts` and `getTokenLargestAccounts` for enumerating large account sets.
* [Yellowstone gRPC Overview](/docs/reference/yellowstone-grpc-overview) and [Subscribe to Accounts](/docs/reference/yellowstone-grpc-subscribe-accounts) — full filter reference and protobuf definitions.
* [Solana API FAQ — Historical Data (Archival)](/docs/solana-api-faq#historical-data-archival) — the full set of archival JSON-RPC methods.
* [Built for Solana](https://www.alchemy.com/blog/solana-infrastructure) and [How Alchemy Built the Fastest Archival Methods on Solana](https://www.alchemy.com/blog/how-alchemy-built-the-fastest-archival-methods-on-solana) — background on the archival stack powering the methods above.

------

# Solana API Overview

> Overview of available Solana API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Solana APIs

📙 Get started with our [Solana API Quickstart Guide](/docs/reference/solana-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`getAccountInfo`](/docs/chains/solana/solana-api-endpoints/get-account-info)                   | [`getBalance`](/docs/chains/solana/solana-api-endpoints/get-balance)                        |
| [`getBlock`](/docs/chains/solana/solana-api-endpoints/get-block)                                | [`getBlockCommitment`](/docs/chains/solana/solana-api-endpoints/get-block-commitment)       |
| [`getBlockHeight`](/docs/chains/solana/solana-api-endpoints/get-block-height)                   | [`getBlockProduction`](/docs/chains/solana/solana-api-endpoints/get-block-production)       |
| [`getBlocks`](/docs/chains/solana/solana-api-endpoints/get-blocks)                              | [`getBlocksWithLimit`](/docs/chains/solana/solana-api-endpoints/get-blocks-with-limit)      |
| [`getBlockTime`](/docs/chains/solana/solana-api-endpoints/get-block-time)                       | [`getClusterNodes`](/docs/chains/solana/solana-api-endpoints/get-cluster-nodes)             |
| [`getEpochInfo`](/docs/chains/solana/solana-api-endpoints/get-epoch-info)                       | [`getEpochSchedule`](/docs/chains/solana/solana-api-endpoints/get-epoch-schedule)           |
| [`getFeeForMessage`](/docs/chains/solana/solana-api-endpoints/get-fee-for-message)              | [`getFirstAvailableBlock`](/docs/chains/solana/solana-api-endpoints/get-first-available-block) |
| [`getGenesisHash`](/docs/chains/solana/solana-api-endpoints/get-genesis-hash)                   | [`getHealth`](/docs/chains/solana/solana-api-endpoints/get-health)                          |
| [`getHighestSnapshotSlot`](/docs/chains/solana/solana-api-endpoints/get-highest-snapshot-slot)  | [`getIdentity`](/docs/chains/solana/solana-api-endpoints/get-identity)                      |
| [`getInflationGovernor`](/docs/chains/solana/solana-api-endpoints/get-inflation-governor)       | [`getInflationRate`](/docs/chains/solana/solana-api-endpoints/get-inflation-rate)           |
| [`getInflationReward`](/docs/chains/solana/solana-api-endpoints/get-inflation-reward)           | [`getLargestAccounts`](/docs/chains/solana/solana-api-endpoints/get-largest-accounts)       |
| [`getLatestBlockhash`](/docs/chains/solana/solana-api-endpoints/get-latest-blockhash)           | [`getLeaderSchedule`](/docs/chains/solana/solana-api-endpoints/get-leader-schedule)         |
| [`getMaxRetransmitSlot`](/docs/chains/solana/solana-api-endpoints/get-max-retransmit-slot)      | [`getMaxShredInsertSlot`](/docs/chains/solana/solana-api-endpoints/get-max-shred-insert-slot) |
| [`getMinimumBalanceForRentExemption`](/docs/chains/solana/solana-api-endpoints/get-minimum-balance-for-rent-exemption) | [`getMultipleAccounts`](/docs/chains/solana/solana-api-endpoints/get-multiple-accounts)     |
| [`getPriorityFeeEstimate`](/docs/chains/solana/solana-api-endpoints/get-priority-fee-estimate)  | [`getProgramAccounts`](/docs/chains/solana/solana-api-endpoints/get-program-accounts)       |
| [`getRecentPerformanceSamples`](/docs/chains/solana/solana-api-endpoints/get-recent-performance-samples) | [`getRecentPrioritizationFees`](/docs/chains/solana/solana-api-endpoints/get-recent-prioritization-fees) |
| [`getSignaturesForAddress`](/docs/chains/solana/solana-api-endpoints/get-signatures-for-address) | [`getSignatureStatuses`](/docs/chains/solana/solana-api-endpoints/get-signature-statuses)   |
| [`getSlot`](/docs/chains/solana/solana-api-endpoints/get-slot)                                  | [`getSlotLeader`](/docs/chains/solana/solana-api-endpoints/get-slot-leader)                 |
| [`getSlotLeaders`](/docs/chains/solana/solana-api-endpoints/get-slot-leaders)                   | [`getStakeActivation`](/docs/chains/solana/solana-api-endpoints/get-stake-activation)       |
| [`getSupply`](/docs/chains/solana/solana-api-endpoints/get-supply)                              | [`getTokenAccountBalance`](/docs/chains/solana/solana-api-endpoints/get-token-account-balance) |
| [`getTokenAccountsByDelegate`](/docs/chains/solana/solana-api-endpoints/get-token-accounts-by-delegate) | [`getTokenAccountsByOwner`](/docs/chains/solana/solana-api-endpoints/get-token-accounts-by-owner) |
| [`getTokenLargestAccounts`](/docs/chains/solana/solana-api-endpoints/get-token-largest-accounts) | [`getTokenSupply`](/docs/chains/solana/solana-api-endpoints/get-token-supply)               |
| [`getTransaction`](/docs/chains/solana/solana-api-endpoints/get-transaction)                    | [`getTransactionCount`](/docs/chains/solana/solana-api-endpoints/get-transaction-count)     |
| [`getTransactionsForAddress`](/docs/chains/solana/solana-api-endpoints/get-transactions-for-address) | [`getVersion`](/docs/chains/solana/solana-api-endpoints/get-version)                        |
| [`getVoteAccounts`](/docs/chains/solana/solana-api-endpoints/get-vote-accounts)                 | [`isBlockhashValid`](/docs/chains/solana/solana-api-endpoints/is-blockhash-valid)           |
| [`minimumLedgerSlot`](/docs/chains/solana/solana-api-endpoints/minimum-ledger-slot)             | [`requestAirdrop`](/docs/chains/solana/solana-api-endpoints/request-airdrop)                |
| [`sendTransaction`](/docs/chains/solana/solana-api-endpoints/send-transaction)                  | [`simulateBundle`](/docs/chains/solana/solana-api-endpoints/simulate-bundle)                |

## Related APIs

The following Alchemy APIs are also supported on Solana:

* [Bundler API](/docs/wallets/transactions/low-level-infra/bundler/overview)
* [Gas Manager API](/docs/wallets/api-reference/gas-manager-admin-api/gas-abstraction-api-endpoints/alchemy-request-gas-and-paymaster-and-data)

------

# getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns all information associated with the account of provided Pubkey.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Pubkey | string | Yes | Pubkey of the account to query. |
| Configuration | object | No | Optional configuration object for additional settings. |

## Result

**Account information** (object): Returns details of the account including balance, ownership, and other relevant data.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getAccountInfo",
  "params": [
    "GwsPP9HHhCvEQeu3HTFzsVL6DEtnnYw4ALEtA3fMBC9Q"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getAccountInfo",
  "params": [
    "GwsPP9HHhCvEQeu3HTFzsVL6DEtnnYw4ALEtA3fMBC9Q",
    {
      "commitment": "processed",
      "encoding": "base58",
      "dataSlice": {
        "length": 1,
        "offset": 1
      },
      "minContextSlot": 1
    }
  ]
}'
```



------

# getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the lamport balance of the account of the provided Pubkey.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Pubkey | string | Yes | Pubkey of the account to query. |
| Configuration | object | No | Optional configuration object containing additional settings. |

## Result

**Lamport balance** (integer): Returns the balance in lamports of the account queried.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getBalance",
  "params": [
    "GwsPP9HHhCvEQeu3HTFzsVL6DEtnnYw4ALEtA3fMBC9Q"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBalance",
  "params": [
    "GwsPP9HHhCvEQeu3HTFzsVL6DEtnnYw4ALEtA3fMBC9Q",
    {
      "commitment": "processed",
      "minContextSlot": 1
    }
  ]
}'
```



------

# getBlock

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns identity and transaction information about a confirmed block in the ledger.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-block

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| slot | integer | Yes | Slot number as a u64 integer. |
| Configuration | object | No | Optional configuration object containing additional settings. |

## Result

**Block information** (object): Returns block information or null if the block is not confirmed.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getBlock",
  "params": [
    237158054,
    {
      "encoding": "json",
      "transactionDetails": "none"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBlock",
  "params": [
    237158054,
    {
      "encoding": "json",
      "transactionDetails": "none"
    }
  ]
}'
```



------

# getBlockCommitment

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the commitment for a particular block.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-block-commitment

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| block | integer | Yes | Block number, identified by Slot. |

## Result

**Block commitment** (object): Returns the commitment and total active stake for the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getBlockCommitment",
  "params": [
    237158054
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBlockCommitment",
  "params": [
    237158054
  ]
}'
```



------

# getBlockHeight

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current block height of the node.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-block-height

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Configuration | object | No | Optional configuration object containing additional request parameters. |

## Result

**Block height** (integer): The current block height, as a u64 integer.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBlockHeight",
  "params": [
    {
      "commitment": "processed",
      "minContextSlot": 1
    }
  ]
}'
```



------

# getBlockProduction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns recent block production information from the current or previous epoch.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-block-production

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Configuration | object | No | Optional configuration object containing additional settings. |

## Result

**Block production information** (object): Returns block production information for the specified range.

## Example

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBlockProduction",
  "params": [
    {
      "commitment": "processed",
      "identity": "string",
      "range": {
        "firstSlot": 1,
        "lastSlot": 1
      }
    }
  ]
}'
```



------

# getBlocks

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of confirmed blocks between two slots.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-blocks

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| start_slot | integer | Yes | The starting slot. |
| end_slot | integer | No | The ending slot. |
| Configuration | object | No | Optional configuration object. |

## Result

**List of confirmed blocks** (integer[]): Returns an array of u64 integers listing confirmed blocks.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getBlocks",
  "params": [
    237158000,
    237158050
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBlocks",
  "params": [
    237158000,
    237158050,
    {
      "commitment": "finalized"
    }
  ]
}'
```



------

# getBlocksWithLimit

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of confirmed blocks starting at the given slot.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-blocks-with-limit

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| start_slot | integer | Yes | The starting slot. |
| limit | integer | Yes | The limit for the number of blocks to return. |
| Configuration | object | No | Optional configuration object. |

## Result

**List of confirmed blocks** (integer[]): Returns an array of u64 integers listing confirmed blocks starting at the start_slot.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getBlocksWithLimit",
  "params": [
    237158000,
    5
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBlocksWithLimit",
  "params": [
    237158000,
    5,
    {
      "commitment": "finalized"
    }
  ]
}'
```



------

# getBlockTime

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the estimated production time of a block.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-block-time

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| block | object | Yes | Block number, identified by Slot. |

## Result

**Estimated production time** (integer): The estimated production time of the block as a Unix timestamp.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getBlockTime",
  "params": [
    237158054
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBlockTime",
  "params": [
    {
      "block": 1
    }
  ]
}'
```



------

# getClusterNodes

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about all the nodes participating in the cluster.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-cluster-nodes

## Result

**List of nodes** (object[]): Returns an array of JSON objects, each containing information about a node in the cluster.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getClusterNodes"
}'
```



------

# getEpochInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about the current epoch.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-epoch-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Configuration | object | No | Optional configuration object. |

## Result

**Epoch information** (object): Returns an object containing information about the current epoch.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getEpochInfo",
  "params": [
    {
      "commitment": "processed",
      "minContextSlot": 1
    }
  ]
}'
```



------

# getEpochSchedule

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the epoch schedule information from the cluster's genesis config.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-epoch-schedule

## Result

**Epoch schedule information** (object): Returns an object containing information about the epoch schedule.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getEpochSchedule"
}'
```



------

# getFeeForMessage

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Get the fee the network will charge for a particular Message.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-fee-for-message

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Message | object | Yes | Base-64 encoded Message. |
| Configuration | object | No | Optional configuration object. |

## Result

**Fee for the message** (integer): The fee corresponding to the message at the specified blockhash.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getFeeForMessage",
  "params": [
    {
      "Message": "string"
    },
    {
      "commitment": "processed",
      "minContextSlot": 1
    }
  ]
}'
```



------

# getFirstAvailableBlock

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the slot of the lowest confirmed block that has not been purged from the ledger.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-first-available-block

## Result

**Slot** (integer): The slot number of the lowest confirmed block that is still available in the ledger.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getFirstAvailableBlock"
}'
```



------

# getGenesisHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the genesis hash.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-genesis-hash

## Result

**Genesis hash** (string): The genesis hash as a base-58 encoded string.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getGenesisHash"
}'
```



------

# getHealth

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current health of the node.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-health

## Result

**Health status** (string or object): If the node is healthy, the result is "ok".

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getHealth"
}'
```



------

# getHighestSnapshotSlot

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the highest slot information that the node has snapshots for.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-highest-snapshot-slot

## Result

**Snapshot slot information** (object): Returns a JSON object with the highest full snapshot slot.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getHighestSnapshotSlot"
}'
```



------

# getIdentity

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the identity pubkey for the current node.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-identity

## Result

**Identity pubkey** (object): The identity pubkey of the current node.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getIdentity"
}'
```



------

# getInflationGovernor

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current inflation governor.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-inflation-governor

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Configuration | object | No | Optional configuration object. |

## Result

**Inflation governor details** (object): Returns a JSON object containing the inflation governor parameters.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getInflationGovernor",
  "params": [
    {
      "commitment": "processed",
      "minContextSlot": 1
    }
  ]
}'
```



------

# getInflationRate

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the specific inflation values for the current epoch.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-inflation-rate

## Result

**Inflation rate details** (object): Returns a JSON object containing the inflation values for the current epoch.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getInflationRate"
}'
```



------

# getInflationReward

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the inflation or staking reward for a list of addresses for a specified epoch.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-inflation-reward

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Addresses | object | Yes | An array of addresses to query. |

## Result

**Inflation reward details** (object[]): Returns a JSON array with reward details for each address.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getInflationReward",
  "params": [
    {
      "Addresses": [
        "string"
      ],
      "commitment": "processed",
      "epoch": 1,
      "minContextSlot": 1
    }
  ]
}'
```



------

# getLargestAccounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the 20 largest accounts, by lamport balance.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-largest-accounts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Configuration | object | No | Optional configuration object. |

## Result

**Largest accounts** (object[]): An array of objects containing the address of the account and its lamport balance.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getLargestAccounts",
  "params": [
    {
      "commitment": "processed",
      "filter": "circulating"
    }
  ]
}'
```



------

# getLatestBlockhash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the latest blockhash.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-latest-blockhash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Configuration | object | No | A configuration object with optional fields for specifying commitment and minimum context slot. |

## Result

**Latest Blockhash** (object): RpcResponse object with blockhash information.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getLatestBlockhash",
  "params": [
    {
      "commitment": "processed",
      "minContextSlot": 1
    }
  ]
}'
```



------

# getLeaderSchedule

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the leader schedule for a given epoch.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-leader-schedule

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Slot | integer | No | The slot to fetch the leader schedule for. If unspecified, returns the leader schedule for the current epoch. |
| Configuration | object | No | Optional configuration object containing additional settings. |

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getLeaderSchedule",
  "params": [
    null,
    {
      "commitment": "processed",
      "identity": "dv2eQHeP4RFrJZ6UeiZWoc3XTtmtZCUKxxCApCDcRNV"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getLeaderSchedule",
  "params": [
    1,
    {
      "commitment": "processed",
      "identity": "dv2eQHeP4RFrJZ6UeiZWoc3XTtmtZCUKxxCApCDcRNV"
    }
  ]
}'
```



------

# getMaxRetransmitSlot

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Get the max slot seen from the retransmit stage.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-max-retransmit-slot

## Result

**Slot number** (integer): The maximum slot number seen from the retransmit stage.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getMaxRetransmitSlot"
}'
```



------

# getMaxShredInsertSlot

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Get the max slot seen from after shred insert.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-max-shred-insert-slot

## Result

**Slot number** (integer): The maximum slot number seen after shred insert.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getMaxShredInsertSlot"
}'
```



------

# getMinimumBalanceForRentExemption

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the minimum balance required to make an account rent exempt.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-minimum-balance-for-rent-exemption

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Account data length | object | Yes | The account's data length in bytes. |
| Configuration | object | No | Optional configuration object. |

## Result

**Minimum balance for rent exemption** (integer): The minimum number of lamports required in the account to remain rent-free.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getMinimumBalanceForRentExemption",
  "params": [
    {
      "dataLength": 1
    },
    {
      "commitment": "processed"
    }
  ]
}'
```



------

# getMultipleAccounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the account information for a list of Pubkeys.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-multiple-accounts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Pubkeys | string[] | Yes | An array of Pubkeys to query. |
| Configuration | object | No | Optional configuration object. |

## Result

**Account information** (object[]): An array of JSON objects containing account details.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getMultipleAccounts",
  "params": [
    [
      "GwsPP9HHhCvEQeu3HTFzsVL6DEtnnYw4ALEtA3fMBC9Q",
      "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
    ]
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getMultipleAccounts",
  "params": [
    [
      "GwsPP9HHhCvEQeu3HTFzsVL6DEtnnYw4ALEtA3fMBC9Q",
      "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
    ],
    {
      "commitment": "processed",
      "minContextSlot": 1,
      "dataSlice": {
        "length": 1,
        "offset": 1
      },
      "encoding": "base64"
    }
  ]
}'
```



------

# getPriorityFeeEstimate

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Calculate optimal priority fee recommendations for Solana transactions based on real-time network conditions.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-priority-fee-estimate

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Configuration | object | Yes | Single params object. Top-level keys are transaction, accountKeys, and options (nested). Put priorityLevel, recommended, etc. inside options. |

## Result

**Priority fee estimate** (object): Optimal priority fee estimate and optional fee levels for different priority tiers.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getPriorityFeeEstimate",
  "params": [
    {
      "transaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDArczbMia1tLmq7zz4DinMNN0pJ1JtLdqIJPUw3YrGCzYAMHBsgN27lcgB6H2WQvFgyZuJYHa46puOQo9yQ8CVQbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCp20C7Wj2aiuk5TReAXo+VTVg8QTHjs0UjNMMKCvpzZ+ABAgEBARU=",
      "options": {
        "priorityLevel": "High"
      }
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getPriorityFeeEstimate",
  "params": [
    {
      "transaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDArczbMia1tLmq7zz4DinMNN0pJ1JtLdqIJPUw3YrGCzYAMHBsgN27lcgB6H2WQvFgyZuJYHa46puOQo9yQ8CVQbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCp20C7Wj2aiuk5TReAXo+VTVg8QTHjs0UjNMMKCvpzZ+ABAgEBARU=",
      "options": {
        "priorityLevel": "High"
      }
    }
  ]
}'
```



------

# getProgramAccounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns all accounts owned by the provided program Pubkey.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-program-accounts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Pubkey | string | Yes | The Pubkey of the program. |
| Configuration | object | No | Optional configuration object. |

## Result

**Program accounts** (object[]): An array of JSON objects containing program account details.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getProgramAccounts",
  "params": [
    "string",
    {
      "commitment": "processed",
      "minContextSlot": 1,
      "withContext": false,
      "encoding": "base58",
      "dataSlice": {
        "length": 1,
        "offset": 1
      }
    }
  ]
}'
```



------

# getRecentPerformanceSamples

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of recent performance samples, in reverse slot order.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-recent-performance-samples

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| limit | integer | No | The number of samples to return. |

## Result

**Performance samples** (object[]): An array of performance sample data.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getRecentPerformanceSamples",
  "params": [
    1
  ]
}'
```



------

# getRecentPrioritizationFees

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of prioritization fees from recent blocks.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-recent-prioritization-fees

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Account addresses | string[] | No | An array of up to 128 account addresses. If provided, the response will reflect a fee to land a transaction locking all of the provided accounts as writable. |

## Result

**Prioritization fees** (object[]): An array of prioritization fees observed in recent blocks.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getRecentPrioritizationFees",
  "params": [
    [
      "string"
    ]
  ]
}'
```



------

# getSignaturesForAddress

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns signatures for confirmed transactions that include the given address.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-signatures-for-address

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Account address | string | Yes | The account address. |
| Configuration | object | No | Optional configuration object. |

## Result

**Transaction signatures** (object[]): An array of objects containing transaction signature information.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getSignaturesForAddress",
  "params": [
    "string",
    {
      "commitment": "processed",
      "minContextSlot": 1,
      "limit": 1000,
      "before": "string",
      "until": "string"
    }
  ]
}'
```



------

# getSignatureStatuses

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the statuses of a list of transaction signatures.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-signature-statuses

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Signatures | string[] | Yes | An array of transaction signatures to confirm. |
| Configuration | object | No | Optional configuration object. |

## Result

**Transaction statuses** (object[]): An array containing the status of each transaction signature.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getSignatureStatuses",
  "params": [
    [
      "string"
    ],
    {
      "searchTransactionHistory": false
    }
  ]
}'
```



------

# getSlot

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the slot that has reached the given or default commitment level.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-slot

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Configuration | object | No | Optional configuration object containing additional settings. |

## Result

**Current slot** (integer): The current slot at the specified commitment level.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getSlot",
  "params": [
    {
      "commitment": "processed",
      "minContextSlot": 1
    }
  ]
}'
```



------

# getSlotLeader

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current slot leader.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-slot-leader

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Configuration | object | No | Optional configuration object containing additional settings. |

## Result

**Slot leader** (string): The node identity Pubkey as a base-58 encoded string.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getSlotLeader",
  "params": [
    {
      "commitment": "processed",
      "minContextSlot": 1
    }
  ]
}'
```



------

# getSlotLeaders

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the slot leaders for a given slot range.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-slot-leaders

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Start slot | integer | Yes | The starting slot as a u64 integer. |
| Limit | integer | Yes | The number of slot leaders to return, between 1 and 5,000. |

## Result

**Slot leaders** (string[]): An array of node identity public keys as base-58 encoded strings.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getSlotLeaders",
  "params": [
    1,
    1
  ]
}'
```



------

# getStakeActivation

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns epoch activation information for a stake account.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-stake-activation

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Stake account Pubkey | string | Yes | Pubkey of the stake account to query. |
| Configuration | object | No | Optional configuration object. |

## Result

**Stake activation info** (object): Returns epoch activation information for the stake account.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getStakeActivation",
  "params": [
    "CYRJWqiSjLitBAcRxPvWpgX3s5TvmN2SuRY3eEYypFvT"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getStakeActivation",
  "params": [
    "CYRJWqiSjLitBAcRxPvWpgX3s5TvmN2SuRY3eEYypFvT",
    {
      "commitment": "processed",
      "epoch": 1,
      "minContextSlot": 1
    }
  ]
}'
```



------

# getSupply

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about the current supply of lamports.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-supply

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Configuration | object | No | Optional configuration object containing additional settings. |

## Result

**Supply information** (object): An RpcResponse JSON object containing the current supply information.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getSupply",
  "params": [
    {
      "commitment": "processed",
      "excludeNonCirculatingAccountsList": false
    }
  ]
}'
```



------

# getTokenAccountBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the token balance of an SPL Token account.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-token-account-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Token account Pubkey | string | Yes | The Pubkey of the token account to query. |
| Configuration | object | No | Optional configuration object containing additional settings. |

## Result

**Token account balance** (object): The balance of the SPL Token account.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getTokenAccountBalance",
  "params": [
    "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getTokenAccountBalance",
  "params": [
    "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    {
      "commitment": "processed"
    }
  ]
}'
```



------

# getTokenAccountsByDelegate

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns all SPL Token accounts delegated to the provided account.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-token-accounts-by-delegate

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Delegate Pubkey | string | Yes | The Pubkey of the account delegate to query. |
| Token filter | object | No | A filter object containing either the Mint Pubkey or the Token program Pubkey. |
| Configuration | object | No | Optional configuration object containing additional settings. |

## Result

**Token accounts** (object[]): An array of JSON objects representing the token accounts delegated to the specified Pubkey.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getTokenAccountsByDelegate",
  "params": [
    "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
    {
      "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getTokenAccountsByDelegate",
  "params": [
    "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
    {
      "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
    },
    {
      "commitment": "processed",
      "minContextSlot": 1,
      "dataSlice": {
        "length": 1,
        "offset": 1
      },
      "encoding": "base58"
    }
  ]
}'
```



------

# getTokenAccountsByOwner

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns all SPL Token accounts owned by the specified token owner.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-token-accounts-by-owner

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Token owner Pubkey | string | Yes | The Pubkey of the account owner to query. |
| Token filter | object | No | A filter object containing either the Mint Pubkey or the Token program Pubkey. |
| Configuration | object | No | Optional configuration object containing additional settings. |

## Result

**Token accounts** (object[]): An array of JSON objects representing the token accounts owned by the specified Pubkey.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getTokenAccountsByOwner",
  "params": [
    "GwsPP9HHhCvEQeu3HTFzsVL6DEtnnYw4ALEtA3fMBC9Q"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getTokenAccountsByOwner",
  "params": [
    "GwsPP9HHhCvEQeu3HTFzsVL6DEtnnYw4ALEtA3fMBC9Q",
    {
      "mint": "string",
      "programId": "string"
    },
    {
      "commitment": "processed",
      "minContextSlot": 1,
      "dataSlice": {
        "length": 1,
        "offset": 1
      },
      "encoding": "base58"
    }
  ]
}'
```



------

# getTokenLargestAccounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the 20 largest accounts of a particular SPL Token type.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-token-largest-accounts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Token Mint Pubkey | string | Yes | The Pubkey of the token Mint to query. |
| Configuration | object | No | Optional configuration object. |

## Result

**Largest token accounts** (object[]): An array of the 20 largest accounts of the specified token type.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getTokenLargestAccounts",
  "params": [
    "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getTokenLargestAccounts",
  "params": [
    "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    {
      "commitment": "processed"
    }
  ]
}'
```



------

# getTokenSupply

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the total supply of an SPL Token type.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-token-supply

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Token Mint Pubkey | string | Yes | The Pubkey of the token Mint to query. |
| Configuration | object | No | Optional configuration object containing additional settings. |

## Result

**Token supply** (object): The total supply of the specified SPL Token.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getTokenSupply",
  "params": [
    "string",
    {
      "commitment": "processed"
    }
  ]
}'
```



------

# getTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction details for a confirmed transaction.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction signature | string | Yes | Transaction signature as a base-58 encoded string. |
| Configuration | object | No | Optional configuration object containing additional settings. |

## Result

**Transaction details** (object): The details of a confirmed transaction.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getTransaction",
  "params": [
    "string",
    {
      "commitment": "processed",
      "maxSupportedTransactionVersion": 1,
      "encoding": "json"
    }
  ]
}'
```



------

# getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current transaction count from the ledger.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Configuration | object | No | Optional configuration object. |

## Result

**Transaction count** (integer): The current transaction count from the ledger.

## Example

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getTransactionCount",
  "params": [
    {
      "commitment": "processed",
      "minContextSlot": 1
    }
  ]
}'
```



------

# getTransactionsForAddress

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction history for a given address with advanced filtering, bidirectional sorting, and pagination. Combines the functionality of `getSignaturesForAddress` and `getTransaction` into a single call, returning up to 1,000 signatures or up to 100 full transactions per request.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-transactions-for-address

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Account address | string | Yes | Base-58 encoded public key of the account to query transaction history for. |
| Configuration | object | No | Optional configuration object containing transaction detail level, sort order, limit, pagination token, commitment, encoding, and filters (slot, blockTime, signature, status, tokenAccounts). |

## Result

**Transaction history** (object): A paginated list of transactions for the address. Each entry includes the slot, transaction index, and either a signature plus metadata (when `transactionDetails` is `signatures`) or the full transaction and meta objects (when `transactionDetails` is `full`). A `paginationToken` is returned when more results are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getTransactionsForAddress",
  "params": [
    "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY",
    {
      "transactionDetails": "signatures",
      "sortOrder": "desc",
      "limit": 100,
      "filters": {
        "status": "succeeded",
        "tokenAccounts": "balanceChanged"
      }
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getTransactionsForAddress",
  "params": [
    "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY",
    {
      "transactionDetails": "signatures",
      "sortOrder": "desc",
      "limit": 100,
      "filters": {
        "status": "succeeded",
        "tokenAccounts": "balanceChanged"
      }
    }
  ]
}'
```



------

# getVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current Solana version running on the node.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-version

## Result

**Version details** (object): The current Solana version running on the node.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getVersion"
}'
```



------

# getVoteAccounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the account info and associated stake for all voting accounts in the current bank.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/get-vote-accounts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Configuration | object | No | Optional configuration object. |

## Result

**Vote accounts** (object): Information about current and delinquent vote accounts.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getVoteAccounts",
  "params": [
    {
      "commitment": "processed",
      "votePubkey": "string",
      "keepUnstakedDelinquents": false,
      "delinquentSlotDistance": 1
    }
  ]
}'
```



------

# isBlockhashValid

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns whether a blockhash is still valid or not.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/is-blockhash-valid

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockhash | string | Yes | The blockhash of the block to evaluate. |
| Configuration | object | No | Optional configuration object. |

## Result

**Validity** (boolean): Indicates if the blockhash is still valid.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "isBlockhashValid",
  "params": [
    "string",
    {
      "blockhash": "string",
      "commitment": "processed",
      "minContextSlot": 1
    }
  ]
}'
```



------

# minimumLedgerSlot

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the lowest slot that the node has information about in its ledger.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/minimum-ledger-slot

## Result

**Minimum ledger slot** (integer): The lowest slot number the node has information about.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "minimumLedgerSlot"
}'
```



------

# requestAirdrop

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Requests an airdrop of lamports to a Pubkey.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/request-airdrop

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Pubkey | string | Yes | The Pubkey of the account to receive lamports. |
| Lamports | integer | Yes | The number of lamports to airdrop, as a "u64". |
| Configuration | object | No | Optional configuration object. |

## Result

**Transaction signature** (string): Transaction Signature of the airdrop.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "requestAirdrop",
  "params": [
    "GwsPP9HHhCvEQeu3HTFzsVL6DEtnnYw4ALEtA3fMBC9Q",
    1000000000000000000
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "requestAirdrop",
  "params": [
    "GwsPP9HHhCvEQeu3HTFzsVL6DEtnnYw4ALEtA3fMBC9Q",
    1000000000000000000,
    {
      "commitment": "processed"
    }
  ]
}'
```



------

# sendTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Submits a signed transaction to the cluster for processing.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/send-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | Fully-signed Transaction, as encoded string. |
| Configuration | object | No | Optional configuration object. |

## Result

**Transaction signature** (string): The first signature in the transaction, used as the transaction ID.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "sendTransaction",
  "params": [
    "string",
    {
      "encoding": "base58",
      "skipPreflight": false,
      "preflightCommitment": "finalized",
      "maxRetries": 1,
      "minContextSlot": 1
    }
  ]
}'
```



------

# simulateBundle

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Simulates sending a Jito bundle of transactions.

Reference: https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/simulate-bundle

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Bundle | object | Yes | Encoded, serialized transactions to simulate in a bundle. |
| Configuration | object | No | Optional configuration object containing additional options. |

## Result

**Simulated bundle result** (object): The result of simulating the bundle.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "simulateBundle",
  "params": [
    {
      "encodedTransactions": [
        "string"
      ]
    },
    {
      "preExecutionAccountsConfigs": [
        {
          "addresses": [
            "string"
          ],
          "encoding": "base64"
        }
      ],
      "postExecutionAccountsConfigs": [
        {
          "addresses": [
            "string"
          ],
          "encoding": "base64"
        }
      ],
      "transactionEncoding": "base64",
      "simulationBank": "string",
      "skipSigVerify": false,
      "replaceRecentBlockhash": false
    }
  ]
}'
```



------

# Alchemy Photon APIs for Solana ZK Compression

> Alchemy Photon APIs for Solana ZK Compression

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Background

Alchemy supports the [Photon](https://github.com/helius-labs/photon) indexer, an open-source ZK Compression indexer maintained by Helius. These endpoints let you read [ZK Compressed](https://www.zkcompression.com/) Solana state — accounts, token balances, and transaction signatures — through the same familiar JSON-RPC surface used for standard Solana calls.

ZK Compression stores most of an account's data offchain in a merkle tree while keeping a small commitment onchain, letting applications mint and manage thousands of accounts or tokens at a fraction of the normal rent cost. Photon indexes those compressed accounts and exposes them through the methods below, following the [Photon API specification](https://github.com/helius-labs/photon).

These endpoints are served through the standard Solana Alchemy endpoints (`https://solana-mainnet.g.alchemy.com/v2/<API_KEY>` and `https://solana-devnet.g.alchemy.com/v2/<API_KEY>`), so you can call them with the same client you already use for Solana Core RPC.

## Methods

| Method | Function | CU cost | Throughput CUs (how many CUs this will count for towards your CUs per second capacity) |
| --- | --- | --- | --- |
| [getCompressedAccount](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-account) | Returns the compressed account with the given address or hash. | 120 | 100 |
| [getCompressedAccountProof](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-account-proof) | Returns a merkle proof for the compressed account with the given hash. | 120 | 100 |
| [getCompressedAccountsByOwner](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-accounts-by-owner) | Returns the owner's compressed accounts. | 120 | 100 |
| [getCompressedBalance](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-balance) | Returns the balance for the compressed account with the given address or hash. | 120 | 100 |
| [getCompressedBalanceByOwner](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-balance-by-owner) | Returns the total balance of the owner's compressed accounts. | 120 | 100 |
| [getCompressedMintTokenHolders](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-mint-token-holders) | Returns the owner balances for a given mint in descending order, for compressed tokens. | 120 | 100 |
| [getCompressedTokenAccountBalance](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-token-account-balance) | Returns the balance for a given compressed token account. | 120 | 100 |
| [getCompressedTokenAccountsByDelegate](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-token-accounts-by-delegate) | Returns the compressed token accounts that are partially or fully delegated to the given delegate. | 120 | 100 |
| [getCompressedTokenAccountsByOwner](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-token-accounts-by-owner) | Returns the compressed token accounts owned by the given Pubkey. | 120 | 100 |
| [getCompressedTokenBalancesByOwner](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-token-balances-by-owner) | Returns the compressed token balances for the given Pubkey. | 120 | 100 |
| [getCompressedTokenBalancesByOwnerV2](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-token-balances-by-owner-v-2) | Returns the compressed token balances for the given Pubkey, with pagination. | 120 | 100 |
| [getCompressionSignaturesForAccount](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compression-signatures-for-account) | Returns the signatures of transactions that closed or opened a compressed account with the given hash. | 120 | 100 |
| [getCompressionSignaturesForAddress](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compression-signatures-for-address) | Returns the signatures of transactions that have modified an address's compressed account. | 120 | 100 |
| [getCompressionSignaturesForOwner](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compression-signatures-for-owner) | Returns the signatures of transactions that have modified the owner's compressed accounts. | 120 | 100 |
| [getCompressionSignaturesForTokenOwner](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compression-signatures-for-token-owner) | Returns the signatures of transactions that have modified the owner's compressed token accounts. | 120 | 100 |
| [getLatestCompressionSignatures](/docs/chains/solana/solana-photon-api/solana-photon-api/get-latest-compression-signatures) | Returns the signatures of the latest transactions that used the compression program. | 120 | 100 |
| [getLatestNonVotingSignatures](/docs/chains/solana/solana-photon-api/solana-photon-api/get-latest-non-voting-signatures) | Returns the signatures of the latest non-voting transactions. | 120 | 100 |
| [getMultipleCompressedAccountProofs](/docs/chains/solana/solana-photon-api/solana-photon-api/get-multiple-compressed-account-proofs) | Returns multiple compressed account proofs. | 120 | 100 |
| [getMultipleCompressedAccounts](/docs/chains/solana/solana-photon-api/solana-photon-api/get-multiple-compressed-accounts) | Returns multiple compressed accounts, identified by address or hash. | 120 | 100 |
| [getMultipleNewAddressProofs](/docs/chains/solana/solana-photon-api/solana-photon-api/get-multiple-new-address-proofs) | Returns proofs that the new addresses are not taken and can be created. | 120 | 100 |
| [getMultipleNewAddressProofsV2](/docs/chains/solana/solana-photon-api/solana-photon-api/get-multiple-new-address-proofs-v-2) | Returns proofs that the new addresses are not taken and can be created (v2). | 120 | 100 |
| [getTransactionWithCompressionInfo](/docs/chains/solana/solana-photon-api/solana-photon-api/get-transaction-with-compression-info) | Returns the transaction data for the given signature along with parsed compression info. | 120 | 100 |
| [getValidityProof](/docs/chains/solana/solana-photon-api/solana-photon-api/get-validity-proof) | Returns a single ZK Validity proof for compressed accounts and new addresses. | 1200 † | 500 † |
| [getValidityProofV2](/docs/chains/solana/solana-photon-api/solana-photon-api/get-validity-proof-v-2) | Returns a single ZK Validity proof for compressed accounts and new addresses (v2). | 1200 † | 500 † |
| [getIndexerHealth](/docs/chains/solana/solana-photon-api/solana-photon-api/get-indexer-health) | Returns an error if the indexer is stale by more than a configured number of blocks, otherwise returns `ok`. | 120 | 100 |
| [getIndexerSlot](/docs/chains/solana/solana-photon-api/solana-photon-api/get-indexer-slot) | Returns the slot of the latest block the indexer has processed. | 120 | 100 |

† `getValidityProof` and `getValidityProofV2` run against the prover service and use an extended 30,000&nbsp;ms request timeout.

------

# getCompressedAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the compressed account matching the given `address` or `hash`. Photon's JSON-RPC for this method accepts the params as a positional pair `[address, hash]` — pass `null` for whichever identifier you are not using.

- `address` queries compressed accounts created with a Light Protocol address.
- `hash` queries by the merkle-tree leaf hash and works for every compressed account.


Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string or null | No | Pubkey of the compressed account to query. Pass `null` to query by `hash` instead. |
| hash | string or null | No | Hash of the compressed account to query. Pass `null` to query by `address` instead. |

## Result

**Compressed account** (object): The compressed account data with context information. `value` is `null` when no compressed account matches the supplied `address` or `hash`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getCompressedAccount",
  "params": [
    null,
    "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 419139544
    },
    "value": {
      "hash": "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL",
      "address": null,
      "data": {
        "discriminator": 2,
        "data": "RhAVR6AmcnFercuAcoi9gbc/hIy3UBfL/FeQkTk7SE8I8WaM+ETZsH8YD96DZJdZG7IPY2fuP8pCP/oQV1de4R5hETEZAAAAAAAA",
        "dataHash": "mkARkU6arYpeTacykBCEytKihySvzGJXbkG5PbwhieQ"
      },
      "owner": "cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",
      "lamports": 0,
      "tree": "smt6ukQDSPPYHSshQovmiRUjG9jGFq2hW9vgrDFk5Yz",
      "leafIndex": 832574,
      "seq": 877634,
      "slotCreated": 357735227
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getCompressedAccount",
  "params": [
    "string",
    "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL"
  ]
}'
```



------

# getCompressedAccountProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns a merkle proof for the compressed account with the given hash.

Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-account-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hash | string | Yes | Hash of the compressed account. |

## Result

**Compressed account proof** (object): The merkle proof for the compressed account.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getCompressedAccountProof",
  "params": [
    "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 418485597
    },
    "value": {
      "proof": [
        "11111111111111111111111111111111",
        "3CFKteYSRSkp9EGFPzibgzCPtNuJ5HeZ31fAsBpgcHwZ",
        "274k4KPY5VhmU5pCwwJzyHaY4AH4m7SjnZnyj44UitJc",
        "3CmsXgfnFjYnFqFGA5FVuTyAA5ENV9GBr1bA3cR47EUJ",
        "2SUP3mBiZBKzepZqxbCoDoV9CvN9xs2nMiPjUwQ3fQti",
        "42SthPRZV4F3Mek5eCGvoETaef5wNwepuoiKaJU18dTf",
        "hSLgVeN68pDxYpGWLVxCLJM2frDcSGgDS56fBm7Jmgp",
        "3xecC71yJecUMwMXABUQyGpQg5wPkuPQQghNSiHuzBL2",
        "3zqgQREMZJBWWxHeArhiso6FGVgTfuz9Xf1hwZLwah4k",
        "eeqRZmXrLxGYiK5zwp4Y72ZHSskwfqdybaH71q2s2cu",
        "CHGptQh7F7FAQFr2ebVQBCNCoWDfkjrWENtBFaSuBQK",
        "2bD5R8x94VURvzqGL5RufxMgJ1euhvQ9MY4FDiTze8D4",
        "2CZ6PSkWbhfZ2nkNQWeFRg5NUGkUb6sWoGYZtVSbZnTP",
        "2RWPLU8J4Qkg13n63cdMndfZLe9vsim44PRAn1q8y356",
        "Qi4hMgGVaYVCdxWQ51AiS7YwrDmVsgjZ3X5H84uje2R",
        "24b4LHNs5nXTTxncoYdPbBXnvjjp6ez6fbBWxPw7qLUK",
        "49zPcCTw2nmguqspeAb3VM8PLjcK5Qfb4oMvKeTDPeqm",
        "2tiUSe34eNxNuXXtPPG8F2dw92v2fM5eWEawSfmBvLQ5",
        "aWKg77LjEQpuFcgyvA5ZwJjggnS4evyG3hwvVLurFud",
        "Ea7WrnMfZdfBjCKa5obZeg2fST94H645dX4GB9PsZaG",
        "3KLopoPRRZeH3H4i1csrJXkfkwX4gjeTRnFsJZvKotPJ",
        "AEvtmNEdsHtCzZjfwvak4of5rV3XUUA1qoLNEGVDvui",
        "2fomPS2xUPwXxVF8hx5YtMpBHmQKSZKushUiWYsy9Eqx",
        "3Pi3nRu4fWpnW5rYDAoraX1Q2xDCRQ24Dq8TEY7gaSBn",
        "3dbMMyehykAriNZ8FMJgPc1N6YSzm9ZfV2HcW9sbaXzP",
        "4EE5KQnQ6Tvo78gGhTu8serpJV4srbRhYZ3rdvCiRa5e"
      ],
      "root": "3m3ZNkLWeTSGdVCejt4QK4dMcAVyckJvoBhBA8VDeHUd",
      "leafIndex": 832574,
      "hash": "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL",
      "merkleTree": "smt6ukQDSPPYHSshQovmiRUjG9jGFq2hW9vgrDFk5Yz",
      "rootSeq": 3076052
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getCompressedAccountProof",
  "params": [
    "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL"
  ]
}'
```



------

# getCompressedAccountsByOwner

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the compressed accounts owned by the given Pubkey.

Advanced filters (`dataSlice`, `filters`) are supported by the underlying Photon API but are not modeled in this Try It widget. To use them, send the request directly with `dataSlice: { offset, length }` and/or `filters: [{ memcmp: { offset, bytes } }]` added to the `params` object.


Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-accounts-by-owner

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| owner | string | Yes | Pubkey of the owner whose compressed accounts to query. |
| cursor | string or null | No | Pagination cursor returned by a previous response. |
| limit | integer or null | No | Maximum number of accounts to return. |

## Result

**Compressed accounts** (object): A paginated list of compressed accounts owned by the given Pubkey.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getCompressedAccountsByOwner",
  "params": [
    "bukwBg6C8VAHsuak1dPm5Teiu3eWe78xakgTL8QjVbW",
    1
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 418890736
    },
    "value": {
      "items": [
        {
          "hash": "2U9KV9sCU5MtJaDTKVkuuEbagVEBL9BQSfUBsaiEP6Cf",
          "address": null,
          "data": null,
          "owner": "bukwBg6C8VAHsuak1dPm5Teiu3eWe78xakgTL8QjVbW",
          "lamports": 1855202212,
          "tree": "smt4vjXvdjDFzvRMUxwTWnSy4c7cKkMaHuPrGsdDH7V",
          "leafIndex": 838169,
          "seq": 884595,
          "slotCreated": 357735567
        }
      ],
      "cursor": "2U9KV9sCU5MtJaDTKVkuuEbagVEBL9BQSfUBsaiEP6Cf"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getCompressedAccountsByOwner",
  "params": [
    "bukwBg6C8VAHsuak1dPm5Teiu3eWe78xakgTL8QjVbW",
    "string",
    1
  ]
}'
```



------

# getCompressedBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance for the compressed account with the given address or hash. Provide either `address` or `hash`.

Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string or null | No | Pubkey of the compressed account to query. |
| hash | string or null | No | Hash of the compressed account to query. |

## Result

**Compressed balance** (object): The lamport balance of the compressed account.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getCompressedBalance",
  "params": [
    "2U9KV9sCU5MtJaDTKVkuuEbagVEBL9BQSfUBsaiEP6Cf"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 418485605
    },
    "value": 1855202212
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getCompressedBalance",
  "params": [
    "2U9KV9sCU5MtJaDTKVkuuEbagVEBL9BQSfUBsaiEP6Cf",
    "string"
  ]
}'
```



------

# getCompressedBalanceByOwner

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the total compressed lamport balance owned by the given Pubkey.

Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-balance-by-owner

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| owner | string | Yes | The Pubkey whose compressed balance to query. |

## Result

**Compressed balance** (object): The total compressed lamport balance for the owner.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getCompressedBalanceByOwner",
  "params": [
    "bukwBg6C8VAHsuak1dPm5Teiu3eWe78xakgTL8QjVbW"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 418485607
    },
    "value": 1855202212
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getCompressedBalanceByOwner",
  "params": [
    "bukwBg6C8VAHsuak1dPm5Teiu3eWe78xakgTL8QjVbW"
  ]
}'
```



------

# getCompressedMintTokenHolders

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns owners of compressed token accounts for the given mint, ranked by balance.

Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-mint-token-holders

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| mint | string | Yes | Pubkey of the mint whose token holders to query. |
| cursor | string or null | No | Pagination cursor returned by a previous response. |
| limit | integer or null | No | Maximum number of holders to return. |

## Result

**Token holders** (object): A paginated list of owner balances for the given mint.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getCompressedMintTokenHolders",
  "params": [
    "5iVmFCCwJTuuw7p4FrxYoZ1bUNdjg14j7uv5hMsMpump"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 418485610
    },
    "value": {
      "items": [
        {
          "owner": "bukwBg6C8VAHsuak1dPm5Teiu3eWe78xakgTL8QjVbW",
          "balance": 108197404958
        },
        {
          "owner": "5STUuhrL8kJ4up9spEY39VJ6ibQCFrg8x8cRV5UeEcfv",
          "balance": 0
        }
      ],
      "cursor": "111111115STUuhrL8kJ4up9spEY39VJ6ibQCFrg8x8cRV5UeEcfv"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getCompressedMintTokenHolders",
  "params": [
    "5iVmFCCwJTuuw7p4FrxYoZ1bUNdjg14j7uv5hMsMpump",
    "string",
    1
  ]
}'
```



------

# getCompressedTokenAccountBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance for the compressed token account with the given address or hash. Provide either `address` or `hash`.

Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-token-account-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string or null | No | Pubkey of the compressed token account to query. |
| hash | string or null | No | Hash of the compressed token account to query. |

## Result

**Token account balance** (object): The token balance of the compressed token account.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getCompressedTokenAccountBalance",
  "params": [
    "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 418485614
    },
    "value": {
      "amount": 108197404958
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getCompressedTokenAccountBalance",
  "params": [
    "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL",
    "string"
  ]
}'
```



------

# getCompressedTokenAccountsByDelegate

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the compressed token accounts delegated to the given Pubkey.

Compressed token delegation is rare on mainnet, so most Pubkeys (including the example value) currently return an empty `items` array. To see a non-empty response, supply a Pubkey that has been set as the SPL-Token-2022 delegate on a compressed token account.


Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-token-accounts-by-delegate

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| delegate | string | Yes | Pubkey of the delegate. |
| mint | string or null | No | Optional mint Pubkey to filter accounts by. |
| cursor | string or null | No | Pagination cursor returned by a previous response. |
| limit | integer or null | No | Maximum number of accounts to return. |

## Result

**Compressed token accounts** (object): A paginated list of compressed token accounts delegated to the given Pubkey.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getCompressedTokenAccountsByDelegate",
  "params": [
    "bukwBg6C8VAHsuak1dPm5Teiu3eWe78xakgTL8QjVbW"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 418485617
    },
    "value": {
      "items": [],
      "cursor": null
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getCompressedTokenAccountsByDelegate",
  "params": [
    "bukwBg6C8VAHsuak1dPm5Teiu3eWe78xakgTL8QjVbW",
    "string",
    "string",
    1
  ]
}'
```



------

# getCompressedTokenAccountsByOwner

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the compressed token accounts owned by the given Pubkey.

Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-token-accounts-by-owner

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| owner | string | Yes | Pubkey of the owner whose compressed token accounts to query. |
| mint | string or null | No | Optional mint Pubkey to filter accounts by. |
| cursor | string or null | No | Pagination cursor returned by a previous response. |
| limit | integer or null | No | Maximum number of accounts to return. |

## Result

**Compressed token accounts** (object): A paginated list of compressed token accounts owned by the given Pubkey.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getCompressedTokenAccountsByOwner",
  "params": [
    "bukwBg6C8VAHsuak1dPm5Teiu3eWe78xakgTL8QjVbW",
    1
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 419096770
    },
    "value": {
      "items": [
        {
          "account": {
            "hash": "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL",
            "address": null,
            "data": {
              "discriminator": 2,
              "data": "RhAVR6AmcnFercuAcoi9gbc/hIy3UBfL/FeQkTk7SE8I8WaM+ETZsH8YD96DZJdZG7IPY2fuP8pCP/oQV1de4R5hETEZAAAAAAAA",
              "dataHash": "mkARkU6arYpeTacykBCEytKihySvzGJXbkG5PbwhieQ"
            },
            "owner": "cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",
            "lamports": 0,
            "tree": "smt6ukQDSPPYHSshQovmiRUjG9jGFq2hW9vgrDFk5Yz",
            "leafIndex": 832574,
            "seq": 877634,
            "slotCreated": 357735227
          },
          "tokenData": {
            "mint": "5iVmFCCwJTuuw7p4FrxYoZ1bUNdjg14j7uv5hMsMpump",
            "owner": "bukwBg6C8VAHsuak1dPm5Teiu3eWe78xakgTL8QjVbW",
            "amount": 108197404958,
            "delegate": null,
            "state": "initialized",
            "tlv": null
          }
        }
      ],
      "cursor": "2QFE3NN4UdCFuek6gubUmahYKq9BA9QSvhp1vARpSCmWd96FJkrZhnNMbVC8U2oUPEkXqSiiszrhweAhbpnRpVCJ"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getCompressedTokenAccountsByOwner",
  "params": [
    "bukwBg6C8VAHsuak1dPm5Teiu3eWe78xakgTL8QjVbW",
    "string",
    "string",
    1
  ]
}'
```



------

# getCompressedTokenBalancesByOwner

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the compressed token balances for the given Pubkey.

Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-token-balances-by-owner

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| owner | string | Yes | Pubkey of the owner whose compressed token balances to query. |
| mint | string or null | No | Optional mint Pubkey to filter balances by. |
| cursor | string or null | No | Pagination cursor returned by a previous response. |
| limit | integer or null | No | Maximum number of balances to return. |

## Result

**Compressed token balances** (object): A paginated list of compressed token balances for the owner.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getCompressedTokenBalancesByOwner",
  "params": [
    "bukwBg6C8VAHsuak1dPm5Teiu3eWe78xakgTL8QjVbW"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 418485622
    },
    "value": {
      "token_balances": [
        {
          "mint": "5iVmFCCwJTuuw7p4FrxYoZ1bUNdjg14j7uv5hMsMpump",
          "balance": 108197404958
        },
        {
          "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
          "balance": 581283412
        }
      ],
      "cursor": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getCompressedTokenBalancesByOwner",
  "params": [
    "bukwBg6C8VAHsuak1dPm5Teiu3eWe78xakgTL8QjVbW",
    "string",
    "string",
    1
  ]
}'
```



------

# getCompressedTokenBalancesByOwnerV2

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the compressed token balances for the given Pubkey.

Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-token-balances-by-owner-v-2

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| owner | string | Yes | Pubkey of the owner whose compressed token balances to query. |
| mint | string or null | No | Optional mint Pubkey to filter balances by. |
| cursor | string or null | No | Pagination cursor returned by a previous response. |
| limit | integer or null | No | Maximum number of balances to return. |

## Result

**Compressed token balances** (object): A paginated list of compressed token balances for the owner.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getCompressedTokenBalancesByOwnerV2",
  "params": [
    "bukwBg6C8VAHsuak1dPm5Teiu3eWe78xakgTL8QjVbW"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 418485624
    },
    "value": {
      "items": [
        {
          "mint": "5iVmFCCwJTuuw7p4FrxYoZ1bUNdjg14j7uv5hMsMpump",
          "balance": 108197404958
        },
        {
          "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
          "balance": 581283412
        }
      ],
      "cursor": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getCompressedTokenBalancesByOwnerV2",
  "params": [
    "bukwBg6C8VAHsuak1dPm5Teiu3eWe78xakgTL8QjVbW",
    "string",
    "string",
    1
  ]
}'
```



------

# getCompressionSignaturesForAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the transaction signatures that closed or opened the compressed account with the given hash.

Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-compression-signatures-for-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hash | string | Yes | Hash of the compressed account. |

## Result

**Signatures** (object): The transaction signatures that touched the compressed account.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getCompressionSignaturesForAccount",
  "params": [
    "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 418485627
    },
    "value": {
      "items": [
        {
          "signature": "2M5XHXBGZSwqYw6HN5TfReiamMXghcJEdwLJCyUPgoAo2kJrSt7EZnS43WRqx1Fiq95W5SV2n86oAKgDARrLLG3u",
          "slot": 357735227,
          "blockTime": 1754278913
        }
      ]
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getCompressionSignaturesForAccount",
  "params": [
    "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL"
  ]
}'
```



------

# getCompressionSignaturesForAddress

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the transaction signatures that closed or opened a compressed account at the given address.

This is for Light-Protocol style compressed accounts that have an `address` set (rather than the more common hash-only compressed token accounts). Most Pubkeys currently return an empty `items` array because the addressed-compressed-account namespace is not yet widely populated.


Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-compression-signatures-for-address

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | Pubkey of the compressed account address. |
| cursor | string or null | No | Pagination cursor returned by a previous response. |
| limit | integer or null | No | Maximum number of signatures to return. |

## Result

**Signatures** (object): A paginated list of transaction signatures.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getCompressionSignaturesForAddress",
  "params": [
    "11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 418485631
    },
    "value": {
      "items": [],
      "cursor": null
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getCompressionSignaturesForAddress",
  "params": [
    "11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP",
    "string",
    1
  ]
}'
```



------

# getCompressionSignaturesForOwner

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the transaction signatures involving compressed accounts owned by the given Pubkey.

Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-compression-signatures-for-owner

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| owner | string | Yes | Pubkey of the owner whose compression-related signatures to query. |
| cursor | string or null | No | Pagination cursor returned by a previous response. |
| limit | integer or null | No | Maximum number of signatures to return. |

## Result

**Signatures** (object): A paginated list of transaction signatures.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getCompressionSignaturesForOwner",
  "params": [
    "bukwBg6C8VAHsuak1dPm5Teiu3eWe78xakgTL8QjVbW"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 418486615
    },
    "value": {
      "items": [
        {
          "signature": "4gXfktAZhE9kr2DrHgdg4PcLKaFBxBCqem7QazyQF54njJ1aMu9EzvMgwcY1eaSuTxeHNbFp9bKcd6BWyJwpRvgE",
          "slot": 357735567,
          "blockTime": 1754279048
        }
      ],
      "cursor": null
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getCompressionSignaturesForOwner",
  "params": [
    "bukwBg6C8VAHsuak1dPm5Teiu3eWe78xakgTL8QjVbW",
    "string",
    1
  ]
}'
```



------

# getCompressionSignaturesForTokenOwner

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the transaction signatures involving compressed token accounts owned by the given Pubkey.

Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-compression-signatures-for-token-owner

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| owner | string | Yes | Pubkey of the owner whose compressed token signatures to query. |
| cursor | string or null | No | Pagination cursor returned by a previous response. |
| limit | integer or null | No | Maximum number of signatures to return. |

## Result

**Signatures** (object): A paginated list of transaction signatures.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getCompressionSignaturesForTokenOwner",
  "params": [
    "bukwBg6C8VAHsuak1dPm5Teiu3eWe78xakgTL8QjVbW"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 418485901
    },
    "value": {
      "items": [
        {
          "signature": "2M5XHXBGZSwqYw6HN5TfReiamMXghcJEdwLJCyUPgoAo2kJrSt7EZnS43WRqx1Fiq95W5SV2n86oAKgDARrLLG3u",
          "slot": 357735227,
          "blockTime": 1754278913
        },
        {
          "signature": "NtPpU9CV6FwxHXFFGtxdfHav8Xyw4wKRwbvGvUUsUMjaPYUTuHhnXZtKKC1aGbBxXUawfSVZNp23o7t4FvuKD1Z",
          "slot": 357734692,
          "blockTime": 1754278702
        }
      ],
      "cursor": "YLGNsKSoA4qyyYAoR3gfCGoq5Kushh5Dx5pv7AHivCekT2nqjdDXBJHVxuv47KS3nL6ZiuQecDREFryMVE1FoUVkePaxrwjYX9"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getCompressionSignaturesForTokenOwner",
  "params": [
    "bukwBg6C8VAHsuak1dPm5Teiu3eWe78xakgTL8QjVbW",
    "string",
    1
  ]
}'
```



------

# getIndexerHealth

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the health status of the compression indexer.

Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-indexer-health

## Result

**Health status** (enum): Returns `ok` when the indexer is healthy.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "ok ...",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getIndexerHealth"
}'
```



------

# getIndexerSlot

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the latest slot indexed by the compression indexer.

Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-indexer-slot

## Result

**Indexer slot** (integer): The latest slot indexed by the compression indexer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "418485744 ...",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getIndexerSlot"
}'
```



------

# getLatestCompressionSignatures

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the most recent transaction signatures involving compressed state.

Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-latest-compression-signatures

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| cursor | string or null | No | Pagination cursor returned by a previous response. |
| limit | integer or null | No | Maximum number of signatures to return. |

## Result

**Signatures** (object): A paginated list of recent compression-related transaction signatures.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 418485747
    },
    "value": {
      "items": [
        {
          "signature": "3VSXkFYMW7Nh73QMRUkM69vo6b6rFzng6KMaxpfeaC8Y5dcyLaqPr6cQR5ryWWG1ciq66rT46e7Xn3MJDNtQ7JAS",
          "slot": 418485507,
          "blockTime": 1778278932
        },
        {
          "signature": "4vz61F3eENQizAqDjoVMUm8ce7EKGMiVSQWtUcwEetbefZc1FP5DEajN4XZZa1emUVKQpWPTHaqdNgkJeYFxnUbQ",
          "slot": 418485502,
          "blockTime": 1778278930
        }
      ],
      "cursor": "4kwtPUJmAis732mGAuMozNPEXfziYaYJbaHa1FqbTqqjwuvTqHAj6e3Bh87rriGFDzZK3HqsmpYG1nvhhXRCHYuoFrBggK9PSr2"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getLatestCompressionSignatures",
  "params": [
    "string",
    1
  ]
}'
```



------

# getLatestNonVotingSignatures

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the most recent non-voting transaction signatures observed by the indexer.

Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-latest-non-voting-signatures

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| cursor | string or null | No | Pagination cursor returned by a previous response. |
| limit | integer or null | No | Maximum number of signatures to return. |

## Result

**Signatures** (object): A list of recent non-voting transaction signatures with their error status.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 418485750
    },
    "value": {
      "items": [
        {
          "signature": "64kTvtd4hvcfvZvbQX28yd4Mn639Jakj8TFw1uij1tzWLq7RbSVbEu496Q8qoRL7yozcieRNyNyJKc9nFhncAuzU",
          "slot": 418485750,
          "blockTime": 1778279027,
          "error": null
        },
        {
          "signature": "64Rkbkbpvu3b72bqwKSvWcVSLyhWjGVzWkZ6hqawJ6kyS4SmMH8YfUZ8P88VsehfgJdrZSQa45ytQiFRXK22Wuv1",
          "slot": 418485750,
          "blockTime": 1778279027,
          "error": null
        }
      ]
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getLatestNonVotingSignatures",
  "params": [
    "string",
    1
  ]
}'
```



------

# getMultipleCompressedAccountProofs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns merkle proofs for the compressed accounts with the given hashes.

The Photon API expects the JSON-RPC `params` array to be the list of hashes itself (each positional element is one hash). The spec models the first two positional slots; pass additional hashes as additional positional elements when needed.


Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-multiple-compressed-account-proofs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hash | string | Yes | First compressed account hash to query. |
| hash2 | string | No | Optional additional compressed account hash to query. |

## Result

**Compressed account proofs** (object): An array of merkle proofs for the requested compressed accounts.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getMultipleCompressedAccountProofs",
  "params": [
    "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL",
    "41GMzTte97MK7eZqo5rb7JNjABrm4r4XkhSCVZdZgtka"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 418485753
    },
    "value": [
      {
        "proof": [
          "11111111111111111111111111111111",
          "3CFKteYSRSkp9EGFPzibgzCPtNuJ5HeZ31fAsBpgcHwZ",
          "274k4KPY5VhmU5pCwwJzyHaY4AH4m7SjnZnyj44UitJc",
          "3CmsXgfnFjYnFqFGA5FVuTyAA5ENV9GBr1bA3cR47EUJ",
          "2SUP3mBiZBKzepZqxbCoDoV9CvN9xs2nMiPjUwQ3fQti",
          "42SthPRZV4F3Mek5eCGvoETaef5wNwepuoiKaJU18dTf",
          "hSLgVeN68pDxYpGWLVxCLJM2frDcSGgDS56fBm7Jmgp",
          "3xecC71yJecUMwMXABUQyGpQg5wPkuPQQghNSiHuzBL2",
          "3zqgQREMZJBWWxHeArhiso6FGVgTfuz9Xf1hwZLwah4k",
          "eeqRZmXrLxGYiK5zwp4Y72ZHSskwfqdybaH71q2s2cu",
          "CHGptQh7F7FAQFr2ebVQBCNCoWDfkjrWENtBFaSuBQK",
          "2bD5R8x94VURvzqGL5RufxMgJ1euhvQ9MY4FDiTze8D4",
          "2CZ6PSkWbhfZ2nkNQWeFRg5NUGkUb6sWoGYZtVSbZnTP",
          "2RWPLU8J4Qkg13n63cdMndfZLe9vsim44PRAn1q8y356",
          "Qi4hMgGVaYVCdxWQ51AiS7YwrDmVsgjZ3X5H84uje2R",
          "24b4LHNs5nXTTxncoYdPbBXnvjjp6ez6fbBWxPw7qLUK",
          "49zPcCTw2nmguqspeAb3VM8PLjcK5Qfb4oMvKeTDPeqm",
          "2tiUSe34eNxNuXXtPPG8F2dw92v2fM5eWEawSfmBvLQ5",
          "aWKg77LjEQpuFcgyvA5ZwJjggnS4evyG3hwvVLurFud",
          "Ea7WrnMfZdfBjCKa5obZeg2fST94H645dX4GB9PsZaG",
          "3KLopoPRRZeH3H4i1csrJXkfkwX4gjeTRnFsJZvKotPJ",
          "AEvtmNEdsHtCzZjfwvak4of5rV3XUUA1qoLNEGVDvui",
          "2fomPS2xUPwXxVF8hx5YtMpBHmQKSZKushUiWYsy9Eqx",
          "3Pi3nRu4fWpnW5rYDAoraX1Q2xDCRQ24Dq8TEY7gaSBn",
          "3dbMMyehykAriNZ8FMJgPc1N6YSzm9ZfV2HcW9sbaXzP",
          "4EE5KQnQ6Tvo78gGhTu8serpJV4srbRhYZ3rdvCiRa5e"
        ],
        "root": "3m3ZNkLWeTSGdVCejt4QK4dMcAVyckJvoBhBA8VDeHUd",
        "leafIndex": 832574,
        "hash": "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL",
        "merkleTree": "smt6ukQDSPPYHSshQovmiRUjG9jGFq2hW9vgrDFk5Yz",
        "rootSeq": 3076052
      },
      {
        "proof": [
          "11111111111111111111111111111111",
          "3CFKteYSRSkp9EGFPzibgzCPtNuJ5HeZ31fAsBpgcHwZ",
          "274k4KPY5VhmU5pCwwJzyHaY4AH4m7SjnZnyj44UitJc",
          "2HZcobpCoz6JbutPkspDsyo6DS98WYXDtGJPHTXnRfyF",
          "3yP5iEu8dorEBmRFeJbDik3SXaoWfAhJBoqjezL3LzCC",
          "2GDE67NjgjexGhbNZYWboxJnHaztcUNPeQrwnEHioms9",
          "3hfwSZEcRLQJLd1q5Y2cKxJw6DH9D9rwmkxmvJPTXgbw",
          "13m4UNC6zmBh7nkYwxj8JM4NRgsBn9S4ntdXi1h3GjmS",
          "e6vLaQaJ2zukHuJ4WzvZYgsuqKbNr12QECqT7Wpig3K",
          "43Ph7zdSXhRz2JRTfNGTkwgrNNhBdDW69q5mtfjiW2JX",
          "2ZQxxGVwKNS5WuTRreG79RZgxUeewPCUV27Cf2D9nysj",
          "2DpmP474nnqZeGxajaxn7WaFeAf3RXt3Fmbn61Gg1qcs",
          "2qtvn5gbtE7pmZaJBsq7VNXAhfrRfFPdQXaFWXWnhPNs",
          "meuYRJykwQ8cz7UzsmM9aKnH1MViyyhjGnvCj8xHk5o",
          "2WsnV6MXTeVZbKagjwrw5vV2gXZ8abpkrZMgddscxmwt",
          "TMRdzA9GdBpuNNzsMGKsZ5EtQZTZjdeBGDZFWN8hVyd",
          "ghySSJYYdWoByRzLv6q6zoJZ9L3BoNUWWrf1nYRKpA5",
          "3nB7c8a7qucm5M9tozYbgrnRS8XkQ2G2wrBK3h643e5u",
          "qH2bLEEVszriPCrPmRFB1QPUstqNv6vhUmeDT1SSjE7",
          "gQzwyiYBucpZNM3hdaj9jvTnk1bXiAJTPViw6fZLSKS",
          "3te1zneHCY9Zyj5nTYCJ6zeancgDTxbSSzwnkQZAu1VV",
          "3LayKjhK8uZAW3nVxJtSYeMJ6RcfaERskgboTPZB123v",
          "2fomPS2xUPwXxVF8hx5YtMpBHmQKSZKushUiWYsy9Eqx",
          "3Pi3nRu4fWpnW5rYDAoraX1Q2xDCRQ24Dq8TEY7gaSBn",
          "3dbMMyehykAriNZ8FMJgPc1N6YSzm9ZfV2HcW9sbaXzP",
          "4EE5KQnQ6Tvo78gGhTu8serpJV4srbRhYZ3rdvCiRa5e"
        ],
        "root": "46RAhrCDLwQu1NDpNbE3EX3cPWi5UhCsvyxrWpDv4rXx",
        "leafIndex": 833491,
        "hash": "41GMzTte97MK7eZqo5rb7JNjABrm4r4XkhSCVZdZgtka",
        "merkleTree": "smt3AFtReRGVcrP11D6bSLEaKdUmrGfaTNowMVccJeu",
        "rootSeq": 3117517
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getMultipleCompressedAccountProofs",
  "params": [
    "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL",
    "41GMzTte97MK7eZqo5rb7JNjABrm4r4XkhSCVZdZgtka"
  ]
}'
```



------

# getMultipleCompressedAccounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the compressed accounts with the given addresses or hashes. Provide either `addresses` or `hashes`.

Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-multiple-compressed-accounts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| addresses | string[] or null | No | An array of compressed account addresses to query. |
| hashes | string[] or null | No | An array of compressed account hashes to query. |

## Result

**Compressed accounts** (object): A list of compressed accounts.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getMultipleCompressedAccounts",
  "params": [
    [
      "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL",
      "41GMzTte97MK7eZqo5rb7JNjABrm4r4XkhSCVZdZgtka"
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 418485756
    },
    "value": {
      "items": [
        {
          "hash": "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL",
          "address": null,
          "data": {
            "discriminator": 2,
            "data": "RhAVR6AmcnFercuAcoi9gbc/hIy3UBfL/FeQkTk7SE8I8WaM+ETZsH8YD96DZJdZG7IPY2fuP8pCP/oQV1de4R5hETEZAAAAAAAA",
            "dataHash": "mkARkU6arYpeTacykBCEytKihySvzGJXbkG5PbwhieQ"
          },
          "owner": "cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",
          "lamports": 0,
          "tree": "smt6ukQDSPPYHSshQovmiRUjG9jGFq2hW9vgrDFk5Yz",
          "leafIndex": 832574,
          "seq": 877634,
          "slotCreated": 357735227
        },
        {
          "hash": "41GMzTte97MK7eZqo5rb7JNjABrm4r4XkhSCVZdZgtka",
          "address": null,
          "data": {
            "discriminator": 2,
            "data": "xvp6877brTo9ZfNqq8l0MbG75MLS9uDkfKYCA0UvXWEI8WaM+ETZsH8YD96DZJdZG7IPY2fuP8pCP/oQV1de4VSupSIAAAAAAAAA",
            "dataHash": "QTbeX3k5dHae2N2C5bdkuznGgQnkW2c7BmCdjZevSgL"
          },
          "owner": "cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",
          "lamports": 0,
          "tree": "smt3AFtReRGVcrP11D6bSLEaKdUmrGfaTNowMVccJeu",
          "leafIndex": 833491,
          "seq": 879099,
          "slotCreated": 357734692
        }
      ]
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getMultipleCompressedAccounts",
  "params": [
    [
      "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL",
      "41GMzTte97MK7eZqo5rb7JNjABrm4r4XkhSCVZdZgtka"
    ],
    [
      "string"
    ]
  ]
}'
```



------

# getMultipleNewAddressProofs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns non-inclusion proofs for the given addresses, used when creating compressed accounts.

The Photon API expects the JSON-RPC `params` array to be the list of addresses itself (each positional element is one Pubkey). The spec models the first positional slot; pass additional addresses as additional positional elements when needed.


Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-multiple-new-address-proofs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | First address to prove non-inclusion for. |

## Result

**New address proofs** (object): An array of non-inclusion proofs for the requested addresses.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getMultipleNewAddressProofs",
  "params": [
    "11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 418485760
    },
    "value": [
      {
        "root": "3DubmFrufJatPqWdb2izLjjozHRHELEYhKGFaP8YV2CK",
        "address": "11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP",
        "lowerRangeAddress": "11111111111111111111111111111111",
        "higherRangeAddress": "1118ZE8WhrMeAxmaCDTBMZry8D7FHxWyMVviQ7ms8K",
        "nextIndex": 230968,
        "proof": [
          "34cMT7MjFrs8hLp2zHMrPJHKkUxBDBwBTNck77wLjjcY",
          "1UzwPfgaZS2ZWkFQ7cP56NwmMQPS9yetvZgWCZYKtYt",
          "3B2iSozqyZrKt4TdvctxxjbJYSKf4jVErf4bJ4vMujGW",
          "2wJz9tuzC46GAaxhyKi6wqzGA39X13LCPvAB1a9WtYAt",
          "3ohYpkt2Gpz4qHB61ZZ5Rs2YQDh7sK1VuDarfq4x8HyN",
          "3o2ScgCzUj6XyeYko8B9ksQ4w6jA5bZ9rWBwTCkNVDKB",
          "28F55i4iTnqFvk4ciaJWtVuMgxPNcK9i75kj3DvmnfnB",
          "38MMrS2XfDUQL3ewJykxMtQ4KoZfdKKZYh5xDuNn6S6w",
          "up31cXRHYuHDpc9BsspaamUfx8hDdCsjX4mBEjnrgcU",
          "3bnRB7vSFgPAzsqbX3KJtJ5oSjV8Sr8n5ewf2va3FL4Q",
          "3CSuWf41reb1FoNQHkyFm9qy4dS25gbYEFjtmryhNyhb",
          "3rhYm7xonQhEzWiCMezUw53QKv5SeajUJ8Jt6fiupRoq",
          "f4kvuNs9vPY9avd2uic3fVuznUdZyytg14dchHQgu2F",
          "3e8RphHoRzP8A1rFNnSsSrRg1rB4fdfWhV5ShxCNRAHS",
          "4EaPXh3REUuFLXeXJp4hk2hFV2EzihYVxqb4fRQLpvy2",
          "46XvVyoJPo8eATFksrXgBgqX9vX9qKcMXXvQHS28W6xZ",
          "3TV4zwC5V7qTDnRxciFWjxkVQEgABcVYCJPM9ENxMUzo",
          "eFRoWaaSmZpEegagSx6se5aBbTS7iyrBB4hfgXfeci3",
          "3HKMMSXVXH5M7tSZjkn6n1sD9XN8kkJEyu72tgSZB6i6",
          "qwrBacu8tAVPtNiEwN1tbD7Sma3gEubXKAdruYt5m59",
          "3EdF4zvu7uwW7xYdnaKUPzqDY5Msq9FfWn6HgEnRTkDB",
          "2jzv6Z8vEXSYRXQCFnVYvzgJ2RfyDN1QEjdHm6CBvJUg",
          "2fomPS2xUPwXxVF8hx5YtMpBHmQKSZKushUiWYsy9Eqx",
          "3Pi3nRu4fWpnW5rYDAoraX1Q2xDCRQ24Dq8TEY7gaSBn",
          "3dbMMyehykAriNZ8FMJgPc1N6YSzm9ZfV2HcW9sbaXzP",
          "4EE5KQnQ6Tvo78gGhTu8serpJV4srbRhYZ3rdvCiRa5e"
        ],
        "merkleTree": "amt1Ayt45jfbdw5YSo7iz6WZxUmnZsQTYXy82hVwyC2",
        "rootSeq": 1167121,
        "lowElementLeafIndex": 0
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getMultipleNewAddressProofs",
  "params": [
    "11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP"
  ]
}'
```



------

# getMultipleNewAddressProofsV2

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns non-inclusion proofs for the given (address, tree) pairs, used when creating compressed accounts.

The Photon API expects the JSON-RPC `params` array to be the list of pairs itself (each positional element is one `{ address, tree }` object). The spec models the first positional slot; pass additional pairs as additional positional elements when needed.


Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-multiple-new-address-proofs-v-2

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| addressWithTree | object | Yes | First address paired with the merkle tree Pubkey it should be inserted into. |

## Result

**New address proofs** (object): An array of non-inclusion proofs for the requested (address, tree) pairs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getMultipleNewAddressProofsV2",
  "params": [
    {
      "address": "11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP",
      "tree": "amt1Ayt45jfbdw5YSo7iz6WZxUmnZsQTYXy82hVwyC2"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 418485763
    },
    "value": [
      {
        "root": "3DubmFrufJatPqWdb2izLjjozHRHELEYhKGFaP8YV2CK",
        "address": "11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP",
        "lowerRangeAddress": "11111111111111111111111111111111",
        "higherRangeAddress": "1118ZE8WhrMeAxmaCDTBMZry8D7FHxWyMVviQ7ms8K",
        "nextIndex": 230968,
        "proof": [
          "34cMT7MjFrs8hLp2zHMrPJHKkUxBDBwBTNck77wLjjcY",
          "1UzwPfgaZS2ZWkFQ7cP56NwmMQPS9yetvZgWCZYKtYt",
          "3B2iSozqyZrKt4TdvctxxjbJYSKf4jVErf4bJ4vMujGW",
          "2wJz9tuzC46GAaxhyKi6wqzGA39X13LCPvAB1a9WtYAt",
          "3ohYpkt2Gpz4qHB61ZZ5Rs2YQDh7sK1VuDarfq4x8HyN",
          "3o2ScgCzUj6XyeYko8B9ksQ4w6jA5bZ9rWBwTCkNVDKB",
          "28F55i4iTnqFvk4ciaJWtVuMgxPNcK9i75kj3DvmnfnB",
          "38MMrS2XfDUQL3ewJykxMtQ4KoZfdKKZYh5xDuNn6S6w",
          "up31cXRHYuHDpc9BsspaamUfx8hDdCsjX4mBEjnrgcU",
          "3bnRB7vSFgPAzsqbX3KJtJ5oSjV8Sr8n5ewf2va3FL4Q",
          "3CSuWf41reb1FoNQHkyFm9qy4dS25gbYEFjtmryhNyhb",
          "3rhYm7xonQhEzWiCMezUw53QKv5SeajUJ8Jt6fiupRoq",
          "f4kvuNs9vPY9avd2uic3fVuznUdZyytg14dchHQgu2F",
          "3e8RphHoRzP8A1rFNnSsSrRg1rB4fdfWhV5ShxCNRAHS",
          "4EaPXh3REUuFLXeXJp4hk2hFV2EzihYVxqb4fRQLpvy2",
          "46XvVyoJPo8eATFksrXgBgqX9vX9qKcMXXvQHS28W6xZ",
          "3TV4zwC5V7qTDnRxciFWjxkVQEgABcVYCJPM9ENxMUzo",
          "eFRoWaaSmZpEegagSx6se5aBbTS7iyrBB4hfgXfeci3",
          "3HKMMSXVXH5M7tSZjkn6n1sD9XN8kkJEyu72tgSZB6i6",
          "qwrBacu8tAVPtNiEwN1tbD7Sma3gEubXKAdruYt5m59",
          "3EdF4zvu7uwW7xYdnaKUPzqDY5Msq9FfWn6HgEnRTkDB",
          "2jzv6Z8vEXSYRXQCFnVYvzgJ2RfyDN1QEjdHm6CBvJUg",
          "2fomPS2xUPwXxVF8hx5YtMpBHmQKSZKushUiWYsy9Eqx",
          "3Pi3nRu4fWpnW5rYDAoraX1Q2xDCRQ24Dq8TEY7gaSBn",
          "3dbMMyehykAriNZ8FMJgPc1N6YSzm9ZfV2HcW9sbaXzP",
          "4EE5KQnQ6Tvo78gGhTu8serpJV4srbRhYZ3rdvCiRa5e"
        ],
        "merkleTree": "amt1Ayt45jfbdw5YSo7iz6WZxUmnZsQTYXy82hVwyC2",
        "rootSeq": 1167121,
        "lowElementLeafIndex": 0
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getMultipleNewAddressProofsV2",
  "params": [
    {
      "address": "11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP",
      "tree": "amt1Ayt45jfbdw5YSo7iz6WZxUmnZsQTYXy82hVwyC2"
    }
  ]
}'
```



------

# getTransactionWithCompressionInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns the transaction details for the given signature, with additional compression information about accounts opened or closed.

Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-transaction-with-compression-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| signature | string | Yes | The transaction signature to query. |

## Result

**Transaction with compression info** (object): The transaction details with associated compression state changes.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getTransactionWithCompressionInfo",
  "params": [
    "2M5XHXBGZSwqYw6HN5TfReiamMXghcJEdwLJCyUPgoAo2kJrSt7EZnS43WRqx1Fiq95W5SV2n86oAKgDARrLLG3u"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "transaction": {
      "slot": 357735227,
      "transaction": [
        "AUNU25v9P3vM794BYWijMVNsZx0V1j9daXYLS3QVTX8sr/BWJGe2Kftl2eycN/7nWXxFTvfYnPhMHojwtd3XWQyAAQALEKYEOITZsTZ04JUgRlndqiUEv47ibPrNlpgoezHT5qXJDQHJoqUdq5rQgjeV7HXa15zD...(truncated)",
        "base64"
      ],
      "meta": {
        "err": null,
        "status": {
          "Ok": null
        },
        "fee": 5140,
        "preBalances": [
          47955282,
          9746107860,
          2039280,
          2039280,
          2039280,
          1,
          1,
          1141440,
          1141440,
          4534961825,
          1141440,
          1141440,
          1141441,
          1392000,
          479783646,
          0
        ],
        "postBalances": [
          47949842,
          9746108160,
          2039280,
          2039280,
          2039280,
          1,
          1,
          1141440,
          1141440,
          4534961825,
          1141440,
          1141440,
          1141441,
          1392000,
          479783646,
          0
        ],
        "innerInstructions": [
          {
            "index": 2,
            "instructions": [
              {
                "programIdIndex": 9,
                "accounts": [
                  3,
                  2,
                  0
                ],
                "data": "3JYH8H8DArPR",
                "stackHeight": 2
              },
              {
                "programIdIndex": 8,
                "accounts": [
                  0,
                  14,
                  13,
                  12,
                  15,
                  11,
                  10,
                  8,
                  8,
                  5,
                  8,
                  1
                ],
                "data": "6uxfRrqz7k19jZzDZgmuRKQLqNipRu4PLoNaJqnsnQFWPr9SQLnEgq3krLcs4YPa9WXziMwNSoSc1E3Q6q6oQsh5TLwCcDuv8zND4n8rwpstxfd61wP1Vo2v33mBGETFxp3iruMoUHndNR8me6F1p73AQStU47MCppji9SMd7Lj4wzJehsE2MczF8xC6FbYAY7NoQzVNuVwLERwMuaXZqh23bZ7MpPQxmfHqE1m7ZEozj1fMoZQfSEjxEmgid3t4HNd9y",
                "stackHeight": 2
              },
              {
                "programIdIndex": 11,
                "accounts": [
                  0,
                  15,
                  13,
                  5,
                  1
                ],
                "data": "5wPdbtbk7M4b3JSHrvzzbr316bwYx8ZFiBFo977zJUzhf4zwCVPsyxPP1T5dBc",
                "stackHeight": 3
              },
              {
                "programIdIndex": 5,
                "accounts": [
                  0,
                  1
                ],
                "data": "3Bxs48DZ3Zx6m4mD",
                "stackHeight": 4
              },
              {
                "programIdIndex": 12,
                "accounts": [],
                "data": "11112kX1UPPxVh1DqEGPf6pdnNUf7avKrEfBeq5PRHE8jM1tzTDg7Yie66SAGjHsnzsZfU4fepRwkwwuJrM1QnC6K4E6zTLSKUXPZf1ciXBExb8SZptUhCzTRPnswKfBCxBGahQhij3nS3PqQfYGphycJKjdg7pBvKySqJ3MNc4as8EhNQV2WxTDSNCkdtBMULESEGzh1BbTrW1h9kupfotKVGeRKHMbV6oKqXQTkzhoMwrfUYa5kVpNinNMJ7AT7NHKP7Kjanm5K859KCJQaiu9fsDq2uqL1xLQ3N4HJ8Yc3SQ3J2G83nUhDnneLKZwR7ri6BTmnSrao8EB8syW7JcfqcQdo7Cbk4xXofCi7AYxVErfJZPXoX4YhWcUn7AwwHmotaucbXfZdemo1Ryzw",
                "stackHeight": 3
              }
            ]
          }
        ],
        "logMessages": [
          "Program ComputeBudget111111111111111111111111111111 invoke [1]",
          "Program ComputeBudget111111111111111111111111111111 success",
          "Program ComputeBudget111111111111111111111111111111 invoke [1]"
        ],
        "preTokenBalances": [
          {
            "accountIndex": 2,
            "mint": "5iVmFCCwJTuuw7p4FrxYoZ1bUNdjg14j7uv5hMsMpump",
            "uiTokenAmount": {
              "uiAmount": null,
              "decimals": 6,
              "amount": "0",
              "uiAmountString": "0"
            },
            "owner": "GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy",
            "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
          },
          {
            "accountIndex": 3,
            "mint": "5iVmFCCwJTuuw7p4FrxYoZ1bUNdjg14j7uv5hMsMpump",
            "uiTokenAmount": {
              "uiAmount": 109290.308038,
              "decimals": 6,
              "amount": "109290308038",
              "uiAmountString": "109290.308038"
            },
            "owner": "CB4QpcVCYGwiHgbwkY3XQ1pg4KM5cPH7XqymJuz1h7xU",
            "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
          },
          {
            "accountIndex": 4,
            "mint": "5iVmFCCwJTuuw7p4FrxYoZ1bUNdjg14j7uv5hMsMpump",
            "uiTokenAmount": {
              "uiAmount": 187.239702,
              "decimals": 6,
              "amount": "187239702",
              "uiAmountString": "187.239702"
            },
            "owner": "5STUuhrL8kJ4up9spEY39VJ6ibQCFrg8x8cRV5UeEcfv",
            "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
          }
        ],
        "postTokenBalances": [
          {
            "accountIndex": 2,
            "mint": "5iVmFCCwJTuuw7p4FrxYoZ1bUNdjg14j7uv5hMsMpump",
            "uiTokenAmount": {
              "uiAmount": 108197.404958,
              "decimals": 6,
              "amount": "108197404958",
              "uiAmountString": "108197.404958"
            },
            "owner": "GXtd2izAiMJPwMEjfgTRH3d7k9mjn4Jq3JrWFv9gySYy",
            "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
          },
          {
            "accountIndex": 3,
            "mint": "5iVmFCCwJTuuw7p4FrxYoZ1bUNdjg14j7uv5hMsMpump",
            "uiTokenAmount": {
              "uiAmount": null,
              "decimals": 6,
              "amount": "0",
              "uiAmountString": "0"
            },
            "owner": "CB4QpcVCYGwiHgbwkY3XQ1pg4KM5cPH7XqymJuz1h7xU",
            "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
          },
          {
            "accountIndex": 4,
            "mint": "5iVmFCCwJTuuw7p4FrxYoZ1bUNdjg14j7uv5hMsMpump",
            "uiTokenAmount": {
              "uiAmount": 1280.142782,
              "decimals": 6,
              "amount": "1280142782",
              "uiAmountString": "1280.142782"
            },
            "owner": "5STUuhrL8kJ4up9spEY39VJ6ibQCFrg8x8cRV5UeEcfv",
            "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
          }
        ],
        "rewards": [],
        "loadedAddresses": {
          "writable": [],
          "readonly": []
        },
        "computeUnitsConsumed": 121277
      },
      "version": 0,
      "blockTime": 1754278913
    },
    "compressionInfo": {
      "closedAccounts": [],
      "openedAccounts": [
        {
          "account": {
            "hash": "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL",
            "address": null,
            "data": {
              "discriminator": 2,
              "data": "RhAVR6AmcnFercuAcoi9gbc/hIy3UBfL/FeQkTk7SE8I8WaM+ETZsH8YD96DZJdZG7IPY2fuP8pCP/oQV1de4R5hETEZAAAAAAAA",
              "dataHash": "mkARkU6arYpeTacykBCEytKihySvzGJXbkG5PbwhieQ"
            },
            "owner": "cTokenmWW8bLPjZEBAUgYy3zKxQZW6VKi7bqNFEVv3m",
            "lamports": 0,
            "tree": "smt6ukQDSPPYHSshQovmiRUjG9jGFq2hW9vgrDFk5Yz",
            "leafIndex": 832574,
            "seq": 877634,
            "slotCreated": 357735227
          },
          "optionalTokenData": {
            "mint": "5iVmFCCwJTuuw7p4FrxYoZ1bUNdjg14j7uv5hMsMpump",
            "owner": "bukwBg6C8VAHsuak1dPm5Teiu3eWe78xakgTL8QjVbW",
            "amount": 108197404958,
            "delegate": null,
            "state": "initialized",
            "tlv": null
          }
        }
      ]
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getTransactionWithCompressionInfo",
  "params": [
    "2M5XHXBGZSwqYw6HN5TfReiamMXghcJEdwLJCyUPgoAo2kJrSt7EZnS43WRqx1Fiq95W5SV2n86oAKgDARrLLG3u"
  ]
}'
```



------

# getValidityProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns a single ZK validity proof for the given compressed account hashes and/or new addresses.

Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-validity-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hashes | string[] | No | Compressed account hashes to prove inclusion for. |
| newAddressesWithTrees | object[] | No | New addresses paired with their merkle tree Pubkeys, to prove non-inclusion for. |

## Result

**Validity proof** (object): A ZK validity proof with context for inclusion and non-inclusion claims.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getValidityProof",
  "params": [
    [
      "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL"
    ],
    []
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "value": {
      "compressedProof": {
        "a": [
          137,
          120,
          225,
          50,
          35,
          37,
          217,
          168,
          180,
          77,
          132,
          146,
          64,
          67,
          127,
          65,
          64,
          218,
          225,
          174,
          237,
          207,
          126,
          51,
          11,
          73,
          253,
          33,
          75,
          142,
          156,
          91
        ],
        "b": [
          157,
          135,
          252,
          227,
          186,
          245,
          104,
          103,
          251,
          118,
          181,
          193,
          77,
          63,
          151,
          245,
          77,
          132,
          117,
          200,
          198,
          157,
          191,
          71,
          40,
          193,
          133,
          100,
          63,
          179,
          163,
          69,
          7,
          107,
          113,
          131,
          16,
          8,
          82,
          88,
          228,
          70,
          34,
          31,
          144,
          89,
          96,
          250,
          23,
          97,
          223,
          53,
          224,
          38,
          47,
          191,
          216,
          122,
          95,
          182,
          35,
          188,
          200,
          149
        ],
        "c": [
          152,
          247,
          87,
          117,
          121,
          61,
          80,
          83,
          136,
          201,
          120,
          76,
          47,
          196,
          167,
          233,
          17,
          39,
          234,
          101,
          122,
          111,
          120,
          79,
          250,
          35,
          55,
          5,
          203,
          51,
          89,
          209
        ]
      },
      "roots": [
        "3m3ZNkLWeTSGdVCejt4QK4dMcAVyckJvoBhBA8VDeHUd"
      ],
      "rootIndices": [
        1652
      ],
      "leafIndices": [
        832574
      ],
      "leaves": [
        "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL"
      ],
      "merkleTrees": [
        "smt6ukQDSPPYHSshQovmiRUjG9jGFq2hW9vgrDFk5Yz"
      ]
    },
    "context": {
      "slot": 418485767
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getValidityProof",
  "params": [
    [
      "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL"
    ],
    []
  ]
}'
```



------

# getValidityProofV2

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://solana-mainnet.g.alchemy.com/v2/{apiKey}

Returns a single ZK validity proof for the given compressed account hashes and/or new addresses, with V2 merkle context information.

Reference: https://www.alchemy.com/docs/chains/solana/solana-photon-api/solana-photon-api/get-validity-proof-v-2

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hashes | string[] | No | Compressed account hashes to prove inclusion for. |
| newAddressesWithTrees | object[] | No | New addresses paired with their merkle tree Pubkeys, to prove non-inclusion for. |

## Result

**Validity proof** (object): A ZK validity proof with V2 merkle context for inclusion and non-inclusion claims.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getValidityProofV2",
  "params": [
    [
      "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL"
    ],
    []
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "value": {
      "compressedProof": {
        "a": [
          133,
          149,
          159,
          232,
          145,
          170,
          148,
          133,
          93,
          45,
          75,
          166,
          162,
          82,
          214,
          173,
          242,
          17,
          241,
          235,
          152,
          251,
          55,
          220,
          222,
          252,
          115,
          171,
          39,
          115,
          42,
          163
        ],
        "b": [
          26,
          198,
          234,
          90,
          55,
          117,
          246,
          146,
          226,
          87,
          34,
          142,
          221,
          6,
          158,
          121,
          20,
          6,
          234,
          81,
          70,
          30,
          124,
          244,
          84,
          192,
          193,
          73,
          0,
          241,
          250,
          187,
          30,
          184,
          140,
          107,
          93,
          137,
          248,
          224,
          206,
          114,
          215,
          188,
          22,
          50,
          48,
          155,
          254,
          96,
          23,
          196,
          102,
          22,
          78,
          70,
          212,
          194,
          47,
          207,
          26,
          75,
          162,
          133
        ],
        "c": [
          23,
          31,
          187,
          40,
          79,
          251,
          205,
          75,
          163,
          130,
          101,
          233,
          248,
          179,
          30,
          22,
          126,
          239,
          223,
          134,
          213,
          242,
          122,
          45,
          108,
          222,
          214,
          38,
          59,
          137,
          133,
          21
        ]
      },
      "accounts": [
        {
          "hash": "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL",
          "root": "3m3ZNkLWeTSGdVCejt4QK4dMcAVyckJvoBhBA8VDeHUd",
          "rootIndex": {
            "rootIndex": 1652,
            "proveByIndex": false
          },
          "leafIndex": 832574,
          "merkleContext": {
            "treeType": 1,
            "tree": "smt6ukQDSPPYHSshQovmiRUjG9jGFq2hW9vgrDFk5Yz",
            "queue": "nfq6uzaNZ5n3EWF4t64M93AWzLGt5dXTikEA9fFRktv",
            "cpiContext": null,
            "nextTreeContext": null
          }
        }
      ],
      "addresses": []
    },
    "context": {
      "slot": 418485770
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getValidityProofV2",
  "params": [
    [
      "3KC9cKQhhzEPjwuyQaohM6SGaZu1ukKRZw2QRgc1sYVL"
    ],
    []
  ]
}'
```



------

# Solana API FAQ

> Frequently asked questions about the Solana API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Solana?

Solana is a high-performance blockchain platform designed to support the scale, open participation, and performance required to power the next generation of decentralized applications. It is built on a new consensus algorithm called Proof of History (PoH) which allows it to process up to 50,000 transactions per second. Solana also features a unique architecture that allows for low-latency transactions, low transaction fees, and a high degree of decentralization.

## What is the Solana API?

The Solana API lets you connect to a Solana node that is part of the Solana blockchain. You can interact with onchain data, send transactions, and deploy contracts using Alchemy's API endpoints. The API follows a JSON-RPC standard, a lightweight, remote procedure call (RPC) protocol commonly used when interacting with blockchain data.

## How can I get started using the Solana API?

Explained in the [Solana API Quickstart Guide](/docs/reference/solana-api-quickstart).

## What methods does Alchemy support for the Solana API?

You can find the list of all the methods Alchemy supports for the Solana API on the [Solana API Endpoints](/docs/chains#solana-apis) page.

## Can I see the Solana methods by category?

Yes! Check out the section below:

<CardGroup>
  <Card title="Current State Methods" icon="clock" href="#current-state-methods">
    Query live blockchain data and network status
  </Card>

  <Card title="Historical Data (Archival)" icon="box-archive" href="#historical-data-archival">
    Access complete transaction and block history
  </Card>

  <Card title="Transaction Submission" icon="paper-plane" href="#transaction-submission">
    Send and simulate transactions with fee estimation
  </Card>

  <Card title="Network & Cluster Info" icon="network-wired" href="#network-performance-economics">
    Monitor validators, epochs and network performance
  </Card>
</CardGroup>

## Current State Methods

Query live blockchain data including accounts, balances, current slots, and real-time network status.

### Account & Balance Queries

<CardGroup>
  <Card title="getAccountInfo" icon="info" href="/docs/chains/solana/solana-api-endpoints/get-account-info">
    Returns all information associated with the account of provided Pubkey.
  </Card>

  <Card title="getBalance" icon="money-bill" href="/docs/chains/solana/solana-api-endpoints/get-balance">
    Returns the lamport balance of the account of the provided Pubkey.
  </Card>

  <Card title="getMultipleAccounts" icon="group-arrows-rotate" href="/docs/chains/solana/solana-api-endpoints/get-multiple-accounts">
    Returns the account information for a list of Pubkeys.
  </Card>

  <Card title="getProgramAccounts" icon="network-wired" href="/docs/chains/solana/solana-api-endpoints/get-program-accounts">
    Returns all accounts owned by the provided program Pubkey.
  </Card>

  <Card title="getLargestAccounts" icon="list-ol" href="/docs/chains/solana/solana-api-endpoints/get-largest-accounts">
    Returns the addresses of the largest accounts, by lamport balance.
  </Card>

  <Card title="getSupply" icon="coins" href="/docs/chains/solana/solana-api-endpoints/get-supply">
    Returns information about the current supply of SOL.
  </Card>
</CardGroup>

***

### Token Account Methods

<CardGroup>
  <Card title="getTokenAccountsByOwner" icon="wallet" href="/docs/chains/solana/solana-api-endpoints/get-token-accounts-by-owner">
    Get all token accounts for a wallet.
  </Card>

  <Card title="getTokenAccountsByDelegate" icon="user-shield" href="/docs/chains/solana/solana-api-endpoints/get-token-accounts-by-delegate">
    Query token accounts by delegate.
  </Card>

  <Card title="getTokenAccountBalance" icon="scale-balanced" href="/docs/chains/solana/solana-api-endpoints/get-token-account-balance">
    Get balance of a specific token account.
  </Card>

  <Card title="getTokenSupply" icon="coins" href="/docs/chains/solana/solana-api-endpoints/get-token-supply">
    Query total supply of an SPL token.
  </Card>

  <Card title="getTokenLargestAccounts" icon="list-ol" href="/docs/chains/solana/solana-api-endpoints/get-token-largest-accounts">
    Find accounts with largest token holdings.
  </Card>
</CardGroup>

***

### Current Slot & Blockhash

<CardGroup>
  <Card title="getSlot" icon="clone" href="/docs/chains/solana/solana-api-endpoints/get-slot">
    Get current slot number.
  </Card>

  <Card title="getBlockHeight" icon="layer-group" href="/docs/chains/solana/solana-api-endpoints/get-block-height">
    Get current block height of the network.
  </Card>

  <Card title="getLatestBlockhash" icon="hashtag" href="/docs/chains/solana/solana-api-endpoints/get-latest-blockhash">
    Get most recent blockhash for transactions.
  </Card>

  <Card title="isBlockhashValid" icon="circle-check" href="/docs/chains/solana/solana-api-endpoints/is-blockhash-valid">
    Validate if a blockhash is still valid.
  </Card>

  <Card title="getSlotLeader" icon="chess-king" href="/docs/chains/solana/solana-api-endpoints/get-slot-leader">
    Get current slot leader.
  </Card>

  <Card title="getSlotLeaders" icon="chess-board" href="/docs/chains/solana/solana-api-endpoints/get-slot-leaders">
    Get slot leaders for a range of slots.
  </Card>
</CardGroup>

***

### Transaction Status & Confirmation

<CardGroup>
  <Card title="getSignatureStatuses" icon="question-circle" href="/docs/chains/solana/solana-api-endpoints/get-signature-statuses">
    Check confirmation status of transactions.
  </Card>

  <Card title="getTransactionCount" icon="list-numeric" href="/docs/chains/solana/solana-api-endpoints/get-transaction-count">
    Get total number of transactions processed.
  </Card>
</CardGroup>

***

## Historical Data (Archival)

Access complete transaction and block history from Solana genesis.

### Transaction History

<CardGroup>
  <Card title="getTransaction" icon="file-alt" href="/docs/chains/solana/solana-api-endpoints/get-transaction">
    Get detailed information about a specific transaction.
  </Card>

  <Card title="getSignaturesForAddress" icon="signature" href="/docs/chains/solana/solana-api-endpoints/get-signatures-for-address">
    Get transaction signatures for an account.
  </Card>

  <Card title="getInflationReward" icon="medal" href="/docs/chains/solana/solana-api-endpoints/get-inflation-reward">
    Calculate inflation rewards for accounts.
  </Card>
</CardGroup>

***

### Block History

Access blockchain structure, timing, and historical data.

<CardGroup>
  <Card title="getBlock" icon="cube" href="/docs/chains/solana/solana-api-endpoints/get-block">
    Get complete block information including all transactions.
  </Card>

  <Card title="getBlocks" icon="cubes" href="/docs/chains/solana/solana-api-endpoints/get-blocks">
    Get list of confirmed blocks in a range.
  </Card>

  <Card title="getBlocksWithLimit" icon="arrow-down-1-9" href="/docs/chains/solana/solana-api-endpoints/get-blocks-with-limit">
    Get limited number of confirmed blocks.
  </Card>

  <Card title="getBlockTime" icon="stopwatch" href="/docs/chains/solana/solana-api-endpoints/get-block-time">
    Get estimated production time of a block.
  </Card>

  <Card title="getBlockCommitment" icon="check-double" href="/docs/chains/solana/solana-api-endpoints/get-block-commitment">
    Get commitment for a particular block.
  </Card>
</CardGroup>

***

## Transaction Submission

Send and simulate transactions with fee estimation and optimization.

### Transaction Methods

<CardGroup>
  <Card title="sendTransaction" icon="paper-plane" href="/docs/solana/solana-api-overview">
    Send a transaction to the network.
  </Card>

  <Card title="simulateTransaction" icon="flask" href="/docs/solana/solana-api-overview">
    Simulate a transaction to preview effects.
  </Card>

  <Card title="requestAirdrop" icon="faucet-drip" href="/docs/chains/solana/solana-api-endpoints/request-airdrop">
    Request SOL airdrop on Devnet.
  </Card>

  <Card title="getRecentPrioritizationFees" icon="arrow-trend-up" href="/docs/chains/solana/solana-api-endpoints/get-recent-prioritization-fees">
    Get recent priority fees for optimal pricing.
  </Card>

  <Card title="getFeeForMessage" icon="coins" href="/docs/chains/solana/solana-api-endpoints/get-fee-for-message">
    Calculate transaction fees before sending.
  </Card>
</CardGroup>

***

## Network & Cluster Methods

Monitor validators, epochs, network performance, and cluster health.

### Cluster Information

<CardGroup>
  <Card title="getHealth" icon="heart-pulse" href="/docs/solana/solana-api-overview">
    Check RPC node health status.
  </Card>

  <Card title="getVersion" icon="code-branch" href="/docs/chains/solana/solana-api-endpoints/get-version">
    Get Solana software version information.
  </Card>

  <Card title="getClusterNodes" icon="network-wired" href="/docs/chains/solana/solana-api-endpoints/get-cluster-nodes">
    Get information about cluster validators.
  </Card>

  <Card title="getVoteAccounts" icon="certificate" href="/docs/chains/solana/solana-api-endpoints/get-vote-accounts">
    Get current and delinquent vote accounts.
  </Card>

  <Card title="getEpochInfo" icon="clock-rotate-left" href="/docs/chains/solana/solana-api-endpoints/get-epoch-info">
    Get information about the current epoch.
  </Card>

  <Card title="getEpochSchedule" icon="calendar-days" href="/docs/chains/solana/solana-api-endpoints/get-epoch-schedule">
    Get epoch schedule information.
  </Card>

  <Card title="getLeaderSchedule" icon="crown" href="/docs/chains/solana/solana-api-endpoints/get-leader-schedule">
    Get leader schedule for an epoch.
  </Card>
</CardGroup>

***

### Network Performance & Economics

<CardGroup>
  <Card title="getRecentPerformanceSamples" icon="chart-line" href="/docs/chains/solana/solana-api-endpoints/get-recent-performance-samples">
    Get recent network performance metrics.
  </Card>

  <Card title="getInflationGovernor" icon="gavel" href="/docs/chains/solana/solana-api-endpoints/get-inflation-governor">
    Get current inflation parameters.
  </Card>

  <Card title="getInflationRate" icon="percent" href="/docs/chains/solana/solana-api-endpoints/get-inflation-rate">
    Get current inflation rate.
  </Card>

  <Card title="getStakeActivation" icon="handshake-simple" href="/docs/chains/solana/solana-api-endpoints/get-stake-activation">
    Get epoch activation information for a stake account.
  </Card>

  <Card title="getBlockProduction" icon="cubes" href="/docs/chains/solana/solana-api-endpoints/get-block-production">
    Get block production information for current/previous epochs.
  </Card>
</CardGroup>

***

## Utility & System Methods

Helper methods for system information, validation, and advanced queries.

### Basic Utility Methods

<CardGroup>
  <Card title="getMinimumBalanceForRentExemption" icon="circle-dollar-to-slot" href="/docs/chains/solana/solana-api-endpoints/get-minimum-balance-for-rent-exemption">
    Calculate minimum balance for rent exemption.
  </Card>

  <Card title="getGenesisHash" icon="dna" href="/docs/chains/solana/solana-api-endpoints/get-genesis-hash">
    Get genesis hash of the cluster.
  </Card>

  <Card title="getIdentity" icon="id-card" href="/docs/chains/solana/solana-api-endpoints/get-identity">
    Get identity public key of the RPC node.
  </Card>

  <Card title="getFirstAvailableBlock" icon="door-open" href="/docs/chains/solana/solana-api-endpoints/get-first-available-block">
    Get slot of first available block.
  </Card>

  <Card title="getHighestSnapshotSlot" icon="angle-double-up" href="/docs/chains/solana/solana-api-endpoints/get-highest-snapshot-slot">
    Get highest slot with a snapshot.
  </Card>

  <Card title="minimumLedgerSlot" icon="layer-group" href="/docs/chains/solana/solana-api-endpoints/minimum-ledger-slot">
    Get minimum slot that node has ledger information.
  </Card>

  <Card title="getMaxRetransmitSlot" icon="arrow-rotate-right" href="/docs/chains/solana/solana-api-endpoints/get-max-retransmit-slot">
    Get max slot seen from retransmit stage.
  </Card>

  <Card title="getMaxShredInsertSlot" icon="arrow-up-right-dots" href="/docs/chains/solana/solana-api-endpoints/get-max-shred-insert-slot">
    Get max slot seen from after shred insert.
  </Card>
</CardGroup>

------

# Abstract API Quickstart

> How to get started building on Abstract using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Abstract is a Layer 2 (L2) network built on top of Ethereum, designed to securely power consumer-facing blockchain applications at scale with low fees and fast transaction speeds.

The Abstract API allows interaction with the Abstract network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an Abstract client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { abstract } from "viem/chains";

const client = createPublicClient({
  chain: abstract,
  transport: http("https://abstract-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (ETH):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Abstract APIs

For the full list of Abstract APIs, see the [Abstract API Endpoints](/docs/chains#abstract-apis).

------

# Abstract API Overview

> Overview of available Abstract API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Abstract APIs

📙 Get started with our [Abstract API Quickstart Guide](/docs/reference/abstract-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/abstract/abstract-api-endpoints/eth-accounts)                     | [`eth_blockNumber`](/docs/chains/abstract/abstract-api-endpoints/eth-block-number)          |
| [`eth_call`](/docs/chains/abstract/abstract-api-endpoints/eth-call)                             | [`eth_chainId`](/docs/chains/abstract/abstract-api-endpoints/eth-chain-id)                  |
| [`eth_estimateGas`](/docs/chains/abstract/abstract-api-endpoints/eth-estimate-gas)              | [`eth_feeHistory`](/docs/chains/abstract/abstract-api-endpoints/eth-fee-history)            |
| [`eth_fillTransaction`](/docs/chains/abstract/abstract-api-endpoints/eth-fill-transaction)      | [`eth_gasPrice`](/docs/chains/abstract/abstract-api-endpoints/eth-gas-price)                |
| [`eth_getAccount`](/docs/chains/abstract/abstract-api-endpoints/eth-get-account)                | [`eth_getAccountInfo`](/docs/chains/abstract/abstract-api-endpoints/eth-get-account-info)   |
| [`eth_getBalance`](/docs/chains/abstract/abstract-api-endpoints/eth-get-balance)                | [`eth_getBlockByHash`](/docs/chains/abstract/abstract-api-endpoints/eth-get-block-by-hash)  |
| [`eth_getBlockByNumber`](/docs/chains/abstract/abstract-api-endpoints/eth-get-block-by-number)  | [`eth_getBlockReceipts`](/docs/chains/abstract/abstract-api-endpoints/eth-get-block-receipts) |
| [`eth_getBlockTransactionCountByHash`](/docs/chains/abstract/abstract-api-endpoints/eth-get-block-transaction-count-by-hash) | [`eth_getBlockTransactionCountByNumber`](/docs/chains/abstract/abstract-api-endpoints/eth-get-block-transaction-count-by-number) |
| [`eth_getCode`](/docs/chains/abstract/abstract-api-endpoints/eth-get-code)                      | [`eth_getFilterChanges`](/docs/chains/abstract/abstract-api-endpoints/eth-get-filter-changes) |
| [`eth_getFilterLogs`](/docs/chains/abstract/abstract-api-endpoints/eth-get-filter-logs)         | [`eth_getLogs`](/docs/chains/abstract/abstract-api-endpoints/eth-get-logs)                  |
| [`eth_getRawTransactionByHash`](/docs/chains/abstract/abstract-api-endpoints/eth-get-raw-transaction-by-hash) | [`eth_getStorageAt`](/docs/chains/abstract/abstract-api-endpoints/eth-get-storage-at)       |
| [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/abstract/abstract-api-endpoints/eth-get-transaction-by-block-hash-and-index) | [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/abstract/abstract-api-endpoints/eth-get-transaction-by-block-number-and-index) |
| [`eth_getTransactionByHash`](/docs/chains/abstract/abstract-api-endpoints/eth-get-transaction-by-hash) | [`eth_getTransactionCount`](/docs/chains/abstract/abstract-api-endpoints/eth-get-transaction-count) |
| [`eth_getTransactionReceipt`](/docs/chains/abstract/abstract-api-endpoints/eth-get-transaction-receipt) | [`eth_getUncleCountByBlockHash`](/docs/chains/abstract/abstract-api-endpoints/eth-get-uncle-count-by-block-hash) |
| [`eth_getUncleCountByBlockNumber`](/docs/chains/abstract/abstract-api-endpoints/eth-get-uncle-count-by-block-number) | [`eth_maxPriorityFeePerGas`](/docs/chains/abstract/abstract-api-endpoints/eth-max-priority-fee-per-gas) |
| [`eth_newBlockFilter`](/docs/chains/abstract/abstract-api-endpoints/eth-new-block-filter)       | [`eth_newFilter`](/docs/chains/abstract/abstract-api-endpoints/eth-new-filter)              |
| [`eth_newPendingTransactionFilter`](/docs/chains/abstract/abstract-api-endpoints/eth-new-pending-transaction-filter) | [`eth_protocolVersion`](/docs/chains/abstract/abstract-api-endpoints/eth-protocol-version)  |
| [`eth_sendRawTransaction`](/docs/chains/abstract/abstract-api-endpoints/eth-send-raw-transaction) | [`eth_submitWork`](/docs/chains/abstract/abstract-api-endpoints/eth-submit-work)            |
| [`eth_subscribe`](/docs/chains/abstract/abstract-api-endpoints/eth-subscribe)                   | [`eth_syncing`](/docs/chains/abstract/abstract-api-endpoints/eth-syncing)                   |
| [`eth_uninstallFilter`](/docs/chains/abstract/abstract-api-endpoints/eth-uninstall-filter)      | [`eth_unsubscribe`](/docs/chains/abstract/abstract-api-endpoints/eth-unsubscribe)           |
| [`net_listening`](/docs/chains/abstract/abstract-api-endpoints/net-listening)                   | [`net_peerCount`](/docs/chains/abstract/abstract-api-endpoints/net-peer-count)              |
| [`net_version`](/docs/chains/abstract/abstract-api-endpoints/net-version)                       | [`web3_clientVersion`](/docs/chains/abstract/abstract-api-endpoints/web-3-client-version)   |
| [`web3_sha3`](/docs/chains/abstract/abstract-api-endpoints/web-3-sha-3)                         | [`zks_estimateFee`](/docs/chains/abstract/abstract-api-endpoints/zks-estimate-fee)          |
| [`zks_estimateGasL1ToL2`](/docs/chains/abstract/abstract-api-endpoints/zks-estimate-gas-l-1-to-l-2) | [`zks_gasPerPubdata`](/docs/chains/abstract/abstract-api-endpoints/zks-gas-per-pubdata)     |
| [`zks_getAllAccountBalances`](/docs/chains/abstract/abstract-api-endpoints/zks-get-all-account-balances) | [`zks_getBaseTokenL1Address`](/docs/chains/abstract/abstract-api-endpoints/zks-get-base-token-l-1-address) |
| [`zks_getBlockDetails`](/docs/chains/abstract/abstract-api-endpoints/zks-get-block-details)     | [`zks_getBridgeContracts`](/docs/chains/abstract/abstract-api-endpoints/zks-get-bridge-contracts) |
| [`zks_getBridgehubContract`](/docs/chains/abstract/abstract-api-endpoints/zks-get-bridgehub-contract) | [`zks_getBytecodeByHash`](/docs/chains/abstract/abstract-api-endpoints/zks-get-bytecode-by-hash) |
| [`zks_getConfirmedTokens`](/docs/chains/abstract/abstract-api-endpoints/zks-get-confirmed-tokens) | [`zks_getFeeParams`](/docs/chains/abstract/abstract-api-endpoints/zks-get-fee-params)       |
| [`zks_getL1BatchBlockRange`](/docs/chains/abstract/abstract-api-endpoints/zks-get-l-1-batch-block-range) | [`zks_getL1BatchDetails`](/docs/chains/abstract/abstract-api-endpoints/zks-get-l-1-batch-details) |
| [`zks_getL1GasPrice`](/docs/chains/abstract/abstract-api-endpoints/zks-get-l-1-gas-price)       | [`zks_getL2ToL1LogProof`](/docs/chains/abstract/abstract-api-endpoints/zks-get-l-2-to-l-1-log-proof) |
| [`zks_getL2ToL1MsgProof`](/docs/chains/abstract/abstract-api-endpoints/zks-get-l-2-to-l-1-msg-proof) | [`zks_getMainContract`](/docs/chains/abstract/abstract-api-endpoints/zks-get-main-contract) |
| [`zks_getProof`](/docs/chains/abstract/abstract-api-endpoints/zks-get-proof)                    | [`zks_getProtocolVersion`](/docs/chains/abstract/abstract-api-endpoints/zks-get-protocol-version) |
| [`zks_getRawBlockTransactions`](/docs/chains/abstract/abstract-api-endpoints/zks-get-raw-block-transactions) | [`zks_getTestnetPaymaster`](/docs/chains/abstract/abstract-api-endpoints/zks-get-testnet-paymaster) |
| [`zks_getTransactionDetails`](/docs/chains/abstract/abstract-api-endpoints/zks-get-transaction-details) | [`zks_L1BatchNumber`](/docs/chains/abstract/abstract-api-endpoints/zks-l-1-batch-number)    |
| [`zks_L1ChainId`](/docs/chains/abstract/abstract-api-endpoints/zks-l-1-chain-id)                | [`zks_sendRawTransactionWithDetailedOutput`](/docs/chains/abstract/abstract-api-endpoints/zks-send-raw-transaction-with-detailed-output) |

## Related APIs

The following Alchemy APIs are also supported on Abstract:

* [Token API](/docs/reference/token-api-overview)
* [Transfers API](/docs/reference/transfers-api-quickstart)
* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)
* [NFT API](/docs/reference/nft-api-overview)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-testnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves account information including balance, code, and nonce for a given address at a specified block.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the account information. |

## Result

**Account information** (object): An object containing the account's balance, code, and nonce.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "balance": "0x1cfe56f3795885980000",
    "code": "0x",
    "nonce": "0x5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_newPendingTransactionFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new pending transactions arrive.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-new-pending-transaction-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newPendingTransactionFilter"
}'
```



------

# eth_protocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current protocol version used by the client.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-protocol-version

## Result

**Protocol Version** (string): The protocol version as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3f",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_protocolVersion"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_peerCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of peers currently connected to the client.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/net-peer-count

## Result

**peerCount** (string): The number of connected peers as a hex string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_peerCount"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# zks_estimateFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Estimates the fee for a given call request.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-estimate-fee

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Call object | object | Yes | The transaction call object containing details about the transaction. |

## Result

**Fee estimation** (object): The estimated gas and fee details for the given call request.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_estimateFee",
  "params": [
    {
      "from": "0x1111111111111111111111111111111111111111",
      "to": "0x2222222222222222222222222222222222222222",
      "data": "0xffffffff"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "gas_limit": "0x1ea9a9",
    "max_fee_per_gas": "0x17d7840",
    "max_priority_fee_per_gas": "0x0",
    "gas_per_pubdata_limit": "0x5340"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_estimateFee",
  "params": [
    {
      "from": "0x1111111111111111111111111111111111111111",
      "to": "0x2222222222222222222222222222222222222222",
      "data": "0xffffffff"
    }
  ]
}'
```



------

# zks_estimateGasL1ToL2

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Estimates the gas required for an L1 to L2 transaction.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-estimate-gas-l-1-to-l-2

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Call object | object | Yes | The transaction call object containing details about the transaction. |

## Result

**Gas estimate** (string): The estimated gas amount in hexadecimal format.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_estimateGasL1ToL2",
  "params": [
    {
      "from": "0x1111111111111111111111111111111111111111",
      "to": "0x2222222222222222222222222222222222222222",
      "data": "0xffffffff"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x25f64db",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_estimateGasL1ToL2",
  "params": [
    {
      "from": "0x1111111111111111111111111111111111111111",
      "to": "0x2222222222222222222222222222222222222222",
      "data": "0xffffffff"
    }
  ]
}'
```



------

# zks_gasPerPubdata

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current gas price per pubdata byte. This value is used to calculate the L1 data availability cost for transactions on zkSync Era. The pubdata refers to the data that needs to be posted to L1 for data availability.


Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-gas-per-pubdata

## Result

**Gas per pubdata** (string): The current gas per pubdata byte value in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x320",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_gasPerPubdata"
}'
```



------

# zks_getAllAccountBalances

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Gets all account balances for a given address.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-get-all-account-balances

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The account address. |

## Result

**Balances** (object): An object mapping token addresses to their balances.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_getAllAccountBalances",
  "params": [
    "0x98E9D288743839e96A8005a6B51C770Bbf7788C0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "0x0000000000000000000000000000000000000000": "0x7c07ef5b520cb7d"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getAllAccountBalances",
  "params": [
    "0x98E9D288743839e96A8005a6B51C770Bbf7788C0"
  ]
}'
```



------

# zks_getBaseTokenL1Address

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the L1 base token address.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-get-base-token-l-1-address

## Result

**Base token L1 address** (string): Layer 1 Ethereum address of base token.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000001",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getBaseTokenL1Address"
}'
```



------

# zks_getBlockDetails

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves details for a given block.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-get-block-details

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number | string | Yes | The number of the block. |

## Result

**Block details** (object): Detailed information about the specified block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_getBlockDetails",
  "params": [
    140599
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": 140599,
    "l1BatchNumber": 1617,
    "timestamp": 1679815038,
    "l1TxCount": 0,
    "l2TxCount": 20,
    "rootHash": "0xf1adac176fc939313eea4b72055db0622a10bbd9b7a83097286e84e471d2e7df",
    "status": "verified",
    "commitTxHash": "0xd045e3698f018cb233c3817eb53a41a4c5b28784ffe659da246aa33bda34350c",
    "committedAt": "2023-03-26T07:21:21.046817Z",
    "proveTxHash": "0x1591e9b16ff6eb029cc865614094b2e6dd872c8be40b15cc56164941ed723a1a",
    "provenAt": "2023-03-26T19:48:35.200565Z",
    "executeTxHash": "0xbb66aa75f437bb4255cf751badfc6b142e8d4d3a4e531c7b2e737a22870ff19e",
    "executedAt": "2023-03-27T07:44:52.187764Z",
    "l1GasPrice": 20690385511,
    "l2FairGasPrice": 250000000,
    "baseSystemContractsHashes": {
      "bootloader": "0x010007793a328ef16cc7086708f7f3292ff9b5eed9e7e539c184228f461bf4ef",
      "default_aa": "0x0100067d861e2f5717a12c3e869cfb657793b86bbb0caa05cc1421f16c5217bc"
    },
    "operatorAddress": "0xfeee860e7aae671124e9a4e61139f3a5085dfeee",
    "protocolVersion": "Version5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getBlockDetails",
  "params": [
    "string"
  ]
}'
```



------

# zks_getBridgeContracts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the addresses of canonical bridge contracts for zkSync Era.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-get-bridge-contracts

## Result

**Bridge contracts** (object): Object containing the addresses of bridge contracts.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "l1Erc20DefaultBridge": "0x57891966931eb4bb6fb81430e6ce0a03aabde063",
    "l2Erc20DefaultBridge": "0x11f943b2c77b743ab90f4a0ae7d5a4e7fca3e102",
    "l1WethBridge": "0x0000000000000000000000000000000000000000",
    "l2WethBridge": "0x0000000000000000000000000000000000000000"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getBridgeContracts"
}'
```



------

# zks_getBridgehubContract

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the address of the zkSync bridgehub contract.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-get-bridgehub-contract

## Result

**Bridgehub contract address** (string): Layer 1 Ethereum address of bridgehub contract.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x303a465b659cbb0ab36ee643ea362c509eeb5213",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getBridgehubContract"
}'
```



------

# zks_getBytecodeByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the bytecode of a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-get-bytecode-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction. |

## Result

**Bytecode** (integer[]): Array of the transaction's bytecode.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_getBytecodeByHash",
  "params": [
    "0x0100067d861e2f5717a12c3e869cfb657793b86bbb0caa05cc1421f16c5217bc"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    0,
    4,
    0,
    255,
    18,
    34
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getBytecodeByHash",
  "params": [
    "0x0100067d861e2f5717a12c3e869cfb657793b86bbb0caa05cc1421f16c5217bc"
  ]
}'
```



------

# zks_getConfirmedTokens

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the confirmed tokens on zkSync.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-get-confirmed-tokens

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| From token ID | integer | Yes | Token ID from which to start listing. |
| Limit | integer | Yes | Maximum number of tokens to list. |

## Result

**Confirmed tokens** (object[]): List of confirmed tokens on zkSync.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_getConfirmedTokens",
  "params": [
    1,
    3
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "l1Address": "0xb6ed7644c69416d67b522e20bc294a9a9b405b31",
      "l2Address": "0xfea352c0d005a1e4ac7e092ef14fca18b8e6c8fd",
      "name": "0xBitcoin Token",
      "symbol": "0xBTC",
      "decimals": 8
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getConfirmedTokens",
  "params": [
    1,
    3
  ]
}'
```



------

# zks_getFeeParams

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the current fee parameters.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-get-fee-params

## Result

**Fee parameters** (object): Current fee parameters.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "V2": {
      "config": {
        "minimal_l2_gas_price": 25000000,
        "compute_overhead_part": 0,
        "pubdata_overhead_part": 1,
        "batch_overhead_l1_gas": 800000,
        "max_gas_per_batch": 200000000,
        "max_pubdata_per_batch": 240000
      },
      "l1_gas_price": 46226388803,
      "l1_pubdata_price": 100780475095
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getFeeParams"
}'
```



------

# zks_getL1BatchBlockRange

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Returns the range of blocks contained within a batch given by the batch number.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-get-l-1-batch-block-range

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| L1BatchNumber | string | Yes | The layer 1 batch number. |

## Result

**Block range** (string[]): Array containing the beginning and end block numbers in hexadecimal.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_getL1BatchBlockRange",
  "params": [
    12345
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0x116fec",
    "0x117015"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getL1BatchBlockRange",
  "params": [
    "string"
  ]
}'
```



------

# zks_getL1BatchDetails

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves details for a given L1 batch.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-get-l-1-batch-details

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| L1 batch number | string | Yes | L1 batch number. |

## Result

**L1 Batch Details** (object): Detailed information about the specified L1 batch.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_getL1BatchDetails",
  "params": [
    468355
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": 468355,
    "timestamp": 1711649164,
    "l1TxCount": 1,
    "l2TxCount": 2363,
    "rootHash": "0x7b31ef880f09238f13b71a0f6bfea340b9c76d01bba0712af6aa0a4f224be167",
    "status": "verified",
    "commitTxHash": "0x5b2598bf1260d498c1c6a05326f7416ef2a602b8a1ac0f75b583cd6e08ae83cb",
    "committedAt": "2024-03-28T18:24:49.713730Z",
    "proveTxHash": "0xc02563331d0a83d634bc4190750e920fc26b57096ec72dd100af2ab037b43912",
    "provenAt": "2024-03-29T03:09:19.634524Z",
    "executeTxHash": "0xbe1ba1fdd17c2421cf2dabe2908fafa26ff4fa2190a7724d16295dd9df72b144",
    "executedAt": "2024-03-29T18:18:04.204270Z",
    "l1GasPrice": 47875552051,
    "l2FairGasPrice": 25000000,
    "baseSystemContractsHashes": {
      "bootloader": "0x010007ede999d096c84553fb514d3d6ca76fbf39789dda76bfeda9f3ae06236e",
      "default_aa": "0x0100055b041eb28aff6e3a6e0f37c31fd053fc9ef142683b05e5f0aee6934066"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getL1BatchDetails",
  "params": [
    "string"
  ]
}'
```



------

# zks_getL1GasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the current L1 gas price.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-get-l-1-gas-price

## Result

**L1 gas price** (string): Current L1 gas price.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x11cccd9f58",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getL1GasPrice"
}'
```



------

# zks_getL2ToL1LogProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the log proof for an L2 to L1 transaction.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-get-l-2-to-l-1-log-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The transaction hash. |
| Log index | integer | No | Index of the log. |

## Result

**Log proof** (object): The log proof for the specified transaction and log index.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_getL2ToL1LogProof",
  "params": [
    "0x2a1c6c74b184965c0cb015aae9ea134fd96215d2e4f4979cfec12563295f610e"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "proof": [
      "0x8c48910df2ca7de509daf50b3182fcdf2dd6c422c6704054fd857d6c9516d6fc",
      "0xc5028885760b8b596c4fa11497c783752cb3a3fb3b8e6b52d7e54b9f1c63521e",
      "0xeb1f451eb8163723ee19940cf3a8f2a2afdf51100ce8ba25839bd94a057cda16",
      "0x7aabfd367dea2b5306b8071c246b99566dae551a1dbd40da791e66c4f696b236",
      "0xe4733f281f18ba3ea8775dd62d2fcd84011c8c938f16ea5790fd29a03bf8db89",
      "0x1798a1fd9c8fbb818c98cff190daa7cc10b6e5ac9716b4a2649f7c2ebcef2272",
      "0x66d7c5983afe44cf15ea8cf565b34c6c31ff0cb4dd744524f7842b942d08770d",
      "0xb04e5ee349086985f74b73971ce9dfe76bbed95c84906c5dffd96504e1e5396c",
      "0xac506ecb5465659b3a927143f6d724f91d8d9c4bdb2463aee111d9aa869874db"
    ],
    "id": 0,
    "root": "0x920c63cb0066a08da45f0a9bf934517141bd72d8e5a51421a94b517bf49a0d39"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getL2ToL1LogProof",
  "params": [
    "0x2a1c6c74b184965c0cb015aae9ea134fd96215d2e4f4979cfec12563295f610e",
    1
  ]
}'
```



------

# zks_getL2ToL1MsgProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the proof for an L2 to L1 message.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-get-l-2-to-l-1-msg-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| L2 block number | string | Yes | The L2 block number. |
| Sender address | string | Yes | The sender's address. |
| Message hash | string | Yes | The message hash. |
| Log position | integer | No | The log position in L2. |

## Result

**Message Proof** (object): The proof for the L2 to L1 message.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_getL2ToL1MsgProof",
  "params": [
    100000,
    "0x1111111111111111111111111111111111111111",
    "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    0
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "proof": [
      "0x8c48910df2ca7de509daf50b3182fcdf2dd6c422c6704054fd857d6c9516d6fc"
    ],
    "root": "0x920c63cb0066a08da45f0a9bf934517141bd72d8e5a51421a94b517bf49a0d39",
    "id": 0
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getL2ToL1MsgProof",
  "params": [
    "string",
    "0x1111111111111111111111111111111111111111",
    "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    1
  ]
}'
```



------

# zks_getMainContract

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the address of the zkSync main contract.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-get-main-contract

## Result

**Main contract address** (string): The address of the zkSync main contract.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x000000000000000000000000000000000000800a",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getMainContract"
}'
```



------

# zks_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

This method generates Merkle proofs for one or more storage values associated with a specific account, accompanied by a proof of their authenticity.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | Account address to fetch storage values and proofs for. |
| Storage keys | string[] | Yes | The storage keys in the account. |
| L1 batch number | string | Yes | Number of the L1 batch specifying the point in time at which the requested values are returned. |

## Result

**Proof** (object): The account details and proofs for storage keys.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_getProof",
  "params": [
    "0x0000000000000000000000000000000000008003",
    [
      "0x8b65c0cf1012ea9f393197eb24619fd814379b298b238285649e14f936a5eb12"
    ],
    354895
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "address": "0x0000000000000000000000000000000000008003",
    "storageProof": [
      {
        "key": "0x8b65c0cf1012ea9f393197eb24619fd814379b298b238285649e14f936a5eb12",
        "proof": [
          "0xe3e8e49a998b3abf8926f62a5a832d829aadc1b7e059f1ea59ffbab8e11edfb7"
        ],
        "value": "0x0000000000000000000000000000000000000000000000000000000000000060",
        "index": 27900957
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getProof",
  "params": [
    "0x0000000000000000000000000000000000008003",
    [
      "0x8b65c0cf1012ea9f393197eb24619fd814379b298b238285649e14f936a5eb12"
    ],
    "string"
  ]
}'
```



------

# zks_getProtocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the current protocol version.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-get-protocol-version

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Version ID | integer | No | Specific version ID to query. |

## Result

**Protocol version** (object): Current protocol version information.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "version_id": 22,
    "timestamp": 1710264138,
    "verification_keys_hashes": {
      "params": {
        "recursion_node_level_vk_hash": "0x5a3ef282b21e12fe1f4438e5bb158fc5060b160559c5158c6389d62d9fe3d080",
        "recursion_leaf_level_vk_hash": "0x400a4b532c6f072c00d1806ef299300d4c104f4ac55bd8698ade78894fcadc0a",
        "recursion_circuits_set_vks_hash": "0x0000000000000000000000000000000000000000000000000000000000000000"
      },
      "recursion_scheduler_level_vk_hash": "0x063c6fb5c70404c2867f413a8e35563ad3d040b1ad8c11786231bfdba7b472c7"
    },
    "base_system_contracts": {
      "bootloader": "0x010007ede999d096c84553fb514d3d6ca76fbf39789dda76bfeda9f3ae06236e",
      "default_aa": "0x0100055b041eb28aff6e3a6e0f37c31fd053fc9ef142683b05e5f0aee6934066"
    },
    "l2_system_upgrade_tx_hash": null
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getProtocolVersion",
  "params": [
    1
  ]
}'
```



------

# zks_getRawBlockTransactions

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Lists transactions in a block without processing them.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-get-raw-block-transactions

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number | string | Yes | Number of the block. |

## Result

**Raw transactions** (object[]): Array of raw transactions within the specified block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_getRawBlockTransactions",
  "params": [
    30098049
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "common_data": {
        "L2": {
          "nonce": 117,
          "fee": {
            "gas_limit": "0xbadbc",
            "max_fee_per_gas": "0x202fbf0",
            "max_priority_fee_per_gas": "0x0",
            "gas_per_pubdata_limit": "0xc350"
          },
          "initiatorAddress": "0xe7734c4a8201af41db64da90eddb4c19bbf64710",
          "signature": [
            203,
            118,
            119,
            63,
            1,
            54,
            91,
            252,
            188,
            23,
            120,
            51,
            4,
            28
          ],
          "transactionType": "EIP1559Transaction",
          "input": {
            "hash": "0x970c9480960818b05832f7e5b76a0c46956003c34942e005672d7ddc537aaa59",
            "data": [
              2,
              249,
              1,
              111,
              1305,
              187,
              2,
              170,
              21,
              166,
              251,
              255
            ]
          },
          "paymasterParams": {
            "paymaster": "0x0000000000000000000000000000000000000000",
            "paymasterInput": []
          }
        }
      },
      "execute": {
        "contractAddress": "0x5155704bb41fde152ad3e1ae402e8e8b9ba335d3",
        "calldata": "0xfa0x5155704bb41fde152ad3e1ae402e8e8b9ba335d3",
        "value": "0x0",
        "factoryDeps": null
      },
      "received_timestamp_ms": 1711649348872,
      "raw_bytes": "0x02f9016f8201447580840202fbf"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getRawBlockTransactions",
  "params": [
    "string"
  ]
}'
```



------

# zks_getTestnetPaymaster

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the testnet paymaster address, specifically for interactions within the testnet environment.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-get-testnet-paymaster

## Result

**Paymaster address** (string): The address of the testnet paymaster.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3cb2b87d10ac01736a65688f3e0fb1b070b3eea3",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getTestnetPaymaster"
}'
```



------

# zks_getTransactionDetails

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves details for a given transaction.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-get-transaction-details

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction. |

## Result

**Transaction details** (object): Detailed information about the specified transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_getTransactionDetails",
  "params": [
    "0x22de7debaa98758afdaee89f447ff43bab5da3de6acca7528b281cc2f1be2ee9"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "isL1Originated": true,
    "status": "verified",
    "fee": "0x0",
    "gasPerPubdata": "0x320",
    "initiatorAddress": "0x87869cb87c4fa78ca278df358e890ff73b42a39e",
    "receivedAt": "2023-03-03T23:52:24.169Z",
    "ethCommitTxHash": "0x3da5b6eda357189c9243c41c5a33b1b2ed0169be172705d74681a25217702772",
    "ethProveTxHash": "0x2f482d3ea163f5be0c2aca7819d0beb80415be1a310e845a2d726fbc4ac54c80",
    "ethExecuteTxHash": "0xdaff5fd7ff91333b161de54534b4bb6a78e5325329959a0863bf0aae2b0fdcc6"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getTransactionDetails",
  "params": [
    "0x22de7debaa98758afdaee89f447ff43bab5da3de6acca7528b281cc2f1be2ee9"
  ]
}'
```



------

# zks_L1BatchNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the current L1 batch number.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-l-1-batch-number

## Result

**L1 Batch Number** (string): Hexadecimal representation of the current L1 batch number.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x72af2",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_L1BatchNumber"
}'
```



------

# zks_L1ChainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the L1 chain ID.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-l-1-chain-id

## Result

**L1 Chain ID** (string): The hexadecimal representation of the L1 chain ID.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_L1ChainId"
}'
```



------

# zks_sendRawTransactionWithDetailedOutput

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://abstract-mainnet.g.alchemy.com/v2/{apiKey}

Executes a transaction and returns its hash, storage logs, and events that would have been generated if the transaction had already been included in the block.

Reference: https://www.alchemy.com/docs/chains/abstract/abstract-api-endpoints/zks-send-raw-transaction-with-detailed-output

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| data | string | Yes | The signed transaction. Typically, signed with a library such as ethers.js. |

## Result

**Transaction details** (object): Details about the transaction execution

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "transactionHash": "0xd586a9381ac33a70d1c34704664209242ee90316878fc1695aa8e4cf553c8595",
    "storageLogs": [
      {
        "address": "0x000000000000000000000000000000000000800b",
        "key": "0x7",
        "writtenValue": "0x40000000000000000000000006641f961"
      },
      {
        "address": "0x000000000000000000000000000000000000800b",
        "key": "0x6",
        "writtenValue": "0x5f5e100"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://abstract-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_sendRawTransactionWithDetailedOutput",
  "params": [
    "string"
  ]
}'
```



------

# Abstract API FAQ

> Frequently asked questions about the Abstract API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Abstract?

Abstract is a blockchain platform designed to lead the next generation of consumer crypto. It focuses on providing a developer-friendly environment for building smart contracts and applications with native account abstraction.

## What is the Abstract API?

The Abstract API allows interaction with the Abstract network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.

## How can I get started using Abstract?

Explained in [Abstract API Quickstart](/docs/reference/abstract-api-quickstart).

## Is Abstract EVM compatible?

Abstract is EVM compatible, meaning it looks and feels like Ethereum, but with lower gas fees and higher transaction throughput. Most existing smart contracts built for Ethereum work out of the box on Abstract (with some differences), meaning you can port applications to Abstract with minimal changes.

## What unique features does Abstract offer?

Abstract offers native account abstraction, which is a key feature of its architecture. It also provides the Abstract Global Wallet, a smart contract wallet powering the Abstract ecosystem.

## How does Abstract's architecture work?

Abstract's architecture includes system contracts and native account abstraction. You can learn more about the components that make up Abstract through their documentation.

## How does Abstract ensure scalability and security?

Built on top of the ZK Stack, Abstract is a zero-knowledge (ZK) rollup built to be a more scalable alternative to Ethereum; it achieves this scalability by executing transactions offchain, batching them together, and verifying batches of transactions on Ethereum using (ZK) proofs.

## My question isn't here, where can I get help?

Don't worry, we got you. If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# ADI API Quickstart

> How to get started building on ADI using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

ADI Network is an EVM-compatible Layer 2 that leverages cryptographic Zero-Knowledge validity proofs (ZKPs) to ensure both security and efficiency in transaction processing. ADI is enabling seamless integration between traditional finance, crypto ecosystems, and regulated markets.

The ADI API allows interaction with the ADI network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an ADI client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http, defineChain } from "viem";

const adiTestnet = defineChain({
  id: 12227332,
  name: "ADI Testnet",
  nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 },
  rpcUrls: {
    default: { http: ["https://adi-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
  },
});

const client = createPublicClient({
  chain: adiTestnet,
  transport: http("https://adi-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (ETH):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# ADI APIs

For the full list of ADI APIs, see the [ADI API Endpoints](/docs/chains#adi-apis).

------

# ADI API Overview

> Overview of available ADI API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## ADI APIs

📙 Get started with our [ADI API Quickstart Guide](/docs/reference/adi-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/adi/adi-api-endpoints/eth-accounts)                               | [`eth_blockNumber`](/docs/chains/adi/adi-api-endpoints/eth-block-number)                    |
| [`eth_call`](/docs/chains/adi/adi-api-endpoints/eth-call)                                       | [`eth_chainId`](/docs/chains/adi/adi-api-endpoints/eth-chain-id)                            |
| [`eth_estimateGas`](/docs/chains/adi/adi-api-endpoints/eth-estimate-gas)                        | [`eth_feeHistory`](/docs/chains/adi/adi-api-endpoints/eth-fee-history)                      |
| [`eth_gasPrice`](/docs/chains/adi/adi-api-endpoints/eth-gas-price)                              | [`eth_getAccount`](/docs/chains/adi/adi-api-endpoints/eth-get-account)                      |
| [`eth_getBalance`](/docs/chains/adi/adi-api-endpoints/eth-get-balance)                          | [`eth_getBlockByHash`](/docs/chains/adi/adi-api-endpoints/eth-get-block-by-hash)            |
| [`eth_getBlockByNumber`](/docs/chains/adi/adi-api-endpoints/eth-get-block-by-number)            | [`eth_getBlockTransactionCountByHash`](/docs/chains/adi/adi-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/adi/adi-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/adi/adi-api-endpoints/eth-get-code)                            |
| [`eth_getFilterChanges`](/docs/chains/adi/adi-api-endpoints/eth-get-filter-changes)             | [`eth_getFilterLogs`](/docs/chains/adi/adi-api-endpoints/eth-get-filter-logs)               |
| [`eth_getLogs`](/docs/chains/adi/adi-api-endpoints/eth-get-logs)                                | [`eth_getRawTransactionByHash`](/docs/chains/adi/adi-api-endpoints/eth-get-raw-transaction-by-hash) |
| [`eth_getStorageAt`](/docs/chains/adi/adi-api-endpoints/eth-get-storage-at)                     | [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/adi/adi-api-endpoints/eth-get-transaction-by-block-hash-and-index) |
| [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/adi/adi-api-endpoints/eth-get-transaction-by-block-number-and-index) | [`eth_getTransactionByHash`](/docs/chains/adi/adi-api-endpoints/eth-get-transaction-by-hash) |
| [`eth_getTransactionCount`](/docs/chains/adi/adi-api-endpoints/eth-get-transaction-count)       | [`eth_getTransactionReceipt`](/docs/chains/adi/adi-api-endpoints/eth-get-transaction-receipt) |
| [`eth_getUncleCountByBlockHash`](/docs/chains/adi/adi-api-endpoints/eth-get-uncle-count-by-block-hash) | [`eth_getUncleCountByBlockNumber`](/docs/chains/adi/adi-api-endpoints/eth-get-uncle-count-by-block-number) |
| [`eth_maxPriorityFeePerGas`](/docs/chains/adi/adi-api-endpoints/eth-max-priority-fee-per-gas)   | [`eth_newBlockFilter`](/docs/chains/adi/adi-api-endpoints/eth-new-block-filter)             |
| [`eth_newFilter`](/docs/chains/adi/adi-api-endpoints/eth-new-filter)                            | [`eth_newPendingTransactionFilter`](/docs/chains/adi/adi-api-endpoints/eth-new-pending-transaction-filter) |
| [`eth_sendRawTransaction`](/docs/chains/adi/adi-api-endpoints/eth-send-raw-transaction)         | [`eth_submitWork`](/docs/chains/adi/adi-api-endpoints/eth-submit-work)                      |
| [`eth_subscribe`](/docs/chains/adi/adi-api-endpoints/eth-subscribe)                             | [`eth_syncing`](/docs/chains/adi/adi-api-endpoints/eth-syncing)                             |
| [`eth_uninstallFilter`](/docs/chains/adi/adi-api-endpoints/eth-uninstall-filter)                | [`eth_unsubscribe`](/docs/chains/adi/adi-api-endpoints/eth-unsubscribe)                     |
| [`net_listening`](/docs/chains/adi/adi-api-endpoints/net-listening)                             | [`net_version`](/docs/chains/adi/adi-api-endpoints/net-version)                             |
| [`web3_clientVersion`](/docs/chains/adi/adi-api-endpoints/web-3-client-version)                 | [`web3_sha3`](/docs/chains/adi/adi-api-endpoints/web-3-sha-3)                               |

## Related APIs

The following Alchemy APIs are also supported on ADI:

* [Debug API](/docs/reference/debug-api-quickstart)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_newPendingTransactionFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new pending transactions arrive.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-new-pending-transaction-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newPendingTransactionFilter"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://adi-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/adi/adi-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://adi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# ADI API FAQ

> Frequently asked questions about the ADI API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is ADI?
ADI Network is an EVM-compatible Layer 2 that leverages cryptographic Zero-Knowledge validity proofs (ZKPs) to ensure both security and efficiency in transaction processing. ADI is enabling seamless integration between traditional finance, crypto ecosystems, and regulated markets.

## How do I get started with ADI?
Check out our [ADI API Quickstart guide](/docs/reference/adi-api-quickstart) to get started building on ADI.

## What is the ADI API?
The ADI API allows you to interface with the ADI mainnet. With this API, you can execute transactions, query onchain data, and interact with the ADI network, relying on a JSON-RPC standard.

## Is ADI EVM compatible?
Yes, ADI is EVM compatible.

## What API does ADI use?
ADI uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the ADI network, allowing you to read block/transaction data, query chain information, execute smart contracts, and store data onchain.

## What methods are supported on ADI?
ADI supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [ADI API Endpoints](/docs/chains#adi-apis) for a complete list.

## What is an ADI API key?
When accessing the ADI network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup).

## Which libraries support ADI?
Common Ethereum libraries like [ethers.js](https://docs.ethers.org/v5/) should be compatible with ADI, given its EVM nature.

## What is the native currency of ADI?
The native currency of ADI is ADI.

## My question isn’t here, where can I get help?
If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Anime API Quickstart

> How to get started building on Anime using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Animechain is a fast and secure blockchain built on Arbitrum, designed to support anime content and digital assets.

The Anime API allows interaction with the Anime network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an Anime client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http, defineChain } from "viem";

const anime = defineChain({
  id: 69000,
  name: "Anime",
  nativeCurrency: { name: "Anime", symbol: "ANIME", decimals: 18 },
  rpcUrls: {
    default: { http: ["https://anime-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
  },
});

const client = createPublicClient({
  chain: anime,
  transport: http("https://anime-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (ANIME):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Anime APIs

For the full list of Anime APIs, see the [Anime API Endpoints](/docs/chains#anime-apis).

------

# Anime API Overview

> Overview of available Anime API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Anime APIs

📙 Get started with our [Anime API Quickstart Guide](/docs/reference/anime-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/anime/anime-api-endpoints/eth-accounts)                           | [`eth_blobBaseFee`](/docs/chains/anime/anime-api-endpoints/eth-blob-base-fee)               |
| [`eth_blockNumber`](/docs/chains/anime/anime-api-endpoints/eth-block-number)                    | [`eth_call`](/docs/chains/anime/anime-api-endpoints/eth-call)                               |
| [`eth_chainId`](/docs/chains/anime/anime-api-endpoints/eth-chain-id)                            | [`eth_estimateGas`](/docs/chains/anime/anime-api-endpoints/eth-estimate-gas)                |
| [`eth_feeHistory`](/docs/chains/anime/anime-api-endpoints/eth-fee-history)                      | [`eth_gasPrice`](/docs/chains/anime/anime-api-endpoints/eth-gas-price)                      |
| [`eth_getAccount`](/docs/chains/anime/anime-api-endpoints/eth-get-account)                      | [`eth_getBalance`](/docs/chains/anime/anime-api-endpoints/eth-get-balance)                  |
| [`eth_getBlockByHash`](/docs/chains/anime/anime-api-endpoints/eth-get-block-by-hash)            | [`eth_getBlockByNumber`](/docs/chains/anime/anime-api-endpoints/eth-get-block-by-number)    |
| [`eth_getBlockReceipts`](/docs/chains/anime/anime-api-endpoints/eth-get-block-receipts)         | [`eth_getBlockTransactionCountByHash`](/docs/chains/anime/anime-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/anime/anime-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/anime/anime-api-endpoints/eth-get-code)                        |
| [`eth_getFilterChanges`](/docs/chains/anime/anime-api-endpoints/eth-get-filter-changes)         | [`eth_getFilterLogs`](/docs/chains/anime/anime-api-endpoints/eth-get-filter-logs)           |
| [`eth_getLogs`](/docs/chains/anime/anime-api-endpoints/eth-get-logs)                            | [`eth_getProof`](/docs/chains/anime/anime-api-endpoints/eth-get-proof)                      |
| [`eth_getRawTransactionByHash`](/docs/chains/anime/anime-api-endpoints/eth-get-raw-transaction-by-hash) | [`eth_getStorageAt`](/docs/chains/anime/anime-api-endpoints/eth-get-storage-at)             |
| [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/anime/anime-api-endpoints/eth-get-transaction-by-block-hash-and-index) | [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/anime/anime-api-endpoints/eth-get-transaction-by-block-number-and-index) |
| [`eth_getTransactionByHash`](/docs/chains/anime/anime-api-endpoints/eth-get-transaction-by-hash) | [`eth_getTransactionCount`](/docs/chains/anime/anime-api-endpoints/eth-get-transaction-count) |
| [`eth_getTransactionReceipt`](/docs/chains/anime/anime-api-endpoints/eth-get-transaction-receipt) | [`eth_getUncleCountByBlockHash`](/docs/chains/anime/anime-api-endpoints/eth-get-uncle-count-by-block-hash) |
| [`eth_getUncleCountByBlockNumber`](/docs/chains/anime/anime-api-endpoints/eth-get-uncle-count-by-block-number) | [`eth_maxPriorityFeePerGas`](/docs/chains/anime/anime-api-endpoints/eth-max-priority-fee-per-gas) |
| [`eth_newBlockFilter`](/docs/chains/anime/anime-api-endpoints/eth-new-block-filter)             | [`eth_newFilter`](/docs/chains/anime/anime-api-endpoints/eth-new-filter)                    |
| [`eth_sendRawTransaction`](/docs/chains/anime/anime-api-endpoints/eth-send-raw-transaction)     | [`eth_submitWork`](/docs/chains/anime/anime-api-endpoints/eth-submit-work)                  |
| [`eth_subscribe`](/docs/chains/anime/anime-api-endpoints/eth-subscribe)                         | [`eth_syncing`](/docs/chains/anime/anime-api-endpoints/eth-syncing)                         |
| [`eth_uninstallFilter`](/docs/chains/anime/anime-api-endpoints/eth-uninstall-filter)            | [`eth_unsubscribe`](/docs/chains/anime/anime-api-endpoints/eth-unsubscribe)                 |
| [`net_listening`](/docs/chains/anime/anime-api-endpoints/net-listening)                         | [`net_version`](/docs/chains/anime/anime-api-endpoints/net-version)                         |
| [`web3_clientVersion`](/docs/chains/anime/anime-api-endpoints/web-3-client-version)             | [`web3_sha3`](/docs/chains/anime/anime-api-endpoints/web-3-sha-3)                           |

## Related APIs

The following Alchemy APIs are also supported on Anime:

* [Bundler API](/docs/wallets/transactions/low-level-infra/bundler/overview)
* [Gas Manager API](/docs/wallets/api-reference/gas-manager-admin-api/gas-abstraction-api-endpoints/alchemy-request-gas-and-paymaster-and-data)
* [Token API](/docs/reference/token-api-overview)
* [Transfers API](/docs/reference/transfers-api-quickstart)
* [Debug API](/docs/reference/debug-api-quickstart)
* [NFT API](/docs/reference/nft-api-overview)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blobBaseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns the base fee per blob gas in wei for the current block.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-blob-base-fee

## Result

**Blob Base Fee** (string): The base fee per blob gas, in wei, as a hexadecimal encoded unsigned integer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blobBaseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://anime-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/anime/anime-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://anime-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Anime API FAQ

> Frequently asked questions about the Anime API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Anime?
Anime is a fast and secure blockchain built on Arbitrum, designed to support anime content and digital assets.

## What is the Anime API?

The Anime API allows you to interface with the Anime mainnet and testnet nodes. With this API, you can execute transactions, query onchain data, and interact with the Anime network, relying on a JSON-RPC standard.

## How can I get started using the Anime API?

Explained in [Anime API Quickstart](/docs/reference/anime-api-quickstart)

## Is Anime EVM compatible?

Yes. Anime supports any Ethereum Virtual Machine (EVM) codebase. This allows you to deploy and migrate assets from Ethereum L1 and other interoperable chains to Anime.

## What API does Anime use?

Anime uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the Anime network, allowing you to read block/transaction data, query chain information, execute smart contracts, and store data onchain.

## What is a Anime API key?

When accessing the Anime network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network.

For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup).

## Which libraries support Anime?

Common Ethereum libraries like [ethers.js](https://docs.ethers.org/v5/) and [web3.js](https://web3js.readthedocs.io/en/v1.8.2/) should be compatible with Anime, given its EVM nature.

## What programming languages work with Anime?

Languages that work with Ethereum, such as JavaScript, Solidity, TypeScript, and Shell, should also be compatible with Anime. Solidity remains the primary choice for smart contract development, while JavaScript is ideal for offchain interactions.

## What does Anime use for gas?

The native cryptocurrency for Animechain is the ANIME token, which is used for transactions, governance, and rewards on the chain.

## What testnet should I use for Anime?

Use the **Anime Sepolia** testnet for Anime. This testnet provides an environment to deploy smart contracts, execute transactions, and test applications.

## What methods does Alchemy support for the Anime API?

You can find the list of all the methods Alchemy supports for the Anime API on the [Anime API Endpoints](/docs/chains#anime-apis) page.

## My question isn't here, where can I get help?

If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# ApeChain API Quickstart

> How to get started building on ApeChain using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

ApeChain is a dedicated infrastructure layer designed to power the ApeCoin ecosystem. It's an Arbitrum chain that utilizes `$APE` as its native gas token, significantly enhancing `$APE`'s utility and fostering a robust, dynamic economy. ApeChain focuses on ecosystem discovery, unique web3 rails, and top-of-funnel exposure to provide you with the best possible blockchain experience.

The ApeChain API allows interaction with the ApeChain network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an ApeChain client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { apeChain } from "viem/chains";

const client = createPublicClient({
  chain: apeChain,
  transport: http("https://apechain-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (APE):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# ApeChain APIs

For the full list of ApeChain APIs, see the [ApeChain API Endpoints](/docs/chains#apechain-apis).

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blobBaseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-curtis.g.alchemy.com/v2/{apiKey}

Returns the base fee per blob gas in wei for the current block.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-blob-base-fee

## Result

**Blob Base Fee** (string): The base fee per blob gas, in wei, as a hexadecimal encoded unsigned integer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-curtis.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blobBaseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-curtis.g.alchemy.com/v2/{apiKey}

Retrieves account information including balance, code, and nonce for a given address at a specified block.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the account information. |

## Result

**Account information** (object): An object containing the account's balance, code, and nonce.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "balance": "0x1cfe56f3795885980000",
    "code": "0x",
    "nonce": "0x5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-curtis.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_sendRawTransactionSync

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Sends a raw transaction to the network and waits for the transaction to be mined.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-send-raw-transaction-sync

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction data | string | Yes | The signed transaction data, RLP-encoded and hex-encoded. |
| Timeout | integer | No | Maximum wait time in milliseconds. Must be a positive integer between 1 and the node-configured maximum timeout. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "transactionHash": "0x1234abcd...",
    "blockHash": "0xabcd1234...",
    "blockNumber": "0x10d4f",
    "cumulativeGasUsed": "0x5208",
    "gasUsed": "0x5208",
    "contractAddress": null,
    "logs": [],
    "status": "0x1"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://apechain-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/apechain/ape-chain-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://apechain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# ApeChain API FAQ

> Frequently asked questions about the ApeChain API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is ApeChain?

ApeChain is a dedicated infrastructure layer designed to power the ApeCoin ecosystem. It's an Arbitrum chain that utilizes `$APE` as its native gas token, significantly enhancing `$APE`'s utility and fostering a robust, dynamic economy. ApeChain focuses on ecosystem discovery, unique web3 rails, and top-of-funnel exposure to provide developers and users with the best possible blockchain experience.

## What is the ApeChain API?

The ApeChain API allows you to interact with the ApeChain network through a set of JSON-RPC methods. It supports various operations such as smart contract deployment, transaction processing, and data retrieval, enabling you to integrate ApeChain's functionality into your applications.

## How can I get started using the ApeChain API?

Explained in [ApeChain Quickstart Guide](/docs/reference/apechain-api-quickstart)

## Is ApeChain EVM compatible?

Yes, ApeChain is EVM-compatible. As an Arbitrum chain, it allows you to deploy Ethereum-based smart contracts and applications on the ApeChain network, leveraging existing Ethereum development tools and practices.

## What API does ApeChain use?

ApeChain utilizes the JSON-RPC API standard, which is widely used in the Ethereum ecosystem. This provides a familiar and efficient interface for blockchain interactions.

## What is an ApeChain API key?

When accessing the ApeChain network via a service provider, you need an API key to send transactions and retrieve data. An API key ensures secure and authenticated access to the network.

## Which libraries support ApeChain?

As an EVM-compatible blockchain, ApeChain supports popular Ethereum libraries such as Web3.js and Ethers.js. This allows you to leverage existing tools and knowledge when building on ApeChain.

## What programming languages work with ApeChain?

ApeChain supports Solidity for smart contract development due to its EVM compatibility. For offchain interactions, you can use JavaScript, TypeScript, or other common web development languages.

## What does ApeChain use for gas?

ApeChain uses `$APE` as its native gas token. You need `$APE` to pay for transaction fees on the network, which significantly enhances the utility of `$APE` within the ecosystem.

## How can I participate in the ApeChain ecosystem?

You can participate in the ApeChain ecosystem by:

1. Developing dApps on ApeChain
2. Using `$APE` for transactions and gas fees
3. Engaging with the ApeCoin community
4. Exploring and using dApps built on ApeChain

## Is ApeChain secure?

ApeChain inherits security features from Arbitrum's technology and ultimately derives its security from Ethereum. However, as with any blockchain technology, you should always exercise caution and follow best practices for security.

## My question isn't here, where can I get help?

If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Aptos API Quickstart

> Get started building on Aptos and using REST

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Introduction

Aptos is a next-generation Layer 1 blockchain designed for scalability, safety, and upgradeability. It leverages the Move programming language and a novel consensus mechanism to achieve high throughput and low latency.

With its modular architecture, Aptos supports frequent and instant upgrades, making it a dynamic platform for building and deploying applications.

***

## What is the Aptos Chain API?

The Aptos API provides a set of tools to interact with the Aptos blockchain.

It offers both RESTful and JSON-RPC endpoints, allowing for seamless integration, transaction management, wallet interactions, and more.

Key features include:

* Account and Wallet Management: Create and manage Aptos accounts, check balances, and send/receive tokens.
* Transaction Handling: Initiate, sign, and broadcast transactions.
* Blockchain Data: Query blockchain data, such as account balances, block information, and transaction details.
* Smart Contract Execution: Interact with Aptos smart contracts to perform decentralized actions.
* Gas Estimates: Get current gas fees and estimate transaction costs.
* Event Streams: Subscribe to real-time blockchain events through WebSockets.
* Resource Access: Access blockchain resources like token metadata, account states, and more.

***

## Getting started

### 1. Choose a package manager (npm or yarn)

Select a package manager to manage your project's dependencies. The choice between `npm` and `yarn` depends on your preference or project requirements.

| npm                                                                                                                       | yarn                                                                                                |
| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |

### 2. Set up your project

Open your terminal and run the following commands:

<CodeGroup>
  ```text npm
  mkdir aptos-api-quickstart
  cd aptos-api-quickstart
  npm init --yes
  ```

  ```text yarn
  mkdir aptos-api-quickstart
  cd aptos-api-quickstart
  yarn init --yes
  ```
</CodeGroup>

This creates a new directory named `aptos-api-quickstart` and initializes a Node.js project within it.

### 3. Make your first request

Install Axios, a popular HTTP client, to make API requests:

<CodeGroup>
  ```bash bash
  npm install axios
  # Or with yarn
  # yarn add axios
  ```
</CodeGroup>

Create an `index.js` file in your project directory and paste the following code:

<CodeGroup>
  ```javascript javascript
  const axios = require('axios');

  const url = `https://aptos-mainnet.g.alchemy.com/v2/${yourAPIKey}/v1/accounts`;

  axios.get(url)
  .then(response => {
    console.log('Accounts:', response.data);
  })
  .catch(error => {
    console.error('Error fetching accounts:', error.message);
  });

  ```
</CodeGroup>

Replace `yourAPIKey` with your actual Alchemy API key that you can get from the [Alchemy Dashboard](https://dashboard.alchemy.com/signup).

### 4. Run your script

To execute your script and make a request to the Aptos App, run:

<CodeGroup>
  ```bash bash
  node index.js
  ```
</CodeGroup>

You should see a list of Aptos accounts (if any exist on your node or fullnode) outputted to your console. For example:

```shell
[
  {
    "authentication_key": "0x...",
    "sequence_number": "0",
    "modules": [...],
    "resources": [...]
  }
]
```

## Next steps

You've made your first request to the Aptos App API.

------

# /v1

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1

Retrieves the latest information from the Aptos blockchain ledger, including the current chain ID, node role, latest and oldest ledger versions, epoch, block height, and more.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1
```



------

# /v1/spec

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/spec

Provides a web-based UI for exploring the Aptos REST API.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-spec

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/spec
```



------

# /v1/view

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/view

Executes a Move view function with the provided arguments and returns the result.
The function must be marked as a view function in the Move module. If a `ledger_version` is specified and has been pruned, the server will respond with a 410 error.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-view

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| ledger_version | string | No | The ledger version to use when executing the view. If not provided, the latest version is used. This is a string representing a `uint64` to ensure compatibility with JavaScript.  |

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/view \
  --header 'Content-Type: application/json' \
  --data '{
  "function": "0x1::coin::balance",
  "type_arguments": [
    "string"
  ],
  "arguments": [
    "string"
  ]
}'
```



------

# /v1/-/healthy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/-/healthy

Checks whether the node is healthy.
By default, this endpoint just verifies that the node can retrieve the latest ledger info and returns a `200 OK`.
If the optional `duration_secs` query parameter is specified, the endpoint returns a `200` only if:
`server_latest_ledger_info_timestamp >= server_current_time_timestamp - duration_secs`
Otherwise, it returns a `503 Service Unavailable`.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-healthy

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| duration_secs | integer | No | Threshold in seconds for how far behind the server can be to still be considered healthy. If not provided, the health check always succeeds.  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/-/healthy
```



------

# /v1/accounts/{address}

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/accounts/{address}

Retrieves high-level information about an account such as its sequence number and authentication key.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-accounts-address

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | Address of account with or without a 0x prefix. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| ledger_version | string | No | Ledger version to get the state of the account. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/accounts/0x1d8727df513fa2a8785d0834e40b34223daff1affc079574082baadb74b66ee4
```



------

# /v1/accounts/{address}/resources

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/accounts/{address}/resources

Retrieves all account resources for a given account and a specific ledger version. 
If the ledger version is not specified, the latest ledger version is used.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-accounts-address-resources

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | Address of account with or without a 0x prefix. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| ledger_version | string | No | Ledger version to get the state of the account. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/accounts/0x1d8727df513fa2a8785d0834e40b34223daff1affc079574082baadb74b66ee4/resources
```



------

# /v1/accounts/{address}/resource/{resource_type}

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/accounts/{address}/resource/{resource_type}

Retrieves an individual resource from a given account and at a specific ledger version.
If the ledger version is not specified, the latest ledger version is used.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-accounts-address-resource-resource-type

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | Address of account with or without a 0x prefix. |
| resource_type | string | Yes | Name of the Move struct resource to retrieve (e.g. 0x1::account::Account). |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| ledger_version | string | No | Ledger version to get the state of the account. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/accounts/0x1d8727df513fa2a8785d0834e40b34223daff1affc079574082baadb74b66ee4/resource/0x1::account::Account
```



------

# /v1/accounts/{address}/modules

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/accounts/{address}/modules

Retrieves all account modules' bytecode for a given account at a specific ledger version.
If the ledger version is not specified, the latest ledger version is used.
The Aptos nodes prune account state history, via a configurable time window. If the requested ledger version has been pruned, the server responds with a 410.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-accounts-address-modules

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | Address of account with or without a 0x prefix. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| ledger_version | string | No | Ledger version to get the state of the account. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/accounts/0x1d8727df513fa2a8785d0834e40b34223daff1affc079574082baadb74b66ee4/modules
```



------

# /v1/accounts/{address}/module/{module_name}

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/accounts/{address}/module/{module_name}

Retrieves an individual module from a given account and at a specific ledger version.
If the ledger version is not specified, the latest ledger version is used.
The Aptos nodes prune account state history, via a configurable time window. If the requested ledger version has been pruned, the server responds with a 410.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-accounts-address-module-module-name

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | Address of account with or without a 0x prefix. |
| module_name | string | Yes | Name of the module to retrieve. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| ledger_version | string | No | Ledger version to get the state of the account. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/accounts/0x1d8727df513fa2a8785d0834e40b34223daff1affc079574082baadb74b66ee4/module/coin
```



------

# /v1/accounts/{address}/events/{creation_number}

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/accounts/{address}/events/{creation_number}

Retrieves events by account address and creation number. Optionally supports pagination via `start` and `limit`.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-accounts-address-events-creation-number

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | Address receiving the events (32-byte hex-encoded). |
| creation_number | string | Yes | Creation number corresponding to the event stream. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| start | string | No | Sequence number to start retrieving events from. |
| limit | string | No | Maximum number of events to retrieve. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/accounts/0xc32f662cd9718f02d8a8e5628f8f642fa27cd9b5f457b406ed734901a4939e34/events/string
```



------

# /v1/accounts/{address}/events/{event_handle}/{field_name}

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/accounts/{address}/events/{event_handle}/{field_name}

Uses the given account `address`, `event_handle`, and `field_name` to retrieve events emitted to the account that match the corresponding event type.
The combination of these parameters constructs a globally unique event stream identifier.
Pagination is supported via `start` and `limit`.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-accounts-address-events-event-handle-field-name

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | Hex-encoded 32-byte Aptos account address, with or without 0x prefix. |
| event_handle | string | Yes | Struct type name that contains the event handle. |
| field_name | string | Yes | Field name within the struct that holds the event handle. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| start | string | No | Starting sequence number of events. |
| limit | string | No | Maximum number of events to return. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/accounts/0xc32f662cd9718f02d8a8e5628f8f642fa27cd9b5f457b406ed734901a4939e34/events/0x1::account::Account/withdraw_events
```



------

# /v1/blocks/by_height/{block_height}

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/blocks/by_height/{block_height}

Retrieves block metadata and optionally the transactions contained in the block.
If the block is pruned, the server will return a 410 error. To avoid partial results when `with_transactions=true`, consider checking the total number of transactions expected.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-blocks-by-height-block-height

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| block_height | integer | Yes | Block height to look up. Starts at 0. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| with_transactions | boolean | No | If set to true, includes all transactions in the block. May be limited by max transaction size. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/blocks/by_height/3700145
```



------

# /v1/blocks/by_version/{version}

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/blocks/by_version/{version}

Retrieves block metadata and optionally the transactions contained in the block, based on a specific ledger version.
If the block is pruned, the server will return a 410 error. To avoid partial results when `with_transactions=true`, consider checking the total number of transactions expected.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-blocks-by-version-version

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| version | integer | Yes | Ledger version to look up block information for. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| with_transactions | boolean | No | If set to true, includes all transactions in the block. May be limited by max transaction size. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/blocks/by_version/13563213
```



------

# /v1/tables/{table_handle}/item

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/tables/{table_handle}/item

Retrieves a specific item from the table identified by `{table_handle}` using the provided key. This is a POST endpoint because the key can be complex and not suitable for query parameters.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-tables-table-handle-item

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| table_handle | string | Yes | Hex-encoded 32-byte string representing the table handle.  |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| ledger_version | string | No | Ledger version to get the state of the account. If not specified, the latest version is used.  |

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/tables/string/item \
  --header 'Content-Type: application/json' \
  --data '{
  "key_type": "string",
  "value_type": "string",
  "key": "string"
}'
```



------

# /v1/tables/{table_handle}/raw_item

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/tables/{table_handle}/raw_item

Get a raw table item at a specific ledger version from the table identified by `{table_handle}` and the key provided in the request body.
The `get_raw_table_item` endpoint only requires a serialized key (hex string) and returns the value in binary canonical serialization (BCS) format.
The Aptos nodes prune account state history via a configurable time window. If the requested ledger version has been pruned, the server responds with a 410.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-tables-table-handle-raw-item

## Headers

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Accept | enum | Yes | Must be set to `application/x-bcs` to receive the response in raw BCS format.  |

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| table_handle | string | Yes | Table handle — a hex encoded 32-byte Aptos address (with or without 0x prefix).  |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| ledger_version | string | No | Ledger version to query state from. If omitted, the latest version will be used.  |

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/tables/0x1b854694ae746cdbd8d44186ca4929b2b337df21d1c74633be19b2710552fdca/raw_item \
  --header 'Accept: application/x-bcs' \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "string"
}'
```



------

# /v1/accounts/{address}/transactions

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/accounts/{address}/transactions

Retrieves transactions sent from a specific account. If `start` is not provided, retrieval starts at sequence number 0. If `start` is too far in the past and pruned, a 410 will be returned.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-accounts-address-transactions

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | Address of account with or without a 0x prefix. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| limit | integer | No | Maximum number of transactions to retrieve. |
| start | string | No | Account sequence number to start retrieving transactions from. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/accounts/0xc32f662cd9718f02d8a8e5628f8f642fa27cd9b5f457b406ed734901a4939e34/transactions
```



------

# /v1/estimate_gas_price

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/estimate_gas_price

Estimates a suitable gas price based on recent network activity.
The estimate is derived from the median gas unit price of the last 100,000 transactions. If there have been no transactions in that window, the estimate defaults to 1.
Users can choose to pay more to prioritize their transaction or less if they're willing to wait.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-estimate-gas-price

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/estimate_gas_price
```



------

# /v1/transactions

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/transactions

Retrieves on-chain committed transactions from the ledger.
Supports optional pagination via the `start` and `limit` query parameters.
If the starting version has been pruned due to the node's data retention policy, a 410 error will be returned.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-transactions

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| start | string | No | Ledger version to start the list of transactions. |
| limit | integer | No | Maximum number of transactions to retrieve. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/transactions
```



------

# /v1/transactions

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/transactions

Retrieves on-chain committed transactions from the ledger.
Supports optional pagination via the `start` and `limit` query parameters.
If the starting version has been pruned due to the node's data retention policy, a 410 error will be returned.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-transactions

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| start | string | No | Ledger version to start the list of transactions. |
| limit | integer | No | Maximum number of transactions to retrieve. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/transactions
```



------

# /v1/transactions/batch

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/transactions/batch

Submits a batch of transactions to the Aptos network. Each transaction in the batch includes full transaction details, such as sender, sequence number, gas settings, and a payload.
If any transaction in the batch fails, the response will include the corresponding failure details.
Note: The API credit cost for this endpoint is 10.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-transactions-batch

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/transactions/batch \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "sender": "string",
    "sequence_number": "string",
    "max_gas_amount": "string",
    "gas_unit_price": "string",
    "expiration_timestamp_secs": "string",
    "payload": {
      "type": "string",
      "function": "string",
      "type_arguments": [
        "string"
      ],
      "arguments": [
        "string"
      ]
    },
    "signature": {
      "type": "string",
      "public_key": "string",
      "signature": "string"
    }
  }
]
'
```



------

# /v1/transactions/by_hash/{txn_hash}

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/transactions/by_hash/{txn_hash}

Retrieves a transaction from the Aptos blockchain by transaction hash.
If the transaction is not found or has been pruned, the API may return a 404 or 410 respectively.
This endpoint has a credit cost of 10.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-transactions-by-hash-txn-hash

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txn_hash | string | Yes | The hash of the transaction to retrieve. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/transactions/by_hash/string
```



------

# /v1/transactions/by_version/{txn_version}

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/transactions/by_version/{txn_version}

Retrieves a transaction from the Aptos blockchain by ledger version.
If the version has been pruned, the server responds with a 410.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-transactions-by-version-txn-version

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txn_version | string | Yes | The version of the transaction to retrieve. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/transactions/by_version/string
```



------

# /v1/transactions/encode_submission

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/transactions/encode_submission

This endpoint accepts an `EncodeSubmissionRequest`, validates the request format, and returns that request encoded in BCS format as a hex string.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-transactions-encode-submission

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/transactions/encode_submission \
  --header 'Content-Type: application/json' \
  --data '{
  "sender": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1",
  "sequence_number": "32425224034",
  "max_gas_amount": "32425224034",
  "gas_unit_price": "32425224034",
  "expiration_timestamp_secs": "32425224034",
  "payload": {
    "type": "entry_function_payload",
    "function": "0x1::aptos_coin::transfer",
    "type_arguments": [
      "string"
    ],
    "arguments": [
      "string"
    ]
  }
}'
```



------

# /v1/transactions/simulate

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/transactions/simulate

Simulates a transaction without committing it to the chain. The output includes transaction events and execution results,  but omits state hashes. Useful for estimating gas usage and transaction validity.
You must provide a SignedTransaction with a zero-padded signature.
Optional flags allow estimating gas price, max gas amount, or using a prioritized gas price.


Reference: https://www.alchemy.com/docs/chains/aptos/aptos-api-endpoints/aptos-api-endpoints/v-1-transactions-simulate

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| estimate_gas_unit_price | boolean | No | If true, replaces the transaction's gas unit price with the estimated value.  |
| estimate_max_gas_amount | boolean | No | If true, overrides the max gas with the estimated maximum.  |
| estimate_prioritized_gas_unit_price | boolean | No | If true, uses a higher gas price than the standard estimate to prioritize the transaction.  |

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/transactions/simulate \
  --header 'Content-Type: application/json' \
  --data '{
  "sender": "string",
  "sequence_number": "string",
  "max_gas_amount": "string",
  "gas_unit_price": "string",
  "expiration_timestamp_secs": "string",
  "payload": {
    "type": "string",
    "function": "string",
    "type_arguments": [
      "string"
    ],
    "arguments": [
      "string"
    ]
  },
  "signature": {
    "type": "string",
    "public_key": "string",
    "signature": "string"
  }
}'
```



------

# Aptos API FAQ

> Frequently asked questions about the Aptos API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Aptos?

Aptos is a Layer 1 blockchain built for scalability, safety, and upgradeability. It uses the Move programming language and the AptosBFT consensus protocol to enable high-throughput and low-latency transactions while maintaining strong security guarantees.

## What is the Aptos API?

The Aptos API allows you to interact with the Aptos blockchain via a set of RESTful endpoints. It enables actions such as querying accounts and transactions, submitting new transactions, interacting with smart contracts, and accessing onchain resources.

## How can I get started using the Aptos API?

Take a look at our [Aptos API Quickstart](/docs/reference/aptos-api-quickstart) guide.

## Does Aptos support smart contracts?

Yes. Aptos supports smart contracts written in Move, a secure and expressive programming language developed specifically for the blockchain. You can deploy, call, and interact with smart contracts via the API.

## What API standard does Aptos use?

The Aptos API follows REST principles and communicates via standard HTTP requests and JSON responses. Endpoints are organized by functionality — accounts, blocks, transactions, events, etc.

## What is an Aptos API key?

When using a blockchain infrastructure provider like Alchemy, an API key allows you to send authenticated requests to the Aptos network. This lets you read data from the chain and submit transactions securely.

## Which libraries can I use with the Aptos API?

You can use any HTTP client that supports standard REST calls. Popular choices include:

* JavaScript: `axios`, `fetch`
* Python: `requests`
* Curl (for CLI or scripting)
* Community SDKs like `aptos-sdk`, `aptos-client` for Python and TypeScript

## What programming languages are compatible with the API?

The API works with any language that supports HTTP — such as JavaScript/TypeScript, Python, Go, Rust, and Java. You can integrate it into backend services, CLI tools, and dApps.

## What is used for fees in Aptos?

Aptos uses its native token, APT, to pay transaction fees. The API provides endpoints to estimate gas usage and fee costs before submitting a transaction.

## My question isn't listed here — where can I get help?

If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Arbitrum API Quickstart

> How to get started building on Arbitrum using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Arbitrum is a Layer 2 scaling solution for Ethereum that leverages optimistic rollups to provide fast and low-cost transactions. Designed to support the needs of decentralized applications (dApps), Arbitrum enhances the scalability and efficiency of Ethereum-based applications while maintaining full EVM compatibility.

The Arbitrum API facilitates interaction with the Arbitrum network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with Arbitrum both intuitive and straightforward.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an Arbitrum client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { arbitrum } from "viem/chains";

const client = createPublicClient({
  chain: arbitrum,
  transport: http("https://arb-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (ETH):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Arbitrum APIs

For the full list of Arbitrum APIs, see the [Arbitrum API Endpoints](/docs/chains#arbitrum-apis).

------

# Arbitrum API Overview

> Overview of available Arbitrum API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Arbitrum APIs

📙 Get started with our [Arbitrum API Quickstart Guide](/docs/reference/arbitrum-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`arbtrace_block`](/docs/chains/arbitrum/arbitrum-api-endpoints/arbtrace-block)                 | [`arbtrace_call`](/docs/chains/arbitrum/arbitrum-api-endpoints/arbtrace-call)               |
| [`arbtrace_callMany`](/docs/chains/arbitrum/arbitrum-api-endpoints/arbtrace-call-many)          | [`arbtrace_filter`](/docs/chains/arbitrum/arbitrum-api-endpoints/arbtrace-filter)           |
| [`arbtrace_get`](/docs/chains/arbitrum/arbitrum-api-endpoints/arbtrace-get)                     | [`arbtrace_replayBlockTransactions`](/docs/chains/arbitrum/arbitrum-api-endpoints/arbtrace-replay-block-transactions) |
| [`arbtrace_replayTransaction`](/docs/chains/arbitrum/arbitrum-api-endpoints/arbtrace-replay-transaction) | [`arbtrace_transaction`](/docs/chains/arbitrum/arbitrum-api-endpoints/arbtrace-transaction) |
| [`eth_accounts`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-accounts)                     | [`eth_blockNumber`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-block-number)          |
| [`eth_call`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-call)                             | [`eth_chainId`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-chain-id)                  |
| [`eth_createAccessList`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-create-access-list)   | [`eth_estimateGas`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-estimate-gas)          |
| [`eth_feeHistory`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-fee-history)                | [`eth_fillTransaction`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-fill-transaction)  |
| [`eth_gasPrice`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-gas-price)                    | [`eth_getAccount`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-account)            |
| [`eth_getBalance`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-balance)                | [`eth_getBlockByHash`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-block-by-hash)  |
| [`eth_getBlockByNumber`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-block-by-number)  | [`eth_getBlockReceipts`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-block-receipts) |
| [`eth_getBlockTransactionCountByHash`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-block-transaction-count-by-hash) | [`eth_getBlockTransactionCountByNumber`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-block-transaction-count-by-number) |
| [`eth_getCode`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-code)                      | [`eth_getFilterChanges`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-filter-changes) |
| [`eth_getFilterLogs`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-filter-logs)         | [`eth_getLogs`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-logs)                  |
| [`eth_getProof`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-proof)                    | [`eth_getRawTransactionByHash`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-raw-transaction-by-hash) |
| [`eth_getStorageAt`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-storage-at)           | [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-transaction-by-block-hash-and-index) |
| [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-transaction-by-block-number-and-index) | [`eth_getTransactionByHash`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-transaction-by-hash) |
| [`eth_getTransactionCount`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-transaction-count) | [`eth_getTransactionReceipt`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-transaction-receipt) |
| [`eth_getUncleByBlockHashAndIndex`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-uncle-by-block-hash-and-index) | [`eth_getUncleByBlockNumberAndIndex`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-uncle-by-block-number-and-index) |
| [`eth_getUncleCountByBlockHash`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-uncle-count-by-block-hash) | [`eth_getUncleCountByBlockNumber`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-uncle-count-by-block-number) |
| [`eth_maxPriorityFeePerGas`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-max-priority-fee-per-gas) | [`eth_newBlockFilter`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-new-block-filter)   |
| [`eth_newFilter`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-new-filter)                  | [`eth_newPendingTransactionFilter`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-new-pending-transaction-filter) |
| [`eth_sendRawTransaction`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-send-raw-transaction) | [`eth_sendRawTransactionSync`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-send-raw-transaction-sync) |
| [`eth_simulateV1`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-simulate-v-1)               | [`eth_submitWork`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-submit-work)            |
| [`eth_subscribe`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-subscribe)                   | [`eth_syncing`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-syncing)                   |
| [`eth_uninstallFilter`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-uninstall-filter)      | [`eth_unsubscribe`](/docs/chains/arbitrum/arbitrum-api-endpoints/eth-unsubscribe)           |
| [`net_listening`](/docs/chains/arbitrum/arbitrum-api-endpoints/net-listening)                   | [`net_version`](/docs/chains/arbitrum/arbitrum-api-endpoints/net-version)                   |
| [`web3_clientVersion`](/docs/chains/arbitrum/arbitrum-api-endpoints/web-3-client-version)       | [`web3_sha3`](/docs/chains/arbitrum/arbitrum-api-endpoints/web-3-sha-3)                     |

## Related APIs

The following Alchemy APIs are also supported on Arbitrum:

* [Bundler API](/docs/wallets/transactions/low-level-infra/bundler/overview)
* [Gas Manager API](/docs/wallets/api-reference/gas-manager-admin-api/gas-abstraction-api-endpoints/alchemy-request-gas-and-paymaster-and-data)
* [Token API](/docs/reference/token-api-overview)
* [Transfers API](/docs/reference/transfers-api-quickstart)
* [Debug API](/docs/reference/debug-api-quickstart)
* [NFT API](/docs/reference/nft-api-overview)
* [UserOp Simulation API](/docs/wallets/api-reference/bundler-api/useroperation-simulation-endpoints/alchemy-simulate-user-operation-asset-changes)

------

# arbtrace_block

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns traces for all transactions in the specified block. This is an Arbitrum-specific tracing method that works for pre-Nitro blocks (before block 22,207,815). For post-Nitro blocks, use Geth debug_* methods.


Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/arbtrace-block

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number | string or enum | Yes | The block number as a hexadecimal string, or a block tag such as "latest", "earliest", or "pending".  |

## Result

**Block traces** (object[]): An array of trace objects for all transactions in the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "arbtrace_block",
  "params": [
    "0x152DD07"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "action": {
        "callType": "call",
        "from": "0x00000000000000000000000000000000000a4b05",
        "gas": "0x0",
        "input": "0x",
        "to": "0xa4b05fffffffffffffffffffffffffffffffffff",
        "value": "0x0"
      },
      "blockHash": "0x5765e1e12766c561a99f2eca6be6dba225e5e2dbecc1c52c59dfd21f3c39071c",
      "blockNumber": 22207751,
      "result": {
        "gasUsed": "0x0",
        "output": "0x"
      },
      "subtraces": 0,
      "traceAddress": [],
      "transactionHash": "0xd2ea43b18e2f0acb66b36e773f20a4e9a1ee2df00a9794f63c2f4d0519cbe12a",
      "transactionPosition": 0,
      "type": "call"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "arbtrace_block",
  "params": [
    "0x152DD07"
  ]
}'
```



------

# arbtrace_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Executes a call and returns the trace results. This is an Arbitrum-specific tracing method that works for pre-Nitro blocks (before block 22,207,815). For post-Nitro blocks, use Geth debug_* methods.


Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/arbtrace-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing call parameters such as from, to, gas, gasPrice, value, and data.  |
| Trace types | enum[] | Yes | Array of trace types to return. Valid values: "trace", "vmTrace", "stateDiff".  |
| Block number | string or enum | Yes | The block number as a hexadecimal string, or a block tag such as "latest", "earliest", or "pending".  |

## Result

**Trace result** (object): The trace result object containing output, traces, and optional state diff and VM trace.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "arbtrace_call",
  "params": [
    {
      "from": "0x1234567890abcdef1234567890abcdef12345678",
      "to": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
      "value": "0x0",
      "data": "0x70a08231000000000000000000000000abcdefabcdefabcdefabcdefabcdefabcdefabcd"
    },
    [
      "trace"
    ],
    "0x152DD07"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "output": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "stateDiff": null,
    "trace": [
      {
        "action": {
          "callType": "call",
          "from": "0x1234567890abcdef1234567890abcdef12345678",
          "gas": "0x2faf080",
          "input": "0x70a08231000000000000000000000000abcdefabcdefabcdefabcdefabcdefabcdefabcd",
          "to": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
          "value": "0x0"
        },
        "result": {
          "gasUsed": "0x565",
          "output": "0x0000000000000000000000000000000000000000000000000000000000000000"
        },
        "subtraces": 0,
        "traceAddress": [],
        "type": "call"
      }
    ],
    "vmTrace": null
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "arbtrace_call",
  "params": [
    {
      "from": "0x1234567890abcdef1234567890abcdef12345678",
      "to": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
      "value": "0x0",
      "data": "0x70a08231000000000000000000000000abcdefabcdefabcdefabcdefabcdefabcdefabcd"
    },
    [
      "trace"
    ],
    "0x152DD07"
  ]
}'
```



------

# arbtrace_callMany

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Executes multiple calls and returns traces for each. Before executing a transaction, all preceding transactions are first applied and traced. This is an Arbitrum-specific tracing method that works for pre-Nitro blocks (before block 22,207,815). For post-Nitro blocks, use Geth debug_* methods.


Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/arbtrace-call-many

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Calls | [object, enum[]][] | Yes | An array of call/trace-type pairs. Each element is an array of [transaction call object, trace type array].  |
| Block number | string or enum | Yes | The block number as a hexadecimal string, or a block tag such as "latest", "earliest", or "pending".  |

## Result

**Trace results** (object[]): An array of trace results, one per call.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "arbtrace_callMany",
  "params": [
    [
      [
        {
          "from": "0x1234567890abcdef1234567890abcdef12345678",
          "to": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
          "value": "0x0",
          "data": "0x70a08231000000000000000000000000abcdefabcdefabcdefabcdefabcdefabcdefabcd"
        },
        [
          "trace"
        ]
      ],
      [
        {
          "from": "0x1234567890abcdef1234567890abcdef12345678",
          "to": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
          "value": "0x0",
          "data": "0x18160ddd"
        },
        [
          "trace"
        ]
      ]
    ],
    "0x152DD07"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "output": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "stateDiff": null,
      "trace": [
        {
          "action": {
            "callType": "call",
            "from": "0x1234567890abcdef1234567890abcdef12345678",
            "gas": "0x2faf080",
            "input": "0x70a08231000000000000000000000000abcdefabcdefabcdefabcdefabcdefabcdefabcd",
            "to": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
            "value": "0x0"
          },
          "result": {
            "gasUsed": "0x565",
            "output": "0x0000000000000000000000000000000000000000000000000000000000000000"
          },
          "subtraces": 0,
          "traceAddress": [],
          "type": "call"
        }
      ],
      "vmTrace": null
    },
    {
      "output": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "stateDiff": null,
      "trace": [
        {
          "action": {
            "callType": "call",
            "from": "0x1234567890abcdef1234567890abcdef12345678",
            "gas": "0x2faf080",
            "input": "0x18160ddd",
            "to": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
            "value": "0x0"
          },
          "result": {
            "gasUsed": "0x4a2",
            "output": "0x0000000000000000000000000000000000000000000000000000000000000000"
          },
          "subtraces": 0,
          "traceAddress": [],
          "type": "call"
        }
      ],
      "vmTrace": null
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "arbtrace_callMany",
  "params": [
    [
      [
        {
          "from": "0x1234567890abcdef1234567890abcdef12345678",
          "to": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
          "value": "0x0",
          "data": "0x70a08231000000000000000000000000abcdefabcdefabcdefabcdefabcdefabcdefabcd"
        },
        [
          "trace"
        ]
      ],
      [
        {
          "from": "0x1234567890abcdef1234567890abcdef12345678",
          "to": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
          "value": "0x0",
          "data": "0x18160ddd"
        },
        [
          "trace"
        ]
      ]
    ],
    "0x152DD07"
  ]
}'
```



------

# arbtrace_filter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns all traces matching a specified filter object. Allows filtering by block range, sender addresses, and recipient addresses. This is an Arbitrum-specific tracing method that works for pre-Nitro blocks (before block 22,207,815). For post-Nitro blocks, use Geth debug_* methods.


Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/arbtrace-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter object specifying the criteria for trace retrieval.  |

## Result

**Filtered traces** (object[]): An array of trace objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "arbtrace_filter",
  "params": [
    {
      "fromBlock": "0x152DD07",
      "toBlock": "0x152DD07",
      "fromAddress": [
        "0x00000000000000000000000000000000000a4b05"
      ],
      "toAddress": [],
      "after": 0,
      "count": 10
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "action": {
        "callType": "call",
        "from": "0x00000000000000000000000000000000000a4b05",
        "gas": "0x0",
        "input": "0x",
        "to": "0xa4b05fffffffffffffffffffffffffffffffffff",
        "value": "0x0"
      },
      "blockHash": "0x5765e1e12766c561a99f2eca6be6dba225e5e2dbecc1c52c59dfd21f3c39071c",
      "blockNumber": 22207751,
      "result": {
        "gasUsed": "0x0",
        "output": "0x"
      },
      "subtraces": 0,
      "traceAddress": [],
      "transactionHash": "0xd2ea43b18e2f0acb66b36e773f20a4e9a1ee2df00a9794f63c2f4d0519cbe12a",
      "transactionPosition": 0,
      "type": "call"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "arbtrace_filter",
  "params": [
    {
      "fromBlock": "0x152DD07",
      "toBlock": "0x152DD07",
      "fromAddress": [
        "0x00000000000000000000000000000000000a4b05"
      ],
      "toAddress": [],
      "after": 0,
      "count": 10
    }
  ]
}'
```



------

# arbtrace_get

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns a specific trace at the given position within a transaction. This is an Arbitrum-specific tracing method that works for pre-Nitro blocks (before block 22,207,815). For post-Nitro blocks, use Geth debug_* methods.


Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/arbtrace-get

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to get the trace from. |
| Trace address | string[] | Yes | An array of index positions specifying the trace address within the transaction's trace tree.  |

## Result

**Trace** (object): The trace object at the specified position.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "arbtrace_get",
  "params": [
    "0xd2ea43b18e2f0acb66b36e773f20a4e9a1ee2df00a9794f63c2f4d0519cbe12a",
    [
      "0x0"
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "action": {
      "callType": "call",
      "from": "0x00000000000000000000000000000000000a4b05",
      "gas": "0x0",
      "input": "0x",
      "to": "0xa4b05fffffffffffffffffffffffffffffffffff",
      "value": "0x0"
    },
    "blockHash": "0x5765e1e12766c561a99f2eca6be6dba225e5e2dbecc1c52c59dfd21f3c39071c",
    "blockNumber": 22207751,
    "result": {
      "gasUsed": "0x0",
      "output": "0x"
    },
    "subtraces": 0,
    "traceAddress": [
      0
    ],
    "transactionHash": "0xd2ea43b18e2f0acb66b36e773f20a4e9a1ee2df00a9794f63c2f4d0519cbe12a",
    "transactionPosition": 0,
    "type": "call"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "arbtrace_get",
  "params": [
    "0xd2ea43b18e2f0acb66b36e773f20a4e9a1ee2df00a9794f63c2f4d0519cbe12a",
    [
      "0x0"
    ]
  ]
}'
```



------

# arbtrace_replayBlockTransactions

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Replays all transactions in the specified block and returns the requested trace types for each transaction. This is an Arbitrum-specific tracing method that works for pre-Nitro blocks (before block 22,207,815). For post-Nitro blocks, use Geth debug_* methods.


Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/arbtrace-replay-block-transactions

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number | string or enum | Yes | The block number as a hexadecimal string, or a block tag such as "latest", "earliest", or "pending".  |
| Trace types | enum[] | Yes | Array of trace types to return. Valid values: "trace", "vmTrace", "stateDiff".  |

## Result

**Block transaction traces** (object[]): An array of trace results, one per transaction in the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "arbtrace_replayBlockTransactions",
  "params": [
    "0x152DD07",
    [
      "trace"
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "output": "0x",
      "stateDiff": null,
      "trace": [
        {
          "action": {
            "callType": "call",
            "from": "0x00000000000000000000000000000000000a4b05",
            "gas": "0x0",
            "input": "0x",
            "to": "0xa4b05fffffffffffffffffffffffffffffffffff",
            "value": "0x0"
          },
          "result": {
            "gasUsed": "0x0",
            "output": "0x"
          },
          "subtraces": 0,
          "traceAddress": [],
          "type": "call"
        }
      ],
      "vmTrace": null
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "arbtrace_replayBlockTransactions",
  "params": [
    "0x152DD07",
    [
      "trace"
    ]
  ]
}'
```



------

# arbtrace_replayTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Replays a specific transaction and returns the requested trace types without actually executing it on the network. This is an Arbitrum-specific tracing method that works for pre-Nitro blocks (before block 22,207,815). For post-Nitro blocks, use Geth debug_* methods.


Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/arbtrace-replay-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to replay. |
| Trace types | enum[] | Yes | Array of trace types to return. Valid values: "trace", "vmTrace", "stateDiff".  |

## Result

**Trace result** (object): The trace result object for the replayed transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "arbtrace_replayTransaction",
  "params": [
    "0xd2ea43b18e2f0acb66b36e773f20a4e9a1ee2df00a9794f63c2f4d0519cbe12a",
    [
      "trace"
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "output": "0x",
    "stateDiff": null,
    "trace": [
      {
        "action": {
          "callType": "call",
          "from": "0x00000000000000000000000000000000000a4b05",
          "gas": "0x0",
          "input": "0x",
          "to": "0xa4b05fffffffffffffffffffffffffffffffffff",
          "value": "0x0"
        },
        "result": {
          "gasUsed": "0x0",
          "output": "0x"
        },
        "subtraces": 0,
        "traceAddress": [],
        "type": "call"
      }
    ],
    "vmTrace": null
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "arbtrace_replayTransaction",
  "params": [
    "0xd2ea43b18e2f0acb66b36e773f20a4e9a1ee2df00a9794f63c2f4d0519cbe12a",
    [
      "trace"
    ]
  ]
}'
```



------

# arbtrace_transaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns all traces produced during the execution of a specific transaction. This is an Arbitrum-specific tracing method that works for pre-Nitro blocks (before block 22,207,815). For post-Nitro blocks, use Geth debug_* methods.


Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/arbtrace-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to trace. |

## Result

**Transaction traces** (object[]): An array of trace objects for the given transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "arbtrace_transaction",
  "params": [
    "0xd2ea43b18e2f0acb66b36e773f20a4e9a1ee2df00a9794f63c2f4d0519cbe12a"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "action": {
        "callType": "call",
        "from": "0x00000000000000000000000000000000000a4b05",
        "gas": "0x0",
        "input": "0x",
        "to": "0xa4b05fffffffffffffffffffffffffffffffffff",
        "value": "0x0"
      },
      "blockHash": "0x5765e1e12766c561a99f2eca6be6dba225e5e2dbecc1c52c59dfd21f3c39071c",
      "blockNumber": 22207751,
      "result": {
        "gasUsed": "0x0",
        "output": "0x"
      },
      "subtraces": 0,
      "traceAddress": [],
      "transactionHash": "0xd2ea43b18e2f0acb66b36e773f20a4e9a1ee2df00a9794f63c2f4d0519cbe12a",
      "transactionPosition": 0,
      "type": "call"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "arbtrace_transaction",
  "params": [
    "0xd2ea43b18e2f0acb66b36e773f20a4e9a1ee2df00a9794f63c2f4d0519cbe12a"
  ]
}'
```



------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_newPendingTransactionFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new pending transactions arrive.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-new-pending-transaction-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newPendingTransactionFilter"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_sendRawTransactionSync

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Sends a raw transaction to the network and waits for the transaction to be mined.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-send-raw-transaction-sync

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction data | string | Yes | The signed transaction data, RLP-encoded and hex-encoded. |
| Timeout | integer | No | Maximum wait time in milliseconds. Must be a positive integer between 1 and the node-configured maximum timeout. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "transactionHash": "0x1234abcd...",
    "blockHash": "0xabcd1234...",
    "blockNumber": "0x10d4f",
    "cumulativeGasUsed": "0x5208",
    "gasUsed": "0x5208",
    "contractAddress": null,
    "logs": [],
    "status": "0x1"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ]
}'
```



------

# eth_simulateV1

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Enables simulation of complex transactions and state changes without modifying the blockchain.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-simulate-v-1

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Simulation object | object | Yes | The object containing all simulation details such as calls, overrides, etc. |

## Result

**Simulation result** (object[]): The result of the simulation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "baseFeePerGas": "0x9",
      "blobGasUsed": "0x0",
      "calls": [
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000001"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
              "transactionIndex": "0x0",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x0",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        },
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000002"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd",
              "transactionIndex": "0x1",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x1",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        }
      ],
      "difficulty": "0x0",
      "excessBlobGas": "0x3b80000",
      "extraData": "0x",
      "gasLimit": "0x22550dd",
      "gasUsed": "0xa410",
      "hash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "miner": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
      "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "nonce": "0x0000000000000000",
      "number": "0x1530a5e",
      "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "parentHash": "0x513a0aa73024f294cdbcb0312af0c920850035f0552d7349ebb30717de30b1cc",
      "receiptsRoot": "0x75308898d571eafb5cd8cde8278bf5b3d13c5f6ec074926de3bb895b519264e1",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "size": "0x29c",
      "stateRoot": "0x65ea44c8bd5f9edbf269b6446b460b3e7378abb25c78fd5d70f0e2ef59296b25",
      "timestamp": "0x67f43327",
      "transactions": [
        "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
        "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd"
      ],
      "transactionsRoot": "0xd6902f31ae9d2169b77cd88611c6afd691ea5a7e604e44c71f663fda0c5d1c28",
      "uncles": [],
      "withdrawals": [],
      "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    }
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arb-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/arbitrum/arbitrum-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Arbitrum API FAQ

> Frequently asked questions about the Arbitrum API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# What is Arbitrum?

Arbitrum is a side chain that runs parallel to Ethereum Mainnet. Also known as a Layer 2 (L2) scaling solution, Arbitrum improves transaction speeds and cost compared to the mainnet, making it an excellent solution for Ethereum developers.

Arbitrum was founded by Steven Goldfeder and Harry Kalodner in 2021, and since its creation, [Arbitrum has shown evidence of continued growth](https://www.alchemy.com/overviews/arbitrum-statistics#:~:text=Healthy%20Ecosystem%20Growth-,Arbitrum%20is%20the%20leading%20layer%202%20Ethereum%20scaling%20solution%20that,deposit%20addresses).

# What is the Arbitrum API?

The Arbitrum API allows applications to connect to an Arbitrum node that is part of the Arbitrum network. You can interact with onchain data and send different types of transactions to the network by utilizing the endpoints provided by the API. The API follows a JSON-RPC standard. JSON-RPC is a stateless, lightweight, remote procedure call (RPC) protocol encoded in JSON.

## How can I get started using the Arbitrum API?

Explained in the [Arbitrum API Quickstart Guide](/docs/reference/arbitrum-api-quickstart#getting-started-instructions).

## What type of Layer 2 solution is Arbitrum?

Arbitrum is a [Layer 2 scaling solution](https://www.alchemy.com/overviews/ethereum-scaling-solutions) that uses optimistic rollups for transactions. One of the things that make Arbitrum optimistic rollups unique is that they use multi-round fraud proofs, focusing on single transaction disputes. Other rollups like Optimism use single-round fraud proofs, which require executing the entire rollup on the Ethereum mainnet for validation.

## Is Arbitrum EVM compatible?

Yes! Arbitrum is fully compatible with all Solidity smart contracts and Ethereum libraries. As Arbitrum acts as a second layer operating on top of the main Ethereum network, it can utilize the [Ethereum Virtual Machine](https://www.alchemy.com/overviews/what-is-the-ethereum-virtual-machine-evm) just like Ethereum.

## How do I add Arbitrum to MetaMask mainnet?

Adding Arbitrum to MetaMask takes four steps:

1. Create a free Alchemy account
2. Create an API key
3. Choose a custom RPC in Metamask
4. Fill in the Arbitrum network details

## What testnet should I use for Arbitrum?

Use the Arbitrum Sepolia testnet and [a Sepolia faucet to get test ETH](https://www.alchemy.com/faucets/ethereum-sepolia) when testing Arbitrum applications.

If you sign in to your Alchemy account, you'll get additional test ETH allowances. Use testnet ETH to make sure your applications are working properly before putting them on Arbitrum mainnet.

## How do I build an app on Arbitrum?

To start building a dApp on Arbitrum, [sign up for Alchemy](https://www.alchemy.com/layer2/arbitrum) and log in. Then click the “Apps” tab and “Create App”. Then, choose Arbitrum mainnet as your chain and network.

## How do you bridge Arbitrum to Ethereum?

For bridging, use the [Arbitrum Bridge](https://bridge.arbitrum.io/). When you connect your Metamask, you will be able to send and receive tokens between Arbitrum and Ethereum. Alchemy’s [overview on cross-chain bridges](https://alchemy.com/overviews/cross-chain-bridges) can further help you understand how bridging works.

## What wallets can be used on Arbitrum?

You can use many [Web3 wallets](https://www.alchemy.com/web3-wallets-overview) on Arbitrum. As Optimism continues to grow, it supports many of the most popular wallets. Some wallets that people choose to use on Arbitrum include Metamask, Ledger Nano X, and SafePal S1.

## What does Arbitrum use for gas?

Arbitrum uses ETH tokens for gas. Compared to Ethereum, [Arbitrum typically has lower gas fees](https://www.alchemy.com/overviews/arbitrum-statistics) because it uses optimistic rollups to process transactions offchain and then submit a single bundle of transactions to Ethereum’s mainnet.

## What projects are on Arbitrum?

Some of the most popular dApps on Arbitrum include Aave, 1inch Network, and Yearn Finance. Aave is one of the biggest Peer-to-Peer lending protocols in DeFi. 1inch is a decentralized exchange (DEX) aggregator that helps users find the best value when swapping tokens. Yearn Finance is a DeFi protocol focused on yield optimization when lending or trading crypto assets.

## How do you withdraw ETH from Arbitrum?

Withdrawing ETH from Arbitrum takes three steps: go to the [Arbitrum Bridge](https://bridge.arbitrum.io/), enter the amount you would like to remove from the network, and click “Withdraw”.

## What API does Arbitrum use?

Arbitrum uses the JSON-RPC API standard. The Arbitrum JSON-RPC API serves as the backbone for the Arbitrum network and powers any blockchain interaction. This API suite allows you to read block/transaction data, query chain information, execute smart contracts, and store data onchain. You interact with Arbitrum’s base JSON-RPC APIs to communicate with its decentralized network of nodes.

## What is an Arbitrum API key?

When accessing the Arbitrum network via a node provider, API services like Alchemy require an API key, which allows you to monitor your apps and access usage metrics.

For the best development experience, we recommend that you [sign up for a free API key](https://www.alchemy.com/layer2/arbitrum). With a dedicated API key, you can:

* access higher request throughput and increase concurrent requests
* query enhanced APIs, gain access to free archive data, logs, and API abstractions
* leverage individualized usage metrics

## Which libraries support Arbitrum?

Popular libraries supporting Arbitrum include Web3.js and Ethers. The Alchemy SDK is an improvement over Web3 and Ethers libraries, providing enhanced API calls, upgraded WebSocket support, and many other benefits.

## What programming languages work with Arbitrum?

Many programming languages work with Arbitrum, including Solidity, Vyper, and Flint. Arbitrum works with all EVM programming languages. Any code that can run on Ethereum can also run on Arbitrum.

## What methods does Alchemy support for the Arbitrum API?

You can find the list of all the methods Alchemy supports for the Arbitrum API on the [Arbitrum API Endpoints](/docs/chains#arbitrum-apis) page.

## My question isn't here, where can I get help?

If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Arbitrum vs. Ethereum API Differences

> Learn about the differences between Arbitrum and Ethereum

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

Arbitrum is designed to be as compatible and consistent with Ethereum as possible, from its high-level RPCs to its low-level bytecode and everything in between. Dapp developers with experience building on Ethereum will likely find that little-to-no new L2-specific knowledge is required to build on Arbitrum.

This document presents an overview of some of the minor differences, perks, and gotchas that devs are advised to be aware of.

# Block and Transaction Properties

## Blocks and Time

Time in L2 is tricky; the timing assumptions one is used to making about L1 blocks don't exactly carry over into the timing of Arbitrum blocks. For details, see [Block Numbers and Time](https://developer.offchainlabs.com/time).

## Block hashes and randomness

Arbitrum's L2 block hashes should not be relied on as a secure source of randomness (see ['blockhash(x);](https://developer.offchainlabs.com/solidity-support))

## L1 Fees

The L2 fees an Arbitrum transaction pays essentially work identically to gas fees on Ethereum. Arbitrum transactions must also, however, pay an L1-fee component to cover the cost of their calldata. (See [L1 pricing](https://developer.offchainlabs.com/arbos/l1-pricing).)

# L1 to L2 Messages

Arbitrum chains support arbitrary L1 to L2 message passing; developers using this functionality should familiarize themselves with how they work (see [L1 to L2 Messaging](https://developer.offchainlabs.com/arbos/l1-to-l2-messaging)). Of particular note:

* The result of a successful initial/"auto"-execution of an L1 to L2 message will be an unsigned L2 tx receipt.
* The `msg.sender` of the L2 side of an L1 to L2 message will be not the initiating L1 address, but rather its address alias.
* Using the special `ethDeposit` method will not result in an L2 contract's fallback function getting triggered. Etc.

# Precompiles

Arbitrum chains include a number of special precompiles not present on Ethereum; see [Common Precompiles](https://developer.offchainlabs.com/arbos/common-precompiles) / [All Precompiles](https://developer.offchainlabs.com/arbos/precompiles).

Of particular note is the [ArbAddressTable](https://developer.offchainlabs.com/arbos/precompiles#ArbAddressTable), which allows contracts to map addresses to integers, saving calldata / fees for addresses expected to be reused as parameters; see [Arb Address Table tutorial](https://github.com/OffchainLabs/arbitrum-tutorials/tree/master/packages/address-table) for example usage.

# Solidity

You can deploy Solidity contracts onto Arbitrum just like you do Ethereum; there are only a few minor differences in behavior. See [Solidity Support](https://developer.offchainlabs.com/solidity-support) for details.

# JSON-RPC Comparisons

This section covers the differences in response body fields you'll find when using the Arbitrum JSON-RPC vs Ethereum mainnet.

<Info>
  Comprehensive documentation on all generally available JSON-RPC methods for Ethereum [can be found at ethereum.org](https://ethereum.org/en/developers/docs/apis/json-rpc/). As Arbitrum has `go-ethereum` at its core, most of the documented methods there can be used with no modifications.
</Info>

## Blocks

When calling `eth_getBlockByHash` or `eth_getBlockByNumber`, Arbitrum includes a few additional fields and leverages some existing fields in different ways than mainnet Ethereum.

### Additional Fields

* `l1BlockNumber`: An approximate L1 block number that occurred before this L2 block. See [Block Numbers and Time](https://developer.offchainlabs.com/time) for more info.
* `sendCount`: The number of L2-to-L1 messages since Nitro genesis.
* `sendRoot`: The Merkle root of the Outbox tree state.

### Existing Fields With Different Behavior

* `extraData`: This field is equivalent to `sendRoot`
* `mixHash`: First 8 bytes is equivalent to `sendCount`, second 8 bytes is equivalent to `l1BlockNumber` difficulty: Fixed at `0x1`
* `gasLimit`: Value is fixed at `0x4000000000000`, but it's important to note that Arbitrum currently has a 32M gas limit per block See full list of [mainnet block fields](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for additional reference.

## Transactions

### Transaction Types

In addition to the [three transaction types](https://ethereum.org/en/developers/docs/transactions/#types-of-transactions) currently supported on mainnet, Arbitrum adds additional types listed below and [documented in full detail here](https://developer.offchainlabs.com/arbos/geth#transaction-types).

On RPC calls that return transactions, such as [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash), the `type` field will reflect the custom codes where applicable.

* `100` - `ArbitrumDepositTxType`: A deposit of ETH from L1 to L2 via the Arbitrum bridge.
* `101` - `ArbitrumUnsignedTxType`: An L1 user can use to call an L2 contract via the bridge.
* `102` - `ArbitrumContractTxType`: Allows an L1 contract to call an L2 contract method via the bridge.
* `104` - `ArbitrumRetryTxType`: Used to [redeem a retryable ticket](https://developer.offchainlabs.com/arbos/l1-to-l2-messaging#redeeming-a-retryable) on L2, which finalizes a [retryable](https://developer.offchainlabs.com/arbos/l1-to-l2-messaging#retryables) that failed to execute automatically (usually due to low gas).
* `105` - `ArbitrumSubmitRetryableTxType`: Retryable tickets are [submitted via the L1 bridge](https://developer.offchainlabs.com/arbos/l1-to-l2-messaging#submitting-a-retryable) and allow arbitrary L1 to L2 messages to be created and executed on L2.
* `106` - `ArbitrumInternalTxType`: Internal transactions created by the ArbOS itself for certain state updates, like L1 base fee and block number.

### Additional Fields

* `requestId`: Added to L1-to-L2 transactions to indicate position in the `Inbox` queue.

### Existing Fields With Different Behavior

* `from`: For L1-to-L2 related transactions, will be the aliased version of the L1's `msg.sender`. See [L1 to L2 Messaging](https://developer.offchainlabs.com/arbos/l1-to-l2-messaging) for more info.

See full list of [mainnet transaction fields](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash) for additional reference.

## Tx Receipts

### Additional Fields

* `l1BlockNumber`: The L1 block number that would be used [for `block.number` calls](https://developer.offchainlabs.com/time).
* `gasUsedForL1`: Amount of gas spent on L1 calldata in units of L2 gas.

See full list of [mainnet transaction receipt](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionreceipt) fields for additional reference.

------

# Arbitrum Nova Network Deprecation Notice

> Important notice regarding the deprecation of Arbitrum Nova network support on Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## ⚠️ Deprecation Notice

As part of our annual process to evaluate the networks supported on Alchemy, we've decided to spin down support of Arbitrum Nova.

Please migrate to an alternate provider.

For Arbitrum Nova network documentation and alternative RPC providers, please visit:

* [Arbitrum Nova Docs](https://docs.arbitrum.io/welcome/arbitrum-gentle-introduction#arbitrum-nova)
* [Arbitrum Nova RPC Info](https://chainlist.org/chain/42170)

------

# Arc API Quickstart

> How to get started building on Arc and using the JSON-RPC API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

*To use the Arc API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*

## Introduction

Arc is an open Layer 1 blockchain by Circle, purpose-built for stablecoin finance, featuring USDC as the native gas token, sub-second finality, and direct integration with Circle's platform for secure access to liquidity and developer tooling.

## What is the Arc API?

The Arc API allows interaction with the Arc network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.

## Getting started

### 1. Choose a package manager (npm or yarn)

Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.

<CodeGroup>
  ```shell npm
  # Begin with npm by following the npm documentation
  # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
  ```

  ```shell yarn
  # For yarn, refer to yarn's installation guide
  # https://classic.yarnpkg.com/lang/en/docs/install
  ```
</CodeGroup>

### 2. Set up your project

Open your terminal and execute the following commands to create and initialize your project:

<CodeGroup>
  ```shell npm
  mkdir arc-api-quickstart
  cd arc-api-quickstart
  npm init --yes
  ```

  ```shell yarn
  mkdir arc-api-quickstart
  cd arc-api-quickstart
  yarn init --yes
  ```
</CodeGroup>

This creates a new directory named `arc-api-quickstart` and initializes a Node.js project within it.

### 3. Make your first request

Install Axios, a popular HTTP client, to make API requests:

<CodeGroup>
  ```shell npm
  npm install axios
  ```

  ```shell yarn
  yarn add axios
  ```
</CodeGroup>

Create an `index.js` file in your project directory and paste the following code:

<CodeGroup>
  ```javascript index.js
  const axios = require('axios');

  const url = 'https://arc-testnet.g.alchemy.com/v2/your-api-key';

  const payload = {
    jsonrpc: '2.0',
    id: 1,
    method: 'eth_blockNumber',
    params: []
  };

  axios.post(url, payload)
    .then(response => {
      console.log('Latest Block:', response.data.result);
    })
    .catch(error => {
      console.error(error);
    });
  ```
</CodeGroup>

Replace `your-api-key` with your actual Alchemy API key that you can get from the [Alchemy Dashboard](https://dashboard.alchemy.com/signup).

### 4. Run your script

Execute your script to make a request to the Arc network:

<CodeGroup>
  ```shell shell
  node index.js
  ```
</CodeGroup>

You should see the latest block information from Arc's network outputted to your console:

<CodeGroup>
  ```shell shell
  Latest Block: 0x...
  ```
</CodeGroup>

## Next steps

You've made your first request to the Arc network. You can now explore the various JSON-RPC methods available on Arc and start building your dApps on this platform.

------

# Arc API Overview

> Overview of available Arc API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Arc APIs

📙 Get started with our [Arc API Quickstart Guide](/docs/reference/arc-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/arc/arc-api-endpoints/eth-accounts)                               | [`eth_blobBaseFee`](/docs/chains/arc/arc-api-endpoints/eth-blob-base-fee)                   |
| [`eth_blockNumber`](/docs/chains/arc/arc-api-endpoints/eth-block-number)                        | [`eth_call`](/docs/chains/arc/arc-api-endpoints/eth-call)                                   |
| [`eth_callBundle`](/docs/chains/arc/arc-api-endpoints/eth-call-bundle)                          | [`eth_callMany`](/docs/chains/arc/arc-api-endpoints/eth-call-many)                          |
| [`eth_chainId`](/docs/chains/arc/arc-api-endpoints/eth-chain-id)                                | [`eth_createAccessList`](/docs/chains/arc/arc-api-endpoints/eth-create-access-list)         |
| [`eth_estimateGas`](/docs/chains/arc/arc-api-endpoints/eth-estimate-gas)                        | [`eth_feeHistory`](/docs/chains/arc/arc-api-endpoints/eth-fee-history)                      |
| [`eth_gasPrice`](/docs/chains/arc/arc-api-endpoints/eth-gas-price)                              | [`eth_getAccount`](/docs/chains/arc/arc-api-endpoints/eth-get-account)                      |
| [`eth_getAccountInfo`](/docs/chains/arc/arc-api-endpoints/eth-get-account-info)                 | [`eth_getBalance`](/docs/chains/arc/arc-api-endpoints/eth-get-balance)                      |
| [`eth_getBlockByHash`](/docs/chains/arc/arc-api-endpoints/eth-get-block-by-hash)                | [`eth_getBlockByNumber`](/docs/chains/arc/arc-api-endpoints/eth-get-block-by-number)        |
| [`eth_getBlockReceipts`](/docs/chains/arc/arc-api-endpoints/eth-get-block-receipts)             | [`eth_getBlockTransactionCountByHash`](/docs/chains/arc/arc-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/arc/arc-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/arc/arc-api-endpoints/eth-get-code)                            |
| [`eth_getFilterChanges`](/docs/chains/arc/arc-api-endpoints/eth-get-filter-changes)             | [`eth_getFilterLogs`](/docs/chains/arc/arc-api-endpoints/eth-get-filter-logs)               |
| [`eth_getLogs`](/docs/chains/arc/arc-api-endpoints/eth-get-logs)                                | [`eth_getProof`](/docs/chains/arc/arc-api-endpoints/eth-get-proof)                          |
| [`eth_getRawTransactionByHash`](/docs/chains/arc/arc-api-endpoints/eth-get-raw-transaction-by-hash) | [`eth_getStorageAt`](/docs/chains/arc/arc-api-endpoints/eth-get-storage-at)                 |
| [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/arc/arc-api-endpoints/eth-get-transaction-by-block-hash-and-index) | [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/arc/arc-api-endpoints/eth-get-transaction-by-block-number-and-index) |
| [`eth_getTransactionByHash`](/docs/chains/arc/arc-api-endpoints/eth-get-transaction-by-hash)    | [`eth_getTransactionCount`](/docs/chains/arc/arc-api-endpoints/eth-get-transaction-count)   |
| [`eth_getTransactionReceipt`](/docs/chains/arc/arc-api-endpoints/eth-get-transaction-receipt)   | [`eth_getUncleByBlockHashAndIndex`](/docs/chains/arc/arc-api-endpoints/eth-get-uncle-by-block-hash-and-index) |
| [`eth_getUncleByBlockNumberAndIndex`](/docs/chains/arc/arc-api-endpoints/eth-get-uncle-by-block-number-and-index) | [`eth_getUncleCountByBlockHash`](/docs/chains/arc/arc-api-endpoints/eth-get-uncle-count-by-block-hash) |
| [`eth_getUncleCountByBlockNumber`](/docs/chains/arc/arc-api-endpoints/eth-get-uncle-count-by-block-number) | [`eth_maxPriorityFeePerGas`](/docs/chains/arc/arc-api-endpoints/eth-max-priority-fee-per-gas) |
| [`eth_newBlockFilter`](/docs/chains/arc/arc-api-endpoints/eth-new-block-filter)                 | [`eth_newFilter`](/docs/chains/arc/arc-api-endpoints/eth-new-filter)                        |
| [`eth_newPendingTransactionFilter`](/docs/chains/arc/arc-api-endpoints/eth-new-pending-transaction-filter) | [`eth_protocolVersion`](/docs/chains/arc/arc-api-endpoints/eth-protocol-version)            |
| [`eth_sendRawTransaction`](/docs/chains/arc/arc-api-endpoints/eth-send-raw-transaction)         | [`eth_sendRawTransactionSync`](/docs/chains/arc/arc-api-endpoints/eth-send-raw-transaction-sync) |
| [`eth_simulateV1`](/docs/chains/arc/arc-api-endpoints/eth-simulate-v-1)                         | [`eth_submitWork`](/docs/chains/arc/arc-api-endpoints/eth-submit-work)                      |
| [`eth_subscribe`](/docs/chains/arc/arc-api-endpoints/eth-subscribe)                             | [`eth_uninstallFilter`](/docs/chains/arc/arc-api-endpoints/eth-uninstall-filter)            |
| [`eth_unsubscribe`](/docs/chains/arc/arc-api-endpoints/eth-unsubscribe)                         | [`net_version`](/docs/chains/arc/arc-api-endpoints/net-version)                             |
| [`web3_clientVersion`](/docs/chains/arc/arc-api-endpoints/web-3-client-version)                 | [`web3_sha3`](/docs/chains/arc/arc-api-endpoints/web-3-sha-3)                               |

## Related APIs

The following Alchemy APIs are also supported on Arc:

* [Bundler API](/docs/wallets/transactions/low-level-infra/bundler/overview)
* [Gas Manager API](/docs/wallets/api-reference/gas-manager-admin-api/gas-abstraction-api-endpoints/alchemy-request-gas-and-paymaster-and-data)
* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blobBaseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns the base fee per blob gas in wei for the current block.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-blob-base-fee

## Result

**Blob Base Fee** (string): The base fee per blob gas, in wei, as a hexadecimal encoded unsigned integer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blobBaseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_callBundle

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Simulates a bundle of signed transactions against a specific block number, including simulating a bundle at the top of the next block. This method allows you to test transaction bundles before submitting them to the network.


Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-call-bundle

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Bundle parameters | object | Yes | The bundle simulation parameters containing the transactions to simulate and the block context for the simulation.  |

## Result

**Bundle simulation result** (object): The result of the bundle simulation containing gas usage, fees, and individual transaction results. 

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_callBundle",
  "params": [
    {
      "txs": [
        "0x123abc...",
        "0x456def..."
      ],
      "blockNumber": "0xb63dcd",
      "stateBlockNumber": "latest",
      "timestamp": 1615920932
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "bundleGasPrice": "476190476193",
    "bundleHash": "0x73b1e258c7a42fd0230b2fd05529c5d4b6fcb66c227783f8bece8aeacdd1db2e",
    "coinbaseDiff": "20000000000126000",
    "ethSentToCoinbase": "20000000000000000",
    "gasFees": "126000",
    "results": [
      {
        "coinbaseDiff": "10000000000063000",
        "ethSentToCoinbase": "10000000000000000",
        "fromAddress": "0x02A727155aeF8609c9f7F2179b2a1f560B39F5A0",
        "gasFees": "63000",
        "gasPrice": "476190476193",
        "gasUsed": 21000,
        "toAddress": "0x73625f59CAdc5009Cb458B751b3E7b6b48C06f2C",
        "txHash": "0x669b4704a7d993a946cdd6e2f95233f308ce0c4649d2e04944e8299efcaa098a",
        "value": "0x"
      },
      {
        "coinbaseDiff": "10000000000063000",
        "ethSentToCoinbase": "10000000000000000",
        "fromAddress": "0x02A727155aeF8609c9f7F2179b2a1f560B39F5A0",
        "gasFees": "63000",
        "gasPrice": "476190476193",
        "gasUsed": 21000,
        "toAddress": "0x73625f59CAdc5009Cb458B751b3E7b6b48C06f2C",
        "txHash": "0xa839ee83465657cac01adc1d50d96c1b586ed498120a84a64749c0034b4f19fa",
        "value": "0x"
      }
    ],
    "stateBlockNumber": 5221585,
    "totalGasUsed": 42000
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_callBundle",
  "params": [
    {
      "txs": [
        "0x123abc...",
        "0x456def..."
      ],
      "blockNumber": "0xb63dcd",
      "stateBlockNumber": "latest",
      "timestamp": 1615920932
    }
  ]
}'
```



------

# eth_callMany

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Executes a list of transaction bundles without creating transactions on the blockchain. This method is particularly useful for simulating transactions to understand their potential outcomes. It supports simulating transactions at an intermediate state of a block, simulating multiple transactions with sequential dependencies, and overwriting block headers.


Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-call-many

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Bundles | object[] | Yes | A list of bundles where each bundle contains transactions and optional block overrides.  |
| Simulation context | object | Yes | The context for the simulation, specifying the blockNumber or Tag and transactionIndex.  |
| State overrides | object | No | An optional mapping for state overrides, following the eth_call standard.  |
| Timeout | integer | No | The maximum running time for the simulations in milliseconds, defaulting to 5000 milliseconds.  |

## Result

**Call results** (object[][]): A list of lists containing either the return value of the executed contract call or the reverted error code. Each bundle returns an array with one result per transaction. 

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "from": "0x1985ea6e9c68e1c272d8209f3b478ac2fdb25c87",
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gas": "0x0f4240",
            "gasPrice": "0x7896e72a",
            "data": "0xa9059cbb000000000000000000000000bc0e63965946815d105e7591407704e6e1964e590000000000000000000000000000000000000000000000000000000005f5e100"
          },
          {
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gasPrice": "0x7896e72a",
            "data": "0x70a08231000000000000000000000000bc0e63965946815d105e7591407704e6e1964e59"
          }
        ],
        "blockOverride": {
          "blockNumber": "0xbb5fe9"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    [
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000000000001"
      },
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000005f5e100"
      }
    ]
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "type": "string",
            "nonce": "string",
            "to": null,
            "from": "string",
            "gas": "string",
            "value": "string",
            "input": "string",
            "gasPrice": "string",
            "maxPriorityFeePerGas": "string",
            "maxFeePerGas": "string",
            "maxFeePerBlobGas": "string",
            "accessList": [
              {
                "address": "string",
                "storageKeys": [
                  "string"
                ]
              }
            ],
            "blobVersionedHashes": [
              "string"
            ],
            "blobs": [
              "string"
            ],
            "chainId": "string"
          }
        ],
        "blockOverride": {
          "blockNumber": "string",
          "blockHash": "string",
          "coinbase": "string",
          "timestamp": "string",
          "difficulty": "string",
          "gasLimit": "string",
          "baseFee": "string"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Retrieves account information including balance, code, and nonce for a given address at a specified block.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the account information. |

## Result

**Account information** (object): An object containing the account's balance, code, and nonce.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "balance": "0x1cfe56f3795885980000",
    "code": "0x",
    "nonce": "0x5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_newPendingTransactionFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new pending transactions arrive.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-new-pending-transaction-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newPendingTransactionFilter"
}'
```



------

# eth_protocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns the current protocol version used by the client.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-protocol-version

## Result

**Protocol Version** (string): The protocol version as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3f",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_protocolVersion"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_sendRawTransactionSync

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Sends a raw transaction to the network and waits for the transaction to be mined.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-send-raw-transaction-sync

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction data | string | Yes | The signed transaction data, RLP-encoded and hex-encoded. |
| Timeout | integer | No | Maximum wait time in milliseconds. Must be a positive integer between 1 and the node-configured maximum timeout. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "transactionHash": "0x1234abcd...",
    "blockHash": "0xabcd1234...",
    "blockNumber": "0x10d4f",
    "cumulativeGasUsed": "0x5208",
    "gasUsed": "0x5208",
    "contractAddress": null,
    "logs": [],
    "status": "0x1"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ]
}'
```



------

# eth_simulateV1

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Enables simulation of complex transactions and state changes without modifying the blockchain.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-simulate-v-1

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Simulation object | object | Yes | The object containing all simulation details such as calls, overrides, etc. |

## Result

**Simulation result** (object[]): The result of the simulation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "baseFeePerGas": "0x9",
      "blobGasUsed": "0x0",
      "calls": [
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000001"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
              "transactionIndex": "0x0",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x0",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        },
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000002"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd",
              "transactionIndex": "0x1",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x1",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        }
      ],
      "difficulty": "0x0",
      "excessBlobGas": "0x3b80000",
      "extraData": "0x",
      "gasLimit": "0x22550dd",
      "gasUsed": "0xa410",
      "hash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "miner": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
      "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "nonce": "0x0000000000000000",
      "number": "0x1530a5e",
      "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "parentHash": "0x513a0aa73024f294cdbcb0312af0c920850035f0552d7349ebb30717de30b1cc",
      "receiptsRoot": "0x75308898d571eafb5cd8cde8278bf5b3d13c5f6ec074926de3bb895b519264e1",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "size": "0x29c",
      "stateRoot": "0x65ea44c8bd5f9edbf269b6446b460b3e7378abb25c78fd5d70f0e2ef59296b25",
      "timestamp": "0x67f43327",
      "transactions": [
        "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
        "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd"
      ],
      "transactionsRoot": "0xd6902f31ae9d2169b77cd88611c6afd691ea5a7e604e44c71f663fda0c5d1c28",
      "uncles": [],
      "withdrawals": [],
      "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    }
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://arc-testnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/arc/arc-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://arc-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Arc API FAQ

> Frequently asked questions about the Arc API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Arc?
Arc is an open Layer 1 blockchain by Circle, purpose-built for stablecoin finance, featuring USDC as the native gas token, sub-second finality, and direct integration with Circle's platform for secure access to liquidity and developer tooling.

## How do I get started with Arc?
Check out our [Arc API Quickstart guide](/docs/reference/arc-api-quickstart) to get started building on Arc.

## What is the Arc API?
The Arc API allows you to interface with the Arc network. With this API, you can execute transactions, query onchain data, and interact with the Arc network, relying on a JSON-RPC standard.

## Is Arc EVM compatible?
Yes, Arc is EVM compatible.

## What API does Arc use?
Arc uses the JSON-RPC API standard. This API is crucial for any blockchain interaction on the Arc network, allowing you to read block/transaction data, query chain information, execute smart contracts, and store data onchain.

## What methods are supported on Arc?
Arc supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the Arc API endpoints documentation for a complete list.

## What is a Arc API key?
When accessing the Arc network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup).

## Which libraries support Arc?
Common Ethereum libraries like [ethers.js](https://docs.ethers.org/v5/) should be compatible with Arc, given its EVM nature.

## My question isn’t here, where can I get help?
If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Astar API Quickstart

> How to get started building on Astar using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Astar Network is a multi-chain smart contract platform that supports both EVM and WebAssembly (Wasm) smart contracts. As a Polkadot parachain, Astar offers cross-chain interoperability and a scalable environment for building decentralized applications.

The Astar API allows interaction with the Astar network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an Astar client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { astar } from "viem/chains";

const client = createPublicClient({
  chain: astar,
  transport: http("https://astar-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (ASTR):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Astar APIs

For the full list of Astar APIs, see the [Astar API Endpoints](/docs/chains#astar-apis).

------

# Astar API Overview

> Overview of available Astar API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Astar APIs

📙 Get started with our [Astar API Quickstart Guide](/docs/reference/astar-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`chain_getFinalizedHead`](/docs/chains/astar/astar-api-endpoints/chain-get-finalized-head)     | [`chain_getHeader`](/docs/chains/astar/astar-api-endpoints/chain-get-header)                |
| [`eth_accounts`](/docs/chains/astar/astar-api-endpoints/eth-accounts)                           | [`eth_blockNumber`](/docs/chains/astar/astar-api-endpoints/eth-block-number)                |
| [`eth_call`](/docs/chains/astar/astar-api-endpoints/eth-call)                                   | [`eth_chainId`](/docs/chains/astar/astar-api-endpoints/eth-chain-id)                        |
| [`eth_estimateGas`](/docs/chains/astar/astar-api-endpoints/eth-estimate-gas)                    | [`eth_feeHistory`](/docs/chains/astar/astar-api-endpoints/eth-fee-history)                  |
| [`eth_gasPrice`](/docs/chains/astar/astar-api-endpoints/eth-gas-price)                          | [`eth_getBalance`](/docs/chains/astar/astar-api-endpoints/eth-get-balance)                  |
| [`eth_getBlockByHash`](/docs/chains/astar/astar-api-endpoints/eth-get-block-by-hash)            | [`eth_getBlockByNumber`](/docs/chains/astar/astar-api-endpoints/eth-get-block-by-number)    |
| [`eth_getBlockReceipts`](/docs/chains/astar/astar-api-endpoints/eth-get-block-receipts)         | [`eth_getBlockTransactionCountByHash`](/docs/chains/astar/astar-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/astar/astar-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/astar/astar-api-endpoints/eth-get-code)                        |
| [`eth_getFilterChanges`](/docs/chains/astar/astar-api-endpoints/eth-get-filter-changes)         | [`eth_getFilterLogs`](/docs/chains/astar/astar-api-endpoints/eth-get-filter-logs)           |
| [`eth_getLogs`](/docs/chains/astar/astar-api-endpoints/eth-get-logs)                            | [`eth_getRawTransactionByHash`](/docs/chains/astar/astar-api-endpoints/eth-get-raw-transaction-by-hash) |
| [`eth_getStorageAt`](/docs/chains/astar/astar-api-endpoints/eth-get-storage-at)                 | [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/astar/astar-api-endpoints/eth-get-transaction-by-block-hash-and-index) |
| [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/astar/astar-api-endpoints/eth-get-transaction-by-block-number-and-index) | [`eth_getTransactionByHash`](/docs/chains/astar/astar-api-endpoints/eth-get-transaction-by-hash) |
| [`eth_getTransactionCount`](/docs/chains/astar/astar-api-endpoints/eth-get-transaction-count)   | [`eth_getTransactionReceipt`](/docs/chains/astar/astar-api-endpoints/eth-get-transaction-receipt) |
| [`eth_newBlockFilter`](/docs/chains/astar/astar-api-endpoints/eth-new-block-filter)             | [`eth_newFilter`](/docs/chains/astar/astar-api-endpoints/eth-new-filter)                    |
| [`eth_sendRawTransaction`](/docs/chains/astar/astar-api-endpoints/eth-send-raw-transaction)     | [`eth_submitWork`](/docs/chains/astar/astar-api-endpoints/eth-submit-work)                  |
| [`eth_subscribe`](/docs/chains/astar/astar-api-endpoints/eth-subscribe)                         | [`eth_uninstallFilter`](/docs/chains/astar/astar-api-endpoints/eth-uninstall-filter)        |
| [`eth_unsubscribe`](/docs/chains/astar/astar-api-endpoints/eth-unsubscribe)                     | [`net_version`](/docs/chains/astar/astar-api-endpoints/net-version)                         |
| [`web3_clientVersion`](/docs/chains/astar/astar-api-endpoints/web-3-client-version)             | [`web3_sha3`](/docs/chains/astar/astar-api-endpoints/web-3-sha-3)                           |

## Related APIs

The following Alchemy APIs are also supported on Astar:

* [Debug API](/docs/reference/debug-api-quickstart)

------

# chain_getFinalizedHead

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns the block hash of the most recently finalized block in the canonical chain.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/chain-get-finalized-head

## Result

**BlockHash** (string): The hash of the last finalized block.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "chain_getFinalizedHead"
}'
```



------

# chain_getHeader

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns the header of the block identified by the given hash. If no hash is provided, returns the header of the best (latest) block.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/chain-get-header

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hash | string | No | The block hash to retrieve the header for. If omitted, returns the header of the current best block. |

## Result

**Header** (object): The block header object containing metadata about the block.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "chain_getHeader",
  "params": [
    "string"
  ]
}'
```



------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://astar-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/astar/astar-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://astar-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Astar API FAQ

> Frequently asked questions about the Astar API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is the Astar Network?

Astar is a parachain that connects the Polkadot ecosystem to all major Layer-1 blockchains, including Ethereum, Acala, and eventually Cosmos.

Astar allows you to build dApps fast and cheap by offering high TPS, low transaction costs, and faster finality. By being compatible with Polkadot, it also enables blockchain networks, like Ethereum and Bitcoin, to operate together seamlessly without having to use a centralized exchange.

## What is the Astar API?

The Astar API allows applications to connect to an Astar node that is part of the Astar network. You can interact with onchain data and send different types of transactions to the network by utilizing the endpoints provided by the API. The API follows a JSON-RPC standard. JSON-RPC is a stateless, lightweight, remote procedure call (RPC) protocol encoded in JSON.

## How can I get started using the Astart API?

Explained in the [Astar API Quickstart Guide](/docs/reference/astar-api-quickstart#getting-started-instructions).

## What type of scaling solution is Astar?

Astar is a parachain of the Polkadot network. They operate pretty similarly to L2s on Ethereum.

In other words, parachains are project-specific blockchains that run parallel to the main Polkadot chain (or *Relay Chain*), and inherit the latter’s base features and security.

## Is Astar EVM compatible?

Yes! Astar allows you to build dApps using EVM-compatible smart contracts. This means you can make full use of Ethereum developer tooling, libraries, and Solidity to build on Astar.

## How do I add Astar to MetaMask?

To add the Astar network to MetaMask, create an Astar app on Alchemy. To get a dedicated Astar RPC endpoint, add a new network to MetaMask, and enter the following details:

* **Network Name:** Astar
* **New RPC URL:** YOUR-ALCHEMY-APP-URL
* **Chain ID:** 592
* **Currency Symbol:** ASTR
* **Block Explorer URL:** [https://blockscout.com/astar](https://blockscout.com/astar)

## What testnet should I use for Astar?

You should use the Shibuya testnet for testing Astar applications. Shibuya is the testnet of Shiden (a sister chain of Astar), and Astar developers can use a Shibuya faucet to [get test SBY tokens](https://docs.astar.network/docs/build/environment/faucet/).

<Warning>
  Please note that Alchemy does not currently support the Shibuya testnet for Astar.
</Warning>

## How do I build an app on Astar?

Simply [sign up for Alchemy](https://www.alchemy.com/astar/?a=0c97587fe8), click the “Apps” tab, “Create App”, and then you can start building your new app for either the Astar mainnet!

## How do you bridge Astar to Ethereum?

For bridging, use the [Arthswap Bridge](https://cbridge.celer.network/1/10/DF). When you connect your Metamask wallet, you will be able to send and receive tokens between Astar and Ethereum.

[Alchemy’s overview on cross-chain bridges](https://alchemy.com/overviews/cross-chain-bridges) can further help you understand how bridging works and how these bridges allow chains to interact with each other.

## What wallets can be used with Astar?

Since Astar is EVM-compatible, you can use many wallets on it. Some of the most popular wallets include Metamask, Ledger Nano X, and SafePal S1. We give details on many of these wallets in our [Web3 wallet overview](https://www.alchemy.com/web3-wallets-overview).

## What does Astar use for gas?

Astar uses the ASTR token for gas. Based on current market prices, developing on Astar is, on average, ten thousand times cheaper than on Ethereum. Check out the [Astar gas tracker](https://blockscout.com/astar) for current gas prices.

## What projects are on Astar?

[Arthswap](https://app.arthswap.org/#/swap) is one of the most popular dApps on Astar that facilitates swapping, staking, and bridging.

Currently, there is over 500k people in the Astar community and $200 million has already been locked into the network.

## How do you withdraw ETH from Astar?

To withdraw ETH from Astar, use the [Arthswap Bridge](https://cbridge.celer.network/1/10/DF). Select Astar \**as the* From  *chain, Ethereum as the*To\* chain, and ETH as the token.

## What API does Astar use?

Astar is compatible with the JSON-RPC API standard. The JSON-RPC API powers any blockchain interaction on Astar. This API suite allows you to read block/transaction data, query chain information, execute smart contracts, store data onchain, etc. You interact with Astar’s base JSON-RPC APIs to communicate with its decentralized network of nodes.

## What is an Astar API key?

When accessing the Astar network via a node provider, API services like Alchemy require an API key, which allows you to monitor your apps and access usage metrics.

While many development environments have a set of default shared API keys, they are often throttled during periods of high usage leading to slower response times and a higher likelihood of request failures.

For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup).

With a dedicated API key, you can:

* access **higher request throughput** and **increased concurrent requests**
* query [Data APIs](/docs/reference/data-overview), gaining access to free archive data, logs, and higher-level API abstractions
* leverage **individualized usage metrics**

## What libraries support Astar?

Web3 libraries like Ethers.js and Viem support Astar.

Alchemy offers Astar-compatible versions of:

* [Supernode](/docs/alchemy-supernode)
* [the Notify API](/docs/reference/webhooks-overview)
* [Alchemy WebSockets](/docs/reference/subscription-api)
* [Usage Analytics](/docs/reference/compute-units)
* [Composer](/docs/reference/api-overview)
* [Explorer](/docs/reference/api-overview)
* [Mempool Visualizer](/docs/reference/api-overview)

## What programming languages work with Astar?

Since Astar is EVM-compatible, it is possible to use Solidity and Vyper to build on the network. Alternatively, Astar also supports WASM-compatible smart contracts written with the Rust programming language.

## What methods does Alchemy support for the Astar API?

You can find the list of all the methods Alchemy supports for the Astar API on the [Astar API Endpoints](/docs/chains#astar-apis) page.

## My question isn't here, where can I get help?

If you have any questions or feedback, please contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Avalanche C-Chain API Quickstart

> How to get started building on Avalanche using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Avalanche is an EVM-compatible blockchain known for its high throughput and low latency. Designed to support the needs of decentralized applications (dApps), Avalanche provides a scalable and efficient environment for deploying Ethereum-based applications with near-instant finality.

The Avalanche C-Chain API facilitates interaction with the Avalanche network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with Avalanche both intuitive and straightforward.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an Avalanche client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { avalanche } from "viem/chains";

const client = createPublicClient({
  chain: avalanche,
  transport: http("https://avax-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (AVAX):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Avalanche APIs

For the full list of Avalanche APIs, see the [Avalanche API Endpoints](/docs/chains#avalanche-apis).

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_baseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the base fee for the next block.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-base-fee

## Result

**Base fee** (string): The hex value of the base fee for the next block.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x34630b8a00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_baseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_callMany

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Executes a list of transaction bundles without creating transactions on the blockchain. This method is particularly useful for simulating transactions to understand their potential outcomes. It supports simulating transactions at an intermediate state of a block, simulating multiple transactions with sequential dependencies, and overwriting block headers.


Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-call-many

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Bundles | object[] | Yes | A list of bundles where each bundle contains transactions and optional block overrides.  |
| Simulation context | object | Yes | The context for the simulation, specifying the blockNumber or Tag and transactionIndex.  |
| State overrides | object | No | An optional mapping for state overrides, following the eth_call standard.  |
| Timeout | integer | No | The maximum running time for the simulations in milliseconds, defaulting to 5000 milliseconds.  |

## Result

**Call results** (object[][]): A list of lists containing either the return value of the executed contract call or the reverted error code. Each bundle returns an array with one result per transaction. 

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "from": "0x1985ea6e9c68e1c272d8209f3b478ac2fdb25c87",
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gas": "0x0f4240",
            "gasPrice": "0x7896e72a",
            "data": "0xa9059cbb000000000000000000000000bc0e63965946815d105e7591407704e6e1964e590000000000000000000000000000000000000000000000000000000005f5e100"
          },
          {
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gasPrice": "0x7896e72a",
            "data": "0x70a08231000000000000000000000000bc0e63965946815d105e7591407704e6e1964e59"
          }
        ],
        "blockOverride": {
          "blockNumber": "0xbb5fe9"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    [
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000000000001"
      },
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000005f5e100"
      }
    ]
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "type": "string",
            "nonce": "string",
            "to": null,
            "from": "string",
            "gas": "string",
            "value": "string",
            "input": "string",
            "gasPrice": "string",
            "maxPriorityFeePerGas": "string",
            "maxFeePerGas": "string",
            "maxFeePerBlobGas": "string",
            "accessList": [
              {
                "address": "string",
                "storageKeys": [
                  "string"
                ]
              }
            ],
            "blobVersionedHashes": [
              "string"
            ],
            "blobs": [
              "string"
            ],
            "chainId": "string"
          }
        ],
        "blockOverride": {
          "blockNumber": "string",
          "blockHash": "string",
          "coinbase": "string",
          "timestamp": "string",
          "difficulty": "string",
          "gasLimit": "string",
          "baseFee": "string"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAssetBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Get an account's non-AVAX balance.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-asset-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The owner of the asset |
| blk | string | Yes | The block number or hash which to retrieve the balance |
| assetID | string | Yes | The id of the asset for which the balance is requested |

## Result

**Asset balance** (string): The balance of an asset.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAssetBalance",
  "params": [
    "0x8723e5773847A4Eb5FeEDabD9320802c5c812F46",
    "latest",
    "3RvKBAmQnfYionFXMfW5P8TDZgZiogKbHjM8cjpu16LKAgF5T"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1388",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAssetBalance",
  "params": [
    "0x8723e5773847A4Eb5FeEDabD9320802c5c812F46",
    "latest",
    "3RvKBAmQnfYionFXMfW5P8TDZgZiogKbHjM8cjpu16LKAgF5T"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getChainConfig

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain config of the blockchain.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-chain-config

## Result

**Chain config** (object): The chain config of the blockchain.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getChainConfig"
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_newPendingTransactionFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new pending transactions arrive.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-new-pending-transaction-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newPendingTransactionFilter"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_sendRawTransactionSync

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Sends a raw transaction to the network and waits for the transaction to be mined.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-send-raw-transaction-sync

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction data | string | Yes | The signed transaction data, RLP-encoded and hex-encoded. |
| Timeout | integer | No | Maximum wait time in milliseconds. Must be a positive integer between 1 and the node-configured maximum timeout. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "transactionHash": "0x1234abcd...",
    "blockHash": "0xabcd1234...",
    "blockNumber": "0x10d4f",
    "cumulativeGasUsed": "0x5208",
    "gasUsed": "0x5208",
    "contractAddress": null,
    "logs": [],
    "status": "0x1"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_peerCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of peers currently connected to the client.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/net-peer-count

## Result

**peerCount** (string): The number of connected peers as a hex string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_peerCount"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# platform.getAllValidatorsAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Get the validators and their weights of all Subnets and the Primary Network at a given P-Chain height.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-get-all-validators-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| height | integer | No | The P-Chain height. |

## Result

**result** (object): validatorSets is an object keyed by subnet ID; each value has validators array and totalWeight.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getAllValidatorsAt",
  "params": [
    1
  ]
}'
```



------

# platform.getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Get the balance of an asset controlled by a given address.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| addresses | string[] | Yes | The addresses to get the balance of. |

## Result

**result** (object): The balance and UTXO information. Maps assetID to balance; utxoIDs list UTXOs referencing the address.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getBalance",
  "params": [
    [
      "string"
    ]
  ]
}'
```



------

# platform.getBlockchains

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Get all the blockchains that exist (excluding the P-Chain).

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-get-blockchains

## Result

**result** (object): The list of blockchains.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getBlockchains"
}'
```



------

# platform.getBlockchainStatus

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Get the status of a blockchain.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-get-blockchain-status

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockchainID | string | Yes | The blockchain ID. |

## Result

**result** (object): The blockchain status.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getBlockchainStatus",
  "params": [
    "string"
  ]
}'
```



------

# platform.getCurrentSupply

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns an upper bound on the number of AVAX that exist. This is an upper bound because it does not account for burnt tokens, including transaction fees.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-get-current-supply

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| subnetID | string | No | The subnet ID. If omitted, uses the Primary Network. |

## Result

**result** (object): The supply value.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getCurrentSupply",
  "params": [
    "string"
  ]
}'
```



------

# platform.getCurrentValidators

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

List the current validators of the given Subnet.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-get-current-validators

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| subnetID | string | No | The subnet whose validators are returned. If omitted, returns validators of the Primary Network. |
| nodeIDs | string[] | No | List of node IDs to filter. |

## Result

**result** (object): The list of validators.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getCurrentValidators",
  "params": [
    "string",
    [
      "string"
    ]
  ]
}'
```



------

# platform.getFeeConfig

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the dynamic fee configuration of the P-Chain.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-get-fee-config

## Result

**result** (object): The fee configuration (weights, capacity, rates, minPrice, excessConversionConstant).

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getFeeConfig"
}'
```



------

# platform.getFeeState

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current fee state of the P-Chain.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-get-fee-state

## Result

**result** (object): The current fee state (capacity, excess, price, timestamp).

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getFeeState"
}'
```



------

# platform.getHeight

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the height of the last accepted block.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-get-height

## Result

**result** (object): The current height.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getHeight"
}'
```



------

# platform.getMinStake

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Get the minimum amount of AVAX required to validate the Primary Network and the minimum amount of AVAX that can be delegated.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-get-min-stake

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| subnetID | string | No | The subnet ID. If omitted, uses the Primary Network. |

## Result

**result** (object): Minimum validator and delegator stake.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getMinStake",
  "params": [
    "string"
  ]
}'
```



------

# platform.getRewardUTXOs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the UTXOs that were rewarded after the provided transaction's staking or delegation period ended.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-get-reward-utx-os

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txID | string | Yes | The transaction ID of the staking or delegating transaction. |
| encoding | string | No | Format for returned UTXOs. Can be "hex" when provided. |

## Result

**result** (object): The reward UTXOs (numFetched, utxos array, encoding).

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getRewardUTXOs",
  "params": [
    "string",
    "string"
  ]
}'
```



------

# platform.getStake

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Get the amount of nAVAX staked by a set of addresses. The amount returned does not include staking rewards.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-get-stake

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| addresses | string[] | Yes | The addresses to get staked amounts for. |
| validatorsOnly | boolean | No | If true, skip checking delegators for stake. |

## Result

**result** (object): Map of assetID to staked amount; stakedOutputs (encoded); encoding.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getStake",
  "params": [
    [
      "string"
    ],
    false
  ]
}'
```



------

# platform.getStakingAssetID

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve an assetID for a subnet's staking asset. Currently this always returns the Primary Network's staking assetID.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-get-staking-asset-id

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| subnetID | string | No | The subnet ID. If omitted, uses the Primary Network. |

## Result

**result** (object): The staking asset ID.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getStakingAssetID",
  "params": [
    "string"
  ]
}'
```



------

# platform.getSubnets

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Get all the Subnets that exist.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-get-subnets

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| ids | string[] | No | Optional list of subnet IDs to retrieve. |

## Result

**result** (object): The list of subnets.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getSubnets",
  "params": [
    [
      "string"
    ]
  ]
}'
```



------

# platform.getTimestamp

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current timestamp of the P-Chain.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-get-timestamp

## Result

**result** (object): The current timestamp.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getTimestamp"
}'
```



------

# platform.getTotalStake

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Get the total amount of nAVAX staked on the Primary Network.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-get-total-stake

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| subnetID | string | No | The subnet ID. If omitted, uses the Primary Network. |

## Result

**result** (object): The total stake.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getTotalStake",
  "params": [
    "string"
  ]
}'
```



------

# platform.getTx

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Get a transaction by its ID.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-get-tx

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txID | string | Yes | The transaction ID. |
| encoding | string | No | Format for the returned transaction. "hex" or "json". Defaults to "hex". |

## Result

**result** (object): The transaction and encoding used.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getTx",
  "params": [
    "string",
    "string"
  ]
}'
```



------

# platform.getTxStatus

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Get a transaction's status by its ID. Status is one of Committed, Processing, Dropped (includes reason), Unknown.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-get-tx-status

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txID | string | Yes | The transaction ID. |

## Result

**result** (object): status (Committed|Processing|Dropped|Unknown); Dropped may include reason.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getTxStatus",
  "params": [
    "string"
  ]
}'
```



------

# platform.getUTXOs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Get the UTXOs that reference a given set of addresses. Supports pagination via startIndex/endIndex.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-get-utx-os

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| addresses | string[] | Yes | The addresses to get UTXOs for. |
| limit | integer | No | Maximum number of UTXOs to return (default 1024 if omitted or greater). |
| startIndex | object | No | Pagination cursor; object with address and utxo. Omit to fetch from start. |
| sourceChain | string | No | If set, fetch UTXOs exported from this chain (e.g. "X" for X-Chain). |
| encoding | string | No | Format for returned UTXOs. Can be "hex" when provided. |

## Result

**result** (object): numFetched, utxos array, endIndex for pagination, encoding.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getUTXOs",
  "params": [
    [
      "string"
    ],
    1,
    {
      "address": "string",
      "utxo": "string"
    },
    "string",
    "string"
  ]
}'
```



------

# platform.getValidatorFeeConfig

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the validator fee configuration of the P-Chain (L1 validator capacity, target, minPrice, etc.).

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-get-validator-fee-config

## Result

**result** (object): capacity, target, minPrice, excessConversionConstant (and optionally targetPerSecond).

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getValidatorFeeConfig"
}'
```



------

# platform.getValidatorFeeState

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current validator fee state of the P-Chain.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-get-validator-fee-state

## Result

**result** (object): excess, price, timestamp.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getValidatorFeeState"
}'
```



------

# platform.getValidatorsAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Get the validators and their weights of a subnet or the Primary Network at a given P-Chain height.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-get-validators-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| height | integer | No | The P-Chain height. |
| subnetID | string | No | The subnet ID. If omitted, uses the Primary Network. |

## Result

**result** (object): validators is an object mapping nodeID to weight.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getValidatorsAt",
  "params": [
    1,
    "string"
  ]
}'
```



------

# platform.issueTx

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Issue a transaction to the Platform Chain.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-issue-tx

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| tx | string | Yes | The byte representation of the transaction. |
| encoding | string | No | Encoding format for the transaction bytes. Can be "hex" when provided. |

## Result

**result** (object): The transaction ID.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.issueTx",
  "params": [
    "string",
    "string"
  ]
}'
```



------

# platform.sampleValidators

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Sample validators from the specified Subnet. If subnetID is omitted, defaults to the Primary Network.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-sample-validators

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| size | integer | Yes | The number of validators to sample. |
| subnetID | string | No | The subnet to sample from. If omitted, uses the Primary Network. |

## Result

**result** (object): The sampled validators.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.sampleValidators",
  "params": [
    1,
    "string"
  ]
}'
```



------

# platform.validatedBy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Get the Subnet that validates a given blockchain.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-validated-by

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockchainID | string | Yes | The blockchain ID. |

## Result

**result** (object): The subnet ID that validates the blockchain.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.validatedBy",
  "params": [
    "string"
  ]
}'
```



------

# platform.validates

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Get the IDs of the blockchains a Subnet validates.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/platform-validates

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| subnetID | string | Yes | The subnet ID. |

## Result

**result** (object): The list of blockchain IDs the Subnet validates.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.validates",
  "params": [
    "string"
  ]
}'
```



------

# txpool_content

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of the exact details of all transactions currently pending for inclusion in the next blocks, as well as ones that are being scheduled for future execution.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/txpool-content

## Result

**content** (object): Object with pending and queued transactions grouped by sender address and nonce.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "txpool_content"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/avalanche/avalanche-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Avalanche C-Chain API FAQ

> Frequently asked questions about the Avalanche Chain

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Avalanche?

Avalanche is a high-performance blockchain platform designed to enable decentralized applications (dApps) and custom blockchain networks. It aims to deliver scalable and efficient transactions with a focus on speed, low costs, and environmental sustainability.

## What is the Avalanche API?

The Avalanche API facilitates interaction with the Avalanche network through a collection of JSON-RPC methods. It provides developers with tools to interact with the blockchain, enabling functionalities such as transactions, smart contract deployment, and data retrieval.

## How can I get started using the Avalanche API?

Explained in [Avalanche Chain API Quickstart](/docs/reference/avalanche-api-quickstart).

## Is Avalanche EVM compatible?

Yes, Avalanche is fully compatible with the Ethereum Virtual Machine (EVM). This compatibility allows Ethereum developers to port their projects to Avalanche with minimal changes, taking advantage of the chain's high throughput and low transaction fees.

## What API does Avalanche use?

Avalanche uses the JSON-RPC API standard for blockchain interactions. This is the same standard used by Ethereum.

## What is an Avalanche API key?

When accessing the Avalanche network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network.

For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!

## Which libraries support Avalanche?

Given Avalanche's EVM compatibility, popular Ethereum libraries like ethers.js and web3.js are fully compatible with Avalanche. This allows for seamless development and integration for those familiar with Ethereum's development ecosystem.

## What programming languages work with Avalanche?

Similar to Ethereum, Avalanche supports a range of programming languages for blockchain interaction and smart contract development, including Solidity for smart contracts, as well as JavaScript and TypeScript for dApp development and offchain interactions.

## What does Avalanche use for gas?

Avalanche uses AVAX, its native cryptocurrency, for transaction fees, gas, and other network activities.

## What methods does Alchemy support for the Avalanche API?

You can find the list of all the methods Alchemy supports for the Avalanche API on the [Avalanche API Endpoints](/docs/chains#avalanche-apis) page.

## My question isn't here, where can I get help?

If you have any questions or feedback, please contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Avalanche P-Chain API Quickstart

> How to get started with the Avalanche Platform Chain (P-Chain) using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

The Avalanche Platform Chain (P-Chain) is the metadata chain on Avalanche that coordinates validators, manages staking, and handles creation of subnets and blockchains. Unlike the Avalanche C-Chain (EVM), the Avalanche P-Chain uses the `platform.*` JSON-RPC API for validator set management, delegations, and subnet operations.

**The Avalanche P-Chain is now live on both mainnet and Fuji.** Use the same Alchemy base URLs as Avalanche C-Chain and append `/ext/bc/P` after your API key in the path.

## Getting started

### 1. Choose a package manager (npm or yarn)

Select a package manager to manage your project's dependencies. The choice between `npm` and `yarn` depends on your preference or project requirements.

| npm | yarn |
| --- | ---- |
| Follow the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | Refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |

### 2. Set up your project

Open your terminal and run:

<CodeGroup>
  ```text npm
  mkdir avalanche-p-api-quickstart
  cd avalanche-p-api-quickstart
  npm init --yes
  ```

  ```text yarn
  mkdir avalanche-p-api-quickstart
  cd avalanche-p-api-quickstart
  yarn init -y
  ```
</CodeGroup>

This creates a new directory and initializes a Node.js project.

### 3. Make your first request

Create an `index.js` file in your project directory. The following example uses native `fetch` (Node.js 18+), so no extra dependencies are needed. Replace `YOUR_ALCHEMY_API_KEY` with your Alchemy API key.

<CodeGroup>
  ```javascript index.js
  (async () => {
    const API_KEY = 'YOUR_ALCHEMY_API_KEY';
    const url = `https://avax-mainnet.g.alchemy.com/v2/${API_KEY}/ext/bc/P`;

    try {
      const response = await fetch(url, {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({
          jsonrpc: '2.0',
          id: 1,
          method: 'platform.getHeight',
          params: {}
        })
      });

      if (!response.ok) {
        throw new Error(`HTTP ${response.status}: ${await response.text()}`);
      }

      const data = await response.json();
      if (data.error) {
        throw new Error(data.error.message || 'RPC error');
      }
      console.log('P-Chain height:', data.result?.height ?? data);
    } catch (error) {
      console.error('Error fetching P-Chain height:', error.message);
    }
  })();
  ```
</CodeGroup>

Run the script:

<CodeGroup>
  ```bash bash
  node index.js
  ```
</CodeGroup>

You should see the current P-Chain height in the console (e.g. `P-Chain height: 35000000`).

## Send your first request on Alchemy (curl)

You can also call the API with `curl` from the terminal. Example for **Mainnet** (`platform.getHeight`):

<CodeGroup>
```bash
curl -X POST https://avax-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY/ext/bc/P \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"platform.getHeight","params":{}}'
```
</CodeGroup>

Example for **Fuji** (`platform.getTimestamp`):

<CodeGroup>
```bash
curl -X POST https://avax-fuji.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY/ext/bc/P \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"platform.getTimestamp","params":{}}'
```
</CodeGroup>

## Get current validators

<CodeGroup>
```bash
curl -X POST https://avax-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY/ext/bc/P \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"platform.getCurrentValidators","params":{}}'
```
</CodeGroup>

To filter by subnet or specific node IDs, pass optional params:

<CodeGroup>
```bash
curl -X POST https://avax-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY/ext/bc/P \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"platform.getCurrentValidators","params":{"subnetID":"11111111111111111111111111111111LpoYY"}}'
```
</CodeGroup>

## Get min stake

<CodeGroup>
```bash
curl -X POST https://avax-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY/ext/bc/P \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"platform.getMinStake","params":{"subnetID":"11111111111111111111111111111111LpoYY"}}'
```
</CodeGroup>

## Get subnets

<CodeGroup>
```bash
curl -X POST https://avax-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY/ext/bc/P \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"platform.getSubnets","params":{}}'
```
</CodeGroup>

------

# Avalanche P-Chain API Overview

> Overview of available Avalanche Platform Chain (P-Chain) API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Avalanche P-Chain APIs

📙 Get started with our [Avalanche P-Chain API Quickstart Guide](/docs/reference/avalanche-p-api-quickstart).

|                                                                                                 |                                                                                                       |
| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| [`platform.getBalance`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-balance) | [`platform.getBlockchainStatus`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-blockchain-status) |
| [`platform.getBlockchains`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-blockchains) | [`platform.getCurrentSupply`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-current-supply) |
| [`platform.getCurrentValidators`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-current-validators) | [`platform.getFeeConfig`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-fee-config) |
| [`platform.getFeeState`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-fee-state) | [`platform.getHeight`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-height) |
| [`platform.getMinStake`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-min-stake) | |
| [`platform.getStake`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-stake) | [`platform.getStakingAssetID`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-staking-asset-id) |
| [`platform.getSubnets`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-subnets) | [`platform.getTimestamp`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-timestamp) |
| [`platform.getTotalStake`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-total-stake) | [`platform.getTx`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-tx) |
| [`platform.getTxStatus`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-tx-status) | |
| [`platform.getValidatorFeeConfig`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-validator-fee-config) | [`platform.getValidatorFeeState`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-validator-fee-state) |
| [`platform.getValidatorsAt`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-validators-at) | [`platform.getAllValidatorsAt`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-all-validators-at) |
| [`platform.issueTx`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-issue-tx) | [`platform.sampleValidators`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-sample-validators) |
| [`platform.validatedBy`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-validated-by) | [`platform.validates`](/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-validates) |

------

# platform.getAllValidatorsAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Get the validators and their weights of all Subnets and the Primary Network at a given P-Chain height.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-all-validators-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| height | integer | No | The P-Chain height. |

## Result

**result** (object): validatorSets is an object keyed by subnet ID; each value has validators array and totalWeight.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getAllValidatorsAt",
  "params": [
    1
  ]
}'
```



------

# platform.getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Get the balance of an asset controlled by a given address.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| addresses | string[] | Yes | The addresses to get the balance of. |

## Result

**result** (object): The balance and UTXO information. Maps assetID to balance; utxoIDs list UTXOs referencing the address.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getBalance",
  "params": [
    [
      "string"
    ]
  ]
}'
```



------

# platform.getBlockchains

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Get all the blockchains that exist (excluding the P-Chain).

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-blockchains

## Result

**result** (object): The list of blockchains.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getBlockchains"
}'
```



------

# platform.getBlockchainStatus

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Get the status of a blockchain.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-blockchain-status

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockchainID | string | Yes | The blockchain ID. |

## Result

**result** (object): The blockchain status.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getBlockchainStatus",
  "params": [
    "string"
  ]
}'
```



------

# platform.getCurrentSupply

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Returns an upper bound on the number of AVAX that exist. This is an upper bound because it does not account for burnt tokens, including transaction fees.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-current-supply

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| subnetID | string | No | The subnet ID. If omitted, uses the Primary Network. |

## Result

**result** (object): The supply value.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getCurrentSupply",
  "params": [
    "string"
  ]
}'
```



------

# platform.getCurrentValidators

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

List the current validators of the given Subnet.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-current-validators

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| subnetID | string | No | The subnet whose validators are returned. If omitted, returns validators of the Primary Network. |
| nodeIDs | string[] | No | List of node IDs to filter. |

## Result

**result** (object): The list of validators.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getCurrentValidators",
  "params": [
    "string",
    [
      "string"
    ]
  ]
}'
```



------

# platform.getFeeConfig

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Returns the dynamic fee configuration of the P-Chain.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-fee-config

## Result

**result** (object): The fee configuration (weights, capacity, rates, minPrice, excessConversionConstant).

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getFeeConfig"
}'
```



------

# platform.getFeeState

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Returns the current fee state of the P-Chain.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-fee-state

## Result

**result** (object): The current fee state (capacity, excess, price, timestamp).

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getFeeState"
}'
```



------

# platform.getHeight

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Returns the height of the last accepted block.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-height

## Result

**result** (object): The current height.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getHeight"
}'
```



------

# platform.getMinStake

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Get the minimum amount of AVAX required to validate the Primary Network and the minimum amount of AVAX that can be delegated.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-min-stake

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| subnetID | string | No | The subnet ID. If omitted, uses the Primary Network. |

## Result

**result** (object): Minimum validator and delegator stake.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getMinStake",
  "params": [
    "string"
  ]
}'
```



------

# platform.getRewardUTXOs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Returns the UTXOs that were rewarded after the provided transaction's staking or delegation period ended.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-reward-utx-os

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txID | string | Yes | The transaction ID of the staking or delegating transaction. |
| encoding | string | No | Format for returned UTXOs. Can be "hex" when provided. |

## Result

**result** (object): The reward UTXOs (numFetched, utxos array, encoding).

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getRewardUTXOs",
  "params": [
    "string",
    "string"
  ]
}'
```



------

# platform.getStake

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Get the amount of nAVAX staked by a set of addresses. The amount returned does not include staking rewards.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-stake

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| addresses | string[] | Yes | The addresses to get staked amounts for. |
| validatorsOnly | boolean | No | If true, skip checking delegators for stake. |

## Result

**result** (object): Map of assetID to staked amount; stakedOutputs (encoded); encoding.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getStake",
  "params": [
    [
      "string"
    ],
    false
  ]
}'
```



------

# platform.getStakingAssetID

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Retrieve an assetID for a subnet's staking asset. Currently this always returns the Primary Network's staking assetID.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-staking-asset-id

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| subnetID | string | No | The subnet ID. If omitted, uses the Primary Network. |

## Result

**result** (object): The staking asset ID.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getStakingAssetID",
  "params": [
    "string"
  ]
}'
```



------

# platform.getSubnets

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Get all the Subnets that exist.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-subnets

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| ids | string[] | No | Optional list of subnet IDs to retrieve. |

## Result

**result** (object): The list of subnets.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getSubnets",
  "params": [
    [
      "string"
    ]
  ]
}'
```



------

# platform.getTimestamp

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Returns the current timestamp of the P-Chain.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-timestamp

## Result

**result** (object): The current timestamp.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getTimestamp"
}'
```



------

# platform.getTotalStake

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Get the total amount of nAVAX staked on the Primary Network.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-total-stake

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| subnetID | string | No | The subnet ID. If omitted, uses the Primary Network. |

## Result

**result** (object): The total stake.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getTotalStake",
  "params": [
    "string"
  ]
}'
```



------

# platform.getTx

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Get a transaction by its ID.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-tx

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txID | string | Yes | The transaction ID. |
| encoding | string | No | Format for the returned transaction. "hex" or "json". Defaults to "hex". |

## Result

**result** (object): The transaction and encoding used.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getTx",
  "params": [
    "string",
    "string"
  ]
}'
```



------

# platform.getTxStatus

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Get a transaction's status by its ID. Status is one of Committed, Processing, Dropped (includes reason), Unknown.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-tx-status

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txID | string | Yes | The transaction ID. |

## Result

**result** (object): status (Committed|Processing|Dropped|Unknown); Dropped may include reason.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getTxStatus",
  "params": [
    "string"
  ]
}'
```



------

# platform.getUTXOs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Get the UTXOs that reference a given set of addresses. Supports pagination via startIndex/endIndex.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-utx-os

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| addresses | string[] | Yes | The addresses to get UTXOs for. |
| limit | integer | No | Maximum number of UTXOs to return (default 1024 if omitted or greater). |
| startIndex | object | No | Pagination cursor; object with address and utxo. Omit to fetch from start. |
| sourceChain | string | No | If set, fetch UTXOs exported from this chain (e.g. "X" for X-Chain). |
| encoding | string | No | Format for returned UTXOs. Can be "hex" when provided. |

## Result

**result** (object): numFetched, utxos array, endIndex for pagination, encoding.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getUTXOs",
  "params": [
    [
      "string"
    ],
    1,
    {
      "address": "string",
      "utxo": "string"
    },
    "string",
    "string"
  ]
}'
```



------

# platform.getValidatorFeeConfig

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Returns the validator fee configuration of the P-Chain (L1 validator capacity, target, minPrice, etc.).

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-validator-fee-config

## Result

**result** (object): capacity, target, minPrice, excessConversionConstant (and optionally targetPerSecond).

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getValidatorFeeConfig"
}'
```



------

# platform.getValidatorFeeState

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Returns the current validator fee state of the P-Chain.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-validator-fee-state

## Result

**result** (object): excess, price, timestamp.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getValidatorFeeState"
}'
```



------

# platform.getValidatorsAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Get the validators and their weights of a subnet or the Primary Network at a given P-Chain height.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-get-validators-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| height | integer | No | The P-Chain height. |
| subnetID | string | No | The subnet ID. If omitted, uses the Primary Network. |

## Result

**result** (object): validators is an object mapping nodeID to weight.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.getValidatorsAt",
  "params": [
    1,
    "string"
  ]
}'
```



------

# platform.issueTx

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Issue a transaction to the Platform Chain.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-issue-tx

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| tx | string | Yes | The byte representation of the transaction. |
| encoding | string | No | Encoding format for the transaction bytes. Can be "hex" when provided. |

## Result

**result** (object): The transaction ID.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.issueTx",
  "params": [
    "string",
    "string"
  ]
}'
```



------

# platform.sampleValidators

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Sample validators from the specified Subnet. If subnetID is omitted, defaults to the Primary Network.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-sample-validators

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| size | integer | Yes | The number of validators to sample. |
| subnetID | string | No | The subnet to sample from. If omitted, uses the Primary Network. |

## Result

**result** (object): The sampled validators.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.sampleValidators",
  "params": [
    1,
    "string"
  ]
}'
```



------

# platform.validatedBy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Get the Subnet that validates a given blockchain.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-validated-by

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockchainID | string | Yes | The blockchain ID. |

## Result

**result** (object): The subnet ID that validates the blockchain.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.validatedBy",
  "params": [
    "string"
  ]
}'
```



------

# platform.validates

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P

Get the IDs of the blockchains a Subnet validates.

Reference: https://www.alchemy.com/docs/chains/avalanche-p/avalanche-p-chain-api-endpoints/platform-validates

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| subnetID | string | Yes | The subnet ID. |

## Result

**result** (object): The list of blockchain IDs the Subnet validates.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://avax-mainnet.g.alchemy.com/v2/docs-demo/ext/bc/P \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "platform.validates",
  "params": [
    "string"
  ]
}'
```



------

# Avalanche P-Chain API FAQ

> Frequently asked questions about the Avalanche Platform Chain (P-Chain)

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is the Avalanche P-Chain?

The Avalanche Platform Chain (P-Chain) is the metadata chain on Avalanche that maintains the validator set, handles staking and delegation, and coordinates the creation of subnets and blockchains. It is one of the three primary chains (P-Chain, X-Chain, C-Chain) on the Avalanche network.

## What is the Avalanche P-Chain API?

The Avalanche P-Chain API is a JSON-RPC interface that lets you interact with the Avalanche P-Chain. It provides methods such as `platform.getCurrentValidators`, `platform.getHeight`, `platform.getSubnets`, and `platform.getMinStake` for querying validators, blocks, subnets, and staking-related data.

## How can I get started using the Avalanche P-Chain API?

Explained in [Avalanche P-Chain API Quickstart](/docs/reference/avalanche-p-api-quickstart).

## Is the Avalanche P-Chain EVM compatible?

No. The Avalanche P-Chain is not EVM compatible. It uses the `platform.*` JSON-RPC namespace. For EVM-compatible smart contracts and dApps, use the [Avalanche C-Chain](/docs/reference/avalanche-api-quickstart).

## What API does the Avalanche P-Chain use?

The Avalanche P-Chain uses the JSON-RPC 2.0 API standard. Parameters are passed by name (as a JSON object). The same base URLs as the Avalanche C-Chain are used, with `/ext/bc/P` appended after your API key in the path.

## What is an Avalanche API key?

When accessing Avalanche (including the Avalanche P-Chain) via a node provider like Alchemy, you use an API key to authenticate requests.

For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!

## Which libraries support the Avalanche P-Chain?

The P-Chain is not EVM-based, so Ethereum libraries like ethers.js or viem do not apply to `platform.*` methods. You can call the API with any HTTP client (e.g. `curl`, `fetch`, or a generic JSON-RPC client) using the Alchemy endpoint and JSON-RPC 2.0 request format.

## What programming languages work with the Avalanche P-Chain?

Any language that can send HTTP POST requests and handle JSON works with the Avalanche P-Chain API (e.g. JavaScript, TypeScript, Python, Go, Shell). There is no dedicated P-Chain SDK from Alchemy; use the documented JSON-RPC methods with your preferred client.

## What does the Avalanche P-Chain use for gas?

The Avalanche P-Chain uses AVAX (and nAVAX) for staking, delegation, and transaction fees. Fee configuration can be queried via `platform.getFeeConfig` and `platform.getFeeState`.

## Supported Avalanche P-Chain methods

You can find the list of supported Avalanche P-Chain methods on the [Avalanche P-Chain API Overview](/docs/avalanche-p/avalanche-p-api-overview) page.

## My question isn't here, where can I get help?

If you have any questions or feedback, please contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Base API Quickstart

> How to get started building on Base using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Base offers a secure, affordable, and developer-centric Ethereum L2 solution. Designed with the vision of making blockchain more accessible, Base emerges from Coinbase's incubation, with clear intentions to move towards increased decentralization in the future. Its goal is to establish an inclusive, global cryptoeconomy. Notably, Base is developed with Optimism, leveraging the MIT-licensed OP Stack. This collaboration highlights Base's commitment to open-source principles and being in sync with the developer community's needs and aspirations.

The Base API is a collection of JSON-RPC methods that enable developers to interact with the Base network. Notably, it shares the same set of JSON-RPC methods as Optimism. For those already acquainted with [Optimism's API](/docs/reference/optimism-api-endpoints), diving into Base will feel both familiar and effortless.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Base client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { base } from "viem/chains";

const client = createPublicClient({
  chain: base,
  transport: http("https://base-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (ETH):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Base APIs

For the full list of Base APIs, see the [Base API Endpoints](/docs/chains#base-apis).

------

# Base API Overview

> Overview of available Base API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Base APIs

📙 Get started with our [Base API Quickstart Guide](/docs/reference/base-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/base/base-api-endpoints/eth-accounts)                             | [`eth_blobBaseFee`](/docs/chains/base/base-api-endpoints/eth-blob-base-fee)                 |
| [`eth_blockNumber`](/docs/chains/base/base-api-endpoints/eth-block-number)                      | [`eth_call`](/docs/chains/base/base-api-endpoints/eth-call)                                 |
| [`eth_callBundle`](/docs/chains/base/base-api-endpoints/eth-call-bundle)                        | [`eth_callMany`](/docs/chains/base/base-api-endpoints/eth-call-many)                        |
| [`eth_chainId`](/docs/chains/base/base-api-endpoints/eth-chain-id)                              | [`eth_createAccessList`](/docs/chains/base/base-api-endpoints/eth-create-access-list)       |
| [`eth_estimateGas`](/docs/chains/base/base-api-endpoints/eth-estimate-gas)                      | [`eth_feeHistory`](/docs/chains/base/base-api-endpoints/eth-fee-history)                    |
| [`eth_fillTransaction`](/docs/chains/base/base-api-endpoints/eth-fill-transaction)              | [`eth_gasPrice`](/docs/chains/base/base-api-endpoints/eth-gas-price)                        |
| [`eth_getAccount`](/docs/chains/base/base-api-endpoints/eth-get-account)                        | [`eth_getAccountInfo`](/docs/chains/base/base-api-endpoints/eth-get-account-info)           |
| [`eth_getBalance`](/docs/chains/base/base-api-endpoints/eth-get-balance)                        | [`eth_getBlockByHash`](/docs/chains/base/base-api-endpoints/eth-get-block-by-hash)          |
| [`eth_getBlockByNumber`](/docs/chains/base/base-api-endpoints/eth-get-block-by-number)          | [`eth_getBlockReceipts`](/docs/chains/base/base-api-endpoints/eth-get-block-receipts)       |
| [`eth_getBlockTransactionCountByHash`](/docs/chains/base/base-api-endpoints/eth-get-block-transaction-count-by-hash) | [`eth_getBlockTransactionCountByNumber`](/docs/chains/base/base-api-endpoints/eth-get-block-transaction-count-by-number) |
| [`eth_getCode`](/docs/chains/base/base-api-endpoints/eth-get-code)                              | [`eth_getFilterChanges`](/docs/chains/base/base-api-endpoints/eth-get-filter-changes)       |
| [`eth_getFilterLogs`](/docs/chains/base/base-api-endpoints/eth-get-filter-logs)                 | [`eth_getLogs`](/docs/chains/base/base-api-endpoints/eth-get-logs)                          |
| [`eth_getProof`](/docs/chains/base/base-api-endpoints/eth-get-proof)                            | [`eth_getRawTransactionByHash`](/docs/chains/base/base-api-endpoints/eth-get-raw-transaction-by-hash) |
| [`eth_getStorageAt`](/docs/chains/base/base-api-endpoints/eth-get-storage-at)                   | [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/base/base-api-endpoints/eth-get-transaction-by-block-hash-and-index) |
| [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/base/base-api-endpoints/eth-get-transaction-by-block-number-and-index) | [`eth_getTransactionByHash`](/docs/chains/base/base-api-endpoints/eth-get-transaction-by-hash) |
| [`eth_getTransactionCount`](/docs/chains/base/base-api-endpoints/eth-get-transaction-count)     | [`eth_getTransactionReceipt`](/docs/chains/base/base-api-endpoints/eth-get-transaction-receipt) |
| [`eth_getUncleByBlockHashAndIndex`](/docs/chains/base/base-api-endpoints/eth-get-uncle-by-block-hash-and-index) | [`eth_getUncleByBlockNumberAndIndex`](/docs/chains/base/base-api-endpoints/eth-get-uncle-by-block-number-and-index) |
| [`eth_getUncleCountByBlockHash`](/docs/chains/base/base-api-endpoints/eth-get-uncle-count-by-block-hash) | [`eth_getUncleCountByBlockNumber`](/docs/chains/base/base-api-endpoints/eth-get-uncle-count-by-block-number) |
| [`eth_maxPriorityFeePerGas`](/docs/chains/base/base-api-endpoints/eth-max-priority-fee-per-gas) | [`eth_newBlockFilter`](/docs/chains/base/base-api-endpoints/eth-new-block-filter)           |
| [`eth_newFilter`](/docs/chains/base/base-api-endpoints/eth-new-filter)                          | [`eth_newPendingTransactionFilter`](/docs/chains/base/base-api-endpoints/eth-new-pending-transaction-filter) |
| [`eth_sendRawTransaction`](/docs/chains/base/base-api-endpoints/eth-send-raw-transaction)       | [`eth_sendRawTransactionSync`](/docs/chains/base/base-api-endpoints/eth-send-raw-transaction-sync) |
| [`eth_simulateV1`](/docs/chains/base/base-api-endpoints/eth-simulate-v-1)                       | [`eth_submitWork`](/docs/chains/base/base-api-endpoints/eth-submit-work)                    |
| [`eth_subscribe`](/docs/chains/base/base-api-endpoints/eth-subscribe)                           | [`eth_syncing`](/docs/chains/base/base-api-endpoints/eth-syncing)                           |
| [`eth_uninstallFilter`](/docs/chains/base/base-api-endpoints/eth-uninstall-filter)              | [`eth_unsubscribe`](/docs/chains/base/base-api-endpoints/eth-unsubscribe)                   |
| [`net_listening`](/docs/chains/base/base-api-endpoints/net-listening)                           | [`net_version`](/docs/chains/base/base-api-endpoints/net-version)                           |
| [`web3_clientVersion`](/docs/chains/base/base-api-endpoints/web-3-client-version)               | [`web3_sha3`](/docs/chains/base/base-api-endpoints/web-3-sha-3)                             |

## Related APIs

The following Alchemy APIs are also supported on Base:

* [Bundler API](/docs/wallets/transactions/low-level-infra/bundler/overview)
* [Gas Manager API](/docs/wallets/api-reference/gas-manager-admin-api/gas-abstraction-api-endpoints/alchemy-request-gas-and-paymaster-and-data)
* [Token API](/docs/reference/token-api-overview)
* [Transfers API](/docs/reference/transfers-api-quickstart)
* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)
* [NFT API](/docs/reference/nft-api-overview)
* [UserOp Simulation API](/docs/wallets/api-reference/bundler-api/useroperation-simulation-endpoints/alchemy-simulate-user-operation-asset-changes)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blobBaseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns the base fee per blob gas in wei for the current block.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-blob-base-fee

## Result

**Blob Base Fee** (string): The base fee per blob gas, in wei, as a hexadecimal encoded unsigned integer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blobBaseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_callBundle

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Simulates a bundle of signed transactions against a specific block number, including simulating a bundle at the top of the next block. This method allows you to test transaction bundles before submitting them to the network.


Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-call-bundle

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Bundle parameters | object | Yes | The bundle simulation parameters containing the transactions to simulate and the block context for the simulation.  |

## Result

**Bundle simulation result** (object): The result of the bundle simulation containing gas usage, fees, and individual transaction results. 

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_callBundle",
  "params": [
    {
      "txs": [
        "0x123abc...",
        "0x456def..."
      ],
      "blockNumber": "0xb63dcd",
      "stateBlockNumber": "latest",
      "timestamp": 1615920932
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "bundleGasPrice": "476190476193",
    "bundleHash": "0x73b1e258c7a42fd0230b2fd05529c5d4b6fcb66c227783f8bece8aeacdd1db2e",
    "coinbaseDiff": "20000000000126000",
    "ethSentToCoinbase": "20000000000000000",
    "gasFees": "126000",
    "results": [
      {
        "coinbaseDiff": "10000000000063000",
        "ethSentToCoinbase": "10000000000000000",
        "fromAddress": "0x02A727155aeF8609c9f7F2179b2a1f560B39F5A0",
        "gasFees": "63000",
        "gasPrice": "476190476193",
        "gasUsed": 21000,
        "toAddress": "0x73625f59CAdc5009Cb458B751b3E7b6b48C06f2C",
        "txHash": "0x669b4704a7d993a946cdd6e2f95233f308ce0c4649d2e04944e8299efcaa098a",
        "value": "0x"
      },
      {
        "coinbaseDiff": "10000000000063000",
        "ethSentToCoinbase": "10000000000000000",
        "fromAddress": "0x02A727155aeF8609c9f7F2179b2a1f560B39F5A0",
        "gasFees": "63000",
        "gasPrice": "476190476193",
        "gasUsed": 21000,
        "toAddress": "0x73625f59CAdc5009Cb458B751b3E7b6b48C06f2C",
        "txHash": "0xa839ee83465657cac01adc1d50d96c1b586ed498120a84a64749c0034b4f19fa",
        "value": "0x"
      }
    ],
    "stateBlockNumber": 5221585,
    "totalGasUsed": 42000
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_callBundle",
  "params": [
    {
      "txs": [
        "0x123abc...",
        "0x456def..."
      ],
      "blockNumber": "0xb63dcd",
      "stateBlockNumber": "latest",
      "timestamp": 1615920932
    }
  ]
}'
```



------

# eth_callMany

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Executes a list of transaction bundles without creating transactions on the blockchain. This method is particularly useful for simulating transactions to understand their potential outcomes. It supports simulating transactions at an intermediate state of a block, simulating multiple transactions with sequential dependencies, and overwriting block headers.


Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-call-many

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Bundles | object[] | Yes | A list of bundles where each bundle contains transactions and optional block overrides.  |
| Simulation context | object | Yes | The context for the simulation, specifying the blockNumber or Tag and transactionIndex.  |
| State overrides | object | No | An optional mapping for state overrides, following the eth_call standard.  |
| Timeout | integer | No | The maximum running time for the simulations in milliseconds, defaulting to 5000 milliseconds.  |

## Result

**Call results** (object[][]): A list of lists containing either the return value of the executed contract call or the reverted error code. Each bundle returns an array with one result per transaction. 

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "from": "0x1985ea6e9c68e1c272d8209f3b478ac2fdb25c87",
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gas": "0x0f4240",
            "gasPrice": "0x7896e72a",
            "data": "0xa9059cbb000000000000000000000000bc0e63965946815d105e7591407704e6e1964e590000000000000000000000000000000000000000000000000000000005f5e100"
          },
          {
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gasPrice": "0x7896e72a",
            "data": "0x70a08231000000000000000000000000bc0e63965946815d105e7591407704e6e1964e59"
          }
        ],
        "blockOverride": {
          "blockNumber": "0xbb5fe9"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    [
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000000000001"
      },
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000005f5e100"
      }
    ]
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "type": "string",
            "nonce": "string",
            "to": null,
            "from": "string",
            "gas": "string",
            "value": "string",
            "input": "string",
            "gasPrice": "string",
            "maxPriorityFeePerGas": "string",
            "maxFeePerGas": "string",
            "maxFeePerBlobGas": "string",
            "accessList": [
              {
                "address": "string",
                "storageKeys": [
                  "string"
                ]
              }
            ],
            "blobVersionedHashes": [
              "string"
            ],
            "blobs": [
              "string"
            ],
            "chainId": "string"
          }
        ],
        "blockOverride": {
          "blockNumber": "string",
          "blockHash": "string",
          "coinbase": "string",
          "timestamp": "string",
          "difficulty": "string",
          "gasLimit": "string",
          "baseFee": "string"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves account information including balance, code, and nonce for a given address at a specified block.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the account information. |

## Result

**Account information** (object): An object containing the account's balance, code, and nonce.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "balance": "0x1cfe56f3795885980000",
    "code": "0x",
    "nonce": "0x5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_newPendingTransactionFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new pending transactions arrive.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-new-pending-transaction-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newPendingTransactionFilter"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_sendRawTransactionSync

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Sends a raw transaction to the network and waits for the transaction to be mined.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-send-raw-transaction-sync

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction data | string | Yes | The signed transaction data, RLP-encoded and hex-encoded. |
| Timeout | integer | No | Maximum wait time in milliseconds. Must be a positive integer between 1 and the node-configured maximum timeout. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "transactionHash": "0x1234abcd...",
    "blockHash": "0xabcd1234...",
    "blockNumber": "0x10d4f",
    "cumulativeGasUsed": "0x5208",
    "gasUsed": "0x5208",
    "contractAddress": null,
    "logs": [],
    "status": "0x1"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ]
}'
```



------

# eth_simulateV1

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Enables simulation of complex transactions and state changes without modifying the blockchain.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-simulate-v-1

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Simulation object | object | Yes | The object containing all simulation details such as calls, overrides, etc. |

## Result

**Simulation result** (object[]): The result of the simulation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "baseFeePerGas": "0x9",
      "blobGasUsed": "0x0",
      "calls": [
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000001"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
              "transactionIndex": "0x0",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x0",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        },
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000002"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd",
              "transactionIndex": "0x1",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x1",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        }
      ],
      "difficulty": "0x0",
      "excessBlobGas": "0x3b80000",
      "extraData": "0x",
      "gasLimit": "0x22550dd",
      "gasUsed": "0xa410",
      "hash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "miner": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
      "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "nonce": "0x0000000000000000",
      "number": "0x1530a5e",
      "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "parentHash": "0x513a0aa73024f294cdbcb0312af0c920850035f0552d7349ebb30717de30b1cc",
      "receiptsRoot": "0x75308898d571eafb5cd8cde8278bf5b3d13c5f6ec074926de3bb895b519264e1",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "size": "0x29c",
      "stateRoot": "0x65ea44c8bd5f9edbf269b6446b460b3e7378abb25c78fd5d70f0e2ef59296b25",
      "timestamp": "0x67f43327",
      "transactions": [
        "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
        "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd"
      ],
      "transactionsRoot": "0xd6902f31ae9d2169b77cd88611c6afd691ea5a7e604e44c71f663fda0c5d1c28",
      "uncles": [],
      "withdrawals": [],
      "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    }
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://base-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/base/base-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://base-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Base Flashblocks API quickstart

> Get started building on Base using Flashblocks

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What are Flashblocks

Flashblocks on Base are a transaction preconfirmation feature that provides near-instant transaction feedback by streaming partial block updates every 200 milliseconds. This significantly reduces the effective block time from Base's standard 2 seconds to 200 milliseconds, a 10x improvement.

Flashblocks is great for developers who demand instant UX such as decentralized exchanges, onchain gaming, and other high-frequency applications.

## Supported networks

Flashblocks is currently supported on both Base testnet and mainnet and can be accessed using your existing **Alchemy Base** RPC.

| Network       | Flashblocks Availability |
|---------------|---------------------------|
| Base Sepolia  | ✅                        |
| Base Mainnet  | ✅                        |

## Query Flashblocks with JSON-RPC

### [eth\_getBlockByNumber](https://www.alchemy.com/docs/node/op-mainnet/op-mainnet-api-endpoints/eth-get-block-by-number)

Use the `pending` tag to retrieve the latest Flashblock:

```bash
curl https://base-sepolia.g.alchemy.com/v2/<YOUR_API_KEY> -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["pending",true],"id":1}'
```

#### Example Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "number": "0x1234",
    "hash": "0x...",
    "transactions": [...]
  }
}
```

### [eth\_getTransactionReceipt](https://www.alchemy.com/docs/node/op-mainnet/op-mainnet-api-endpoints/eth-get-transaction-receipt)

Use the existing receipt RPC to get preconfirmed receipts:

```bash
curl https://base-sepolia.g.alchemy.com/v2/<YOUR_API_KEY> -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0x..."],"id":1}'
```

#### Example Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "transactionHash": "0x...",
    "blockNumber": "0x1234",
    "status": "0x1"
  }
}
```

### [eth\_getBalance](https://www.alchemy.com/docs/node/op-mainnet/op-mainnet-api-endpoints/eth-get-balance)

Use the `pending` tag to get the address balance in the latest Flashblock:

```bash
curl https://base-sepolia.g.alchemy.com/v2/<YOUR_API_KEY> -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x...","pending"],"id":1}'
```

#### Example Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x0234"
}
```

### [eth\_getTransactionCount](https://www.alchemy.com/docs/node/op-mainnet/op-mainnet-api-endpoints/eth-get-transaction-count)

Use the `pending` tag to get the address nonce in the latest Flashblock:

```bash
curl https://base-sepolia.g.alchemy.com/v2/<YOUR_API_KEY> -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params":["0x...","pending"],"id":1}'
```

#### Example Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x1b" // 27 transactions
}
```

### [eth\_getTransactionByHash](https://www.alchemy.com/docs/node/op-mainnet/op-mainnet-api-endpoints/eth-get-transaction-by-hash)

Use the existing get transaction by hash RPC to get preconfirmed transactions:

```bash
curl https://base-sepolia.g.alchemy.com/v2/<YOUR_API_KEY> -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0x..."],"id":1}'
```

#### Example Response

```json
{
  "type": "0x2",
  "chainId": "...",
  "nonce": "...",
  ...
}
```

### [eth\_call](https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-call)

Use the `pending` tag to execute a smart contract call against the latest Flashblock:

```bash
curl https://base-sepolia.g.alchemy.com/v2/<YOUR_API_KEY> -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x...","data":"0x..."},"pending"],"id":1}'
```

#### Example Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x0000000000000000000000000000000000000000000000000000000000000001"
}
```

### [eth\_simulateV1](https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-simulate-v-1)

Use the `pending` tag to simulate transactions against the latest Flashblock:

```bash
curl https://base-sepolia.g.alchemy.com/v2/<YOUR_API_KEY> -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_simulateV1","params":[{"blockStateCalls":[{"calls":[{"to":"0x...","data":"0x..."}],"stateOverrides":{}}],"traceTransfers":true,"validation":true},"pending"],"id":1}'
```

#### Example Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "calls": [
        {
          "status": "0x1",
          "gasUsed": "0x5208",
          "returnData": "0x"
        }
      ]
    }
  ]
}
```

### [eth\_estimateGas](https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-estimate-gas)

Use the `pending` tag to estimate gas against the latest Flashblock:

```bash
curl https://base-sepolia.g.alchemy.com/v2/<YOUR_API_KEY> -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_estimateGas","params":[{"to":"0x...","data":"0x..."},"pending"],"id":1}'
```

#### Example Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x5208"
}
```

### [eth\_getLogs](https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-logs)

Use the `pending` tag for toBlock to retrieve logs from the latest Flashblock:

```bash
curl https://base-sepolia.g.alchemy.com/v2/<YOUR_API_KEY> -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"fromBlock":"latest","toBlock":"pending","address":"0x...","topics":["0x..."]}],"id":1}'
```

#### Example Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "address": "0x...",
      "topics": ["0x..."],
      "data": "0x...",
      "blockNumber": "0x1234",
      "transactionHash": "0x...",
      "transactionIndex": "0x0",
      "blockHash": "0x...",
      "logIndex": "0x0",
      "removed": false
    }
  ]
}
```

### `eth_subscribe` (WebSocket subscriptions)

Flashblocks-enabled WebSocket subscriptions stream preconfirmed data at approximately 200ms intervals via `eth_subscribe`. Standard subscription types (`newHeads`, `logs`, `newPendingTransactions`) are also supported.

Connect using your Base WebSocket endpoint:

* `wss://base-mainnet.g.alchemy.com/v2/<YOUR_API_KEY>`
* `wss://base-sepolia.g.alchemy.com/v2/<YOUR_API_KEY>`

#### Flashblocks subscription types

##### `newFlashblockTransactions`

Receive each transaction as it becomes preconfirmed into a Flashblock. Pass `true` as the second parameter to include full transaction objects and associated logs.

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_subscribe",
  "params": ["newFlashblockTransactions"]
}
```

With full transaction data:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_subscribe",
  "params": ["newFlashblockTransactions", true]
}
```

##### `pendingLogs`

Monitor contract events from preconfirmed transactions with sub-block latency. You can optionally filter by contract address and topics.

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_subscribe",
  "params": [
    "pendingLogs",
    {
      "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "topics": [
        "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
      ]
    }
  ]
}
```

The `address` field accepts a single address or an array of addresses, and `topics` follows the same format as `eth_getLogs`.

##### `newFlashblocks`

Receive full block state updates as each Flashblock is constructed, with accumulated preconfirmed state for the block in progress.

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_subscribe",
  "params": ["newFlashblocks"]
}
```

#### Subscription response

After subscribing, you receive a subscription ID:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x1887ec8b9589ccad00000000000532da"
}
```

Events are then delivered through `eth_subscription` notifications:

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscription",
  "params": {
    "subscription": "0x1887ec8b9589ccad00000000000532da",
    "result": { ... }
  }
}
```

#### `eth_unsubscribe`

Cancel any active subscription using the subscription ID:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_unsubscribe",
  "params": ["0x1887ec8b9589ccad00000000000532da"]
}
```

For more details, see the [Base Flashblocks API reference](https://docs.base.org/base-chain/flashblocks/api-reference) and the [Base Flashblocks documentation](https://docs.base.org/base-chain/flashblocks/apps).

------

# Base API FAQ

> Frequently asked questions about the Base API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Base?

[Base](https://www.alchemy.com/base) is a secure, low-cost, builder-friendly Ethereum Layer 2 (L2) solution designed to bring the next billion users onchain. Developed and incubated within Coinbase, Base is built on the MIT-licensed OP Stack, in collaboration with Optimism, with a goal to progressively decentralize in the coming years. By leveraging Base, developers have an opportunity to provide users with a robust Ethereum L2 environment at a fraction of the cost.

## What is the Base API?

The Base API allows developers to interface with the Base mainnet and testnet nodes. With this API, you can execute transactions, query onchain data, and interact with the Base network, relying on a JSON-RPC standard.

## How can I get started using the Base API?

Explained in [Base API Quickstart](/docs/reference/base-api-quickstart)

## Is Base EVM compatible?

Yes. Base is built as an Ethereum L2, which means it supports any Ethereum Virtual Machine (EVM) codebase. This allows you to deploy and migrate assets from Ethereum L1 and other interoperable chains to Base.

## What API does Base use?

Base utilizes the JSON-RPC API standard. This API is crucial for any blockchain interaction on the Base network, allowing you to read block/transaction data, query chain information, execute smart contracts, and store data onchain.

## What is a Base API key?

When accessing the Base network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network.

For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!

## Which libraries support Base?

Common Ethereum libraries like [ethers.js](https://docs.ethers.org/v5/) and [web3.js](https://web3js.readthedocs.io/en/v1.8.2/) should be compatible with Base, given its EVM nature.

## What programming languages work with Base?

Languages that work with Ethereum, such as JavaScript, Solidity, TypeScript, and Shell, should also be compatible with Base. Solidity remains the primary choice for smart contract development, while JavaScript is ideal for offchain interactions.

## What does Base use for gas?

The primary currency for transaction fees and other network activities on Base is ETH.

## What testnet should I use for Base?

Use the **Base Goerli** testnet for Base. This testnet provides an environment to deploy smart contracts, execute transactions, and test applications. ETH for Base Goerli can be obtained from the [Base Goerli Faucet](https://www.coinbase.com/developer-platform/products/faucet).

## What methods does Alchemy support for the Base API?

You can find the list of all the methods Alchemy supports for the Base API on the [Base API Endpoints](/docs/chains#base-apis) page.

## How can I bridge assets between Ethereum and Base?

The Base Bridge facilitates the bridging of ETH between Ethereum and Base. To bridge assets:

1. Navigate to Base Bridge for [Base Goerli](https://goerli-bridge.base.org/deposit) or [Base Mainnet](https://bridge.base.org/withdraw).
2. Click "Connect wallet" and link your wallet.
3. Specify the amount of ETH (or a supported asset) you wish to deposit or withdraw.

## My question isn't here, where can I get help?

If you have any questions or feedback, please contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Berachain API Quickstart

> How to get started building on Berachain using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Berachain is an EVM-compatible blockchain designed to provide high performance, scalability, and security for decentralized applications (dApps). Known for its innovative features and efficient transaction processing, Berachain offers a robust environment for deploying Ethereum-based applications.

The Berachain API facilitates interaction with the Berachain network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with Berachain both intuitive and straightforward.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Berachain client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { berachainTestnetbArtio } from "viem/chains";

const client = createPublicClient({
  chain: berachainTestnetbArtio,
  transport: http("https://berachain-bartio.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (BERA):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Berachain APIs

For the full list of Berachain APIs, see the [Berachain API Endpoints](/docs/chains#berachain-apis).

------

# Berachain API Overview

> Overview of available Berachain API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Berachain APIs

📙 Get started with our [Berachain API Quickstart Guide](/docs/reference/berachain-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/berachain/berachain-api-endpoints/eth-accounts)                   | [`eth_blobBaseFee`](/docs/chains/berachain/berachain-api-endpoints/eth-blob-base-fee)       |
| [`eth_blockNumber`](/docs/chains/berachain/berachain-api-endpoints/eth-block-number)            | [`eth_call`](/docs/chains/berachain/berachain-api-endpoints/eth-call)                       |
| [`eth_callMany`](/docs/chains/berachain/berachain-api-endpoints/eth-call-many)                  | [`eth_chainId`](/docs/chains/berachain/berachain-api-endpoints/eth-chain-id)                |
| [`eth_createAccessList`](/docs/chains/berachain/berachain-api-endpoints/eth-create-access-list) | [`eth_estimateGas`](/docs/chains/berachain/berachain-api-endpoints/eth-estimate-gas)        |
| [`eth_feeHistory`](/docs/chains/berachain/berachain-api-endpoints/eth-fee-history)              | [`eth_fillTransaction`](/docs/chains/berachain/berachain-api-endpoints/eth-fill-transaction) |
| [`eth_gasPrice`](/docs/chains/berachain/berachain-api-endpoints/eth-gas-price)                  | [`eth_getAccount`](/docs/chains/berachain/berachain-api-endpoints/eth-get-account)          |
| [`eth_getAccountInfo`](/docs/chains/berachain/berachain-api-endpoints/eth-get-account-info)     | [`eth_getBalance`](/docs/chains/berachain/berachain-api-endpoints/eth-get-balance)          |
| [`eth_getBlockByHash`](/docs/chains/berachain/berachain-api-endpoints/eth-get-block-by-hash)    | [`eth_getBlockByNumber`](/docs/chains/berachain/berachain-api-endpoints/eth-get-block-by-number) |
| [`eth_getBlockReceipts`](/docs/chains/berachain/berachain-api-endpoints/eth-get-block-receipts) | [`eth_getBlockTransactionCountByHash`](/docs/chains/berachain/berachain-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/berachain/berachain-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/berachain/berachain-api-endpoints/eth-get-code)                |
| [`eth_getFilterChanges`](/docs/chains/berachain/berachain-api-endpoints/eth-get-filter-changes) | [`eth_getFilterLogs`](/docs/chains/berachain/berachain-api-endpoints/eth-get-filter-logs)   |
| [`eth_getLogs`](/docs/chains/berachain/berachain-api-endpoints/eth-get-logs)                    | [`eth_getProof`](/docs/chains/berachain/berachain-api-endpoints/eth-get-proof)              |
| [`eth_getRawTransactionByHash`](/docs/chains/berachain/berachain-api-endpoints/eth-get-raw-transaction-by-hash) | [`eth_getStorageAt`](/docs/chains/berachain/berachain-api-endpoints/eth-get-storage-at)     |
| [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/berachain/berachain-api-endpoints/eth-get-transaction-by-block-hash-and-index) | [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/berachain/berachain-api-endpoints/eth-get-transaction-by-block-number-and-index) |
| [`eth_getTransactionByHash`](/docs/chains/berachain/berachain-api-endpoints/eth-get-transaction-by-hash) | [`eth_getTransactionCount`](/docs/chains/berachain/berachain-api-endpoints/eth-get-transaction-count) |
| [`eth_getTransactionReceipt`](/docs/chains/berachain/berachain-api-endpoints/eth-get-transaction-receipt) | [`eth_getUncleByBlockNumberAndIndex`](/docs/chains/berachain/berachain-api-endpoints/eth-get-uncle-by-block-number-and-index) |
| [`eth_getUncleCountByBlockHash`](/docs/chains/berachain/berachain-api-endpoints/eth-get-uncle-count-by-block-hash) | [`eth_getUncleCountByBlockNumber`](/docs/chains/berachain/berachain-api-endpoints/eth-get-uncle-count-by-block-number) |
| [`eth_maxPriorityFeePerGas`](/docs/chains/berachain/berachain-api-endpoints/eth-max-priority-fee-per-gas) | [`eth_newBlockFilter`](/docs/chains/berachain/berachain-api-endpoints/eth-new-block-filter) |
| [`eth_newFilter`](/docs/chains/berachain/berachain-api-endpoints/eth-new-filter)                | [`eth_newPendingTransactionFilter`](/docs/chains/berachain/berachain-api-endpoints/eth-new-pending-transaction-filter) |
| [`eth_protocolVersion`](/docs/chains/berachain/berachain-api-endpoints/eth-protocol-version)    | [`eth_sendRawTransaction`](/docs/chains/berachain/berachain-api-endpoints/eth-send-raw-transaction) |
| [`eth_simulateV1`](/docs/chains/berachain/berachain-api-endpoints/eth-simulate-v-1)             | [`eth_submitWork`](/docs/chains/berachain/berachain-api-endpoints/eth-submit-work)          |
| [`eth_subscribe`](/docs/chains/berachain/berachain-api-endpoints/eth-subscribe)                 | [`eth_syncing`](/docs/chains/berachain/berachain-api-endpoints/eth-syncing)                 |
| [`eth_uninstallFilter`](/docs/chains/berachain/berachain-api-endpoints/eth-uninstall-filter)    | [`eth_unsubscribe`](/docs/chains/berachain/berachain-api-endpoints/eth-unsubscribe)         |
| [`net_listening`](/docs/chains/berachain/berachain-api-endpoints/net-listening)                 | [`net_peerCount`](/docs/chains/berachain/berachain-api-endpoints/net-peer-count)            |
| [`net_version`](/docs/chains/berachain/berachain-api-endpoints/net-version)                     | [`txpool_content`](/docs/chains/berachain/berachain-api-endpoints/txpool-content)           |
| [`web3_clientVersion`](/docs/chains/berachain/berachain-api-endpoints/web-3-client-version)     | [`web3_sha3`](/docs/chains/berachain/berachain-api-endpoints/web-3-sha-3)                   |

## Related APIs

The following Alchemy APIs are also supported on Berachain:

* [Bundler API](/docs/wallets/transactions/low-level-infra/bundler/overview)
* [Gas Manager API](/docs/wallets/api-reference/gas-manager-admin-api/gas-abstraction-api-endpoints/alchemy-request-gas-and-paymaster-and-data)
* [Token API](/docs/reference/token-api-overview)
* [Transfers API](/docs/reference/transfers-api-quickstart)
* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)
* [NFT API](/docs/reference/nft-api-overview)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blobBaseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-bepolia.g.alchemy.com/v2/{apiKey}

Returns the base fee per blob gas in wei for the current block.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-blob-base-fee

## Result

**Blob Base Fee** (string): The base fee per blob gas, in wei, as a hexadecimal encoded unsigned integer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-bepolia.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blobBaseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_callMany

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Executes a list of transaction bundles without creating transactions on the blockchain. This method is particularly useful for simulating transactions to understand their potential outcomes. It supports simulating transactions at an intermediate state of a block, simulating multiple transactions with sequential dependencies, and overwriting block headers.


Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-call-many

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Bundles | object[] | Yes | A list of bundles where each bundle contains transactions and optional block overrides.  |
| Simulation context | object | Yes | The context for the simulation, specifying the blockNumber or Tag and transactionIndex.  |
| State overrides | object | No | An optional mapping for state overrides, following the eth_call standard.  |
| Timeout | integer | No | The maximum running time for the simulations in milliseconds, defaulting to 5000 milliseconds.  |

## Result

**Call results** (object[][]): A list of lists containing either the return value of the executed contract call or the reverted error code. Each bundle returns an array with one result per transaction. 

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "from": "0x1985ea6e9c68e1c272d8209f3b478ac2fdb25c87",
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gas": "0x0f4240",
            "gasPrice": "0x7896e72a",
            "data": "0xa9059cbb000000000000000000000000bc0e63965946815d105e7591407704e6e1964e590000000000000000000000000000000000000000000000000000000005f5e100"
          },
          {
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gasPrice": "0x7896e72a",
            "data": "0x70a08231000000000000000000000000bc0e63965946815d105e7591407704e6e1964e59"
          }
        ],
        "blockOverride": {
          "blockNumber": "0xbb5fe9"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    [
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000000000001"
      },
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000005f5e100"
      }
    ]
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "type": "string",
            "nonce": "string",
            "to": null,
            "from": "string",
            "gas": "string",
            "value": "string",
            "input": "string",
            "gasPrice": "string",
            "maxPriorityFeePerGas": "string",
            "maxFeePerGas": "string",
            "maxFeePerBlobGas": "string",
            "accessList": [
              {
                "address": "string",
                "storageKeys": [
                  "string"
                ]
              }
            ],
            "blobVersionedHashes": [
              "string"
            ],
            "blobs": [
              "string"
            ],
            "chainId": "string"
          }
        ],
        "blockOverride": {
          "blockNumber": "string",
          "blockHash": "string",
          "coinbase": "string",
          "timestamp": "string",
          "difficulty": "string",
          "gasLimit": "string",
          "baseFee": "string"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves account information including balance, code, and nonce for a given address at a specified block.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the account information. |

## Result

**Account information** (object): An object containing the account's balance, code, and nonce.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "balance": "0x1cfe56f3795885980000",
    "code": "0x",
    "nonce": "0x5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-bepolia.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-bepolia.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_newPendingTransactionFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new pending transactions arrive.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-new-pending-transaction-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newPendingTransactionFilter"
}'
```



------

# eth_protocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-bepolia.g.alchemy.com/v2/{apiKey}

Returns the current protocol version used by the client.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-protocol-version

## Result

**Protocol Version** (string): The protocol version as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3f",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-bepolia.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_protocolVersion"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_simulateV1

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Enables simulation of complex transactions and state changes without modifying the blockchain.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-simulate-v-1

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Simulation object | object | Yes | The object containing all simulation details such as calls, overrides, etc. |

## Result

**Simulation result** (object[]): The result of the simulation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "baseFeePerGas": "0x9",
      "blobGasUsed": "0x0",
      "calls": [
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000001"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
              "transactionIndex": "0x0",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x0",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        },
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000002"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd",
              "transactionIndex": "0x1",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x1",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        }
      ],
      "difficulty": "0x0",
      "excessBlobGas": "0x3b80000",
      "extraData": "0x",
      "gasLimit": "0x22550dd",
      "gasUsed": "0xa410",
      "hash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "miner": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
      "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "nonce": "0x0000000000000000",
      "number": "0x1530a5e",
      "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "parentHash": "0x513a0aa73024f294cdbcb0312af0c920850035f0552d7349ebb30717de30b1cc",
      "receiptsRoot": "0x75308898d571eafb5cd8cde8278bf5b3d13c5f6ec074926de3bb895b519264e1",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "size": "0x29c",
      "stateRoot": "0x65ea44c8bd5f9edbf269b6446b460b3e7378abb25c78fd5d70f0e2ef59296b25",
      "timestamp": "0x67f43327",
      "transactions": [
        "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
        "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd"
      ],
      "transactionsRoot": "0xd6902f31ae9d2169b77cd88611c6afd691ea5a7e604e44c71f663fda0c5d1c28",
      "uncles": [],
      "withdrawals": [],
      "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    }
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_peerCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of peers currently connected to the client.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/net-peer-count

## Result

**peerCount** (string): The number of connected peers as a hex string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_peerCount"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# txpool_content

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of the exact details of all transactions currently pending for inclusion in the next blocks, as well as ones that are being scheduled for future execution.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/txpool-content

## Result

**content** (object): Object with pending and queued transactions grouped by sender address and nonce.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "txpool_content"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://berachain-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/berachain/berachain-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://berachain-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Berachain API FAQ

> Frequently asked questions about the Berachain API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Berachain?

Berachain is an innovative blockchain platform designed to offer a secure, scalable, and efficient environment for decentralized applications (dApps). It focuses on high transaction throughput, low latency, and robust security, making it a suitable choice for developers looking to build advanced blockchain solutions.

## What is the Berachain API?

The Berachain API facilitates interaction with the Berachain network through a collection of JSON-RPC methods. It provides tools to interact with the blockchain, enabling functionalities such as transactions, smart contract deployment, and data retrieval.

## How can I get started using the Berachain API?

Explained in [Berachain API Quickstart](/docs/reference/berachain-api-quickstart).

## Is Berachain EVM compatible?

Yes, Berachain is fully compatible with the Ethereum Virtual Machine (EVM). This compatibility allows you to port your projects to Berachain with minimal changes, benefiting from the chain's high performance and low transaction fees.

## What API does Berachain use?

Berachain uses the JSON-RPC API standard for blockchain interactions. This is the same standard used by Ethereum.

## What is a Berachain API key?

When accessing the Berachain network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network.

For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!

## Which libraries support Berachain?

Given Berachain's EVM compatibility, popular Ethereum libraries like ethers.js and web3.js are fully compatible with Berachain. This allows for seamless development and integration for those familiar with Ethereum's development ecosystem.

## What programming languages work with Berachain?

Similar to Ethereum, Berachain supports a range of programming languages for blockchain interaction and smart contract development, including Solidity for smart contracts, as well as JavaScript and TypeScript for dApp development and offchain interactions.

## What does Berachain use for gas?

Berachain uses BERA, its native cryptocurrency, for transaction fees, gas, and other network activities.

## What methods does Alchemy support for the Berachain API?

You can find the list of all the methods Alchemy supports for the Berachain API on the [Berachain API Endpoints](/docs/chains#berachain-apis) page.

## My question isn't here, where can I get help?

If you have any questions or feedback, please contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Bitcoin API Quickstart

> Get started building on Bitcoin and using the JSON-RPC API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Introduction

The Bitcoin API gives you access to interact with the Bitcoin blockchain through a standard set of JSON-RPC methods. With this API, you can retrieve block and transaction data, inspect the mempool, broadcast transactions, and more.

Unlike EVM chains, Bitcoin uses a UTXO-based model and exposes its functionality via the JSON-RPC protocol. This quickstart will help you make your first request.

***

## What is the Bitcoin Chain API?

The Bitcoin Chain API allows applications to communicate with a Bitcoin node using the JSON-RPC protocol. Unlike Ethereum’s account-based model, Bitcoin relies on a UTXO (Unspent Transaction Output) model, which means that balances are tracked by outputs that are explicitly spent or unspent.

Alchemy’s Bitcoin API gives developers a consistent interface to query blockchain data, submit transactions, and monitor network activity. This includes:

* Retrieving raw or decoded transaction data
* Querying block headers and full blocks
* Monitoring mempool entries and states
* Submitting and testing raw transactions

If you’ve worked with Ethereum or other JSON-RPC-compatible chains, the structure will feel familiar, though the data returned may differ in structure and semantics.

***

## Getting started

### 1. Choose a package manager (npm or yarn)

Select a package manager to manage your project's dependencies. The choice between `npm` and `yarn` depends on your preference or project requirements.

| npm                                                                                                                       | yarn                                                                                                |
| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |

### 2. Set up your project

Open your terminal and run the following commands:

<CodeGroup>
  ```text npm
  mkdir bitcoin-api-quickstart
  cd bitcoin-api-quickstart
  npm init --yes
  ```

  ```text yarn
  mkdir bitcoin-api-quickstart
  cd bitcoin-api-quickstart
  yarn init --yes
  ```
</CodeGroup>

This creates a new directory named `bitcoin-api-quickstart` and initializes a Node.js project within it.

### 3. Make your first request

Install Axios, a popular HTTP client, to make API requests:

<CodeGroup>
  ```bash bash
  npm install axios
  # Or with yarn
  # yarn add axios
  ```
</CodeGroup>

Create an `index.js` file in your project directory and paste the following code:

<CodeGroup>
  ```javascript javascript
  const axios = require('axios');

  const url = `https://bitcoin-mainnet.alchemy-blast.com/v2/${yourAPIKey}`;

  const payload = {
  jsonrpc: '2.0',
  id: 1,
  method: 'getblockcount',
  params: []
  };

  axios.post(url, payload)
  .then(response => {
  console.log('Current block height:', response.data.result);
  })
  .catch(error => {
  console.error('Error fetching block count:', error);
  });

  ```
</CodeGroup>

Replace `yourAPIKey` with your actual Alchemy API key that you can get from the [Alchemy Dashboard](https://dashboard.alchemy.com/signup).

### 4. Run your script

To execute your script and make a request to the Bitcoin App, run:

<CodeGroup>
  ```bash bash
  node index.js
  ```
</CodeGroup>

You should see the current block number on Bitcoin App (in hexadecimal format) outputted to your console:

```shell
Current block height: 0x6d68e
```

## Next steps

You've made your first request to the Bitcoin App API. With this foundation, you can dive deeper into the [JSON-RPC methods available on Bitcoin App](/docs/bitcoin/bitcoin-api-overview) and start building your dApps on it!

------

# Bitcoin API Overview

> Overview of available Bitcoin API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Bitcoin APIs

📙 Get started with our [Bitcoin API Quickstart Guide](/docs/reference/bitcoin-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`createrawtransaction`](/docs/chains/bitcoin/bitcoin-api-endpoints/createrawtransaction)       | [`decoderawtransaction`](/docs/chains/bitcoin/bitcoin-api-endpoints/decoderawtransaction)   |
| [`decodescript`](/docs/chains/bitcoin/bitcoin-api-endpoints/decodescript)                       | [`estimatesmartfee`](/docs/chains/bitcoin/bitcoin-api-endpoints/estimatesmartfee)           |
| [`getbestblockhash`](/docs/chains/bitcoin/bitcoin-api-endpoints/getbestblockhash)               | [`getblock`](/docs/chains/bitcoin/bitcoin-api-endpoints/getblock)                           |
| [`getblockchaininfo`](/docs/chains/bitcoin/bitcoin-api-endpoints/getblockchaininfo)             | [`getblockcount`](/docs/chains/bitcoin/bitcoin-api-endpoints/getblockcount)                 |
| [`getblockfilter`](/docs/chains/bitcoin/bitcoin-api-endpoints/getblockfilter)                   | [`getblockhash`](/docs/chains/bitcoin/bitcoin-api-endpoints/getblockhash)                   |
| [`getblockheader`](/docs/chains/bitcoin/bitcoin-api-endpoints/getblockheader)                   | [`getblockstats`](/docs/chains/bitcoin/bitcoin-api-endpoints/getblockstats)                 |
| [`getblocktemplate`](/docs/chains/bitcoin/bitcoin-api-endpoints/getblocktemplate)               | [`getchaintips`](/docs/chains/bitcoin/bitcoin-api-endpoints/getchaintips)                   |
| [`getchaintxstats`](/docs/chains/bitcoin/bitcoin-api-endpoints/getchaintxstats)                 | [`getconnectioncount`](/docs/chains/bitcoin/bitcoin-api-endpoints/getconnectioncount)       |
| [`getdifficulty`](/docs/chains/bitcoin/bitcoin-api-endpoints/getdifficulty)                     | [`getindexinfo`](/docs/chains/bitcoin/bitcoin-api-endpoints/getindexinfo)                   |
| [`getmemoryinfo`](/docs/chains/bitcoin/bitcoin-api-endpoints/getmemoryinfo)                     | [`getmempoolancestors`](/docs/chains/bitcoin/bitcoin-api-endpoints/getmempoolancestors)     |
| [`getmempooldescendants`](/docs/chains/bitcoin/bitcoin-api-endpoints/getmempooldescendants)     | [`getmempoolinfo`](/docs/chains/bitcoin/bitcoin-api-endpoints/getmempoolinfo)               |
| [`getnetworkhashps`](/docs/chains/bitcoin/bitcoin-api-endpoints/getnetworkhashps)               | [`getnetworkinfo`](/docs/chains/bitcoin/bitcoin-api-endpoints/getnetworkinfo)               |
| [`getrawmempool`](/docs/chains/bitcoin/bitcoin-api-endpoints/getrawmempool)                     | [`getrawtransaction`](/docs/chains/bitcoin/bitcoin-api-endpoints/getrawtransaction)         |
| [`gettxout`](/docs/chains/bitcoin/bitcoin-api-endpoints/gettxout)                               | [`gettxoutproof`](/docs/chains/bitcoin/bitcoin-api-endpoints/gettxoutproof)                 |
| [`gettxoutsetinfo`](/docs/chains/bitcoin/bitcoin-api-endpoints/gettxoutsetinfo)                 | [`sendrawtransaction`](/docs/chains/bitcoin/bitcoin-api-endpoints/sendrawtransaction)       |
| [`submitblock`](/docs/chains/bitcoin/bitcoin-api-endpoints/submitblock)                         | [`submitheader`](/docs/chains/bitcoin/bitcoin-api-endpoints/submitheader)                   |
| [`submitpackage`](/docs/chains/bitcoin/bitcoin-api-endpoints/submitpackage)                     | [`testmempoolaccept`](/docs/chains/bitcoin/bitcoin-api-endpoints/testmempoolaccept)         |
| [`validateaddress`](/docs/chains/bitcoin/bitcoin-api-endpoints/validateaddress)                 | [`verifymessage`](/docs/chains/bitcoin/bitcoin-api-endpoints/verifymessage)                 |

------

# createrawtransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Creates a transaction spending the given inputs and creating new outputs. Outputs can be addresses or data. Returns hex-encoded raw transaction. Note that the transaction's inputs are not signed, and it is not stored in the wallet or transmitted to the network.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/createrawtransaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| inputs | object[] | Yes | An array of transaction inputs. |
| outputs | object[] or object | Yes | An array or object with outputs (key-value pairs, where keys are addresses or 'data', and values are BTC amounts or hex). |
| locktime | integer | No | Raw locktime. Non-0 value also activates inputs. |
| replaceable | boolean | No | Whether to mark transaction as BIP125 replaceable. Allows this transaction to be replaced by a transaction with higher fees. |

## Result

**result** (string): Hex-encoded raw transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "createrawtransaction",
  "params": [
    [
      {
        "txid": "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
        "vout": 0
      }
    ],
    [
      {
        "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa": 0.01
      }
    ],
    0,
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0200000001546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b0000000000fdffffff01c0c62d000000000017a914751e76e8199196d454941c45d1b3a323f1433bd68700000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "createrawtransaction",
  "params": [
    [
      {
        "txid": "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
        "vout": 0
      }
    ],
    [
      {
        "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa": 0.01
      }
    ],
    0,
    false
  ]
}'
```



------

# decoderawtransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Decodes a serialized, hex-encoded Bitcoin transaction. Returns detailed information about inputs, outputs, size, witness data, etc.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/decoderawtransaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hexstring | string | Yes | The transaction hex string to decode. |
| iswitness | boolean | No | Indicates whether the transaction includes witness data. If omitted, heuristic decoding is applied.  |

## Result

**result** (object): A JSON object representing the decoded transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "decoderawtransaction",
  "params": [
    "0200000000010142d6bd07c424e975fe821c978e720f9a55f9981d62c290cea5ccd06b455d79b90000000000fdffffff028096980000000000160014d3620fe180a0beb8fcc9682fe92e5a25f0feccd370cd2f0100000000160014076d998f6b12c3d1da6217d967154f42a5e0afd30247304402204549b10ea1698d4b4605be1d3bfff810f6135395386207664a66f5bb8bd1470902205fb86c95bfbe7b502195ffa65276d292fb074fe18ba171ef0a35395211384091012103cb5de30b343b35cc09b50f064eb289dd3e252f6985fc4309fba795cc950316afcfa50d00",
    true
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "txid": "a4cf344758af60ab8d4812477a7d3eee8854595db70ab39cf68f9dc509b13929",
    "hash": "48d1de9e93391ac3d83e5e97ce94ebd1db0f88553e45a6dffad3501c82408995",
    "size": 222,
    "vsize": 141,
    "weight": 564,
    "version": 2,
    "locktime": 862954048,
    "vin": [
      {
        "txid": "b9795d456bd0cca5ce90c2621d98f9559a0f728e971c82fe75e924c407bdd642",
        "vout": 0,
        "scriptSig": {
          "asm": "",
          "hex": ""
        },
        "sequence": 4294967293,
        "txinwitness": [
          "304402204549b10ea1698d4b4605be1d3bfff810f6135395386207664a66f5bb8bd1470902205fb86c95bfbe7b502195ffa65276d292fb074fe18ba171ef0a35395211384091",
          "03cb5de30b343b35cc09b50f064eb289dd3e252f6985fc4309fba795cc950316af"
        ]
      }
    ],
    "vout": [
      {
        "value": 0.1,
        "n": 0,
        "scriptPubKey": {
          "asm": "OP_DUP OP_HASH160 d3620fe180a0beb8fcc9682fe92e5a25f0feccd3 OP_EQUALVERIFY OP_CHECKSIG",
          "desc": "addr(1BM1sAcrfV6d4zPKytzziu4McLQDsFC2Qc)",
          "hex": "76a914d3620fe180a0beb8fcc9682fe92e5a25f0feccd388ac",
          "type": "pubkeyhash"
        }
      },
      {
        "value": 0.65281824,
        "n": 1,
        "scriptPubKey": {
          "asm": "OP_DUP OP_HASH160 076d998f6b12c3d1da6217d967154f42a5e0afd3 OP_EQUALVERIFY OP_CHECKSIG",
          "desc": "addr(1iPoHeR3z1EidftGXMcEppzA1UupGPs2u)",
          "hex": "76a914076d998f6b12c3d1da6217d967154f42a5e0afd388ac",
          "type": "pubkeyhash"
        }
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "decoderawtransaction",
  "params": [
    "0200000000010142d6bd07c424e975fe821c978e720f9a55f9981d62c290cea5ccd06b455d79b90000000000fdffffff028096980000000000160014d3620fe180a0beb8fcc9682fe92e5a25f0feccd370cd2f0100000000160014076d998f6b12c3d1da6217d967154f42a5e0afd30247304402204549b10ea1698d4b4605be1d3bfff810f6135395386207664a66f5bb8bd1470902205fb86c95bfbe7b502195ffa65276d292fb074fe18ba171ef0a35395211384091012103cb5de30b343b35cc09b50f064eb289dd3e252f6985fc4309fba795cc950316afcfa50d00",
    true
  ]
}'
```



------

# decodescript

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Decodes a hex-encoded script and provides detailed information about it.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/decodescript

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hexstring | string | Yes | The hex-encoded script. |

## Result

**result** (object): Decoded script information.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "decodescript",
  "params": [
    "0014751e76e8199196d454941c45d1b3a323f1433bd6"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "asm": "0 751e76e8199196d454941c45d1b3a323f1433bd6",
    "desc": "addr(bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4)#uyjndxcw",
    "address": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4",
    "type": "witness_v0_keyhash",
    "p2sh": "3JvL6Ymt8MVWiCNHC7oWU6nLeHNJKLZGLN"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "decodescript",
  "params": [
    "0014751e76e8199196d454941c45d1b3a323f1433bd6"
  ]
}'
```



------

# estimatesmartfee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Estimates the approximate fee per kilobyte required for a transaction to begin confirmation within `conf_target` blocks. Uses BIP 141 virtual transaction size.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/estimatesmartfee

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| conf_target | integer | Yes | Number of blocks within which confirmation is targeted. |
| estimate_mode | enum | No | Fee estimate mode. Options are "UNSET", "ECONOMICAL", or "CONSERVATIVE".  |

## Result

**result** (object): Estimated fee rate and corresponding target blocks.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "estimatesmartfee",
  "params": [
    1,
    "UNSET"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "feerate": 0.00002465,
    "blocks": 2
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "estimatesmartfee",
  "params": [
    1,
    "UNSET"
  ]
}'
```



------

# getbestblockhash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the hash of the most-work fully-validated tip block in the active Bitcoin blockchain.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/getbestblockhash

## Result

**result** (string): The hash of the best block in the longest chain.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "00000000000000000001fe9b58c5ccd401de62139c29e7dbfd32bd3cf14b650c",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getbestblockhash"
}'
```



------

# getblock

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block, based on the provided block hash.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/getblock

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockhash | string | Yes | The hash of the block to retrieve. |
| verbosity | enum | No | Level of detail to return.  - 0: hex-encoded string, - 1: basic block info, - 2: with transactions, - 3: with transactions + input prevouts.  |

## Result

**result** (object): The block object or hex string, depending on verbosity.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblock",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    2
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "hash": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "confirmations": 151,
    "height": 894470,
    "version": 537067520,
    "versionHex": "20030000",
    "merkleroot": "9d93ae25de98e5ed33aec9ccfea612c3b5b181a60171ba564ec1634786b04bc6",
    "time": 1745931642,
    "mediantime": 1745928076,
    "nonce": 766301978,
    "bits": "170248b6",
    "target": "0000000000000000000248b60000000000000000000000000000000000000000",
    "difficulty": 123234387977050.9,
    "chainwork": "0000000000000000000000000000000000000000bf64054821a76841a63cb26e",
    "nTx": 2186,
    "previousblockhash": "00000000000000000001aa9a63c6c0774a767f7a4d37d2bce3658728de76a146",
    "nextblockhash": "00000000000000000000cb8a1d7945b960985579525957bcc37b22174f1ecb31",
    "strippedsize": 844254,
    "size": 1460798,
    "weight": 3993560,
    "tx": [
      "c86b4846175942038cc9da086e506aa8a441beada92f1678fb1fe35d640366db"
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblock",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    2
  ]
}'
```



------

# getblockchaininfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object containing state details related to blockchain processing, network, and storage information.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/getblockchaininfo

## Result

**result** (object): Blockchain status information.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "chain": "main",
    "blocks": 894713,
    "headers": 894713,
    "bestblockhash": "00000000000000000000eb0ae1714d3ec43cfaac74769f3bcde489daf116e4ca",
    "bits": "170248b6",
    "target": "0000000000000000000248b60000000000000000000000000000000000000000",
    "difficulty": 123234387977050.9,
    "time": 1746083867,
    "mediantime": 1746081100,
    "verificationprogress": 0.9999993374725104,
    "initialblockdownload": false,
    "chainwork": "0000000000000000000000000000000000000000bfce6962cc3162143b67a1d4",
    "size_on_disk": 745999541195,
    "pruned": false,
    "warnings": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockchaininfo"
}'
```



------

# getblockcount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of blocks in the longest fully validated blockchain.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/getblockcount

## Result

**result** (integer): The number of blocks in the current best blockchain.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": 894623,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockcount"
}'
```



------

# getblockfilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the BIP 157 content filter for a specified block. Requires the blockfilterindex to be enabled.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/getblockfilter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockhash | string | Yes | The hash of the block. |
| filtertype | enum | No | The type name of the filter. Currently only 'basic' is supported. |

## Result

**result** (object): The block filter details.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblockfilter",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "basic"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "filter": "0180c3b80144ec1762e9eb8e5b2e072f7d8c8c8c0c2c2a2a2a2a2a2a2a2a2a",
    "header": "1e1e1f1f2020202021212121222222222323232324242424252525252626262"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockfilter",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "basic"
  ]
}'
```



------

# getblockhash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the hash of the block at a given height (index) in the active Bitcoin blockchain.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/getblockhash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| height | integer | Yes | The height of the block to retrieve the hash for. |

## Result

**result** (string): The hash of the block at the specified height.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblockhash",
  "params": [
    894470
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockhash",
  "params": [
    894470
  ]
}'
```



------

# getblockheader

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the block header for the specified block hash.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/getblockheader

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockhash | string | Yes | The block hash to retrieve the header for. |
| verbose | boolean | No | Whether to return a JSON object (true) or raw hex-encoded string (false). Default is true.  |

## Result

**result** (object or string): The block header as an object or hex string depending on verbose.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblockheader",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    true
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "hash": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "confirmations": 154,
    "height": 894470,
    "version": 537067520,
    "versionHex": "20030000",
    "merkleroot": "9d93ae25de98e5ed33aec9ccfea612c3b5b181a60171ba564ec1634786b04bc6",
    "time": 1745931642,
    "mediantime": 1745928076,
    "nonce": 766301978,
    "bits": "170248b6",
    "difficulty": 123234387977050.9,
    "chainwork": "0000000000000000000000000000000000000000bf64054821a76841a63cb26e",
    "nTx": 2186,
    "previousblockhash": "00000000000000000001aa9a63c6c0774a767f7a4d37d2bce3658728de76a146",
    "nextblockhash": "00000000000000000000cb8a1d7945b960985579525957bcc37b22174f1ecb31"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockheader",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    true
  ]
}'
```



------

# getblockstats

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Calculates various statistics for a given block by hash or height.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/getblockstats

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hash_or_height | string or integer | Yes | The block hash (string) or height (integer) of the target block. |
| stats | string[] | No | Optional list of specific stats to retrieve. If empty or omitted, returns all stats.  |

## Result

**result** (object): A set of statistical metrics for the specified block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblockstats",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    []
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "avgfee": 1565,
    "avgfeerate": 3,
    "avgtxsize": 668,
    "blockhash": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "feerate_percentiles": [
      2,
      2,
      3,
      3,
      4
    ],
    "height": 894470,
    "ins": 7718,
    "outs": 5666,
    "maxfee": 376692,
    "maxfeerate": 79,
    "maxtxsize": 200604,
    "medianfee": 453,
    "mediantime": 1745928076,
    "mediantxsize": 228,
    "minfee": 141,
    "minfeerate": 1,
    "mintxsize": 150,
    "subsidy": 312500000,
    "swtotal_size": 1049707,
    "swtotal_weight": 2349304,
    "swtxs": 2075,
    "time": 1745931642,
    "total_out": 271147032190,
    "total_size": 1460379,
    "total_weight": 3991992,
    "totalfee": 3420664,
    "txs": 2186,
    "utxo_increase": -2052,
    "utxo_size_inc": -137484,
    "utxo_increase_actual": -2841,
    "utxo_size_inc_actual": -199799
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockstats",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    []
  ]
}'
```



------

# getblocktemplate

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns data needed to construct a block to mine. This method is used by miners to request a block template  for mining new blocks. It can be customized with various parameters to specify the desired mining capabilities and rules.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/getblocktemplate

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| template_request | object | No | A JSON object containing the template request parameters. |

## Result

**result** (object): A block template object containing all necessary data for mining.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblocktemplate",
  "params": [
    {
      "mode": "template",
      "capabilities": [
        "coinbasetxn",
        "workid",
        "coinbase/append"
      ],
      "rules": [
        "segwit"
      ]
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "version": 536870912,
    "previousblockhash": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "transactions": [],
    "coinbaseaux": {
      "flags": ""
    },
    "coinbasevalue": 625000000,
    "target": "0000000000000000000248b60000000000000000000000000000000000000000",
    "mintime": 1745928076,
    "mutable": [
      "time",
      "transactions",
      "prevblock"
    ],
    "noncerange": "00000000ffffffff",
    "sigoplimit": 80000,
    "sizelimit": 4000000,
    "curtime": 1745931642,
    "bits": "170248b6",
    "height": 894471
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblocktemplate",
  "params": [
    {
      "mode": "template",
      "capabilities": [
        "coinbasetxn",
        "workid",
        "coinbase/append"
      ],
      "rules": [
        "segwit"
      ]
    }
  ]
}'
```



------

# getchaintips

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about all known tips in the block tree, including the active chain tip and orphaned branches.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/getchaintips

## Result

**result** (object[]): An array of chain tip information objects.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "height": 894712,
      "hash": "00000000000000000000e6518eac47199bcf0108b1c7d194b00ef5a9df794427",
      "branchlen": 0,
      "status": "active"
    },
    {
      "height": 894657,
      "hash": "00000000000000000002311b7c31f1ffef1261bb53740958ed98c600ae2abd41",
      "branchlen": 1,
      "status": "valid-fork"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getchaintips"
}'
```



------

# getchaintxstats

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Calculates statistics about the overall transaction rate and volume of the blockchain over a window of blocks.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/getchaintxstats

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nblocks | integer | No | The size of the window in number of blocks. Defaults to approximately one month. |
| blockhash | string | No | The block hash at which the window ends. Defaults to chain tip. |

## Result

**result** (object): The calculated chain transaction statistics.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getchaintxstats",
  "params": [
    0,
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "time": 1745931642,
    "txcount": 1184990717,
    "window_final_block_hash": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "window_final_block_height": 894470,
    "window_block_count": 0
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getchaintxstats",
  "params": [
    1,
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80"
  ]
}'
```



------

# getconnectioncount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of connections to other nodes (both inbound and outbound).


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/getconnectioncount

## Result

**result** (integer): The total number of connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": 10,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getconnectioncount"
}'
```



------

# getdifficulty

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the proof-of-work difficulty as a multiple of the minimum difficulty.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/getdifficulty

## Result

**result** (number): The difficulty of the current best block as a floating-point number.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": 123234387977050.9,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getdifficulty"
}'
```



------

# getindexinfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the state of one or all available indices currently running.  You can optionally filter the results by a specific index name.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/getindexinfo

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| index_name | string | No | Filter results for an index with a specific name.  |

## Result

**result** (object): A mapping of index names to their respective info.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getindexinfo",
  "params": [
    "txindex"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "txindex": {
      "synced": true,
      "best_block_height": 894717
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getindexinfo",
  "params": [
    "txindex"
  ]
}'
```



------

# getmemoryinfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about memory usage, either general statistics ("stats") or heap information ("mallocinfo").


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/getmemoryinfo

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| mode | enum | No | Determines what kind of information is returned: - "stats" returns general statistics about memory usage. - "mallocinfo" returns an XML string describing low-level heap state.  |

## Result

**result** (object): Memory usage details.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getmemoryinfo",
  "params": [
    "stats"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "locked": {
      "used": 352,
      "free": 65184,
      "total": 65536,
      "locked": 65536,
      "chunks_used": 1,
      "chunks_free": 1
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getmemoryinfo",
  "params": [
    "stats"
  ]
}'
```



------

# getmempoolancestors

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the in-mempool ancestors of a given transaction.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/getmempoolancestors

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txid | string | Yes | The transaction ID whose ancestors to retrieve. |
| verbose | boolean | No | Whether to return detailed info (true) or just txids (false). |

## Result

**result** (string[] or object): The mempool ancestors of the specified transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getmempoolancestors",
  "params": [
    "b86ae732473ff2c91c04073ec9cbef5e4ddaa701741e141e41345df72122b795",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "6f8c6e8d3021d8a1db71eae3cb8db00f1c99d0f94f3b5782e6cfc155b55f3c55",
    "a4d47b8bdee5f5b8c098c9ac9aa4e3ec113d9f305a4f723d617a92439ab244cb"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getmempoolancestors",
  "params": [
    "b86ae732473ff2c91c04073ec9cbef5e4ddaa701741e141e41345df72122b795",
    false
  ]
}'
```



------

# getmempooldescendants

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the in-mempool descendants of a given transaction.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/getmempooldescendants

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txid | string | Yes | The transaction ID whose descendants to retrieve. |
| verbose | boolean | No | Whether to return detailed info (true) or just txids (false). |

## Result

**result** (string[] or object): The mempool descendants of the specified transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getmempooldescendants",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "c3b9f342fc90837fd4a22878b59fdf5cdeae1b4e4586224b0df1b3a2e3e6e9c8",
    "a2e34d98cb7e98b8d85d3a991c8d1cbd3e7a3f17b4acdf4768c88fa3e0e9d8bc"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getmempooldescendants",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    false
  ]
}'
```



------

# getmempoolinfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Provides information about the TX memory pool's current state, including memory usage, transaction count, and relay fee settings.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/getmempoolinfo

## Result

**result** (object): Mempool state information.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "loaded": true,
    "size": 4889,
    "bytes": 13816734,
    "usage": 49380080,
    "total_fee": 0.14547621,
    "maxmempool": 300000000,
    "mempoolminfee": 0.00001,
    "minrelaytxfee": 0.00001,
    "incrementalrelayfee": 0.00001,
    "unbroadcastcount": 0,
    "fullrbf": true
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getmempoolinfo"
}'
```



------

# getnetworkhashps

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the estimated network hashes per second based on the last n blocks. Pass in nblocks to override the default number of blocks, or -1 to get the value since the last difficulty change.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/getnetworkhashps

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nblocks | integer | No | The number of blocks to use for the calculation. Default is 120. Use -1 to calculate since last difficulty change. |
| height | integer | No | To estimate at the time of the given height. Default is -1 (current tip). |

## Result

**result** (number): Hashes per second estimated.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getnetworkhashps",
  "params": [
    120,
    -1
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": 412345678900000000000,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getnetworkhashps",
  "params": [
    120,
    -1
  ]
}'
```



------

# getnetworkinfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object containing various state info regarding P2P networking, including version information, network status, connections, and relay fees.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/getnetworkinfo

## Result

**result** (object): Object containing P2P networking state information.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "version": 270000,
    "subversion": "/Satoshi:27.0.0/",
    "protocolversion": 70016,
    "localservices": "0000000000000409",
    "localservicesnames": [
      "NETWORK",
      "WITNESS",
      "NETWORK_LIMITED"
    ],
    "localrelay": true,
    "timeoffset": 0,
    "connections": 10,
    "connections_in": 2,
    "connections_out": 8,
    "networkactive": true,
    "networks": [
      {
        "name": "ipv4",
        "limited": false,
        "reachable": true,
        "proxy": "",
        "proxy_randomize_credentials": false
      },
      {
        "name": "ipv6",
        "limited": false,
        "reachable": true,
        "proxy": "",
        "proxy_randomize_credentials": false
      },
      {
        "name": "onion",
        "limited": true,
        "reachable": false,
        "proxy": "",
        "proxy_randomize_credentials": false
      }
    ],
    "relayfee": 0.00001,
    "incrementalfee": 0.00001,
    "localaddresses": [],
    "warnings": ""
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getnetworkinfo"
}'
```



------

# getrawmempool

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns either a list of transaction IDs currently in the mempool or detailed metadata for each transaction, depending on the verbosity level.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/getrawmempool

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| verbose | boolean | No | If true, returns detailed info per transaction. If false, returns a list of txids.  |
| mempool_sequence | boolean | No | When verbose is false, includes mempool sequence number in the response.  |

## Result

**result** (object): Mempool data depending on verbosity level.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getrawmempool",
  "params": [
    false,
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "txids": [
      "5f10285c6fee80d1982df9893742d0c5aed5aa4fcca3aa4331d7fa071ba4d5ce",
      "30ad6eacfc8b83de7b91f8df705e081945c9d8a7a05506de38a1842dd856550b"
    ],
    "mempool_sequence": 1386211
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getrawmempool",
  "params": [
    false,
    false
  ]
}'
```



------

# getrawtransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction representation for a given transaction ID (`txid`).  If `verbose` is true, returns a JSON object with detailed information;  otherwise, returns a serialized hex-encoded string.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/getrawtransaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txid | string | Yes | The transaction ID to fetch. |
| verbose | boolean | No | Return verbose JSON or just the raw hex string. |
| blockhash | string | No | The block in which to look for the transaction (if not in the mempool). |

## Result

**result** (string or object): Raw transaction data.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getrawtransaction",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    false,
    "000000000000000000013c7104486ef1aa53e8ac99b8a8ac02a113b58457ed8b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0100000001d074a22eedb6e7258c15368988826e6c73c6577fff490f42afeb8cd7be858032010000006b48304502210084689df7816df6f8a85c72a8cf4d52c2957657d619f5d126dbfc5f866d7561e80220415f8fbd095f53f0a8a4aa11496b126bc87dd020771d3d30c58f374a0f02bf420121024a42999af129d16c92bc0a0b18b39e2550769711845817d1f69932762d431ebcffffffff02ab6502000000000017a91453ca847feb3986cf2be405429e7e513484e0bc938780c6b001000000001976a914ebbfc363611943f588194465c1febdba9bf3883988ac00000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getrawtransaction",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    false,
    "000000000000000000013c7104486ef1aa53e8ac99b8a8ac02a113b58457ed8b"
  ]
}'
```



------

# gettxout

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns details about an unspent transaction output (UTXO), optionally including mempool data.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/gettxout

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txid | string | Yes | The transaction ID. |
| n | integer | Yes | The vout number. |
| include_mempool | boolean | No | Whether to include outputs spent in the mempool. Default is true.  |

## Result

**result** (object): Details about the specified unspent output, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "gettxout",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    0,
    true
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "bestblock": "00000000000000000000944aba5f33a268df0c95a8bacdf42e5d10f8c7d51f94",
    "confirmations": 7,
    "value": 0.00157099,
    "scriptPubKey": {
      "asm": "OP_HASH160 53ca847feb3986cf2be405429e7e513484e0bc93 OP_EQUAL",
      "desc": "addr(39L4cdhha5ueasiKz1wRVd75fHdB9NV2t7)#29pkvxg9",
      "hex": "a91453ca847feb3986cf2be405429e7e513484e0bc9387",
      "address": "39L4cdhha5ueasiKz1wRVd75fHdB9NV2t7",
      "type": "scripthash"
    },
    "coinbase": false
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "gettxout",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    1,
    true
  ]
}'
```



------

# gettxoutproof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns a hex-encoded proof that the specified transaction(s) were included in a block. This proof can be used to verify the inclusion of transactions without relying on a full node.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/gettxoutproof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txids | string[] | Yes | An array of transaction IDs to generate proof for. |
| blockhash | string | No | The block in which to search for the txid(s). If omitted, the node will try to locate it. |

## Result

**result** (string): A hex-encoded proof that the specified transactions are part of a block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "gettxoutproof",
  "params": [
    [
      "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b"
    ],
    "000000000000000000013c7104486ef1aa53e8ac99b8a8ac02a113b58457ed8b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0080ce25cae416f1da89e4cd3b9f7674acfa3cc43e4d71e10aeb0000000000000000000029cc4a072d5cba23dd0e821d8d711f56124f19015b70abaf08ca4f2124a429fc3e23136...",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "gettxoutproof",
  "params": [
    [
      "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b"
    ],
    "000000000000000000013c7104486ef1aa53e8ac99b8a8ac02a113b58457ed8b"
  ]
}'
```



------

# gettxoutsetinfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns statistics about the unspent transaction output (UTXO) set. Only the current chain tip is supported; querying specific blocks is not available.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/gettxoutsetinfo

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| use_index | boolean | No | Whether to use `coinstatsindex` if available. Defaults to true.  |

## Result

**result** (object): Statistics on the current state of the UTXO set.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "gettxoutsetinfo",
  "params": [
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "height": 894719,
    "bestblock": "000000000000000000022d8a0f2096e71b1fe50b486dcda415857bb0cc5a2ca8",
    "txouts": 174434793,
    "bogosize": 13652712508,
    "hash_serialized_3": "d9183d9a82433fbd0b9370da065fb84bbd1bb5004816f242ce0f2268c0394b2e",
    "total_amount": 19858278.9908868,
    "transactions": 121919431,
    "disk_size": 12197514429
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "gettxoutsetinfo",
  "params": [
    false
  ]
}'
```



------

# sendrawtransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Broadcasts a raw transaction (hex-encoded) to the network. Useful for rebroadcasting transactions not originating from your wallet.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/sendrawtransaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hexstring | string | Yes | The hex-encoded raw transaction. |
| maxfeerate | number or string | No | Reject transactions whose fee rate is higher than this value (in BTC/kB). Set to 0 to disable the check.  |

## Result

**result** (string): The transaction ID (txid) of the submitted transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "sendrawtransaction",
  "params": [
    "0200000000010153fc6712e0c6cbfd15e56743f2a16bba3c0b17837d4fd33d68d2d930739e2b130000000000ffffffff01c0c62d0000000000160014c24b61118d4a2b36257b65e1ea7f15f85e41ff0402483045022100ac32e935715a57ec1d642a5e178c37f74c013bf8e4edc4cb1c79f5352f136e87022020b0b3192347d1b84e9b89d00a2ecb290f18f9c39e514fa3ef2b7a889e7b6c1b012103ab0b56c7aa6254a80c124e04d2149f7fc376afedfe4623f3c59b87c279eaeb1400000000",
    0.1
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1b6d7a0196d78d84c31408982f8fa6bc7383d29c96c5e2b3a55e1f1575dc1cfb",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "sendrawtransaction",
  "params": [
    "0200000000010153fc6712e0c6cbfd15e56743f2a16bba3c0b17837d4fd33d68d2d930739e2b130000000000ffffffff01c0c62d0000000000160014c24b61118d4a2b36257b65e1ea7f15f85e41ff0402483045022100ac32e935715a57ec1d642a5e178c37f74c013bf8e4edc4cb1c79f5352f136e87022020b0b3192347d1b84e9b89d00a2ecb290f18f9c39e514fa3ef2b7a889e7b6c1b012103ab0b56c7aa6254a80c124e04d2149f7fc376afedfe4623f3c59b87c279eaeb1400000000",
    0.1
  ]
}'
```



------

# submitblock

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Attempts to submit a new block to the network. The block data must be hex-encoded.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/submitblock

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hexdata | string | Yes | The hex-encoded block data to submit. |
| dummy | string | No | Dummy value for compatibility with BIP22. This value is ignored.  |

## Result

**result** (null or string): Returns null when valid, or a string error message according to BIP22 otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "submitblock",
  "params": [
    "0000002073bd2184edd74c5c5b4c0c5be04d0e8f5d6b7d5b3b1b1d8e8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": null,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "submitblock",
  "params": [
    "0000002073bd2184edd74c5c5b4c0c5be04d0e8f5d6b7d5b3b1b1d8e8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c",
    "string"
  ]
}'
```



------

# submitheader

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Decodes the given hex-encoded block header and submits it as a candidate chain tip if valid. Throws an error if the header is invalid. This can be used to mine on top of a particular block without  having the full block data.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/submitheader

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hexdata | string | Yes | The hex-encoded block header to submit. |

## Result

**result** (null or string): Returns null if the header was accepted, or a string describing the rejection reason.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "submitheader",
  "params": [
    "0000002073bd2184edd74c5c5b4c0c5be04d0e8f5d6b7d5b3b1b1d8e8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": null,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "submitheader",
  "params": [
    "0000002073bd2184edd74c5c5b4c0c5be04d0e8f5d6b7d5b3b1b1d8e8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c"
  ]
}'
```



------

# submitpackage

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Submits a package containing multiple raw transactions to the mempool for validation and acceptance.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/submitpackage

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| package | string[] | Yes | An array of raw transactions (serialized hex strings) to be submitted as a package.  |

## Result

**result** (object): Transaction results keyed by `wtxid`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "submitpackage",
  "params": [
    [
      "0200000000010153fc6712e0c6cbfd15e56743f2a16bba3c0b17837d4fd33d68d2d930739e2b130000000000ffffffff01c0c62d0000000000160014c24b61118d4a2b36257b65e1ea7f15f85e41ff0402483045022100ac32e935715a57ec1d642a5e178c37f74c013bf8e4edc4cb1c79f5352f136e87022020b0b3192347d1b84e9b89d00a2ecb290f18f9c39e514fa3ef2b7a889e7b6c1b012103ab0b56c7aa6254a80c124e04d2149f7fc376afedfe4623f3c59b87c279eaeb1400000000"
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "package_msg": "transaction failed",
    "tx-results": {
      "6dbccbd4775598af6e9713cd84e90e80431ecc7e932c4b832ab3966ad988bc08": {
        "txid": "c67ecf450828d639a8cf3d74f168fe6bd9a1121a1167a1d46908d703f871c3a6",
        "error": "bad-txns-inputs-missingorspent"
      }
    },
    "replaced-transactions": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "submitpackage",
  "params": [
    [
      "0200000000010153fc6712e0c6cbfd15e56743f2a16bba3c0b17837d4fd33d68d2d930739e2b130000000000ffffffff01c0c62d0000000000160014c24b61118d4a2b36257b65e1ea7f15f85e41ff0402483045022100ac32e935715a57ec1d642a5e178c37f74c013bf8e4edc4cb1c79f5352f136e87022020b0b3192347d1b84e9b89d00a2ecb290f18f9c39e514fa3ef2b7a889e7b6c1b012103ab0b56c7aa6254a80c124e04d2149f7fc376afedfe4623f3c59b87c279eaeb1400000000"
    ]
  ]
}'
```



------

# testmempoolaccept

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Indicates whether one or more raw transactions (serialized, hex-encoded) would be accepted by the mempool.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/testmempoolaccept

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| rawtxs | string[] | Yes | An array of hex-encoded raw transactions to test for mempool acceptance.  |
| maxfeerate | number | No | Reject transactions whose fee rate is higher than the specified value, expressed in BTC/kB.  |

## Result

**result** (object[]): Result of the mempool acceptance test for each transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "testmempoolaccept",
  "params": [
    [
      "0200000000010142d6bd07c424e975fe821c978e720f9a55f9981d62c290cea5ccd06b455d79b90000000000fdffffff028096980000000000160014d3620fe180a0beb8fcc9682fe92e5a25f0feccd370cd2f0100000000160014076d998f6b12c3d1da6217d967154f42a5e0afd30247304402204549b10ea1698d4b4605be1d3bfff810f6135395386207664a66f5bb8bd1470902205fb86c95bfbe7b502195ffa65276d292fb074fe18ba171ef0a35395211384091012103cb5de30b343b35cc09b50f064eb289dd3e252f6985fc4309fba795cc950316afcfa50d00"
    ],
    0
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "txid": "054183ee699ff12cf1c9f4413f421c3cf0a8febc6b82a1d8751a30f5e0fd54c0",
      "wtxid": "b07f26a908955f8071620896476d6e2ca6b6610e5edc9e55f19185ca9536c8de",
      "allowed": true
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "testmempoolaccept",
  "params": [
    [
      "0200000000010142d6bd07c424e975fe821c978e720f9a55f9981d62c290cea5ccd06b455d79b90000000000fdffffff028096980000000000160014d3620fe180a0beb8fcc9682fe92e5a25f0feccd370cd2f0100000000160014076d998f6b12c3d1da6217d967154f42a5e0afd30247304402204549b10ea1698d4b4605be1d3bfff810f6135395386207664a66f5bb8bd1470902205fb86c95bfbe7b502195ffa65276d292fb074fe18ba171ef0a35395211384091012103cb5de30b343b35cc09b50f064eb289dd3e252f6985fc4309fba795cc950316afcfa50d00"
    ],
    1
  ]
}'
```



------

# validateaddress

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Verifies the validity of a given Bitcoin address and provides additional metadata about it.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/validateaddress

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The Bitcoin address to validate. |

## Result

**result** (object): Validation result and metadata about the address.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "validateaddress",
  "params": [
    "39L4cdhha5ueasiKz1wRVd75fHdB9NV2t7"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "isvalid": true,
    "address": "39L4cdhha5ueasiKz1wRVd75fHdB9NV2t7",
    "scriptPubKey": "a91453ca847feb3986cf2be405429e7e513484e0bc9387",
    "isscript": true,
    "iswitness": false
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "validateaddress",
  "params": [
    "39L4cdhha5ueasiKz1wRVd75fHdB9NV2t7"
  ]
}'
```



------

# verifymessage

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

Verifies a message signature using the corresponding Bitcoin address. Returns true if the signature is valid and matches the given address.


Reference: https://www.alchemy.com/docs/chains/bitcoin/bitcoin-api-endpoints/verifymessage

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The Bitcoin address to use for the signature. |
| signature | string | Yes | The base64-encoded signature provided by the signer. |
| message | string | Yes | The message that was signed. |

## Result

**result** (boolean): Whether the signature is valid for the message and address.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "verifymessage",
  "params": [
    "1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY",
    "G9oR+mz9QwPZq2boSmjdtbX0VNdD+dLOFRzJ93ZDHNwhnOtJb1EDAKCK3NmPIzctQDAazX9gh3d+zdoFKc69bQ4=",
    "Test message from Bitcoin"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "verifymessage",
  "params": [
    "1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY",
    "G9oR+mz9QwPZq2boSmjdtbX0VNdD+dLOFRzJ93ZDHNwhnOtJb1EDAKCK3NmPIzctQDAazX9gh3d+zdoFKc69bQ4=",
    "Test message from Bitcoin"
  ]
}'
```



------

# UTXO Overview

> Understand how the Unspent Transaction Output (UTXO) model tracks balances on Bitcoin.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

Bitcoin uses the **Unspent Transaction Output (UTXO) model** to track user balances, in contrast to the **account model** used by Ethereum and other EVM chains.

## UTXO-based model

UTXO stands for *Unspent Transaction Output*. Instead of tracking an account's overall balance, the network maintains a set of UTXOs: outputs from past transactions that credit specific addresses with a specific amount.

When someone says they own 3 BTC, what they actually hold is one or more UTXOs that together sum to 3 BTC. To spend that balance, a wallet selects specific UTXOs as inputs to a new transaction.

## What is a UTXO?

A UTXO is the output of a previous transaction that has not yet been spent. Every time a transaction is confirmed:

* The inputs reference one or more UTXOs from previous transactions.
* The outputs create new UTXOs credited to the recipient addresses.
* Any leftover value (input minus output minus fee) returns to the sender as a "change" UTXO.

So each transaction consumes old UTXOs and produces new ones. The full set of UTXOs at any point in time represents the network's spendable state.

## Properties of UTXOs

* **Non-fungible.** Each UTXO is a distinct object referenced by its transaction ID and output index.
* **Specific to spend.** To spend a UTXO you must refer to that exact UTXO, not just an aggregate balance.
* **Change creates new UTXOs.** Any leftover from the input value becomes a new UTXO sent back to the spender.
* **Single-use.** A UTXO can only be spent once; double-spending is prevented at consensus.
* **Script-locked.** Each UTXO carries a locking script that defines the conditions under which it can be spent (typically a signature from the owning private key).

## Account model vs UTXO model

|                    | Account model (Ethereum, EVM chains)                        | UTXO model (Bitcoin)                                                              |
| ------------------ | ----------------------------------------------------------- | --------------------------------------------------------------------------------- |
| User balance       | Single overall account state (e.g. address X holds 4.2 ETH) | Sum of specific UTXOs (e.g. address X owns 29 UTXOs totalling 2.65 BTC)           |
| Query model        | Direct: read account balance                                | Compute: aggregate over an address's UTXOs                                        |
| Privacy            | Repeated address use correlates activity                    | Rotating addresses per output is the recommended privacy model                    |
| Transaction model  | State transition: balance update                            | Input/output: consume UTXOs, create new ones                                      |

## Querying UTXO data with Alchemy

Alchemy's UTXO API gives you a clean REST interface to fetch Bitcoin addresses, balances, balance history, UTXOs, and block/transaction data. See the UTXO API endpoints in the sidebar, or the [UTXO migration guide](https://www.alchemy.com/docs/bitcoin/utxo-migration-guide) if you're moving from QuickNode, BlockCypher, or Blockdaemon.

------

# Migrating UTXO data to Alchemy

> Migrate your UTXO API calls to Alchemy from QuickNode, BlockCypher, or Blockdaemon. Side-by-side examples for Bitcoin, Bitcoin Cash, Litecoin, and Dogecoin.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

This guide provides a straightforward path for migrating your UTXO API calls to Alchemy from QuickNode, BlockCypher, or Blockdaemon. Whether you're already on Alchemy for other chains or evaluating providers, we'll walk you through every step.

Please reach out to [data-services-product@alchemy.com](mailto:data-services-product@alchemy.com) with any questions.

## Supported networks

Our UTXO APIs are available on the following networks:

* `BTC` Bitcoin (mainnet and testnet4)
* `BCH` Bitcoin Cash (mainnet and testnet)
* `LTC` Litecoin (mainnet and testnet)
* `DOGE` Dogecoin (mainnet)

## What Alchemy's UTXO API provides

Our UTXO API endpoints are a drop-in replacement for QuickNode's Blockbook add-on, BlockCypher's Address API, and Blockdaemon's custom Bitcoin RPC methods.

* **Full Blockbook parity.** Balance history, address info, block data, transaction lookups, and UTXOs.
* **REST API.** Clean, simple GET requests with no JSON-RPC boilerplate.
* **Multi-chain support.** Bitcoin, Bitcoin Cash, Litecoin, and Dogecoin from a single provider.

UTXO API reference: [Bitcoin](https://www.alchemy.com/docs/chains/bitcoin/utxo-api-endpoints/utxo-api-endpoints/get-block-hash-by-index), [Bitcoin Cash](https://www.alchemy.com/docs/chains/bitcoincash/utxo-api-endpoints/utxo-api-endpoints/get-block-hash-by-index), [Litecoin](https://www.alchemy.com/docs/chains/litecoin/utxo-api-endpoints/utxo-api-endpoints/get-block-hash-by-index), [Dogecoin](https://www.alchemy.com/docs/chains/dogecoin/utxo-api-endpoints/utxo-api-endpoints/get-block-hash-by-index).

## How to enable UTXO endpoints

Purchase the UTXO add-on for your desired chain from the [Alchemy dashboard](https://dashboard.alchemy.com/).

<Note title="Key difference">
  Alchemy's standard chain endpoints use JSON-RPC, while the UTXO API endpoints are REST. QuickNode wraps its UTXO functionality (Blockbook) in JSON-RPC. This is the primary architectural difference between the two.
</Note>

## Migrating from QuickNode

### Example: Get balance history

Below is a side-by-side comparison of the same API call, with the same address and same time range, showing how the request and response differ between Alchemy and QuickNode.

Example address: `bc1qwfgdjyy95aay2686fn74h6a4nu9eev6np7q4fn204dkj3274frlqrskvx0`

**QuickNode request (old)**

```bash
curl -X POST "https://docs-demo.btc.quiknode.pro/" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "method": "bb_getBalanceHistory",
  "params": [
    "bc1qwfgdjyy95aay2686fn74h6a4nu9eev6np7q4fn204dkj3274frlqrskvx0",
    {
      "from": "1683684000",
      "to": "1700042400"
    }
  ],
  "id": 1
}'
```

**QuickNode response**

```json
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": [
    {
      "time": 1685689200,
      "txs": 5,
      "received": "0",
      "sent": "10247601921605917",
      "sentToSelf": "0",
      "rates": {
        "usd": 1907.2123
      }
    },
    {
      "time": 1694084400,
      "txs": 4,
      "received": "0",
      "sent": "8064344277547668",
      "sentToSelf": "0",
      "rates": {
        "usd": 1646.305
      }
    }
  ]
}
```

Source: [QuickNode `bb_getBalanceHistory`](https://www.quicknode.com/docs/bitcoin/bb_getbalancehistory).

**Alchemy request (new)**

```bash
curl --request GET \
  --url 'https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/balancehistory/bc1qwfgdjyy95aay2686fn74h6a4nu9eev6np7q4fn204dkj3274frlqrskvx0?from=1683684000&to=1700042400'
```

**Alchemy response**

```json
[
  {
    "time": 1685689200,
    "txs": 5,
    "received": "0",
    "sent": "10247601921605917",
    "sentToSelf": "0"
  },
  {
    "time": 1694084400,
    "txs": 4,
    "received": "0",
    "sent": "8064344277547668",
    "sentToSelf": "0"
  }
]
```

Source: [Alchemy Get balance history](/docs/chains/bitcoin/utxo-api-endpoints/utxo-api-endpoints/get-balance-history).

### Understand the differences

|                          | QuickNode                            | Alchemy                                |
| ------------------------ | ------------------------------------ | -------------------------------------- |
| Protocol                 | JSON-RPC (POST)                      | REST (GET)                             |
| Address                  | Passed in `params` array             | Passed in URL path                     |
| Time range               | Passed as strings in `params` object | Passed as query parameters             |
| Response wrapper         | Wrapped in `jsonrpc`, `id`, `result` | Clean JSON array, no wrapper           |
| Fiat rates in response   | Included via `fiatcurrency` param    | Included via `fiatcurrency` query param |

## Migrating from BlockCypher

### Example: Get address balance

Below is a side-by-side comparison of how to retrieve address balance and transaction summary data. Both requests query the same address.

Example address: `1DEP8i3QJCsomS4BSMY2RpU1upv62aGvhD`

**BlockCypher request (old)**

```bash
curl --request GET \
  --url 'https://api.blockcypher.com/v1/btc/main/addrs/1DEP8i3QJCsomS4BSMY2RpU1upv62aGvhD/balance'
```

Source: [BlockCypher Address Balance Endpoint](https://www.blockcypher.com/dev/bitcoin/#address-balance-endpoint).

**BlockCypher response**

```json
{
  "address": "1DEP8i3QJCsomS4BSMY2RpU1upv62aGvhD",
  "total_received": 4433416,
  "total_sent": 0,
  "balance": 4433416,
  "unconfirmed_balance": 0,
  "final_balance": 4433416,
  "n_tx": 7,
  "unconfirmed_n_tx": 0,
  "final_n_tx": 7
}
```

**Alchemy request (new)**

```bash
curl --request GET \
  --url 'https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/address/1DEP8i3QJCsomS4BSMY2RpU1upv62aGvhD'
```

Source: [Alchemy Get address](/docs/chains/bitcoin/utxo-api-endpoints/utxo-api-endpoints/get-address).

**Alchemy response**

```json
{
  "address": "1DEP8i3QJCsomS4BSMY2RpU1upv62aGvhD",
  "balance": "4433416",
  "totalReceived": "4433416",
  "totalSent": "0",
  "unconfirmedBalance": "0",
  "unconfirmedTxs": 0,
  "txs": 7
}
```

### Understand the differences

|                    | BlockCypher                              | Alchemy                                       |
| ------------------ | ---------------------------------------- | --------------------------------------------- |
| Protocol           | REST (GET)                               | REST (GET)                                    |
| Base URL pattern   | `/v1/btc/main/addrs/{address}`           | `/v2/{apiKey}/api/v2/address/{address}`       |
| Authentication     | Token as query parameter                 | API key in URL path                           |
| Balance unit       | Integer (satoshis)                       | String (satoshis)                             |
| Response format    | Flat JSON with `snake_case` fields       | Flat JSON with `camelCase` fields             |
| Supported chains   | BTC, LTC, DOGE, DASH                     | BTC, BCH, LTC, DOGE                           |

## Migrating from Blockdaemon

### Example: Get address balance

Below is a side-by-side comparison of how to retrieve address balance data. Both requests query the same address.

Example address: `bc1qwfgdjyy95aay2686fn74h6a4nu9eev6np7q4fn204dkj3274frlqrskvx0`

**Blockdaemon request (old)**

```bash
curl -X POST "https://svc.blockdaemon.com/bitcoin/mainnet/native" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "1.0",
  "id": "curltest",
  "method": "bd_getbalance",
  "params": [
    "bc1qwfgdjyy95aay2686fn74h6a4nu9eev6np7q4fn204dkj3274frlqrskvx0"
  ]
}'
```

Source: [Blockdaemon Bitcoin custom methods](https://docs.blockdaemon.com/reference/bitcoin-custom-methods-rpc-api).

**Blockdaemon response**

```json
{
  "id": "curltest",
  "result": {
    "trusted": "0.00000000",
    "untrusted_pending": "0.00000000"
  }
}
```

**Alchemy request (new)**

```bash
curl --request GET \
  --url 'https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/address/bc1qwfgdjyy95aay2686fn74h6a4nu9eev6np7q4fn204dkj3274frlqrskvx0'
```

Source: [Alchemy Get address](/docs/chains/bitcoin/utxo-api-endpoints/utxo-api-endpoints/get-address).

**Alchemy response**

```json
{
  "address": "bc1qwfgdjyy95aay2686fn74h6a4nu9eev6np7q4fn204dkj3274frlqrskvx0",
  "balance": "0",
  "totalReceived": "18311946199153585",
  "totalSent": "18311946199153585",
  "unconfirmedBalance": "0",
  "unconfirmedTxs": 0,
  "txs": 9
}
```

### Understand the differences

|                   | Blockdaemon                                            | Alchemy                                                |
| ----------------- | ------------------------------------------------------ | ------------------------------------------------------ |
| Protocol          | JSON-RPC 1.0 (POST)                                    | REST (GET)                                             |
| Address           | Passed in `params` array                               | Passed in URL path                                     |
| Authentication    | `Authorization: Bearer` header                         | API key in URL path                                    |
| Balance data      | Returns `trusted` and `untrusted_pending` only         | Returns balance, totalReceived, totalSent, tx count    |
| Response wrapper  | Wrapped in `jsonrpc`, `id`, `result`                   | Clean JSON object, no wrapper                          |
| Balance history   | Not available                                          | Available via `/api/v2/balancehistory/{address}`       |

## Benchmarking results

Across Bitcoin, Litecoin, Dogecoin, and Bitcoin Cash, Alchemy is **3x faster overall** than competitors on average latency, and up to **5x faster on UTXO-specific methods**, the API surface that matters most for blockchain applications querying transaction and balance data.

We maintain a live dashboard with real-time performance metrics for our UTXO endpoints across all supported networks, benchmarked against QuickNode and Blockdaemon. [View live dashboard](https://alchemyinsights.grafana.net/public-dashboards/255a89badeb94c12853ff5493c8af667).

## Start your migration to Alchemy

We understand migrating services can be complex, but we are here to make it easy with dedicated support, feature parity, and expanded capabilities.

If there's a feature you need, let us know. Contact us at [data-services-product@alchemy.com](mailto:data-services-product@alchemy.com).

## Frequently asked questions

* **Why should I migrate my UTXO calls to Alchemy?**
  * Alchemy's UTXO API provides full Blockbook feature parity with a clean REST interface - no JSON-RPC boilerplate, no wrappers in responses, and consistent multi-chain support from a single provider. Whether you're coming from QuickNode, BlockCypher, or Blockdaemon, the migration is straightforward.
* **Is Alchemy's UTXO API a drop-in replacement?**
  * The data returned is equivalent, but the request format may differ. QuickNode and Blockdaemon use JSON-RPC POST requests, while BlockCypher and Alchemy both use REST GET. You will need to update your HTTP calls, but the underlying data models are the same.
* **How do I enable UTXO endpoints on my Alchemy account?**
  * Purchase the UTXO add-on for your desired chain directly from the Alchemy dashboard. Once enabled, you can start making REST API calls immediately.
* **I'm migrating from BlockCypher. How different is the integration?**
  * BlockCypher and Alchemy both use REST GET endpoints, so the migration is the most straightforward of the three. The main changes are the base URL pattern, field naming convention (`snake_case` vs `camelCase`), and authentication method (query param vs URL path).
* **I'm migrating from Blockdaemon. Does Alchemy support the same data?**
  * Alchemy provides richer address data than Blockdaemon's `bd_getbalance` method, including total received, total sent, and transaction counts - all from a single REST call with no JSON-RPC wrapper. Alchemy also offers balance history, which is not available through Blockdaemon's Bitcoin RPC.
* **Where can I get help with my migration?**
  * Contact [data-services-product@alchemy.com](mailto:data-services-product@alchemy.com) with any questions or feature requests. We offer dedicated migration support.

------

# Get Block Hash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/block-index/{block_height}

Returns the block hash for a given block height on the selected network.

Reference: https://www.alchemy.com/docs/chains/bitcoin/utxo-api-endpoints/utxo-api-endpoints/get-block-hash-by-index

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| block_height | integer | Yes | Block height as a non-negative integer. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/block-index/860730
```



------

# Get Transaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/tx/{txid}

Returns normalized transaction data for the given transaction ID. Response shape is consistent across UTXO networks. Empty fields are omitted.


Reference: https://www.alchemy.com/docs/chains/bitcoin/utxo-api-endpoints/utxo-api-endpoints/get-transaction

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| txid | string | Yes | Hex-encoded transaction ID. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/tx/8c1e3dec662d1f2a5e322ccef5eca263f98eb16723c6f990be0c88c1db113fb1
```



------

# Get Transaction Specific

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/tx-specific/{txid}

Returns transaction data in the exact format returned by the underlying coin backend, including all chain-specific fields not surfaced by the normalized `/tx/{txid}` endpoint.


Reference: https://www.alchemy.com/docs/chains/bitcoin/utxo-api-endpoints/utxo-api-endpoints/get-transaction-specific

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| txid | string | Yes | Hex-encoded transaction ID. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/tx-specific/8c1e3dec662d1f2a5e322ccef5eca263f98eb16723c6f990be0c88c1db113fb1
```



------

# Get Address

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/address/{address}

Returns balances and transactions for the given address. Transactions are sorted newest-first by block height.


Reference: https://www.alchemy.com/docs/chains/bitcoin/utxo-api-endpoints/utxo-api-endpoints/get-address

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| address | string | Yes | Coin-specific address string. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| page | integer | No | Page of returned transactions, starting from 1. |
| pageSize | integer | No | Number of transactions returned per page (max 1000). |
| from | integer | No | Filter transactions starting from this block height. |
| to | integer | No | Filter transactions up to this block height. |
| details | enum | No | Level of detail to return. |
| secondary | string | No | Secondary (fiat) currency code for balance conversion, e.g. `usd` or `eur`. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/address/bc1q0wd209cv5k9pd9mhk7nspacywcj038xxdhnt5u
```



------

# Get Xpub

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/xpub/{xpub}

Returns balances and transactions for an xpub or output descriptor. Supports BIP44, BIP49, BIP84, and BIP86 (Taproot) derivation schemes. The BIP version is determined by the xpub prefix or by an explicit output descriptor.


Reference: https://www.alchemy.com/docs/chains/bitcoin/utxo-api-endpoints/utxo-api-endpoints/get-xpub

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| xpub | string | Yes | Extended public key or output descriptor. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| page | integer | No |  |
| pageSize | integer | No |  |
| from | integer | No |  |
| to | integer | No |  |
| details | enum | No |  |
| tokens | enum | No | Which derived addresses to return. |
| secondary | string | No | Secondary (fiat) currency code for balance conversion. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/xpub/xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz
```



------

# Get UTXOs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/utxo/{descriptor}

Returns the unspent transaction outputs for an address, xpub, or output descriptor. Includes confirmed and unconfirmed UTXOs by default; pass `confirmed=true` to limit to confirmed only. UTXOs are sorted newest-first.


Reference: https://www.alchemy.com/docs/chains/bitcoin/utxo-api-endpoints/utxo-api-endpoints/get-utxo

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| descriptor | string | Yes | Address, xpub, or output descriptor. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| confirmed | boolean | No | When `true`, exclude unconfirmed UTXOs. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/utxo/bc1qwfgdjyy95aay2686fn74h6a4nu9eev6np7q4fn204dkj3274frlqrskvx0
```



------

# Get Block

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/block/{block}

Returns information about a block, including transactions, by block hash or block height. Results are paginated.


Reference: https://www.alchemy.com/docs/chains/bitcoin/utxo-api-endpoints/utxo-api-endpoints/get-block

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| block | string | Yes | Block height (integer) or block hash (hex string). |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| page | integer | No |  |
| pageSize | integer | No |  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/block/860730
```



------

# Send Transaction (GET)

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/sendtx/{hex}

Broadcasts a signed raw Bitcoin transaction encoded as a hex string in the path. Returns the transaction ID on success. The example value below is the hex of a confirmed Bitcoin transaction; re-sending it will respond with a Bitcoin-Core RPC error (e.g. `-25: bad-txns-inputs-missingorspent` once the inputs are spent, or `-27: transaction already in block chain` for unspent re-broadcasts). Substitute your own signed raw-transaction hex to broadcast. For larger payloads, use the POST variant.


Reference: https://www.alchemy.com/docs/chains/bitcoin/utxo-api-endpoints/utxo-api-endpoints/send-transaction-get

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| hex | string | Yes | Hex-encoded raw transaction bytes. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/sendtx/02000000000101662a2fc609ddb4ebf96113d237041d687c94494f44c10d8dc8e23d3774b5b70e0100000000fdffffff0298ab0200000000001976a914ecc999d554eaa3efa5e871c28f58b549c36ec51788ac64e196000000000016001496f152a0919487624bf4f13f46f0d20fa10d9acc0247304402202bb0591180cdbbe0f639af6eb21abdb993fc5a667b09e6392d5c11b025a9187102201ef2e84fc91a5d2c6fbbc9f943482d230256a3640f8ecb83c1f3f17242cf011001210314f03889e1667feb696ee280625943195189cfabe46d54204d987f631fe6892739220d00
```



------

# Send Transaction (POST)

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/sendtx/

Broadcasts a signed raw Bitcoin transaction by sending hex bytes in the request body. The trailing slash on the path is mandatory; see the [Blockbook API reference](https://github.com/trezor/blockbook/blob/master/docs/api.md#send-transaction). Use this for larger payloads (request body limit 8 MiB). Returns the transaction ID on success.

> **Heads up**: the POST variant currently returns `{ "error": "Parse error" }` (HTTP 400) > on the Alchemy proxy regardless of body format. Until that upstream issue is resolved, > prefer the GET variant above for hex payloads under the URL-length limit.


Reference: https://www.alchemy.com/docs/chains/bitcoin/utxo-api-endpoints/utxo-api-endpoints/send-transaction-post

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/sendtx/
```



------

# Get Tickers List

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/tickers-list/

Returns the list of available currency rate tickers (secondary currencies) for a given timestamp, along with the actual data timestamp.

> **Heads up**: this endpoint currently returns HTTP 503 `Unable to complete request at this > time` on the Alchemy proxy. The schema and request shape below are documented for > reference; "Try It" will not return live data until the upstream service is restored.


Reference: https://www.alchemy.com/docs/chains/bitcoin/utxo-api-endpoints/utxo-api-endpoints/get-tickers-list

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| timestamp | integer | Yes | Unix timestamp for the requested currency list. |
| token | string | No | Token symbol or contract/address key for token-specific rates. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url 'https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/tickers-list/?timestamp=1574346615'
```



------

# Get Tickers

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/tickers/

Returns the currency rate for the specified currency and timestamp. If the requested currency is unavailable for that timestamp, the closest rate is returned with the actual rate timestamp.

> **Heads up**: this endpoint currently returns HTTP 503 `Unable to complete request at this > time` on the Alchemy proxy. The schema and request shape below are documented for > reference; "Try It" will not return live data until the upstream service is restored.


Reference: https://www.alchemy.com/docs/chains/bitcoin/utxo-api-endpoints/utxo-api-endpoints/get-tickers

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| currency | string | No | Fiat or crypto currency code (e.g. `usd`, `eur`, `eth`). Omit to return all. |
| timestamp | integer | No | Unix timestamp. Omit to return the latest. |
| block | string | No | Block height or hash whose timestamp should be used for historical rates. |
| token | string | No | Token symbol or contract/address key for token-specific rates. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/tickers/
```



------

# Get Balance History

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/balancehistory/{address}

Returns the balance history for the specified address. Optionally enrich each bucket with secondary (fiat) currency rates at the time of the transaction.


Reference: https://www.alchemy.com/docs/chains/bitcoin/utxo-api-endpoints/utxo-api-endpoints/get-balance-history

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| address | string | Yes | Coin-specific address string. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| from | integer | Yes | Start of the history range as a Unix timestamp. |
| to | integer | Yes | End of the history range as a Unix timestamp. |
| fiatcurrency | string | No | Fiat currency code to enrich each bucket with. |
| groupBy | integer | No | Aggregation interval in seconds. Defaults to 3600. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url 'https://bitcoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/balancehistory/bc1q0wd209cv5k9pd9mhk7nspacywcj038xxdhnt5u?from=1578391200&to=1578488400'
```



------

# UTXO WebSockets

> Stream block, transaction, address, and fiat rate updates from Bitcoin over a persistent WebSocket connection.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

The UTXO WebSockets API streams real-time events from Bitcoin over a persistent connection, powered by [Trezor Blockbook](https://github.com/trezor/blockbook). Use it to push-subscribe to new blocks, new transactions, transactions affecting specific addresses, and fiat rate updates, with the same data shapes returned by the [UTXO REST API](/docs/bitcoin/utxo).

<Info>
  When the chain reorganizes, the server emits new block events for the new chain. You may see multiple events at the same height; treat the latest one as canonical.
</Info>

# Supported Networks

* `bitcoin-mainnet`
* `bitcoin-testnet4`

# Connection

Open a WebSocket connection using the standard Alchemy WebSocket URL for the network:

<CodeGroup>
  ```shell wscat
  wscat -c wss://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}
  ```
</CodeGroup>

Replace `{apiKey}` with your Alchemy API key from the [Alchemy Dashboard](https://dashboard.alchemy.com/). The WebSocket URL for an app uses the same host as its HTTPS URL, just with the `wss://` scheme.

# Message format

Every client message uses the following envelope:

```json
{
  "id": "1",
  "method": "<request or subscription name>",
  "params": { ... }
}
```

* `id`: a client-chosen string. The server echoes it back on every response so you can correlate.
* `method`: the request method or subscription name.
* `params`: method-specific arguments. Use `{}` when none.

A connection can hold only one active subscription per event type. Sending a second `subscribeAddresses` replaces the previous address list. To stop receiving events, close the connection.

# Subscriptions

## subscribeNewBlock

Emits an event each time a new block is added to the chain.

### Parameters

* None.

### Response

* `id`: `string` - The id you sent on the request.
* `data`:
  * `height`: `number` - Block height.
  * `hash`: `string` - Block hash.

### Request

<CodeGroup>
  ```shell wscat
  // open the websocket
  wscat -c wss://bitcoin-mainnet.g.alchemy.com/v2/{apiKey}

  // then send the subscription
  {"id":"1","method":"subscribeNewBlock","params":{}}
  ```
</CodeGroup>

### Result

<CodeGroup>
  ```json result
  {"id":"1","data":{"subscribed":true}}

  {
    "id":"1",
    "data":{
      "height":860730,
      "hash":"00000000000000000000effeb0c4460480e6a347deab95332c63007a68646ee5"
    }
  }
  ```
</CodeGroup>

## subscribeNewTransaction

Emits every new transaction added to the blockchain, across all addresses.

<Info>
  This subscription is a high-volume firehose and requires the backend to be running with the `-enablesubnewtx` flag. It may not be enabled on all networks. If you do not receive events after subscribing, fall back to `subscribeAddresses` for targeted updates.
</Info>

### Parameters

* None.

### Response

* `id`: `string` - The id you sent on the request.
* `data`: a transaction object using the same shape as `GET /api/v2/tx/{txid}`. See the [Get transaction reference](https://github.com/trezor/blockbook/blob/master/docs/api.md#get-transaction) for the full field list.

### Request

<CodeGroup>
  ```shell wscat
  {"id":"2","method":"subscribeNewTransaction","params":{}}
  ```
</CodeGroup>

### Result

<CodeGroup>
  ```json result
  {"id":"2","data":{"subscribed":true}}

  {
    "id":"2",
    "data":{
      "txid":"8c1e3dec662d1f2a5e322ccef5eca263f98eb16723c6f990be0c88c1db113fb1",
      "version":2,
      "vin":[
        {
          "txid":"0eb7b574373de2c88d0dc1444f49947c681d0437d21361f9ebb4dd09c62f2a66",
          "vout":1,
          "n":0,
          "addresses":["bc1qmgwnfjlda4ns3g6g3yz74w6scnn9yu2ts82yyc"],
          "isAddress":true,
          "value":"10106300"
        }
      ],
      "vout":[
        {
          "value":"175000",
          "n":0,
          "addresses":["1Nb1ykSD7J5k4RFjJQGsrD9gxBE6jzfNa9"],
          "isAddress":true
        }
      ],
      "blockHeight":-1,
      "confirmations":0,
      "value":"10063100",
      "valueIn":"10106300",
      "fees":"43200"
    }
  }
  ```
</CodeGroup>

## subscribeAddresses

Emits an event when a new transaction touches any of the supplied addresses. Optionally also emits when those transactions confirm in a new block.

### Parameters

* `addresses`: `string[]` - One or more addresses to watch. Sending a new `subscribeAddresses` request replaces the previous list.
* `newBlockTxs`: `boolean` *(optional)* - When `true`, also emits an event when a watched transaction is included in a new block, not just when it enters the mempool. Defaults to `false`.

### Response

* `id`: `string` - The id you sent on the request.
* `data`:
  * Initial: `{ "subscribed": true }`.
  * On each event: `{ "address": <string>, "tx": <Tx> }` where `Tx` follows the same shape as `GET /api/v2/tx/{txid}`.

### Request

<CodeGroup>
  ```shell wscat
  {
    "id":"3",
    "method":"subscribeAddresses",
    "params":{
      "addresses":[
        "bc1qmgwnfjlda4ns3g6g3yz74w6scnn9yu2ts82yyc",
        "1Nb1ykSD7J5k4RFjJQGsrD9gxBE6jzfNa9"
      ],
      "newBlockTxs":true
    }
  }
  ```
</CodeGroup>

### Result

<CodeGroup>
  ```json result
  {"id":"3","data":{"subscribed":true}}

  {
    "id":"3",
    "data":{
      "address":"bc1qmgwnfjlda4ns3g6g3yz74w6scnn9yu2ts82yyc",
      "tx":{
        "txid":"8c1e3dec662d1f2a5e322ccef5eca263f98eb16723c6f990be0c88c1db113fb1",
        "vin":[
          {
            "n":0,
            "addresses":["bc1qmgwnfjlda4ns3g6g3yz74w6scnn9yu2ts82yyc"],
            "isAddress":true,
            "value":"10106300"
          }
        ],
        "vout":[
          {
            "value":"175000",
            "n":0,
            "addresses":["1Nb1ykSD7J5k4RFjJQGsrD9gxBE6jzfNa9"],
            "isAddress":true
          }
        ],
        "blockHeight":-1,
        "confirmations":0,
        "value":"10063100",
        "fees":"43200"
      }
    }
  }
  ```
</CodeGroup>

## subscribeFiatRates

Emits an event when the fiat rate ticker for the chain's native asset updates.

### Parameters

* `currency`: `string` *(optional)* - Filter to a single fiat currency (e.g. `"usd"`, `"eur"`). When omitted, the server emits all available currencies on each update.

### Response

* `id`: `string` - The id you sent on the request.
* `data`:
  * Initial: `{ "subscribed": true }`.
  * On each event: `{ "rates": { "<currency>": <number>, ... } }`.

### Request

<CodeGroup>
  ```shell wscat
  {"id":"4","method":"subscribeFiatRates","params":{"currency":"usd"}}
  ```
</CodeGroup>

### Result

<CodeGroup>
  ```json result
  {"id":"4","data":{"subscribed":true}}

  {"id":"4","data":{"rates":{"usd":7914.5}}}
  ```
</CodeGroup>

# Request methods

In addition to subscriptions, the WebSocket connection accepts the same one-shot requests as the [UTXO REST API](/docs/chains/bitcoin/utxo-api-endpoints/utxo-api-endpoints). They are useful when you have already opened a connection for subscriptions and want to fetch ad-hoc data without a separate HTTP round-trip.

| Method                       | REST equivalent                                  | Description                                                       |
| ---------------------------- | ------------------------------------------------ | ----------------------------------------------------------------- |
| `getInfo`                    | `GET /api/`                                      | Backend and Blockbook status                                      |
| `getBlockHash`               | `GET /api/v2/block-index/{block_height}`         | Block hash for a given height                                     |
| `getAccountInfo`             | `GET /api/v2/address/{address}`, `/xpub/{xpub}`  | Balances and transactions for an address or xpub                  |
| `getAccountUtxo`             | `GET /api/v2/utxo/{descriptor}`                  | UTXOs for an address or xpub                                      |
| `getTransaction`             | `GET /api/v2/tx/{txid}`                          | Normalized transaction data                                       |
| `getTransactionSpecific`     | `GET /api/v2/tx-specific/{txid}`                 | Coin-specific raw transaction                                     |
| `getBalanceHistory`          | `GET /api/v2/balancehistory/{address}`           | Address balance history grouped by time                           |
| `estimateFee`                | n/a                                              | Fee estimate for a target confirmation depth                      |
| `sendTransaction`            | `POST /api/v2/sendtx/`                           | Broadcast a signed raw transaction                                |
| `getCurrentFiatRates`        | `GET /api/v2/tickers/`                           | Current fiat rates                                                |
| `getFiatRatesTickersList`    | `GET /api/v2/tickers-list/`                      | List of available fiat tickers for a timestamp                    |
| `getFiatRatesForTimestamps`  | n/a                                              | Historical fiat rates for specific timestamps                     |
| `getMempoolFilters`          | n/a                                              | Compact block filters for the mempool (for light clients)         |
| `getBlockFilter`             | n/a                                              | Compact block filter for a given block                            |
| `ping`                       | n/a                                              | Connection health check                                           |

For request and response payload shapes, see the [Trezor Blockbook WebSocket API reference](https://github.com/trezor/blockbook/blob/master/docs/api.md#websocket-api). The payloads are the same as the REST API; only the connection layer differs.

# WebSocket limits

The following limits apply to Alchemy WebSocket connections:

* 100 concurrent connections per app on the FREE tier; 2,000 on all other tiers.
* 1,000 unique subscriptions per connection.

See [Best Practices for Using WebSockets](/docs/reference/best-practices-for-using-websockets-in-web3) for connection-management tips and [Compute Unit Costs](/docs/reference/compute-unit-costs) for billing details.

# See also

* [UTXO Overview](/docs/bitcoin/utxo)
* [UTXO API Endpoints](/docs/chains/bitcoin/utxo-api-endpoints/utxo-api-endpoints)
* [UTXO Migration Guide](/docs/bitcoin/utxo-migration-guide)

------

# Bitcoin API FAQ

> Frequently asked questions about the Bitcoin API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Bitcoin?

Bitcoin is the first decentralized, peer-to-peer digital currency. It allows you to send and receive payments without the need for intermediaries like banks. Bitcoin uses a UTXO (Unspent Transaction Output) model and is secured by proof-of-work mining.

## What is the Bitcoin API?

The Bitcoin API allows you to interact with the Bitcoin network using JSON-RPC methods. Through the API, you can retrieve data about blocks, transactions, and the mempool, as well as broadcast new transactions to the network.

## How can I get started using the Bitcoin API?

Check out our [Bitcoin API Quickstart](/docs/reference/bitcoin-api-quickstart) guide for setup instructions, sample code, and your first API call.

## Does Bitcoin support smart contracts?

Not in the same way as EVM-based chains. Bitcoin supports basic scripting for transactions, but does not have a full smart contract virtual machine like Ethereum. More advanced contract-like functionality is being explored via protocols like Taproot and Ordinals.

## What API standard does Bitcoin use?

Bitcoin Core implements a standard JSON-RPC interface for querying blockchain data and submitting transactions.

## What is a Bitcoin API key?

When accessing the Bitcoin Chain network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network.

## Which libraries can I use with the Bitcoin API?

You can use any HTTP client that supports JSON payloads — e.g., `axios`, `fetch`, `requests`, or `curl`. There are also Bitcoin-specific libraries like `bitcoin-core` (Node.js), `python-bitcoinrpc`, and `btcd` (Go) for deeper integration.

## What programming languages are compatible with the API?

The API works with any programming language that can send JSON over HTTP. Common choices include JavaScript/TypeScript, Python, Go, and Java.

## What is used for fees in Bitcoin?

Bitcoin transaction fees are paid in BTC. They are calculated per virtual byte (vByte) of transaction data and are used to incentivize miners to include transactions in blocks.

## What methods does Alchemy support for the Bitcoin API?

You can find a full list of supported JSON-RPC methods on the [Bitcoin API Endpoints](/docs/chains#bitcoin-apis) page.

## My question isn't listed here — where can I get help?

If you have any questions or feedback, please contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Bitcoin Cash API Quickstart

> Get started building on Bitcoin Cash and using the JSON-RPC API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Introduction

The Bitcoin Cash API gives you access to the Bitcoin Cash blockchain through a standard set of JSON-RPC methods. With this API, you can retrieve block and transaction data, inspect the mempool, broadcast transactions, and more.

Bitcoin Cash uses a UTXO-based model and exposes its functionality via the JSON-RPC protocol. This quickstart will help you make your first request.

***

## What is the Bitcoin Cash Chain API?

The Bitcoin Cash Chain API allows applications to communicate with a Bitcoin Cash node using the JSON-RPC protocol. Like Bitcoin, Bitcoin Cash relies on a UTXO (Unspent Transaction Output) model, which means balances are tracked by outputs that are explicitly spent or unspent.

Alchemy's Bitcoin Cash API gives developers a consistent interface to query blockchain data, submit transactions, and monitor network activity. This includes:

* Retrieving raw or decoded transaction data
* Querying block headers and full blocks
* Monitoring mempool entries and states
* Submitting and testing raw transactions

If you've worked with Bitcoin or other JSON-RPC-compatible chains, the structure will feel familiar.

***

## Getting started

### 1. Choose a package manager (npm or yarn)

Select a package manager to manage your project's dependencies. The choice between `npm` and `yarn` depends on your preference or project requirements.

| npm                                                                                                                       | yarn                                                                                                |
| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |

### 2. Set up your project

Open your terminal and run the following commands:

<CodeGroup>
  ```text npm
  mkdir bitcoincash-api-quickstart
  cd bitcoincash-api-quickstart
  npm init --yes
  ```

  ```text yarn
  mkdir bitcoincash-api-quickstart
  cd bitcoincash-api-quickstart
  yarn init --yes
  ```
</CodeGroup>

This creates a new directory named `bitcoincash-api-quickstart` and initializes a Node.js project within it.

### 3. Make your first request

Install Axios, a popular HTTP client, to make API requests:

<CodeGroup>
  ```bash bash
  npm install axios
  # Or with yarn
  # yarn add axios
  ```
</CodeGroup>

Create an `index.js` file in your project directory and paste the following code:

<CodeGroup>
  ```javascript javascript
  const axios = require('axios');

  const url = `https://bitcoincash-mainnet.g.alchemy.com/v2/${apiKey}`;

  const payload = {
    jsonrpc: '2.0',
    id: 1,
    method: 'getblockcount',
    params: []
  };

  axios.post(url, payload)
    .then(response => {
      console.log('Current block height:', response.data.result);
    })
    .catch(error => {
      console.error('Error fetching block count:', error);
    });
  ```
</CodeGroup>

Replace `apiKey` with your actual Alchemy API key that you can get from the [Alchemy Dashboard](https://dashboard.alchemy.com/signup).

### 4. Run your script

To execute your script and make a request to the Bitcoin Cash API, run:

<CodeGroup>
  ```bash bash
  node index.js
  ```
</CodeGroup>

You should see the current block height on Bitcoin Cash printed to your console:

```shell
Current block height: 869432
```

## Next steps

You've made your first request to the Bitcoin Cash API. With this foundation, you can dive deeper into the [JSON-RPC methods available on Bitcoin Cash](/docs/bitcoincash/bitcoincash-api-overview) and start building on it.

------

# Bitcoin Cash API Overview

> Overview of available Bitcoin Cash API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Bitcoin Cash APIs

📙 Get started with our [Bitcoin Cash API Quickstart Guide](/docs/reference/bitcoincash-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`createrawtransaction`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/createrawtransaction) | [`decoderawtransaction`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/decoderawtransaction) |
| [`decodescript`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/decodescript)               | [`estimatesmartfee`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/estimatesmartfee)   |
| [`getbestblockhash`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/getbestblockhash)       | [`getblock`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/getblock)                   |
| [`getblockchaininfo`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/getblockchaininfo)     | [`getblockcount`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/getblockcount)         |
| [`getblockfilter`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/getblockfilter)           | [`getblockhash`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/getblockhash)           |
| [`getblockheader`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/getblockheader)           | [`getblockstats`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/getblockstats)         |
| [`getblocktemplate`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/getblocktemplate)       | [`getchaintips`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/getchaintips)           |
| [`getchaintxstats`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/getchaintxstats)         | [`getconnectioncount`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/getconnectioncount) |
| [`getdifficulty`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/getdifficulty)             | [`getindexinfo`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/getindexinfo)           |
| [`getmemoryinfo`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/getmemoryinfo)             | [`getmempoolancestors`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/getmempoolancestors) |
| [`getmempooldescendants`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/getmempooldescendants) | [`getmempoolinfo`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/getmempoolinfo)       |
| [`getnetworkhashps`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/getnetworkhashps)       | [`getnetworkinfo`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/getnetworkinfo)       |
| [`getrawmempool`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/getrawmempool)             | [`getrawtransaction`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/getrawtransaction) |
| [`gettxout`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/gettxout)                       | [`gettxoutproof`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/gettxoutproof)         |
| [`gettxoutsetinfo`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/gettxoutsetinfo)         | [`sendrawtransaction`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/sendrawtransaction) |
| [`submitblock`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/submitblock)                 | [`submitheader`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/submitheader)           |
| [`submitpackage`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/submitpackage)             | [`testmempoolaccept`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/testmempoolaccept) |
| [`validateaddress`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/validateaddress)         | [`verifymessage`](/docs/chains/bitcoincash/bitcoincash-api-endpoints/verifymessage)         |

------

# createrawtransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Creates a transaction spending the given inputs and creating new outputs. Outputs can be addresses or data. Returns hex-encoded raw transaction. Note that the transaction's inputs are not signed, and it is not stored in the wallet or transmitted to the network.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/createrawtransaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| inputs | object[] | Yes | An array of transaction inputs. |
| outputs | object[] or object | Yes | An array or object with outputs (key-value pairs, where keys are addresses or 'data', and values are BTC amounts or hex). |
| locktime | integer | No | Raw locktime. Non-0 value also activates inputs. |
| replaceable | boolean | No | Whether to mark transaction as BIP125 replaceable. Allows this transaction to be replaced by a transaction with higher fees. |

## Result

**result** (string): Hex-encoded raw transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "createrawtransaction",
  "params": [
    [
      {
        "txid": "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
        "vout": 0
      }
    ],
    [
      {
        "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa": 0.01
      }
    ],
    0,
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0200000001546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b0000000000fdffffff01c0c62d000000000017a914751e76e8199196d454941c45d1b3a323f1433bd68700000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "createrawtransaction",
  "params": [
    [
      {
        "txid": "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
        "vout": 0
      }
    ],
    [
      {
        "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa": 0.01
      }
    ],
    0,
    false
  ]
}'
```



------

# decoderawtransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Decodes a serialized, hex-encoded Bitcoin transaction. Returns detailed information about inputs, outputs, size, witness data, etc.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/decoderawtransaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hexstring | string | Yes | The transaction hex string to decode. |
| iswitness | boolean | No | Indicates whether the transaction includes witness data. If omitted, heuristic decoding is applied.  |

## Result

**result** (object): A JSON object representing the decoded transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "decoderawtransaction",
  "params": [
    "0200000000010142d6bd07c424e975fe821c978e720f9a55f9981d62c290cea5ccd06b455d79b90000000000fdffffff028096980000000000160014d3620fe180a0beb8fcc9682fe92e5a25f0feccd370cd2f0100000000160014076d998f6b12c3d1da6217d967154f42a5e0afd30247304402204549b10ea1698d4b4605be1d3bfff810f6135395386207664a66f5bb8bd1470902205fb86c95bfbe7b502195ffa65276d292fb074fe18ba171ef0a35395211384091012103cb5de30b343b35cc09b50f064eb289dd3e252f6985fc4309fba795cc950316afcfa50d00",
    true
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "txid": "a4cf344758af60ab8d4812477a7d3eee8854595db70ab39cf68f9dc509b13929",
    "hash": "48d1de9e93391ac3d83e5e97ce94ebd1db0f88553e45a6dffad3501c82408995",
    "size": 222,
    "vsize": 141,
    "weight": 564,
    "version": 2,
    "locktime": 862954048,
    "vin": [
      {
        "txid": "b9795d456bd0cca5ce90c2621d98f9559a0f728e971c82fe75e924c407bdd642",
        "vout": 0,
        "scriptSig": {
          "asm": "",
          "hex": ""
        },
        "sequence": 4294967293,
        "txinwitness": [
          "304402204549b10ea1698d4b4605be1d3bfff810f6135395386207664a66f5bb8bd1470902205fb86c95bfbe7b502195ffa65276d292fb074fe18ba171ef0a35395211384091",
          "03cb5de30b343b35cc09b50f064eb289dd3e252f6985fc4309fba795cc950316af"
        ]
      }
    ],
    "vout": [
      {
        "value": 0.1,
        "n": 0,
        "scriptPubKey": {
          "asm": "OP_DUP OP_HASH160 d3620fe180a0beb8fcc9682fe92e5a25f0feccd3 OP_EQUALVERIFY OP_CHECKSIG",
          "desc": "addr(1BM1sAcrfV6d4zPKytzziu4McLQDsFC2Qc)",
          "hex": "76a914d3620fe180a0beb8fcc9682fe92e5a25f0feccd388ac",
          "type": "pubkeyhash"
        }
      },
      {
        "value": 0.65281824,
        "n": 1,
        "scriptPubKey": {
          "asm": "OP_DUP OP_HASH160 076d998f6b12c3d1da6217d967154f42a5e0afd3 OP_EQUALVERIFY OP_CHECKSIG",
          "desc": "addr(1iPoHeR3z1EidftGXMcEppzA1UupGPs2u)",
          "hex": "76a914076d998f6b12c3d1da6217d967154f42a5e0afd388ac",
          "type": "pubkeyhash"
        }
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "decoderawtransaction",
  "params": [
    "0200000000010142d6bd07c424e975fe821c978e720f9a55f9981d62c290cea5ccd06b455d79b90000000000fdffffff028096980000000000160014d3620fe180a0beb8fcc9682fe92e5a25f0feccd370cd2f0100000000160014076d998f6b12c3d1da6217d967154f42a5e0afd30247304402204549b10ea1698d4b4605be1d3bfff810f6135395386207664a66f5bb8bd1470902205fb86c95bfbe7b502195ffa65276d292fb074fe18ba171ef0a35395211384091012103cb5de30b343b35cc09b50f064eb289dd3e252f6985fc4309fba795cc950316afcfa50d00",
    true
  ]
}'
```



------

# decodescript

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Decodes a hex-encoded script and provides detailed information about it.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/decodescript

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hexstring | string | Yes | The hex-encoded script. |

## Result

**result** (object): Decoded script information.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "decodescript",
  "params": [
    "0014751e76e8199196d454941c45d1b3a323f1433bd6"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "asm": "0 751e76e8199196d454941c45d1b3a323f1433bd6",
    "desc": "addr(bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4)#uyjndxcw",
    "address": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4",
    "type": "witness_v0_keyhash",
    "p2sh": "3JvL6Ymt8MVWiCNHC7oWU6nLeHNJKLZGLN"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "decodescript",
  "params": [
    "0014751e76e8199196d454941c45d1b3a323f1433bd6"
  ]
}'
```



------

# estimatesmartfee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Estimates the approximate fee per kilobyte required for a transaction to begin confirmation within `conf_target` blocks. Uses BIP 141 virtual transaction size.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/estimatesmartfee

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| conf_target | integer | Yes | Number of blocks within which confirmation is targeted. |
| estimate_mode | enum | No | Fee estimate mode. Options are "UNSET", "ECONOMICAL", or "CONSERVATIVE".  |

## Result

**result** (object): Estimated fee rate and corresponding target blocks.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "estimatesmartfee",
  "params": [
    1,
    "UNSET"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "feerate": 0.00002465,
    "blocks": 2
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "estimatesmartfee",
  "params": [
    1,
    "UNSET"
  ]
}'
```



------

# getbestblockhash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Returns the hash of the most-work fully-validated tip block in the active Bitcoin blockchain.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/getbestblockhash

## Result

**result** (string): The hash of the best block in the longest chain.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "00000000000000000001fe9b58c5ccd401de62139c29e7dbfd32bd3cf14b650c",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getbestblockhash"
}'
```



------

# getblock

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block, based on the provided block hash.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/getblock

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockhash | string | Yes | The hash of the block to retrieve. |
| verbosity | enum | No | Level of detail to return.  - 0: hex-encoded string, - 1: basic block info, - 2: with transactions, - 3: with transactions + input prevouts.  |

## Result

**result** (object): The block object or hex string, depending on verbosity.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblock",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    2
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "hash": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "confirmations": 151,
    "height": 894470,
    "version": 537067520,
    "versionHex": "20030000",
    "merkleroot": "9d93ae25de98e5ed33aec9ccfea612c3b5b181a60171ba564ec1634786b04bc6",
    "time": 1745931642,
    "mediantime": 1745928076,
    "nonce": 766301978,
    "bits": "170248b6",
    "target": "0000000000000000000248b60000000000000000000000000000000000000000",
    "difficulty": 123234387977050.9,
    "chainwork": "0000000000000000000000000000000000000000bf64054821a76841a63cb26e",
    "nTx": 2186,
    "previousblockhash": "00000000000000000001aa9a63c6c0774a767f7a4d37d2bce3658728de76a146",
    "nextblockhash": "00000000000000000000cb8a1d7945b960985579525957bcc37b22174f1ecb31",
    "strippedsize": 844254,
    "size": 1460798,
    "weight": 3993560,
    "tx": [
      "c86b4846175942038cc9da086e506aa8a441beada92f1678fb1fe35d640366db"
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblock",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    2
  ]
}'
```



------

# getblockchaininfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object containing state details related to blockchain processing, network, and storage information.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/getblockchaininfo

## Result

**result** (object): Blockchain status information.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "chain": "main",
    "blocks": 894713,
    "headers": 894713,
    "bestblockhash": "00000000000000000000eb0ae1714d3ec43cfaac74769f3bcde489daf116e4ca",
    "bits": "170248b6",
    "target": "0000000000000000000248b60000000000000000000000000000000000000000",
    "difficulty": 123234387977050.9,
    "time": 1746083867,
    "mediantime": 1746081100,
    "verificationprogress": 0.9999993374725104,
    "initialblockdownload": false,
    "chainwork": "0000000000000000000000000000000000000000bfce6962cc3162143b67a1d4",
    "size_on_disk": 745999541195,
    "pruned": false,
    "warnings": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockchaininfo"
}'
```



------

# getblockcount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of blocks in the longest fully validated blockchain.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/getblockcount

## Result

**result** (integer): The number of blocks in the current best blockchain.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": 894623,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockcount"
}'
```



------

# getblockfilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Returns the BIP 157 content filter for a specified block. Requires the blockfilterindex to be enabled.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/getblockfilter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockhash | string | Yes | The hash of the block. |
| filtertype | enum | No | The type name of the filter. Currently only 'basic' is supported. |

## Result

**result** (object): The block filter details.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblockfilter",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "basic"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "filter": "0180c3b80144ec1762e9eb8e5b2e072f7d8c8c8c0c2c2a2a2a2a2a2a2a2a2a",
    "header": "1e1e1f1f2020202021212121222222222323232324242424252525252626262"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockfilter",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "basic"
  ]
}'
```



------

# getblockhash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Returns the hash of the block at a given height (index) in the active Bitcoin blockchain.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/getblockhash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| height | integer | Yes | The height of the block to retrieve the hash for. |

## Result

**result** (string): The hash of the block at the specified height.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblockhash",
  "params": [
    894470
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockhash",
  "params": [
    894470
  ]
}'
```



------

# getblockheader

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Returns the block header for the specified block hash.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/getblockheader

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockhash | string | Yes | The block hash to retrieve the header for. |
| verbose | boolean | No | Whether to return a JSON object (true) or raw hex-encoded string (false). Default is true.  |

## Result

**result** (object or string): The block header as an object or hex string depending on verbose.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblockheader",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    true
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "hash": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "confirmations": 154,
    "height": 894470,
    "version": 537067520,
    "versionHex": "20030000",
    "merkleroot": "9d93ae25de98e5ed33aec9ccfea612c3b5b181a60171ba564ec1634786b04bc6",
    "time": 1745931642,
    "mediantime": 1745928076,
    "nonce": 766301978,
    "bits": "170248b6",
    "difficulty": 123234387977050.9,
    "chainwork": "0000000000000000000000000000000000000000bf64054821a76841a63cb26e",
    "nTx": 2186,
    "previousblockhash": "00000000000000000001aa9a63c6c0774a767f7a4d37d2bce3658728de76a146",
    "nextblockhash": "00000000000000000000cb8a1d7945b960985579525957bcc37b22174f1ecb31"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockheader",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    true
  ]
}'
```



------

# getblockstats

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Calculates various statistics for a given block by hash or height.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/getblockstats

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hash_or_height | string or integer | Yes | The block hash (string) or height (integer) of the target block. |
| stats | string[] | No | Optional list of specific stats to retrieve. If empty or omitted, returns all stats.  |

## Result

**result** (object): A set of statistical metrics for the specified block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblockstats",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    []
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "avgfee": 1565,
    "avgfeerate": 3,
    "avgtxsize": 668,
    "blockhash": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "feerate_percentiles": [
      2,
      2,
      3,
      3,
      4
    ],
    "height": 894470,
    "ins": 7718,
    "outs": 5666,
    "maxfee": 376692,
    "maxfeerate": 79,
    "maxtxsize": 200604,
    "medianfee": 453,
    "mediantime": 1745928076,
    "mediantxsize": 228,
    "minfee": 141,
    "minfeerate": 1,
    "mintxsize": 150,
    "subsidy": 312500000,
    "swtotal_size": 1049707,
    "swtotal_weight": 2349304,
    "swtxs": 2075,
    "time": 1745931642,
    "total_out": 271147032190,
    "total_size": 1460379,
    "total_weight": 3991992,
    "totalfee": 3420664,
    "txs": 2186,
    "utxo_increase": -2052,
    "utxo_size_inc": -137484,
    "utxo_increase_actual": -2841,
    "utxo_size_inc_actual": -199799
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockstats",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    []
  ]
}'
```



------

# getblocktemplate

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Returns data needed to construct a block to mine. This method is used by miners to request a block template  for mining new blocks. It can be customized with various parameters to specify the desired mining capabilities and rules.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/getblocktemplate

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| template_request | object | No | A JSON object containing the template request parameters. |

## Result

**result** (object): A block template object containing all necessary data for mining.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblocktemplate",
  "params": [
    {
      "mode": "template",
      "capabilities": [
        "coinbasetxn",
        "workid",
        "coinbase/append"
      ],
      "rules": [
        "segwit"
      ]
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "version": 536870912,
    "previousblockhash": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "transactions": [],
    "coinbaseaux": {
      "flags": ""
    },
    "coinbasevalue": 625000000,
    "target": "0000000000000000000248b60000000000000000000000000000000000000000",
    "mintime": 1745928076,
    "mutable": [
      "time",
      "transactions",
      "prevblock"
    ],
    "noncerange": "00000000ffffffff",
    "sigoplimit": 80000,
    "sizelimit": 4000000,
    "curtime": 1745931642,
    "bits": "170248b6",
    "height": 894471
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblocktemplate",
  "params": [
    {
      "mode": "template",
      "capabilities": [
        "coinbasetxn",
        "workid",
        "coinbase/append"
      ],
      "rules": [
        "segwit"
      ]
    }
  ]
}'
```



------

# getchaintips

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about all known tips in the block tree, including the active chain tip and orphaned branches.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/getchaintips

## Result

**result** (object[]): An array of chain tip information objects.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "height": 894712,
      "hash": "00000000000000000000e6518eac47199bcf0108b1c7d194b00ef5a9df794427",
      "branchlen": 0,
      "status": "active"
    },
    {
      "height": 894657,
      "hash": "00000000000000000002311b7c31f1ffef1261bb53740958ed98c600ae2abd41",
      "branchlen": 1,
      "status": "valid-fork"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getchaintips"
}'
```



------

# getchaintxstats

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Calculates statistics about the overall transaction rate and volume of the blockchain over a window of blocks.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/getchaintxstats

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nblocks | integer | No | The size of the window in number of blocks. Defaults to approximately one month. |
| blockhash | string | No | The block hash at which the window ends. Defaults to chain tip. |

## Result

**result** (object): The calculated chain transaction statistics.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getchaintxstats",
  "params": [
    0,
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "time": 1745931642,
    "txcount": 1184990717,
    "window_final_block_hash": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "window_final_block_height": 894470,
    "window_block_count": 0
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getchaintxstats",
  "params": [
    1,
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80"
  ]
}'
```



------

# getconnectioncount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of connections to other nodes (both inbound and outbound).


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/getconnectioncount

## Result

**result** (integer): The total number of connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": 10,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getconnectioncount"
}'
```



------

# getdifficulty

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Returns the proof-of-work difficulty as a multiple of the minimum difficulty.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/getdifficulty

## Result

**result** (number): The difficulty of the current best block as a floating-point number.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": 123234387977050.9,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getdifficulty"
}'
```



------

# getindexinfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Returns the state of one or all available indices currently running.  You can optionally filter the results by a specific index name.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/getindexinfo

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| index_name | string | No | Filter results for an index with a specific name.  |

## Result

**result** (object): A mapping of index names to their respective info.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getindexinfo",
  "params": [
    "txindex"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "txindex": {
      "synced": true,
      "best_block_height": 894717
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getindexinfo",
  "params": [
    "txindex"
  ]
}'
```



------

# getmemoryinfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about memory usage, either general statistics ("stats") or heap information ("mallocinfo").


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/getmemoryinfo

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| mode | enum | No | Determines what kind of information is returned: - "stats" returns general statistics about memory usage. - "mallocinfo" returns an XML string describing low-level heap state.  |

## Result

**result** (object): Memory usage details.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getmemoryinfo",
  "params": [
    "stats"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "locked": {
      "used": 352,
      "free": 65184,
      "total": 65536,
      "locked": 65536,
      "chunks_used": 1,
      "chunks_free": 1
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getmemoryinfo",
  "params": [
    "stats"
  ]
}'
```



------

# getmempoolancestors

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Returns the in-mempool ancestors of a given transaction.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/getmempoolancestors

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txid | string | Yes | The transaction ID whose ancestors to retrieve. |
| verbose | boolean | No | Whether to return detailed info (true) or just txids (false). |

## Result

**result** (string[] or object): The mempool ancestors of the specified transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getmempoolancestors",
  "params": [
    "b86ae732473ff2c91c04073ec9cbef5e4ddaa701741e141e41345df72122b795",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "6f8c6e8d3021d8a1db71eae3cb8db00f1c99d0f94f3b5782e6cfc155b55f3c55",
    "a4d47b8bdee5f5b8c098c9ac9aa4e3ec113d9f305a4f723d617a92439ab244cb"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getmempoolancestors",
  "params": [
    "b86ae732473ff2c91c04073ec9cbef5e4ddaa701741e141e41345df72122b795",
    false
  ]
}'
```



------

# getmempooldescendants

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Returns the in-mempool descendants of a given transaction.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/getmempooldescendants

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txid | string | Yes | The transaction ID whose descendants to retrieve. |
| verbose | boolean | No | Whether to return detailed info (true) or just txids (false). |

## Result

**result** (string[] or object): The mempool descendants of the specified transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getmempooldescendants",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "c3b9f342fc90837fd4a22878b59fdf5cdeae1b4e4586224b0df1b3a2e3e6e9c8",
    "a2e34d98cb7e98b8d85d3a991c8d1cbd3e7a3f17b4acdf4768c88fa3e0e9d8bc"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getmempooldescendants",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    false
  ]
}'
```



------

# getmempoolinfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Provides information about the TX memory pool's current state, including memory usage, transaction count, and relay fee settings.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/getmempoolinfo

## Result

**result** (object): Mempool state information.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "loaded": true,
    "size": 4889,
    "bytes": 13816734,
    "usage": 49380080,
    "total_fee": 0.14547621,
    "maxmempool": 300000000,
    "mempoolminfee": 0.00001,
    "minrelaytxfee": 0.00001,
    "incrementalrelayfee": 0.00001,
    "unbroadcastcount": 0,
    "fullrbf": true
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getmempoolinfo"
}'
```



------

# getnetworkhashps

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Returns the estimated network hashes per second based on the last n blocks. Pass in nblocks to override the default number of blocks, or -1 to get the value since the last difficulty change.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/getnetworkhashps

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nblocks | integer | No | The number of blocks to use for the calculation. Default is 120. Use -1 to calculate since last difficulty change. |
| height | integer | No | To estimate at the time of the given height. Default is -1 (current tip). |

## Result

**result** (number): Hashes per second estimated.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getnetworkhashps",
  "params": [
    120,
    -1
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": 412345678900000000000,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getnetworkhashps",
  "params": [
    120,
    -1
  ]
}'
```



------

# getnetworkinfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object containing various state info regarding P2P networking, including version information, network status, connections, and relay fees.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/getnetworkinfo

## Result

**result** (object): Object containing P2P networking state information.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "version": 270000,
    "subversion": "/Satoshi:27.0.0/",
    "protocolversion": 70016,
    "localservices": "0000000000000409",
    "localservicesnames": [
      "NETWORK",
      "WITNESS",
      "NETWORK_LIMITED"
    ],
    "localrelay": true,
    "timeoffset": 0,
    "connections": 10,
    "connections_in": 2,
    "connections_out": 8,
    "networkactive": true,
    "networks": [
      {
        "name": "ipv4",
        "limited": false,
        "reachable": true,
        "proxy": "",
        "proxy_randomize_credentials": false
      },
      {
        "name": "ipv6",
        "limited": false,
        "reachable": true,
        "proxy": "",
        "proxy_randomize_credentials": false
      },
      {
        "name": "onion",
        "limited": true,
        "reachable": false,
        "proxy": "",
        "proxy_randomize_credentials": false
      }
    ],
    "relayfee": 0.00001,
    "incrementalfee": 0.00001,
    "localaddresses": [],
    "warnings": ""
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getnetworkinfo"
}'
```



------

# getrawmempool

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Returns either a list of transaction IDs currently in the mempool or detailed metadata for each transaction, depending on the verbosity level.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/getrawmempool

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| verbose | boolean | No | If true, returns detailed info per transaction. If false, returns a list of txids.  |
| mempool_sequence | boolean | No | When verbose is false, includes mempool sequence number in the response.  |

## Result

**result** (object): Mempool data depending on verbosity level.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getrawmempool",
  "params": [
    false,
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "txids": [
      "5f10285c6fee80d1982df9893742d0c5aed5aa4fcca3aa4331d7fa071ba4d5ce",
      "30ad6eacfc8b83de7b91f8df705e081945c9d8a7a05506de38a1842dd856550b"
    ],
    "mempool_sequence": 1386211
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getrawmempool",
  "params": [
    false,
    false
  ]
}'
```



------

# getrawtransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction representation for a given transaction ID (`txid`).  If `verbose` is true, returns a JSON object with detailed information;  otherwise, returns a serialized hex-encoded string.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/getrawtransaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txid | string | Yes | The transaction ID to fetch. |
| verbose | boolean | No | Return verbose JSON or just the raw hex string. |
| blockhash | string | No | The block in which to look for the transaction (if not in the mempool). |

## Result

**result** (string or object): Raw transaction data.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getrawtransaction",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    false,
    "000000000000000000013c7104486ef1aa53e8ac99b8a8ac02a113b58457ed8b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0100000001d074a22eedb6e7258c15368988826e6c73c6577fff490f42afeb8cd7be858032010000006b48304502210084689df7816df6f8a85c72a8cf4d52c2957657d619f5d126dbfc5f866d7561e80220415f8fbd095f53f0a8a4aa11496b126bc87dd020771d3d30c58f374a0f02bf420121024a42999af129d16c92bc0a0b18b39e2550769711845817d1f69932762d431ebcffffffff02ab6502000000000017a91453ca847feb3986cf2be405429e7e513484e0bc938780c6b001000000001976a914ebbfc363611943f588194465c1febdba9bf3883988ac00000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getrawtransaction",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    false,
    "000000000000000000013c7104486ef1aa53e8ac99b8a8ac02a113b58457ed8b"
  ]
}'
```



------

# gettxout

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Returns details about an unspent transaction output (UTXO), optionally including mempool data.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/gettxout

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txid | string | Yes | The transaction ID. |
| n | integer | Yes | The vout number. |
| include_mempool | boolean | No | Whether to include outputs spent in the mempool. Default is true.  |

## Result

**result** (object): Details about the specified unspent output, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "gettxout",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    0,
    true
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "bestblock": "00000000000000000000944aba5f33a268df0c95a8bacdf42e5d10f8c7d51f94",
    "confirmations": 7,
    "value": 0.00157099,
    "scriptPubKey": {
      "asm": "OP_HASH160 53ca847feb3986cf2be405429e7e513484e0bc93 OP_EQUAL",
      "desc": "addr(39L4cdhha5ueasiKz1wRVd75fHdB9NV2t7)#29pkvxg9",
      "hex": "a91453ca847feb3986cf2be405429e7e513484e0bc9387",
      "address": "39L4cdhha5ueasiKz1wRVd75fHdB9NV2t7",
      "type": "scripthash"
    },
    "coinbase": false
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "gettxout",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    1,
    true
  ]
}'
```



------

# gettxoutproof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Returns a hex-encoded proof that the specified transaction(s) were included in a block. This proof can be used to verify the inclusion of transactions without relying on a full node.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/gettxoutproof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txids | string[] | Yes | An array of transaction IDs to generate proof for. |
| blockhash | string | No | The block in which to search for the txid(s). If omitted, the node will try to locate it. |

## Result

**result** (string): A hex-encoded proof that the specified transactions are part of a block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "gettxoutproof",
  "params": [
    [
      "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b"
    ],
    "000000000000000000013c7104486ef1aa53e8ac99b8a8ac02a113b58457ed8b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0080ce25cae416f1da89e4cd3b9f7674acfa3cc43e4d71e10aeb0000000000000000000029cc4a072d5cba23dd0e821d8d711f56124f19015b70abaf08ca4f2124a429fc3e23136...",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "gettxoutproof",
  "params": [
    [
      "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b"
    ],
    "000000000000000000013c7104486ef1aa53e8ac99b8a8ac02a113b58457ed8b"
  ]
}'
```



------

# gettxoutsetinfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Returns statistics about the unspent transaction output (UTXO) set. Only the current chain tip is supported; querying specific blocks is not available.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/gettxoutsetinfo

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| use_index | boolean | No | Whether to use `coinstatsindex` if available. Defaults to true.  |

## Result

**result** (object): Statistics on the current state of the UTXO set.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "gettxoutsetinfo",
  "params": [
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "height": 894719,
    "bestblock": "000000000000000000022d8a0f2096e71b1fe50b486dcda415857bb0cc5a2ca8",
    "txouts": 174434793,
    "bogosize": 13652712508,
    "hash_serialized_3": "d9183d9a82433fbd0b9370da065fb84bbd1bb5004816f242ce0f2268c0394b2e",
    "total_amount": 19858278.9908868,
    "transactions": 121919431,
    "disk_size": 12197514429
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "gettxoutsetinfo",
  "params": [
    false
  ]
}'
```



------

# sendrawtransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Broadcasts a raw transaction (hex-encoded) to the network. Useful for rebroadcasting transactions not originating from your wallet.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/sendrawtransaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hexstring | string | Yes | The hex-encoded raw transaction. |
| maxfeerate | number or string | No | Reject transactions whose fee rate is higher than this value (in BTC/kB). Set to 0 to disable the check.  |

## Result

**result** (string): The transaction ID (txid) of the submitted transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "sendrawtransaction",
  "params": [
    "0200000000010153fc6712e0c6cbfd15e56743f2a16bba3c0b17837d4fd33d68d2d930739e2b130000000000ffffffff01c0c62d0000000000160014c24b61118d4a2b36257b65e1ea7f15f85e41ff0402483045022100ac32e935715a57ec1d642a5e178c37f74c013bf8e4edc4cb1c79f5352f136e87022020b0b3192347d1b84e9b89d00a2ecb290f18f9c39e514fa3ef2b7a889e7b6c1b012103ab0b56c7aa6254a80c124e04d2149f7fc376afedfe4623f3c59b87c279eaeb1400000000",
    0.1
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1b6d7a0196d78d84c31408982f8fa6bc7383d29c96c5e2b3a55e1f1575dc1cfb",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "sendrawtransaction",
  "params": [
    "0200000000010153fc6712e0c6cbfd15e56743f2a16bba3c0b17837d4fd33d68d2d930739e2b130000000000ffffffff01c0c62d0000000000160014c24b61118d4a2b36257b65e1ea7f15f85e41ff0402483045022100ac32e935715a57ec1d642a5e178c37f74c013bf8e4edc4cb1c79f5352f136e87022020b0b3192347d1b84e9b89d00a2ecb290f18f9c39e514fa3ef2b7a889e7b6c1b012103ab0b56c7aa6254a80c124e04d2149f7fc376afedfe4623f3c59b87c279eaeb1400000000",
    0.1
  ]
}'
```



------

# submitblock

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Attempts to submit a new block to the network. The block data must be hex-encoded.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/submitblock

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hexdata | string | Yes | The hex-encoded block data to submit. |
| dummy | string | No | Dummy value for compatibility with BIP22. This value is ignored.  |

## Result

**result** (null or string): Returns null when valid, or a string error message according to BIP22 otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "submitblock",
  "params": [
    "0000002073bd2184edd74c5c5b4c0c5be04d0e8f5d6b7d5b3b1b1d8e8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": null,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "submitblock",
  "params": [
    "0000002073bd2184edd74c5c5b4c0c5be04d0e8f5d6b7d5b3b1b1d8e8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c",
    "string"
  ]
}'
```



------

# submitheader

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Decodes the given hex-encoded block header and submits it as a candidate chain tip if valid. Throws an error if the header is invalid. This can be used to mine on top of a particular block without  having the full block data.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/submitheader

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hexdata | string | Yes | The hex-encoded block header to submit. |

## Result

**result** (null or string): Returns null if the header was accepted, or a string describing the rejection reason.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "submitheader",
  "params": [
    "0000002073bd2184edd74c5c5b4c0c5be04d0e8f5d6b7d5b3b1b1d8e8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": null,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "submitheader",
  "params": [
    "0000002073bd2184edd74c5c5b4c0c5be04d0e8f5d6b7d5b3b1b1d8e8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c"
  ]
}'
```



------

# submitpackage

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Submits a package containing multiple raw transactions to the mempool for validation and acceptance.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/submitpackage

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| package | string[] | Yes | An array of raw transactions (serialized hex strings) to be submitted as a package.  |

## Result

**result** (object): Transaction results keyed by `wtxid`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "submitpackage",
  "params": [
    [
      "0200000000010153fc6712e0c6cbfd15e56743f2a16bba3c0b17837d4fd33d68d2d930739e2b130000000000ffffffff01c0c62d0000000000160014c24b61118d4a2b36257b65e1ea7f15f85e41ff0402483045022100ac32e935715a57ec1d642a5e178c37f74c013bf8e4edc4cb1c79f5352f136e87022020b0b3192347d1b84e9b89d00a2ecb290f18f9c39e514fa3ef2b7a889e7b6c1b012103ab0b56c7aa6254a80c124e04d2149f7fc376afedfe4623f3c59b87c279eaeb1400000000"
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "package_msg": "transaction failed",
    "tx-results": {
      "6dbccbd4775598af6e9713cd84e90e80431ecc7e932c4b832ab3966ad988bc08": {
        "txid": "c67ecf450828d639a8cf3d74f168fe6bd9a1121a1167a1d46908d703f871c3a6",
        "error": "bad-txns-inputs-missingorspent"
      }
    },
    "replaced-transactions": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "submitpackage",
  "params": [
    [
      "0200000000010153fc6712e0c6cbfd15e56743f2a16bba3c0b17837d4fd33d68d2d930739e2b130000000000ffffffff01c0c62d0000000000160014c24b61118d4a2b36257b65e1ea7f15f85e41ff0402483045022100ac32e935715a57ec1d642a5e178c37f74c013bf8e4edc4cb1c79f5352f136e87022020b0b3192347d1b84e9b89d00a2ecb290f18f9c39e514fa3ef2b7a889e7b6c1b012103ab0b56c7aa6254a80c124e04d2149f7fc376afedfe4623f3c59b87c279eaeb1400000000"
    ]
  ]
}'
```



------

# testmempoolaccept

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Indicates whether one or more raw transactions (serialized, hex-encoded) would be accepted by the mempool.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/testmempoolaccept

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| rawtxs | string[] | Yes | An array of hex-encoded raw transactions to test for mempool acceptance.  |
| maxfeerate | number | No | Reject transactions whose fee rate is higher than the specified value, expressed in BTC/kB.  |

## Result

**result** (object[]): Result of the mempool acceptance test for each transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "testmempoolaccept",
  "params": [
    [
      "0200000000010142d6bd07c424e975fe821c978e720f9a55f9981d62c290cea5ccd06b455d79b90000000000fdffffff028096980000000000160014d3620fe180a0beb8fcc9682fe92e5a25f0feccd370cd2f0100000000160014076d998f6b12c3d1da6217d967154f42a5e0afd30247304402204549b10ea1698d4b4605be1d3bfff810f6135395386207664a66f5bb8bd1470902205fb86c95bfbe7b502195ffa65276d292fb074fe18ba171ef0a35395211384091012103cb5de30b343b35cc09b50f064eb289dd3e252f6985fc4309fba795cc950316afcfa50d00"
    ],
    0
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "txid": "054183ee699ff12cf1c9f4413f421c3cf0a8febc6b82a1d8751a30f5e0fd54c0",
      "wtxid": "b07f26a908955f8071620896476d6e2ca6b6610e5edc9e55f19185ca9536c8de",
      "allowed": true
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "testmempoolaccept",
  "params": [
    [
      "0200000000010142d6bd07c424e975fe821c978e720f9a55f9981d62c290cea5ccd06b455d79b90000000000fdffffff028096980000000000160014d3620fe180a0beb8fcc9682fe92e5a25f0feccd370cd2f0100000000160014076d998f6b12c3d1da6217d967154f42a5e0afd30247304402204549b10ea1698d4b4605be1d3bfff810f6135395386207664a66f5bb8bd1470902205fb86c95bfbe7b502195ffa65276d292fb074fe18ba171ef0a35395211384091012103cb5de30b343b35cc09b50f064eb289dd3e252f6985fc4309fba795cc950316afcfa50d00"
    ],
    1
  ]
}'
```



------

# validateaddress

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Verifies the validity of a given Bitcoin address and provides additional metadata about it.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/validateaddress

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The Bitcoin address to validate. |

## Result

**result** (object): Validation result and metadata about the address.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "validateaddress",
  "params": [
    "39L4cdhha5ueasiKz1wRVd75fHdB9NV2t7"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "isvalid": true,
    "address": "39L4cdhha5ueasiKz1wRVd75fHdB9NV2t7",
    "scriptPubKey": "a91453ca847feb3986cf2be405429e7e513484e0bc9387",
    "isscript": true,
    "iswitness": false
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "validateaddress",
  "params": [
    "39L4cdhha5ueasiKz1wRVd75fHdB9NV2t7"
  ]
}'
```



------

# verifymessage

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

Verifies a message signature using the corresponding Bitcoin address. Returns true if the signature is valid and matches the given address.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/bitcoincash-api-endpoints/verifymessage

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The Bitcoin address to use for the signature. |
| signature | string | Yes | The base64-encoded signature provided by the signer. |
| message | string | Yes | The message that was signed. |

## Result

**result** (boolean): Whether the signature is valid for the message and address.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "verifymessage",
  "params": [
    "1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY",
    "G9oR+mz9QwPZq2boSmjdtbX0VNdD+dLOFRzJ93ZDHNwhnOtJb1EDAKCK3NmPIzctQDAazX9gh3d+zdoFKc69bQ4=",
    "Test message from Bitcoin"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "verifymessage",
  "params": [
    "1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY",
    "G9oR+mz9QwPZq2boSmjdtbX0VNdD+dLOFRzJ93ZDHNwhnOtJb1EDAKCK3NmPIzctQDAazX9gh3d+zdoFKc69bQ4=",
    "Test message from Bitcoin"
  ]
}'
```



------

# UTXO Overview

> Understand how the Unspent Transaction Output (UTXO) model tracks balances on Bitcoin Cash.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

Bitcoin Cash uses the **Unspent Transaction Output (UTXO) model** to track user balances, in contrast to the **account model** used by Ethereum and other EVM chains.

## UTXO-based model

UTXO stands for *Unspent Transaction Output*. Instead of tracking an account's overall balance, the network maintains a set of UTXOs: outputs from past transactions that credit specific addresses with a specific amount.

When someone says they own 3 BCH, what they actually hold is one or more UTXOs that together sum to 3 BCH. To spend that balance, a wallet selects specific UTXOs as inputs to a new transaction.

## What is a UTXO?

A UTXO is the output of a previous transaction that has not yet been spent. Every time a transaction is confirmed:

* The inputs reference one or more UTXOs from previous transactions.
* The outputs create new UTXOs credited to the recipient addresses.
* Any leftover value (input minus output minus fee) returns to the sender as a "change" UTXO.

So each transaction consumes old UTXOs and produces new ones. The full set of UTXOs at any point in time represents the network's spendable state.

## Properties of UTXOs

* **Non-fungible.** Each UTXO is a distinct object referenced by its transaction ID and output index.
* **Specific to spend.** To spend a UTXO you must refer to that exact UTXO, not just an aggregate balance.
* **Change creates new UTXOs.** Any leftover from the input value becomes a new UTXO sent back to the spender.
* **Single-use.** A UTXO can only be spent once; double-spending is prevented at consensus.
* **Script-locked.** Each UTXO carries a locking script that defines the conditions under which it can be spent (typically a signature from the owning private key).

## Account model vs UTXO model

|                    | Account model (Ethereum, EVM chains)                        | UTXO model (Bitcoin Cash)                                                         |
| ------------------ | ----------------------------------------------------------- | --------------------------------------------------------------------------------- |
| User balance       | Single overall account state (e.g. address X holds 4.2 ETH) | Sum of specific UTXOs (e.g. address X owns 29 UTXOs totalling 2.65 BCH)           |
| Query model        | Direct: read account balance                                | Compute: aggregate over an address's UTXOs                                        |
| Privacy            | Repeated address use correlates activity                    | Rotating addresses per output is the recommended privacy model                    |
| Transaction model  | State transition: balance update                            | Input/output: consume UTXOs, create new ones                                      |

## Querying UTXO data with Alchemy

Alchemy's UTXO API gives you a clean REST interface to fetch Bitcoin Cash addresses, balances, balance history, UTXOs, and block/transaction data. See the UTXO API endpoints in the sidebar, or the [UTXO migration guide](https://www.alchemy.com/docs/bitcoin/utxo-migration-guide) if you're moving from QuickNode, BlockCypher, or Blockdaemon.

------

# Get Block Hash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/block-index/{block_height}

Returns the block hash for a given block height on the selected network.

Reference: https://www.alchemy.com/docs/chains/bitcoincash/utxo-api-endpoints/utxo-api-endpoints/get-block-hash-by-index

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| block_height | integer | Yes | Block height as a non-negative integer. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo/api/v2/block-index/860730
```



------

# Get Transaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/tx/{txid}

Returns normalized transaction data for the given transaction ID. Response shape is consistent across UTXO networks. Empty fields are omitted.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/utxo-api-endpoints/utxo-api-endpoints/get-transaction

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| txid | string | Yes | Hex-encoded transaction ID. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo/api/v2/tx/0ddda32c1004ba0cdb6544ac4622f7affc895b8f582b27f202d9745186f72d0a
```



------

# Get Transaction Specific

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/tx-specific/{txid}

Returns transaction data in the exact format returned by the underlying coin backend, including all chain-specific fields not surfaced by the normalized `/tx/{txid}` endpoint.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/utxo-api-endpoints/utxo-api-endpoints/get-transaction-specific

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| txid | string | Yes | Hex-encoded transaction ID. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo/api/v2/tx-specific/0ddda32c1004ba0cdb6544ac4622f7affc895b8f582b27f202d9745186f72d0a
```



------

# Get Address

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/address/{address}

Returns balances and transactions for the given Bitcoin Cash address. Transactions are sorted newest-first by block height. Bitcoin Cash addresses use the `bitcoincash:` CashAddr prefix.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/utxo-api-endpoints/utxo-api-endpoints/get-address

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| address | string | Yes | Bitcoin Cash CashAddr address (`bitcoincash:` prefixed). |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| page | integer | No | Page of returned transactions, starting from 1. |
| pageSize | integer | No | Number of transactions returned per page (max 1000). |
| from | integer | No | Filter transactions starting from this block height. |
| to | integer | No | Filter transactions up to this block height. |
| details | enum | No | Level of detail to return. |
| secondary | string | No | Secondary (fiat) currency code for balance conversion, e.g. `usd` or `eur`. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo/api/v2/address/bitcoincash:qp3wjpa3tjlj042z2wv7hahsldgwhwy0rq9sywjpyy
```



------

# Get Xpub

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/xpub/{xpub}

Returns balances and transactions for an xpub or output descriptor on Bitcoin Cash. Supports BIP44 and BIP49 derivation schemes. The BIP version is determined by the xpub prefix or by an explicit output descriptor.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/utxo-api-endpoints/utxo-api-endpoints/get-xpub

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| xpub | string | Yes | Extended public key or output descriptor. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| page | integer | No |  |
| pageSize | integer | No |  |
| from | integer | No |  |
| to | integer | No |  |
| details | enum | No |  |
| tokens | enum | No | Which derived addresses to return. |
| secondary | string | No | Secondary (fiat) currency code for balance conversion. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo/api/v2/xpub/xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz
```



------

# Get UTXOs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/utxo/{descriptor}

Returns the unspent transaction outputs for a Bitcoin Cash address, xpub, or output descriptor. Includes confirmed and unconfirmed UTXOs by default; pass `confirmed=true` to limit to confirmed only. UTXOs are sorted newest-first.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/utxo-api-endpoints/utxo-api-endpoints/get-utxo

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| descriptor | string | Yes | Bitcoin Cash address, xpub, or output descriptor. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| confirmed | boolean | No | When `true`, exclude unconfirmed UTXOs. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo/api/v2/utxo/1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
```



------

# Get Block

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/block/{block}

Returns information about a block on Bitcoin Cash, including transactions, by block hash or block height. Results are paginated.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/utxo-api-endpoints/utxo-api-endpoints/get-block

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| block | string | Yes | Block height (integer) or block hash (hex string). |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| page | integer | No |  |
| pageSize | integer | No |  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo/api/v2/block/860730
```



------

# Send Transaction (GET)

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/sendtx/{hex}

Broadcasts a signed raw Bitcoin Cash transaction encoded as a hex string in the path. Returns the transaction ID on success. The example value below is the hex of an already-confirmed Bitcoin Cash transaction; re-sending it will respond with the Bitcoin-Core `-27: transaction already in block chain` error. Substitute your own signed raw-transaction hex to broadcast. For larger payloads, use the POST variant.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/utxo-api-endpoints/utxo-api-endpoints/send-transaction-get

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| hex | string | Yes | Hex-encoded raw transaction bytes. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo/api/v2/sendtx/0100000002fd11e3d414e14fa9a2c9aaee0f6533dbc85b5cdd5a3ac8ecb6e8b48f88103a9a020000006a473044022067fc686b4fe5dcae65ec721d47faf9312634f7087d3bb9924f2f4e5c3d55e2b302206c403b098b62b648ef329a23184b0b9320745b1227463aeeafcbfb7f5563218d412102870b87cdbc930db3b8cbef3b4d72cce0ce2817bfef15aab28abe61fb064930f5ffffffff3051fba1337c0898f3cbf87e9bdb0efa5beab0bef8d32f0deb8d1d29326ea4eb010000006a47304402204ef4b516abac3d419c5dae87c4f5da412ad159b9288c35034a044433109c4355022002cd568e69f2490bc45f71f7cbe3a29124548057ed625b286616e590e45f87a8412102870b87cdbc930db3b8cbef3b4d72cce0ce2817bfef15aab28abe61fb064930f5ffffffff040000000000000000406a04534c500001010453454e4420c4c788a1664de4213b9bcb806e3fb47f786d53f6f63220deb6719b2c087b457308000000174876e80008000775d6bd84740022020000000000001976a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac22020000000000001976a914ade60c76898fe0c01431edd5e79b465f818a0d8a88ac68ad0000000000001976a914ade60c76898fe0c01431edd5e79b465f818a0d8a88ac00000000
```



------

# Send Transaction (POST)

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/sendtx/

Broadcasts a signed raw Bitcoin Cash transaction by sending hex bytes in the request body. The trailing slash on the path is mandatory; see the [Blockbook API reference](https://github.com/trezor/blockbook/blob/master/docs/api.md#send-transaction). Use this for larger payloads (request body limit 8 MiB). Returns the transaction ID on success.

> **Heads up**: the POST variant currently returns `{ "error": "Parse error" }` (HTTP 400) > on the Alchemy proxy regardless of body format. Until that upstream issue is resolved, > prefer the GET variant above for hex payloads under the URL-length limit.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/utxo-api-endpoints/utxo-api-endpoints/send-transaction-post

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo/api/v2/sendtx/
```



------

# Get Tickers List

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/tickers-list/

Returns the list of available currency rate tickers (secondary currencies) for Bitcoin Cash at a given timestamp, along with the actual data timestamp.

> **Heads up**: this endpoint currently returns HTTP 503 `Unable to complete request at this > time` on the Alchemy proxy. The schema and request shape below are documented for > reference; "Try It" will not return live data until the upstream service is restored.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/utxo-api-endpoints/utxo-api-endpoints/get-tickers-list

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| timestamp | integer | Yes | Unix timestamp for the requested currency list. |
| token | string | No | Token symbol or contract/address key for token-specific rates. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url 'https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo/api/v2/tickers-list/?timestamp=1578391200'
```



------

# Get Tickers

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/tickers/

Returns the Bitcoin Cash currency rate for the specified currency and timestamp. If the requested currency is unavailable for that timestamp, the closest rate is returned with the actual rate timestamp.

> **Heads up**: this endpoint currently returns HTTP 503 `Unable to complete request at this > time` on the Alchemy proxy. The schema and request shape below are documented for > reference; "Try It" will not return live data until the upstream service is restored.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/utxo-api-endpoints/utxo-api-endpoints/get-tickers

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| currency | string | No | Fiat or crypto currency code (e.g. `usd`, `eur`, `eth`). Omit to return all. |
| timestamp | integer | No | Unix timestamp. Omit to return the latest. |
| block | string | No | Block height or hash whose timestamp should be used for historical rates. |
| token | string | No | Token symbol or contract/address key for token-specific rates. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo/api/v2/tickers/
```



------

# Get Balance History

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/balancehistory/{address}

Returns the balance history for the specified Bitcoin Cash address. Optionally enrich each bucket with secondary (fiat) currency rates at the time of the transaction.


Reference: https://www.alchemy.com/docs/chains/bitcoincash/utxo-api-endpoints/utxo-api-endpoints/get-balance-history

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| address | string | Yes | Bitcoin Cash CashAddr address (`bitcoincash:` prefixed). |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| from | integer | Yes | Start of the history range as a Unix timestamp. |
| to | integer | Yes | End of the history range as a Unix timestamp. |
| fiatcurrency | string | No | Fiat currency code to enrich each bucket with. |
| groupBy | integer | No | Aggregation interval in seconds. Defaults to 3600. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url 'https://bitcoincash-mainnet.g.alchemy.com/v2/docs-demo/api/v2/balancehistory/bitcoincash:qp3wjpa3tjlj042z2wv7hahsldgwhwy0rq9sywjpyy?from=1501545600&to=1757280000'
```



------

# UTXO WebSockets

> Stream block, transaction, address, and fiat rate updates from Bitcoin Cash over a persistent WebSocket connection.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

The UTXO WebSockets API streams real-time events from Bitcoin Cash over a persistent connection, powered by [Trezor Blockbook](https://github.com/trezor/blockbook). Use it to push-subscribe to new blocks, new transactions, transactions affecting specific addresses, and fiat rate updates, with the same data shapes returned by the [UTXO REST API](/docs/bitcoincash/utxo).

<Info>
  When the chain reorganizes, the server emits new block events for the new chain. You may see multiple events at the same height; treat the latest one as canonical.
</Info>

# Supported Networks

* `bitcoincash-mainnet`
* `bitcoincash-testnet`

# Connection

Open a WebSocket connection using the standard Alchemy WebSocket URL for the network:

<CodeGroup>
  ```shell wscat
  wscat -c wss://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}
  ```
</CodeGroup>

Replace `{apiKey}` with your Alchemy API key from the [Alchemy Dashboard](https://dashboard.alchemy.com/). The WebSocket URL for an app uses the same host as its HTTPS URL, just with the `wss://` scheme.

# Message format

Every client message uses the following envelope:

```json
{
  "id": "1",
  "method": "<request or subscription name>",
  "params": { ... }
}
```

* `id`: a client-chosen string. The server echoes it back on every response so you can correlate.
* `method`: the request method or subscription name.
* `params`: method-specific arguments. Use `{}` when none.

A connection can hold only one active subscription per event type. Sending a second `subscribeAddresses` replaces the previous address list. To stop receiving events, close the connection.

# Subscriptions

## subscribeNewBlock

Emits an event each time a new block is added to the chain.

### Parameters

* None.

### Response

* `id`: `string` - The id you sent on the request.
* `data`:
  * `height`: `number` - Block height.
  * `hash`: `string` - Block hash.

### Request

<CodeGroup>
  ```shell wscat
  // open the websocket
  wscat -c wss://bitcoincash-mainnet.g.alchemy.com/v2/{apiKey}

  // then send the subscription
  {"id":"1","method":"subscribeNewBlock","params":{}}
  ```
</CodeGroup>

### Result

<CodeGroup>
  ```json result
  {"id":"1","data":{"subscribed":true}}

  {
    "id":"1",
    "data":{
      "height":860730,
      "hash":"000000000000000000a2b67ec3ea0b3a3a3a3b3a3a3a3a3a3a3a3a3a3a3a3a3a"
    }
  }
  ```
</CodeGroup>

## subscribeNewTransaction

Emits every new transaction added to the blockchain, across all addresses.

<Info>
  This subscription is a high-volume firehose and requires the backend to be running with the `-enablesubnewtx` flag. It may not be enabled on all networks. If you do not receive events after subscribing, fall back to `subscribeAddresses` for targeted updates.
</Info>

### Parameters

* None.

### Response

* `id`: `string` - The id you sent on the request.
* `data`: a transaction object using the same shape as `GET /api/v2/tx/{txid}`. See the [Get transaction reference](https://github.com/trezor/blockbook/blob/master/docs/api.md#get-transaction) for the full field list.

### Request

<CodeGroup>
  ```shell wscat
  {"id":"2","method":"subscribeNewTransaction","params":{}}
  ```
</CodeGroup>

### Result

<CodeGroup>
  ```json result
  {"id":"2","data":{"subscribed":true}}

  {
    "id":"2",
    "data":{
      "txid":"<bch txid>",
      "version":2,
      "vin":[
        {
          "txid":"<input txid>",
          "vout":1,
          "n":0,
          "addresses":["bitcoincash:qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx0"],
          "isAddress":true,
          "value":"10106300"
        }
      ],
      "vout":[
        {
          "value":"175000",
          "n":0,
          "addresses":["bitcoincash:qq3vlashthktqpeppuv7trmw062vfqkfk5l6w0jcuv"],
          "isAddress":true
        }
      ],
      "blockHeight":-1,
      "confirmations":0,
      "value":"10063100",
      "valueIn":"10106300",
      "fees":"43200"
    }
  }
  ```
</CodeGroup>

## subscribeAddresses

Emits an event when a new transaction touches any of the supplied addresses. Optionally also emits when those transactions confirm in a new block.

### Parameters

* `addresses`: `string[]` - One or more addresses to watch. Sending a new `subscribeAddresses` request replaces the previous list. Both CashAddr (`bitcoincash:q...`) and legacy (`1...`) formats are accepted.
* `newBlockTxs`: `boolean` *(optional)* - When `true`, also emits an event when a watched transaction is included in a new block, not just when it enters the mempool. Defaults to `false`.

### Response

* `id`: `string` - The id you sent on the request.
* `data`:
  * Initial: `{ "subscribed": true }`.
  * On each event: `{ "address": <string>, "tx": <Tx> }` where `Tx` follows the same shape as `GET /api/v2/tx/{txid}`.

### Request

<CodeGroup>
  ```shell wscat
  {
    "id":"3",
    "method":"subscribeAddresses",
    "params":{
      "addresses":[
        "bitcoincash:qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx0",
        "bitcoincash:qq3vlashthktqpeppuv7trmw062vfqkfk5l6w0jcuv"
      ],
      "newBlockTxs":true
    }
  }
  ```
</CodeGroup>

### Result

<CodeGroup>
  ```json result
  {"id":"3","data":{"subscribed":true}}

  {
    "id":"3",
    "data":{
      "address":"bitcoincash:qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx0",
      "tx":{
        "txid":"<bch txid>",
        "vin":[
          {
            "n":0,
            "addresses":["bitcoincash:qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx0"],
            "isAddress":true,
            "value":"10106300"
          }
        ],
        "vout":[
          {
            "value":"175000",
            "n":0,
            "addresses":["bitcoincash:qq3vlashthktqpeppuv7trmw062vfqkfk5l6w0jcuv"],
            "isAddress":true
          }
        ],
        "blockHeight":-1,
        "confirmations":0,
        "value":"10063100",
        "fees":"43200"
      }
    }
  }
  ```
</CodeGroup>

## subscribeFiatRates

Emits an event when the fiat rate ticker for the chain's native asset updates.

### Parameters

* `currency`: `string` *(optional)* - Filter to a single fiat currency (e.g. `"usd"`, `"eur"`). When omitted, the server emits all available currencies on each update.

### Response

* `id`: `string` - The id you sent on the request.
* `data`:
  * Initial: `{ "subscribed": true }`.
  * On each event: `{ "rates": { "<currency>": <number>, ... } }`.

### Request

<CodeGroup>
  ```shell wscat
  {"id":"4","method":"subscribeFiatRates","params":{"currency":"usd"}}
  ```
</CodeGroup>

### Result

<CodeGroup>
  ```json result
  {"id":"4","data":{"subscribed":true}}

  {"id":"4","data":{"rates":{"usd":312.45}}}
  ```
</CodeGroup>

# Request methods

In addition to subscriptions, the WebSocket connection accepts the same one-shot requests as the [UTXO REST API](/docs/chains/bitcoincash/utxo-api-endpoints/utxo-api-endpoints). They are useful when you have already opened a connection for subscriptions and want to fetch ad-hoc data without a separate HTTP round-trip.

| Method                       | REST equivalent                                  | Description                                                       |
| ---------------------------- | ------------------------------------------------ | ----------------------------------------------------------------- |
| `getInfo`                    | `GET /api/`                                      | Backend and Blockbook status                                      |
| `getBlockHash`               | `GET /api/v2/block-index/{block_height}`         | Block hash for a given height                                     |
| `getAccountInfo`             | `GET /api/v2/address/{address}`, `/xpub/{xpub}`  | Balances and transactions for an address or xpub                  |
| `getAccountUtxo`             | `GET /api/v2/utxo/{descriptor}`                  | UTXOs for an address or xpub                                      |
| `getTransaction`             | `GET /api/v2/tx/{txid}`                          | Normalized transaction data                                       |
| `getTransactionSpecific`     | `GET /api/v2/tx-specific/{txid}`                 | Coin-specific raw transaction                                     |
| `getBalanceHistory`          | `GET /api/v2/balancehistory/{address}`           | Address balance history grouped by time                           |
| `estimateFee`                | n/a                                              | Fee estimate for a target confirmation depth                      |
| `sendTransaction`            | `POST /api/v2/sendtx/`                           | Broadcast a signed raw transaction                                |
| `getCurrentFiatRates`        | `GET /api/v2/tickers/`                           | Current fiat rates                                                |
| `getFiatRatesTickersList`    | `GET /api/v2/tickers-list/`                      | List of available fiat tickers for a timestamp                    |
| `getFiatRatesForTimestamps`  | n/a                                              | Historical fiat rates for specific timestamps                     |
| `getMempoolFilters`          | n/a                                              | Compact block filters for the mempool (for light clients)         |
| `getBlockFilter`             | n/a                                              | Compact block filter for a given block                            |
| `ping`                       | n/a                                              | Connection health check                                           |

For request and response payload shapes, see the [Trezor Blockbook WebSocket API reference](https://github.com/trezor/blockbook/blob/master/docs/api.md#websocket-api). The payloads are the same as the REST API; only the connection layer differs.

# WebSocket limits

The following limits apply to Alchemy WebSocket connections:

* 100 concurrent connections per app on the FREE tier; 2,000 on all other tiers.
* 1,000 unique subscriptions per connection.

See [Best Practices for Using WebSockets](/docs/reference/best-practices-for-using-websockets-in-web3) for connection-management tips and [Compute Unit Costs](/docs/reference/compute-unit-costs) for billing details.

# See also

* [UTXO Overview](/docs/bitcoincash/utxo)
* [UTXO API Endpoints](/docs/chains/bitcoincash/utxo-api-endpoints/utxo-api-endpoints)
* [UTXO Migration Guide](/docs/bitcoin/utxo-migration-guide)

------

# Bitcoin Cash API FAQ

> Frequently asked questions about the Bitcoin Cash API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Bitcoin Cash?

Bitcoin Cash (BCH) is a peer-to-peer electronic cash system that originated as a hard fork of Bitcoin in 2017. It uses a larger block size to support higher on-chain transaction throughput, and is secured by proof-of-work mining.

## What is the Bitcoin Cash API?

The Bitcoin Cash API allows you to interact with the Bitcoin Cash network using JSON-RPC methods. Through the API, you can retrieve data about blocks, transactions, and the mempool, as well as broadcast new transactions to the network.

## How can I get started using the Bitcoin Cash API?

Check out our [Bitcoin Cash API Quickstart](/docs/reference/bitcoincash-api-quickstart) guide for setup instructions, sample code, and your first API call.

## Does Bitcoin Cash support smart contracts?

Bitcoin Cash supports a richer scripting language than Bitcoin via the CashScript ecosystem and CashTokens, but it does not have a full smart contract virtual machine like Ethereum.

## What API standard does Bitcoin Cash use?

Bitcoin Cash Node and BCHN implement a standard JSON-RPC interface for querying blockchain data and submitting transactions, derived from Bitcoin Core.

## What is a Bitcoin Cash API key?

When accessing the Bitcoin Cash network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network.

## Which libraries can I use with the Bitcoin Cash API?

You can use any HTTP client that supports JSON payloads, e.g. `axios`, `fetch`, `requests`, or `curl`. There are also Bitcoin-Cash-specific libraries like `bchjs` (Node.js) and `bitcash` (Python) for deeper integration.

## What programming languages are compatible with the API?

The API works with any programming language that can send JSON over HTTP. Common choices include JavaScript/TypeScript, Python, Go, and Java.

## What is used for fees in Bitcoin Cash?

Bitcoin Cash transaction fees are paid in BCH and are calculated per byte of transaction data. Fees are used to incentivize miners to include transactions in blocks.

## What methods does Alchemy support for the Bitcoin Cash API?

You can find a full list of supported JSON-RPC methods on the [Bitcoin Cash API Overview](/docs/bitcoincash/bitcoincash-api-overview) page.

## My question isn't listed here, where can I get help?

If you have any questions or feedback, please contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Blast Chain API Quickstart

> How to get started building on Blast using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Blast is an EVM-compatible blockchain designed to provide high performance and scalability for decentralized applications (dApps). Known for its efficient and secure transaction processing, Blast offers a robust environment for deploying Ethereum-based applications.

The Blast Chain API facilitates interaction with the Blast network through a collection of JSON-RPC methods. Given its compatibility with the Ethereum ecosystem, developers familiar with Ethereum's JSON-RPC APIs will find working with Blast both intuitive and straightforward.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Blast client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { blast } from "viem/chains";

const client = createPublicClient({
  chain: blast,
  transport: http("https://blast-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (ETH):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Blast APIs

For the full list of Blast APIs, see the [Blast API Endpoints](/docs/chains#blast-apis).

------

# Blast API Overview

> Overview of available Blast API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Blast APIs

📙 Get started with our [Blast API Quickstart Guide](/docs/reference/blast-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/blast/blast-api-endpoints/eth-accounts)                           | [`eth_blockNumber`](/docs/chains/blast/blast-api-endpoints/eth-block-number)                |
| [`eth_call`](/docs/chains/blast/blast-api-endpoints/eth-call)                                   | [`eth_chainId`](/docs/chains/blast/blast-api-endpoints/eth-chain-id)                        |
| [`eth_createAccessList`](/docs/chains/blast/blast-api-endpoints/eth-create-access-list)         | [`eth_estimateGas`](/docs/chains/blast/blast-api-endpoints/eth-estimate-gas)                |
| [`eth_feeHistory`](/docs/chains/blast/blast-api-endpoints/eth-fee-history)                      | [`eth_fillTransaction`](/docs/chains/blast/blast-api-endpoints/eth-fill-transaction)        |
| [`eth_gasPrice`](/docs/chains/blast/blast-api-endpoints/eth-gas-price)                          | [`eth_getAccount`](/docs/chains/blast/blast-api-endpoints/eth-get-account)                  |
| [`eth_getAccountInfo`](/docs/chains/blast/blast-api-endpoints/eth-get-account-info)             | [`eth_getBalance`](/docs/chains/blast/blast-api-endpoints/eth-get-balance)                  |
| [`eth_getBlockByHash`](/docs/chains/blast/blast-api-endpoints/eth-get-block-by-hash)            | [`eth_getBlockByNumber`](/docs/chains/blast/blast-api-endpoints/eth-get-block-by-number)    |
| [`eth_getBlockReceipts`](/docs/chains/blast/blast-api-endpoints/eth-get-block-receipts)         | [`eth_getBlockTransactionCountByHash`](/docs/chains/blast/blast-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/blast/blast-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/blast/blast-api-endpoints/eth-get-code)                        |
| [`eth_getFilterChanges`](/docs/chains/blast/blast-api-endpoints/eth-get-filter-changes)         | [`eth_getFilterLogs`](/docs/chains/blast/blast-api-endpoints/eth-get-filter-logs)           |
| [`eth_getLogs`](/docs/chains/blast/blast-api-endpoints/eth-get-logs)                            | [`eth_getProof`](/docs/chains/blast/blast-api-endpoints/eth-get-proof)                      |
| [`eth_getRawTransactionByHash`](/docs/chains/blast/blast-api-endpoints/eth-get-raw-transaction-by-hash) | [`eth_getStorageAt`](/docs/chains/blast/blast-api-endpoints/eth-get-storage-at)             |
| [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/blast/blast-api-endpoints/eth-get-transaction-by-block-hash-and-index) | [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/blast/blast-api-endpoints/eth-get-transaction-by-block-number-and-index) |
| [`eth_getTransactionByHash`](/docs/chains/blast/blast-api-endpoints/eth-get-transaction-by-hash) | [`eth_getTransactionCount`](/docs/chains/blast/blast-api-endpoints/eth-get-transaction-count) |
| [`eth_getTransactionReceipt`](/docs/chains/blast/blast-api-endpoints/eth-get-transaction-receipt) | [`eth_getUncleByBlockHashAndIndex`](/docs/chains/blast/blast-api-endpoints/eth-get-uncle-by-block-hash-and-index) |
| [`eth_getUncleByBlockNumberAndIndex`](/docs/chains/blast/blast-api-endpoints/eth-get-uncle-by-block-number-and-index) | [`eth_getUncleCountByBlockHash`](/docs/chains/blast/blast-api-endpoints/eth-get-uncle-count-by-block-hash) |
| [`eth_getUncleCountByBlockNumber`](/docs/chains/blast/blast-api-endpoints/eth-get-uncle-count-by-block-number) | [`eth_maxPriorityFeePerGas`](/docs/chains/blast/blast-api-endpoints/eth-max-priority-fee-per-gas) |
| [`eth_newBlockFilter`](/docs/chains/blast/blast-api-endpoints/eth-new-block-filter)             | [`eth_newFilter`](/docs/chains/blast/blast-api-endpoints/eth-new-filter)                    |
| [`eth_newPendingTransactionFilter`](/docs/chains/blast/blast-api-endpoints/eth-new-pending-transaction-filter) | [`eth_protocolVersion`](/docs/chains/blast/blast-api-endpoints/eth-protocol-version)        |
| [`eth_sendRawTransaction`](/docs/chains/blast/blast-api-endpoints/eth-send-raw-transaction)     | [`eth_sendRawTransactionSync`](/docs/chains/blast/blast-api-endpoints/eth-send-raw-transaction-sync) |
| [`eth_submitWork`](/docs/chains/blast/blast-api-endpoints/eth-submit-work)                      | [`eth_subscribe`](/docs/chains/blast/blast-api-endpoints/eth-subscribe)                     |
| [`eth_syncing`](/docs/chains/blast/blast-api-endpoints/eth-syncing)                             | [`eth_uninstallFilter`](/docs/chains/blast/blast-api-endpoints/eth-uninstall-filter)        |
| [`eth_unsubscribe`](/docs/chains/blast/blast-api-endpoints/eth-unsubscribe)                     | [`net_listening`](/docs/chains/blast/blast-api-endpoints/net-listening)                     |
| [`net_peerCount`](/docs/chains/blast/blast-api-endpoints/net-peer-count)                        | [`net_version`](/docs/chains/blast/blast-api-endpoints/net-version)                         |
| [`web3_clientVersion`](/docs/chains/blast/blast-api-endpoints/web-3-client-version)             | [`web3_sha3`](/docs/chains/blast/blast-api-endpoints/web-3-sha-3)                           |

## Related APIs

The following Alchemy APIs are also supported on Blast:

* [Token API](/docs/reference/token-api-overview)
* [Transfers API](/docs/reference/transfers-api-quickstart)
* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)
* [NFT API](/docs/reference/nft-api-overview)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-sepolia.g.alchemy.com/v2/{apiKey}

Retrieves account information including balance, code, and nonce for a given address at a specified block.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the account information. |

## Result

**Account information** (object): An object containing the account's balance, code, and nonce.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "balance": "0x1cfe56f3795885980000",
    "code": "0x",
    "nonce": "0x5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-sepolia.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_newPendingTransactionFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new pending transactions arrive.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-new-pending-transaction-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newPendingTransactionFilter"
}'
```



------

# eth_protocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current protocol version used by the client.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-protocol-version

## Result

**Protocol Version** (string): The protocol version as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3f",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_protocolVersion"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_sendRawTransactionSync

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Sends a raw transaction to the network and waits for the transaction to be mined.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-send-raw-transaction-sync

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction data | string | Yes | The signed transaction data, RLP-encoded and hex-encoded. |
| Timeout | integer | No | Maximum wait time in milliseconds. Must be a positive integer between 1 and the node-configured maximum timeout. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "transactionHash": "0x1234abcd...",
    "blockHash": "0xabcd1234...",
    "blockNumber": "0x10d4f",
    "cumulativeGasUsed": "0x5208",
    "gasUsed": "0x5208",
    "contractAddress": null,
    "logs": [],
    "status": "0x1"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_peerCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of peers currently connected to the client.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/net-peer-count

## Result

**peerCount** (string): The number of connected peers as a hex string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_peerCount"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://blast-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/blast/blast-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://blast-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Blast Chain API FAQ

> Frequently asked questions about the Blast Chain API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Blast Chain?

Blast Chain is a high-performance blockchain designed to deliver rapid transaction speeds and low costs. It focuses on scalability and efficiency, making it an ideal platform for decentralized applications (dApps) that require fast and cost-effective transactions.

## What is the Blast Chain API?

The Blast Chain API facilitates interaction with the Blast Chain network through a collection of JSON-RPC methods. It provides tools to interact with the blockchain, enabling functionalities such as transactions, smart contract deployment, and data retrieval.

## How can I get started using the Blast Chain API?

Explained in [Blast Chain API Quickstart](/docs/reference/blast-api-quickstart).

## Is Blast Chain EVM compatible?

Yes, Blast Chain is fully compatible with the Ethereum Virtual Machine (EVM). This compatibility allows you to port your projects to Blast Chain with minimal changes, benefiting from the chain's high throughput and low transaction fees.

## What API does Blast Chain use?

Blast Chain uses the JSON-RPC API standard for blockchain interactions. This is the same standard used by Ethereum.

## What is a Blast Chain API key?

When accessing the Blast Chain network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network.

For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!

## Which libraries support Blast Chain?

Given Blast Chain's EVM compatibility, popular Ethereum libraries like ethers.js and web3.js are fully compatible with Blast Chain. This allows for seamless development and integration for those familiar with Ethereum's development ecosystem.

## What programming languages work with Blast Chain?

Similar to Ethereum, Blast Chain supports a range of programming languages for blockchain interaction and smart contract development, including Solidity for smart contracts, as well as JavaScript and TypeScript for dApp development and offchain interactions.

## What does Blast Chain use for gas?

Blast Chain uses BLAST, its native cryptocurrency, for transaction fees, gas, and other network activities.

## What methods does Alchemy support for the Blast Chain API?

You can find the list of all the methods Alchemy supports for the Blast Chain API on the [Blast API Endpoints](/docs/chains#blast-apis) page.

## My question isn't here, where can I get help?

If you have any questions or feedback, please contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# BNB Smart Chain API Overview

> Overview of available BNB Smart Chain API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## BNB Smart Chain APIs

📙 Get started with our [BNB Smart Chain API Quickstart Guide](/docs/reference/bnb-smart-chain-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-accounts)       | [`eth_blobBaseFee`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-blob-base-fee) |
| [`eth_blockNumber`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-block-number) | [`eth_call`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-call)           |
| [`eth_callMany`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-call-many)      | [`eth_chainId`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-chain-id)    |
| [`eth_createAccessList`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-create-access-list) | [`eth_estimateGas`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-estimate-gas) |
| [`eth_feeHistory`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-fee-history)  | [`eth_fillTransaction`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-fill-transaction) |
| [`eth_gasPrice`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-gas-price)      | [`eth_getAccount`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-account) |
| [`eth_getAccountInfo`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-account-info) | [`eth_getBalance`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-balance) |
| [`eth_getBlobSidecars`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-blob-sidecars) | [`eth_getBlockByHash`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-block-by-hash) |
| [`eth_getBlockByNumber`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-block-by-number) | [`eth_getBlockReceipts`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-block-receipts) |
| [`eth_getBlockTransactionCountByHash`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-block-transaction-count-by-hash) | [`eth_getBlockTransactionCountByNumber`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-block-transaction-count-by-number) |
| [`eth_getCode`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-code)        | [`eth_getFilterChanges`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-filter-changes) |
| [`eth_getFilterLogs`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-filter-logs) | [`eth_getFinalizedHeader`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-finalized-header) |
| [`eth_getLogs`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-logs)        | [`eth_getProof`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-proof)  |
| [`eth_getRawTransactionByHash`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-raw-transaction-by-hash) | [`eth_getStorageAt`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-storage-at) |
| [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-transaction-by-block-hash-and-index) | [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-transaction-by-block-number-and-index) |
| [`eth_getTransactionByHash`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-transaction-by-hash) | [`eth_getTransactionCount`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-transaction-count) |
| [`eth_getTransactionReceipt`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-transaction-receipt) | [`eth_getUncleByBlockHashAndIndex`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-uncle-by-block-hash-and-index) |
| [`eth_getUncleByBlockNumberAndIndex`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-uncle-by-block-number-and-index) | [`eth_getUncleCountByBlockHash`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-uncle-count-by-block-hash) |
| [`eth_getUncleCountByBlockNumber`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-uncle-count-by-block-number) | [`eth_maxPriorityFeePerGas`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-max-priority-fee-per-gas) |
| [`eth_newBlockFilter`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-new-block-filter) | [`eth_newFilter`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-new-filter) |
| [`eth_newPendingTransactionFilter`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-new-pending-transaction-filter) | [`eth_protocolVersion`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-protocol-version) |
| [`eth_sendRawTransaction`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-send-raw-transaction) | [`eth_sendRawTransactionSync`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-send-raw-transaction-sync) |
| [`eth_simulateV1`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-simulate-v-1) | [`eth_submitWork`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-submit-work) |
| [`eth_subscribe`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-subscribe)     | [`eth_syncing`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-syncing)     |
| [`eth_uninstallFilter`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-uninstall-filter) | [`eth_unsubscribe`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-unsubscribe) |
| [`net_listening`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/net-listening)     | [`net_peerCount`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/net-peer-count) |
| [`net_version`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/net-version)         | [`parlia_getSnapshot`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/parlia-get-snapshot) |
| [`txpool_content`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/txpool-content)   | [`web3_clientVersion`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/web-3-client-version) |
| [`web3_sha3`](/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/web-3-sha-3)           |                                                                                             |

## Related APIs

The following Alchemy APIs are also supported on BNB Smart Chain:

* [Bundler API](/docs/wallets/transactions/low-level-infra/bundler/overview)
* [Gas Manager API](/docs/wallets/api-reference/gas-manager-admin-api/gas-abstraction-api-endpoints/alchemy-request-gas-and-paymaster-and-data)
* [Token API](/docs/reference/token-api-overview)
* [Transfers API](/docs/reference/transfers-api-quickstart)
* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)
* [NFT API](/docs/reference/nft-api-overview)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blobBaseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the base fee per blob gas in wei for the current block.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-blob-base-fee

## Result

**Blob Base Fee** (string): The base fee per blob gas, in wei, as a hexadecimal encoded unsigned integer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blobBaseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_callMany

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Executes a list of transaction bundles without creating transactions on the blockchain. This method is particularly useful for simulating transactions to understand their potential outcomes. It supports simulating transactions at an intermediate state of a block, simulating multiple transactions with sequential dependencies, and overwriting block headers.


Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-call-many

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Bundles | object[] | Yes | A list of bundles where each bundle contains transactions and optional block overrides.  |
| Simulation context | object | Yes | The context for the simulation, specifying the blockNumber or Tag and transactionIndex.  |
| State overrides | object | No | An optional mapping for state overrides, following the eth_call standard.  |
| Timeout | integer | No | The maximum running time for the simulations in milliseconds, defaulting to 5000 milliseconds.  |

## Result

**Call results** (object[][]): A list of lists containing either the return value of the executed contract call or the reverted error code. Each bundle returns an array with one result per transaction. 

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "from": "0x1985ea6e9c68e1c272d8209f3b478ac2fdb25c87",
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gas": "0x0f4240",
            "gasPrice": "0x7896e72a",
            "data": "0xa9059cbb000000000000000000000000bc0e63965946815d105e7591407704e6e1964e590000000000000000000000000000000000000000000000000000000005f5e100"
          },
          {
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gasPrice": "0x7896e72a",
            "data": "0x70a08231000000000000000000000000bc0e63965946815d105e7591407704e6e1964e59"
          }
        ],
        "blockOverride": {
          "blockNumber": "0xbb5fe9"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    [
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000000000001"
      },
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000005f5e100"
      }
    ]
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "type": "string",
            "nonce": "string",
            "to": null,
            "from": "string",
            "gas": "string",
            "value": "string",
            "input": "string",
            "gasPrice": "string",
            "maxPriorityFeePerGas": "string",
            "maxFeePerGas": "string",
            "maxFeePerBlobGas": "string",
            "accessList": [
              {
                "address": "string",
                "storageKeys": [
                  "string"
                ]
              }
            ],
            "blobVersionedHashes": [
              "string"
            ],
            "blobs": [
              "string"
            ],
            "chainId": "string"
          }
        ],
        "blockOverride": {
          "blockNumber": "string",
          "blockHash": "string",
          "coinbase": "string",
          "timestamp": "string",
          "difficulty": "string",
          "gasLimit": "string",
          "baseFee": "string"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves account information including balance, code, and nonce for a given address at a specified block.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the account information. |

## Result

**Account information** (object): An object containing the account's balance, code, and nonce.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "balance": "0x1cfe56f3795885980000",
    "code": "0x",
    "nonce": "0x5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlobSidecars

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the blob sidecars for a given block, identified by block hash or block number.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-blob-sidecars

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block Identifier | string | No | A block hash or block number to retrieve blob sidecars for. |

## Result

**Blob Sidecars** (object[]): An array of blob sidecar objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlobSidecars",
  "params": [
    "0x41a5d8ffcc7ba7bbf3670caff9a2d95a63a4f31be905f86f5c44e25c2dfb30ed"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "index": "0x0",
      "blob": "0x...",
      "kzgCommitment": "0x...",
      "kzgProof": "0x..."
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlobSidecars",
  "params": [
    "string"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFinalizedHeader

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the latest finalized execution payload header. The finality threshold is selected via `verifiedValidatorNum`; negative values are shortcuts: `-1` (≥ 1/2 validators), `-2` (≥ 2/3 validators), `-3` (all validators). The method returns the block header at the height equal to `max(fastFinalizedHeight, probabilisticFinalizedHeight)`.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-finalized-header

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| verifiedValidatorNum | integer | Yes | Number of validators required to verify the block for probabilistic finality. Must be in `[1, len(currentValidators)]` or one of the shortcut values: `-1` (≥ 1/2 validators), `-2` (≥ 2/3 validators), `-3` (all validators). |

## Result

**Finalized Header** (object): The finalized execution block header.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFinalizedHeader",
  "params": [
    -3
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "baseFeePerGas": "0x0",
    "blobGasUsed": "0x0",
    "difficulty": "0x2",
    "excessBlobGas": "0x0",
    "extraData": "0xda8301060788643233646130343588676f312e32342e30836c696e004d518ce1f8b5831dffffb860b8c7390a8a9be245067620f30a4abd6f53290868da89fa6dbec51cf4168e03e1cd468da4302a7f45ce6492654c3f9ad3105a94e74f17e804ca6552306a314faca45222569612e7078c599e44a39eb93b6da80a903951b0cb4823bf5bd7732f46f84c84056f9bc5a04bc9b5101c179acd90c83a2ac1ff4685ed2b3576ccf24f2e8fd3870b1724efe784056f9bc6a028942e7a678e3f57ca057f6e58a69d0809247ae1bbf1d20b23eb8c72b6abdfa080b28358139305554bd08572388924d7249814fec1931c2ba25e646e3aab6e4a3935ae814c324138005140b593ef0c010f77e576d37c48389e78c282e7cabce75b01",
    "gasLimit": "0x3473bc0",
    "gasUsed": "0xb498a1",
    "hash": "0xdef001fe94c26896c92b875b97558a674824d0a643409edc616a845833578f2c",
    "logsBloom": "0xbe791bc23204004153e2505dc28ca82d012a9ea080584296c53824821112010fb48e148959285e0a7820f0802f020085179f30102654b5a02eb00236d52f08884510b613c5689d8d859818398001602338539d5090c4093b001c081730533d082f2800680a8a44b098c062ad0656482429405a4060068fc96d208ed18d7e244046a1d2acf82a0d6091852902240807f699749fc7804ed00a810453408013c564420ca1690112103339558996076d8c40d3044a2c4a808b693563182c6c27400de1b8b102ea16a019144300a12040d8012f24e500809e7a187c3043bf4478e0fae9506b2a900749004d607e14807101a10c00e4111d821c4cc78b0c80028c0a44",
    "milliTimestamp": "0x19d696b712a",
    "miner": "0xca503a7ed99eca485da2e875aedf7758472c378c",
    "mixHash": "0x00000000000000000000000000000000000000000000000000000000000000fa",
    "nonce": "0x0000000000000000",
    "number": "0x56f9bc7",
    "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "parentHash": "0x28942e7a678e3f57ca057f6e58a69d0809247ae1bbf1d20b23eb8c72b6abdfa0",
    "receiptsRoot": "0x59dac4d7b272eabe4a755f869c3ec87033d993ee392f8a70067fed733c7f8f4f",
    "requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "size": "0x67d2",
    "stateRoot": "0xbfb9084e605d265d79844e82109f0fc3395c0ee09b46beef8523a5dea36afe17",
    "timestamp": "0x69d55afe",
    "totalDifficulty": "0xad64c73",
    "transactionsRoot": "0xb19dc98f4f0c28f6f40abc86b3de6b5299784e78dbcc1c6cf6f1e285e48edcf2",
    "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFinalizedHeader",
  "params": [
    -3
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_newPendingTransactionFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new pending transactions arrive.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-new-pending-transaction-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newPendingTransactionFilter"
}'
```



------

# eth_protocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current protocol version used by the client.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-protocol-version

## Result

**Protocol Version** (string): The protocol version as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3f",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_protocolVersion"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_sendRawTransactionSync

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Sends a raw transaction to the network and waits for the transaction to be mined.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-send-raw-transaction-sync

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction data | string | Yes | The signed transaction data, RLP-encoded and hex-encoded. |
| Timeout | integer | No | Maximum wait time in milliseconds. Must be a positive integer between 1 and the node-configured maximum timeout. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "transactionHash": "0x1234abcd...",
    "blockHash": "0xabcd1234...",
    "blockNumber": "0x10d4f",
    "cumulativeGasUsed": "0x5208",
    "gasUsed": "0x5208",
    "contractAddress": null,
    "logs": [],
    "status": "0x1"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ]
}'
```



------

# eth_simulateV1

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Enables simulation of complex transactions and state changes without modifying the blockchain.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-simulate-v-1

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Simulation object | object | Yes | The object containing all simulation details such as calls, overrides, etc. |

## Result

**Simulation result** (object[]): The result of the simulation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "baseFeePerGas": "0x9",
      "blobGasUsed": "0x0",
      "calls": [
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000001"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
              "transactionIndex": "0x0",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x0",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        },
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000002"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd",
              "transactionIndex": "0x1",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x1",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        }
      ],
      "difficulty": "0x0",
      "excessBlobGas": "0x3b80000",
      "extraData": "0x",
      "gasLimit": "0x22550dd",
      "gasUsed": "0xa410",
      "hash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "miner": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
      "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "nonce": "0x0000000000000000",
      "number": "0x1530a5e",
      "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "parentHash": "0x513a0aa73024f294cdbcb0312af0c920850035f0552d7349ebb30717de30b1cc",
      "receiptsRoot": "0x75308898d571eafb5cd8cde8278bf5b3d13c5f6ec074926de3bb895b519264e1",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "size": "0x29c",
      "stateRoot": "0x65ea44c8bd5f9edbf269b6446b460b3e7378abb25c78fd5d70f0e2ef59296b25",
      "timestamp": "0x67f43327",
      "transactions": [
        "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
        "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd"
      ],
      "transactionsRoot": "0xd6902f31ae9d2169b77cd88611c6afd691ea5a7e604e44c71f663fda0c5d1c28",
      "uncles": [],
      "withdrawals": [],
      "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    }
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_peerCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of peers currently connected to the client.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/net-peer-count

## Result

**peerCount** (string): The number of connected peers as a hex string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_peerCount"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# parlia_getSnapshot

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the consensus snapshot at the given block number for the BNB Smart Chain Parlia consensus engine. If omitted, returns the snapshot at the latest block.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/parlia-get-snapshot

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockNumber | string or enum | No | The block number or tag. |

## Result

**snapshot** (object): The Parlia consensus snapshot.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "parlia_getSnapshot",
  "params": [
    "string"
  ]
}'
```



------

# txpool_content

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of the exact details of all transactions currently pending for inclusion in the next blocks, as well as ones that are being scheduled for future execution.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/txpool-content

## Result

**content** (object): Object with pending and queued transactions grouped by sender address and nonce.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "txpool_content"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/bnb-smart-chain/bnb-smart-chain-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# BNB Smart Chain Quickstart

> How to get started building on BNB Smart Chain using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

BNB Smart Chain (BSC) is a high-performance blockchain developed by Binance, designed to offer low transaction costs and fast execution times. It is Ethereum Virtual Machine (EVM) compatible, which lets you deploy Ethereum-based applications seamlessly.

The BNB Smart Chain API lets you interact with the BSC network through a collection of JSON-RPC methods. If you're familiar with Ethereum's JSON-RPC APIs, working with BSC is intuitive and straightforward.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a BNB Smart Chain client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { bsc } from "viem/chains";

const client = createPublicClient({
  chain: bsc,
  transport: http("https://bnb-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (BNB):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# BNB Smart Chain APIs

For the full list of BNB Smart Chain APIs, see the [BNB Smart Chain API Endpoints](/docs/chains#bnb-smart-chain-apis).

------

# BNB Smart Chain FAQ

> Frequently asked questions about the BNB Smart Chain API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is BNB Smart Chain (BSC)?

BNB Smart Chain (BSC) is a high-performance blockchain developed by Binance, designed to offer low transaction costs and fast execution times. It is Ethereum Virtual Machine (EVM) compatible, which lets you deploy Ethereum-based applications seamlessly.

## What is the BNB Smart Chain API?

The BNB Smart Chain API lets you interact with the BSC network through a collection of JSON-RPC methods. If you're familiar with Ethereum's JSON-RPC APIs, working with BSC is intuitive and straightforward.

## How can I get started using the BSC API?

Explained in [BNB Smart Chain Quickstart](/docs/reference/bnb-smart-chain-api-quickstart).

## Is BSC EVM compatible?

Yes, BNB Smart Chain is fully compatible with the Ethereum Virtual Machine (EVM). This compatibility lets you port your Ethereum projects to BSC with minimal changes, taking advantage of the chain's high throughput and low transaction fees.

## What API does BSC use?

BNB Smart Chain uses the JSON-RPC API standard for blockchain interactions. This is the same standard used by Ethereum.

## What is a BSC API key?

When accessing the BSC network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network.

For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup).

## Which libraries support BSC?

Given BSC's EVM compatibility, popular Ethereum libraries like ethers.js and web3.js are fully compatible with BSC. You can develop and integrate seamlessly if you're familiar with Ethereum's development ecosystem.

## What programming languages work with BSC?

Similar to Ethereum, BSC supports a range of programming languages for blockchain interaction and smart contract development, including Solidity for smart contracts, as well as JavaScript and TypeScript for dApp development and offchain interactions.

## What does BSC use for gas?

BSC uses BNB, the native cryptocurrency of the Binance ecosystem, for transaction fees, gas, and other network activities.

## What methods does Alchemy support for the BSC API?

You can find the list of all the methods Alchemy support for the BSC API on [BSC API Endpoints](/docs/bnb-smart-chain/bnb-smart-chain-api-overview) page.

## My question isn't here, where can I get help?

If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# BOB API Quickstart

> How to get started building on BOB using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

BOB (Build on Bitcoin) is a hybrid OP Stack Layer-2 that runs full-EVM apps while anchoring finality to Bitcoin and enabling trust-minimized BTC bridging for Bitcoin-native DeFi.

The BOB API allows interaction with the BOB network through a set of JSON-RPC methods. Its design is familiar to developers who have worked with Ethereum's JSON-RPC APIs, making it intuitive and straightforward to use.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a BOB client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { bob } from "viem/chains";

const client = createPublicClient({
  chain: bob,
  transport: http("https://bob-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (ETH):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# BOB APIs

For the full list of BOB APIs, see the [BOB API Endpoints](/docs/chains#bob-apis).

------

# BOB API Overview

> Overview of available BOB API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## BOB APIs

📙 Get started with our [BOB API Quickstart Guide](/docs/reference/bob-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`debug_executionWitness`](/docs/chains/bob/bob-api-endpoints/debug-execution-witness)          | [`erigon_getHeaderByNumber`](/docs/chains/bob/bob-api-endpoints/erigon-get-header-by-number) |
| [`eth_accounts`](/docs/chains/bob/bob-api-endpoints/eth-accounts)                               | [`eth_baseFee`](/docs/chains/bob/bob-api-endpoints/eth-base-fee)                            |
| [`eth_blobBaseFee`](/docs/chains/bob/bob-api-endpoints/eth-blob-base-fee)                       | [`eth_blockNumber`](/docs/chains/bob/bob-api-endpoints/eth-block-number)                    |
| [`eth_call`](/docs/chains/bob/bob-api-endpoints/eth-call)                                       | [`eth_callBundle`](/docs/chains/bob/bob-api-endpoints/eth-call-bundle)                      |
| [`eth_callMany`](/docs/chains/bob/bob-api-endpoints/eth-call-many)                              | [`eth_chainId`](/docs/chains/bob/bob-api-endpoints/eth-chain-id)                            |
| [`eth_createAccessList`](/docs/chains/bob/bob-api-endpoints/eth-create-access-list)             | [`eth_estimateGas`](/docs/chains/bob/bob-api-endpoints/eth-estimate-gas)                    |
| [`eth_feeHistory`](/docs/chains/bob/bob-api-endpoints/eth-fee-history)                          | [`eth_fillTransaction`](/docs/chains/bob/bob-api-endpoints/eth-fill-transaction)            |
| [`eth_gasPrice`](/docs/chains/bob/bob-api-endpoints/eth-gas-price)                              | [`eth_getAccount`](/docs/chains/bob/bob-api-endpoints/eth-get-account)                      |
| [`eth_getAccountInfo`](/docs/chains/bob/bob-api-endpoints/eth-get-account-info)                 | [`eth_getBalance`](/docs/chains/bob/bob-api-endpoints/eth-get-balance)                      |
| [`eth_getBlockByHash`](/docs/chains/bob/bob-api-endpoints/eth-get-block-by-hash)                | [`eth_getBlockByNumber`](/docs/chains/bob/bob-api-endpoints/eth-get-block-by-number)        |
| [`eth_getBlockReceipts`](/docs/chains/bob/bob-api-endpoints/eth-get-block-receipts)             | [`eth_getBlockTransactionCountByHash`](/docs/chains/bob/bob-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/bob/bob-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/bob/bob-api-endpoints/eth-get-code)                            |
| [`eth_getFilterChanges`](/docs/chains/bob/bob-api-endpoints/eth-get-filter-changes)             | [`eth_getFilterLogs`](/docs/chains/bob/bob-api-endpoints/eth-get-filter-logs)               |
| [`eth_getLogs`](/docs/chains/bob/bob-api-endpoints/eth-get-logs)                                | [`eth_getProof`](/docs/chains/bob/bob-api-endpoints/eth-get-proof)                          |
| [`eth_getRawTransactionByHash`](/docs/chains/bob/bob-api-endpoints/eth-get-raw-transaction-by-hash) | [`eth_getStorageAt`](/docs/chains/bob/bob-api-endpoints/eth-get-storage-at)                 |
| [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/bob/bob-api-endpoints/eth-get-transaction-by-block-hash-and-index) | [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/bob/bob-api-endpoints/eth-get-transaction-by-block-number-and-index) |
| [`eth_getTransactionByHash`](/docs/chains/bob/bob-api-endpoints/eth-get-transaction-by-hash)    | [`eth_getTransactionCount`](/docs/chains/bob/bob-api-endpoints/eth-get-transaction-count)   |
| [`eth_getTransactionReceipt`](/docs/chains/bob/bob-api-endpoints/eth-get-transaction-receipt)   | [`eth_getUncleByBlockHashAndIndex`](/docs/chains/bob/bob-api-endpoints/eth-get-uncle-by-block-hash-and-index) |
| [`eth_getUncleByBlockNumberAndIndex`](/docs/chains/bob/bob-api-endpoints/eth-get-uncle-by-block-number-and-index) | [`eth_getUncleCountByBlockHash`](/docs/chains/bob/bob-api-endpoints/eth-get-uncle-count-by-block-hash) |
| [`eth_getUncleCountByBlockNumber`](/docs/chains/bob/bob-api-endpoints/eth-get-uncle-count-by-block-number) | [`eth_maxPriorityFeePerGas`](/docs/chains/bob/bob-api-endpoints/eth-max-priority-fee-per-gas) |
| [`eth_newBlockFilter`](/docs/chains/bob/bob-api-endpoints/eth-new-block-filter)                 | [`eth_newFilter`](/docs/chains/bob/bob-api-endpoints/eth-new-filter)                        |
| [`eth_newPendingTransactionFilter`](/docs/chains/bob/bob-api-endpoints/eth-new-pending-transaction-filter) | [`eth_protocolVersion`](/docs/chains/bob/bob-api-endpoints/eth-protocol-version)            |
| [`eth_sendRawTransaction`](/docs/chains/bob/bob-api-endpoints/eth-send-raw-transaction)         | [`eth_sendRawTransactionSync`](/docs/chains/bob/bob-api-endpoints/eth-send-raw-transaction-sync) |
| [`eth_simulateV1`](/docs/chains/bob/bob-api-endpoints/eth-simulate-v-1)                         | [`eth_submitWork`](/docs/chains/bob/bob-api-endpoints/eth-submit-work)                      |
| [`eth_subscribe`](/docs/chains/bob/bob-api-endpoints/eth-subscribe)                             | [`eth_syncing`](/docs/chains/bob/bob-api-endpoints/eth-syncing)                             |
| [`eth_uninstallFilter`](/docs/chains/bob/bob-api-endpoints/eth-uninstall-filter)                | [`eth_unsubscribe`](/docs/chains/bob/bob-api-endpoints/eth-unsubscribe)                     |
| [`net_listening`](/docs/chains/bob/bob-api-endpoints/net-listening)                             | [`net_peerCount`](/docs/chains/bob/bob-api-endpoints/net-peer-count)                        |
| [`net_version`](/docs/chains/bob/bob-api-endpoints/net-version)                                 | [`txpool_content`](/docs/chains/bob/bob-api-endpoints/txpool-content)                       |
| [`web3_clientVersion`](/docs/chains/bob/bob-api-endpoints/web-3-client-version)                 | [`web3_sha3`](/docs/chains/bob/bob-api-endpoints/web-3-sha-3)                               |

## Related APIs

The following Alchemy APIs are also supported on BOB:

* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)

------

# debug_executionWitness

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the execution witness for the given block number.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/debug-execution-witness

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockNumber | string or enum | Yes | The block number or tag. |

## Result

**executionWitness** (object): The execution witness data.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "debug_executionWitness",
  "params": [
    "string"
  ]
}'
```



------

# erigon_getHeaderByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the block header for the given block number.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/erigon-get-header-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockNumber | string or enum | Yes | The block number or tag. |

## Result

**header** (object): The block header object.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "erigon_getHeaderByNumber",
  "params": [
    "string"
  ]
}'
```



------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_baseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the base fee for the next block.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-base-fee

## Result

**Base fee** (string): The hex value of the base fee for the next block.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x34630b8a00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_baseFee"
}'
```



------

# eth_blobBaseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the base fee per blob gas in wei for the current block.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-blob-base-fee

## Result

**Blob Base Fee** (string): The base fee per blob gas, in wei, as a hexadecimal encoded unsigned integer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blobBaseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_callBundle

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Simulates a bundle of signed transactions against a specific block number, including simulating a bundle at the top of the next block. This method allows you to test transaction bundles before submitting them to the network.


Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-call-bundle

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Bundle parameters | object | Yes | The bundle simulation parameters containing the transactions to simulate and the block context for the simulation.  |

## Result

**Bundle simulation result** (object): The result of the bundle simulation containing gas usage, fees, and individual transaction results. 

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_callBundle",
  "params": [
    {
      "txs": [
        "0x123abc...",
        "0x456def..."
      ],
      "blockNumber": "0xb63dcd",
      "stateBlockNumber": "latest",
      "timestamp": 1615920932
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "bundleGasPrice": "476190476193",
    "bundleHash": "0x73b1e258c7a42fd0230b2fd05529c5d4b6fcb66c227783f8bece8aeacdd1db2e",
    "coinbaseDiff": "20000000000126000",
    "ethSentToCoinbase": "20000000000000000",
    "gasFees": "126000",
    "results": [
      {
        "coinbaseDiff": "10000000000063000",
        "ethSentToCoinbase": "10000000000000000",
        "fromAddress": "0x02A727155aeF8609c9f7F2179b2a1f560B39F5A0",
        "gasFees": "63000",
        "gasPrice": "476190476193",
        "gasUsed": 21000,
        "toAddress": "0x73625f59CAdc5009Cb458B751b3E7b6b48C06f2C",
        "txHash": "0x669b4704a7d993a946cdd6e2f95233f308ce0c4649d2e04944e8299efcaa098a",
        "value": "0x"
      },
      {
        "coinbaseDiff": "10000000000063000",
        "ethSentToCoinbase": "10000000000000000",
        "fromAddress": "0x02A727155aeF8609c9f7F2179b2a1f560B39F5A0",
        "gasFees": "63000",
        "gasPrice": "476190476193",
        "gasUsed": 21000,
        "toAddress": "0x73625f59CAdc5009Cb458B751b3E7b6b48C06f2C",
        "txHash": "0xa839ee83465657cac01adc1d50d96c1b586ed498120a84a64749c0034b4f19fa",
        "value": "0x"
      }
    ],
    "stateBlockNumber": 5221585,
    "totalGasUsed": 42000
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_callBundle",
  "params": [
    {
      "txs": [
        "0x123abc...",
        "0x456def..."
      ],
      "blockNumber": "0xb63dcd",
      "stateBlockNumber": "latest",
      "timestamp": 1615920932
    }
  ]
}'
```



------

# eth_callMany

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Executes a list of transaction bundles without creating transactions on the blockchain. This method is particularly useful for simulating transactions to understand their potential outcomes. It supports simulating transactions at an intermediate state of a block, simulating multiple transactions with sequential dependencies, and overwriting block headers.


Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-call-many

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Bundles | object[] | Yes | A list of bundles where each bundle contains transactions and optional block overrides.  |
| Simulation context | object | Yes | The context for the simulation, specifying the blockNumber or Tag and transactionIndex.  |
| State overrides | object | No | An optional mapping for state overrides, following the eth_call standard.  |
| Timeout | integer | No | The maximum running time for the simulations in milliseconds, defaulting to 5000 milliseconds.  |

## Result

**Call results** (object[][]): A list of lists containing either the return value of the executed contract call or the reverted error code. Each bundle returns an array with one result per transaction. 

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "from": "0x1985ea6e9c68e1c272d8209f3b478ac2fdb25c87",
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gas": "0x0f4240",
            "gasPrice": "0x7896e72a",
            "data": "0xa9059cbb000000000000000000000000bc0e63965946815d105e7591407704e6e1964e590000000000000000000000000000000000000000000000000000000005f5e100"
          },
          {
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gasPrice": "0x7896e72a",
            "data": "0x70a08231000000000000000000000000bc0e63965946815d105e7591407704e6e1964e59"
          }
        ],
        "blockOverride": {
          "blockNumber": "0xbb5fe9"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    [
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000000000001"
      },
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000005f5e100"
      }
    ]
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "type": "string",
            "nonce": "string",
            "to": null,
            "from": "string",
            "gas": "string",
            "value": "string",
            "input": "string",
            "gasPrice": "string",
            "maxPriorityFeePerGas": "string",
            "maxFeePerGas": "string",
            "maxFeePerBlobGas": "string",
            "accessList": [
              {
                "address": "string",
                "storageKeys": [
                  "string"
                ]
              }
            ],
            "blobVersionedHashes": [
              "string"
            ],
            "blobs": [
              "string"
            ],
            "chainId": "string"
          }
        ],
        "blockOverride": {
          "blockNumber": "string",
          "blockHash": "string",
          "coinbase": "string",
          "timestamp": "string",
          "difficulty": "string",
          "gasLimit": "string",
          "baseFee": "string"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves account information including balance, code, and nonce for a given address at a specified block.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the account information. |

## Result

**Account information** (object): An object containing the account's balance, code, and nonce.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "balance": "0x1cfe56f3795885980000",
    "code": "0x",
    "nonce": "0x5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_newPendingTransactionFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new pending transactions arrive.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-new-pending-transaction-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newPendingTransactionFilter"
}'
```



------

# eth_protocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current protocol version used by the client.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-protocol-version

## Result

**Protocol Version** (string): The protocol version as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3f",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_protocolVersion"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_sendRawTransactionSync

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Sends a raw transaction to the network and waits for the transaction to be mined.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-send-raw-transaction-sync

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction data | string | Yes | The signed transaction data, RLP-encoded and hex-encoded. |
| Timeout | integer | No | Maximum wait time in milliseconds. Must be a positive integer between 1 and the node-configured maximum timeout. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "transactionHash": "0x1234abcd...",
    "blockHash": "0xabcd1234...",
    "blockNumber": "0x10d4f",
    "cumulativeGasUsed": "0x5208",
    "gasUsed": "0x5208",
    "contractAddress": null,
    "logs": [],
    "status": "0x1"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ]
}'
```



------

# eth_simulateV1

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Enables simulation of complex transactions and state changes without modifying the blockchain.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-simulate-v-1

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Simulation object | object | Yes | The object containing all simulation details such as calls, overrides, etc. |

## Result

**Simulation result** (object[]): The result of the simulation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "baseFeePerGas": "0x9",
      "blobGasUsed": "0x0",
      "calls": [
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000001"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
              "transactionIndex": "0x0",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x0",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        },
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000002"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd",
              "transactionIndex": "0x1",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x1",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        }
      ],
      "difficulty": "0x0",
      "excessBlobGas": "0x3b80000",
      "extraData": "0x",
      "gasLimit": "0x22550dd",
      "gasUsed": "0xa410",
      "hash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "miner": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
      "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "nonce": "0x0000000000000000",
      "number": "0x1530a5e",
      "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "parentHash": "0x513a0aa73024f294cdbcb0312af0c920850035f0552d7349ebb30717de30b1cc",
      "receiptsRoot": "0x75308898d571eafb5cd8cde8278bf5b3d13c5f6ec074926de3bb895b519264e1",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "size": "0x29c",
      "stateRoot": "0x65ea44c8bd5f9edbf269b6446b460b3e7378abb25c78fd5d70f0e2ef59296b25",
      "timestamp": "0x67f43327",
      "transactions": [
        "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
        "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd"
      ],
      "transactionsRoot": "0xd6902f31ae9d2169b77cd88611c6afd691ea5a7e604e44c71f663fda0c5d1c28",
      "uncles": [],
      "withdrawals": [],
      "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    }
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_peerCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of peers currently connected to the client.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/net-peer-count

## Result

**peerCount** (string): The number of connected peers as a hex string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_peerCount"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# txpool_content

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of the exact details of all transactions currently pending for inclusion in the next blocks, as well as ones that are being scheduled for future execution.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/txpool-content

## Result

**content** (object): Object with pending and queued transactions grouped by sender address and nonce.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "txpool_content"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://bob-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/bob/bob-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://bob-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Bob API FAQ

> Frequently asked questions about the Bob API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Bob?
BOB (Build on Bitcoin) is a hybrid OP Stack Layer-2 that runs full-EVM apps while anchoring finality to Bitcoin and enabling trust-minimized BTC bridging for Bitcoin-native DeFi.

## How do I get started with Bob?
Check out our [Bob API Quickstart guide](/docs/reference/bob-api-quickstart) to get started building on Bob.

## What is the Bob API?
The Bob API lets you interface with the Bob mainnet. With this API, you can execute transactions, query onchain data, and interact with the Bob network using the JSON-RPC standard.

## Is Bob EVM compatible?
Yes, Bob is EVM compatible.

## What API does Bob use?
Bob uses the JSON-RPC API standard. This API is essential for any blockchain interaction on the Bob network, allowing you to read block/transaction data, query chain information, execute smart contracts, and store data onchain.

## What methods are supported on Bob?
BOB supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [BOB API Endpoints](/docs/chains#bob-apis) for a complete list.

## What is a Bob API key?
When accessing the Bob network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup).

## Which libraries support Bob?
Common Ethereum libraries like [ethers.js](https://docs.ethers.org/v5/) should be compatible with Bob, given its EVM nature.

## My question isn’t here, where can I get help?
If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Botanix API Quickstart

> How to get started building on Botanix using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Botanix is a Bitcoin-native, EVM-compatible Layer 2 that lets you build and run smart contracts using Bitcoin as the native asset.

The Botanix API lets you interact with the Botanix network through a set of JSON-RPC methods. If you've worked with Ethereum's JSON-RPC APIs, the design will feel familiar.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Botanix client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http, defineChain } from "viem";

const botanix = defineChain({
  id: 3636,
  name: "Botanix",
  nativeCurrency: { name: "Bitcoin", symbol: "BTC", decimals: 18 },
  rpcUrls: {
    default: { http: ["https://botanix-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
  },
});

const client = createPublicClient({
  chain: botanix,
  transport: http("https://botanix-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (BTC):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Botanix APIs

For the full list of Botanix APIs, see the [Botanix API Endpoints](/docs/chains#botanix-apis).

------

# Botanix API Overview

> Overview of available Botanix API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Botanix APIs

📙 Get started with our [Botanix API Quickstart Guide](/docs/reference/botanix-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_blobBaseFee`](/docs/chains/botanix/botanix-api-endpoints/eth-blob-base-fee)               | [`eth_blockNumber`](/docs/chains/botanix/botanix-api-endpoints/eth-block-number)            |
| [`eth_call`](/docs/chains/botanix/botanix-api-endpoints/eth-call)                               | [`eth_chainId`](/docs/chains/botanix/botanix-api-endpoints/eth-chain-id)                    |
| [`eth_createAccessList`](/docs/chains/botanix/botanix-api-endpoints/eth-create-access-list)     | [`eth_estimateGas`](/docs/chains/botanix/botanix-api-endpoints/eth-estimate-gas)            |
| [`eth_feeHistory`](/docs/chains/botanix/botanix-api-endpoints/eth-fee-history)                  | [`eth_gasPrice`](/docs/chains/botanix/botanix-api-endpoints/eth-gas-price)                  |
| [`eth_getAccount`](/docs/chains/botanix/botanix-api-endpoints/eth-get-account)                  | [`eth_getAccountInfo`](/docs/chains/botanix/botanix-api-endpoints/eth-get-account-info)     |
| [`eth_getBalance`](/docs/chains/botanix/botanix-api-endpoints/eth-get-balance)                  | [`eth_getBlockByHash`](/docs/chains/botanix/botanix-api-endpoints/eth-get-block-by-hash)    |
| [`eth_getBlockByNumber`](/docs/chains/botanix/botanix-api-endpoints/eth-get-block-by-number)    | [`eth_getBlockReceipts`](/docs/chains/botanix/botanix-api-endpoints/eth-get-block-receipts) |
| [`eth_getBlockTransactionCountByHash`](/docs/chains/botanix/botanix-api-endpoints/eth-get-block-transaction-count-by-hash) | [`eth_getBlockTransactionCountByNumber`](/docs/chains/botanix/botanix-api-endpoints/eth-get-block-transaction-count-by-number) |
| [`eth_getCode`](/docs/chains/botanix/botanix-api-endpoints/eth-get-code)                        | [`eth_getFilterChanges`](/docs/chains/botanix/botanix-api-endpoints/eth-get-filter-changes) |
| [`eth_getFilterLogs`](/docs/chains/botanix/botanix-api-endpoints/eth-get-filter-logs)           | [`eth_getLogs`](/docs/chains/botanix/botanix-api-endpoints/eth-get-logs)                    |
| [`eth_getProof`](/docs/chains/botanix/botanix-api-endpoints/eth-get-proof)                      | [`eth_getRawTransactionByHash`](/docs/chains/botanix/botanix-api-endpoints/eth-get-raw-transaction-by-hash) |
| [`eth_getStorageAt`](/docs/chains/botanix/botanix-api-endpoints/eth-get-storage-at)             | [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/botanix/botanix-api-endpoints/eth-get-transaction-by-block-hash-and-index) |
| [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/botanix/botanix-api-endpoints/eth-get-transaction-by-block-number-and-index) | [`eth_getTransactionByHash`](/docs/chains/botanix/botanix-api-endpoints/eth-get-transaction-by-hash) |
| [`eth_getTransactionCount`](/docs/chains/botanix/botanix-api-endpoints/eth-get-transaction-count) | [`eth_getTransactionReceipt`](/docs/chains/botanix/botanix-api-endpoints/eth-get-transaction-receipt) |
| [`eth_getUncleCountByBlockHash`](/docs/chains/botanix/botanix-api-endpoints/eth-get-uncle-count-by-block-hash) | [`eth_getUncleCountByBlockNumber`](/docs/chains/botanix/botanix-api-endpoints/eth-get-uncle-count-by-block-number) |
| [`eth_maxPriorityFeePerGas`](/docs/chains/botanix/botanix-api-endpoints/eth-max-priority-fee-per-gas) | [`eth_newBlockFilter`](/docs/chains/botanix/botanix-api-endpoints/eth-new-block-filter)     |
| [`eth_newFilter`](/docs/chains/botanix/botanix-api-endpoints/eth-new-filter)                    | [`eth_protocolVersion`](/docs/chains/botanix/botanix-api-endpoints/eth-protocol-version)    |
| [`eth_sendRawTransaction`](/docs/chains/botanix/botanix-api-endpoints/eth-send-raw-transaction) | [`eth_submitWork`](/docs/chains/botanix/botanix-api-endpoints/eth-submit-work)              |
| [`eth_subscribe`](/docs/chains/botanix/botanix-api-endpoints/eth-subscribe)                     | [`eth_syncing`](/docs/chains/botanix/botanix-api-endpoints/eth-syncing)                     |
| [`eth_uninstallFilter`](/docs/chains/botanix/botanix-api-endpoints/eth-uninstall-filter)        | [`eth_unsubscribe`](/docs/chains/botanix/botanix-api-endpoints/eth-unsubscribe)             |
| [`net_listening`](/docs/chains/botanix/botanix-api-endpoints/net-listening)                     | [`net_version`](/docs/chains/botanix/botanix-api-endpoints/net-version)                     |
| [`txpool_content`](/docs/chains/botanix/botanix-api-endpoints/txpool-content)                   | [`web3_clientVersion`](/docs/chains/botanix/botanix-api-endpoints/web-3-client-version)     |
| [`web3_sha3`](/docs/chains/botanix/botanix-api-endpoints/web-3-sha-3)                           |                                                                                             |

## Related APIs

The following Alchemy APIs are also supported on Botanix:

* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)

------

# eth_blobBaseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns the base fee per blob gas in wei for the current block.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-blob-base-fee

## Result

**Blob Base Fee** (string): The base fee per blob gas, in wei, as a hexadecimal encoded unsigned integer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blobBaseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves account information including balance, code, and nonce for a given address at a specified block.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the account information. |

## Result

**Account information** (object): An object containing the account's balance, code, and nonce.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "balance": "0x1cfe56f3795885980000",
    "code": "0x",
    "nonce": "0x5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_protocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current protocol version used by the client.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-protocol-version

## Result

**Protocol Version** (string): The protocol version as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3f",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_protocolVersion"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# txpool_content

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of the exact details of all transactions currently pending for inclusion in the next blocks, as well as ones that are being scheduled for future execution.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/txpool-content

## Result

**content** (object): Object with pending and queued transactions grouped by sender address and nonce.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "txpool_content"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://botanix-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/botanix/botanix-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://botanix-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Botanix API FAQ

> Frequently asked questions about the Botanix API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Botanix?

Botanix is a Bitcoin-native, EVM-compatible Layer 2 that lets you build and run smart contracts using Bitcoin as the native asset.

## How do I get started with Botanix?

Check out our [Botanix API Quickstart guide](/docs/reference/botanix-api-quickstart) to get started building on Botanix.

## What is the Botanix API?

The Botanix API lets you interface with the Botanix mainnet and testnet nodes. With this API, you can execute transactions, query onchain data, and interact with the Botanix network using the JSON-RPC standard.

## Is Botanix EVM compatible?

Yes, Botanix is EVM compatible.

## What API does Botanix use?

Botanix uses the JSON-RPC API standard. This API is essential for any blockchain interaction on the Botanix network, allowing you to read block/transaction data, query chain information, execute smart contracts, and store data onchain.

## What is a Botanix API key?

When accessing the Botanix network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network.

For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup).

## Which libraries support Botanix?

Common Ethereum libraries like [ethers.js](https://docs.ethers.org/v5/) and [web3.js](https://web3js.readthedocs.io/en/v1.8.2/) should be compatible with Botanix, given its EVM nature.

## What programming languages work with Botanix?

Languages that work with Ethereum, such as JavaScript, Solidity, TypeScript, and Shell, should also be compatible with Botanix. Solidity remains the primary choice for smart contract development, while JavaScript is ideal for offchain interactions.

## What does Botanix use for gas?

The native currency of the Botanix blockchain is Bitcoin (BTC). Unlike other Layer 2s that use ETH or create their own tokens for gas and staking, Botanix is designed so that BTC itself serves as the native asset.

## What methods does Alchemy support for the Botanix API?

You can find the list of all the methods Alchemy supports for the Botanix API on the [Botanix API Endpoints](/docs/chains#botanix-apis) page.

## My question isn't here, where can I get help?

If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Celo Chain API Quickstart

> How to get started building on Celo using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Celo is an EVM-compatible blockchain designed to provide financial tools and services to anyone with a mobile phone. Known for its focus on usability and inclusive finance, Celo offers a robust environment for deploying Ethereum-based applications with an emphasis on mobile-first experiences.

The Celo API lets you interact with the Celo network through a collection of JSON-RPC methods. If you're familiar with Ethereum's JSON-RPC APIs, working with Celo is intuitive and straightforward.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Celo client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { celo } from "viem/chains";

const client = createPublicClient({
  chain: celo,
  transport: http("https://celo-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (CELO):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Celo APIs

For the full list of Celo APIs, see the [Celo API Endpoints](/docs/chains#celo-apis).

------

# Celo API Overview

> Overview of available Celo API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Celo APIs

📙 Get started with our [Celo API Quickstart Guide](/docs/reference/celo-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/celo/celo-api-endpoints/eth-accounts)                             | [`eth_blobBaseFee`](/docs/chains/celo/celo-api-endpoints/eth-blob-base-fee)                 |
| [`eth_blockNumber`](/docs/chains/celo/celo-api-endpoints/eth-block-number)                      | [`eth_call`](/docs/chains/celo/celo-api-endpoints/eth-call)                                 |
| [`eth_callMany`](/docs/chains/celo/celo-api-endpoints/eth-call-many)                            | [`eth_chainId`](/docs/chains/celo/celo-api-endpoints/eth-chain-id)                          |
| [`eth_createAccessList`](/docs/chains/celo/celo-api-endpoints/eth-create-access-list)           | [`eth_estimateGas`](/docs/chains/celo/celo-api-endpoints/eth-estimate-gas)                  |
| [`eth_feeHistory`](/docs/chains/celo/celo-api-endpoints/eth-fee-history)                        | [`eth_fillTransaction`](/docs/chains/celo/celo-api-endpoints/eth-fill-transaction)          |
| [`eth_gasPrice`](/docs/chains/celo/celo-api-endpoints/eth-gas-price)                            | [`eth_getAccount`](/docs/chains/celo/celo-api-endpoints/eth-get-account)                    |
| [`eth_getAccountInfo`](/docs/chains/celo/celo-api-endpoints/eth-get-account-info)               | [`eth_getBalance`](/docs/chains/celo/celo-api-endpoints/eth-get-balance)                    |
| [`eth_getBlockByHash`](/docs/chains/celo/celo-api-endpoints/eth-get-block-by-hash)              | [`eth_getBlockByNumber`](/docs/chains/celo/celo-api-endpoints/eth-get-block-by-number)      |
| [`eth_getBlockReceipts`](/docs/chains/celo/celo-api-endpoints/eth-get-block-receipts)           | [`eth_getBlockTransactionCountByHash`](/docs/chains/celo/celo-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/celo/celo-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/celo/celo-api-endpoints/eth-get-code)                          |
| [`eth_getFilterChanges`](/docs/chains/celo/celo-api-endpoints/eth-get-filter-changes)           | [`eth_getFilterLogs`](/docs/chains/celo/celo-api-endpoints/eth-get-filter-logs)             |
| [`eth_getLogs`](/docs/chains/celo/celo-api-endpoints/eth-get-logs)                              | [`eth_getProof`](/docs/chains/celo/celo-api-endpoints/eth-get-proof)                        |
| [`eth_getRawTransactionByHash`](/docs/chains/celo/celo-api-endpoints/eth-get-raw-transaction-by-hash) | [`eth_getStorageAt`](/docs/chains/celo/celo-api-endpoints/eth-get-storage-at)               |
| [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/celo/celo-api-endpoints/eth-get-transaction-by-block-hash-and-index) | [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/celo/celo-api-endpoints/eth-get-transaction-by-block-number-and-index) |
| [`eth_getTransactionByHash`](/docs/chains/celo/celo-api-endpoints/eth-get-transaction-by-hash)  | [`eth_getTransactionCount`](/docs/chains/celo/celo-api-endpoints/eth-get-transaction-count) |
| [`eth_getTransactionReceipt`](/docs/chains/celo/celo-api-endpoints/eth-get-transaction-receipt) | [`eth_getUncleByBlockHashAndIndex`](/docs/chains/celo/celo-api-endpoints/eth-get-uncle-by-block-hash-and-index) |
| [`eth_getUncleByBlockNumberAndIndex`](/docs/chains/celo/celo-api-endpoints/eth-get-uncle-by-block-number-and-index) | [`eth_getUncleCountByBlockHash`](/docs/chains/celo/celo-api-endpoints/eth-get-uncle-count-by-block-hash) |
| [`eth_getUncleCountByBlockNumber`](/docs/chains/celo/celo-api-endpoints/eth-get-uncle-count-by-block-number) | [`eth_maxPriorityFeePerGas`](/docs/chains/celo/celo-api-endpoints/eth-max-priority-fee-per-gas) |
| [`eth_newBlockFilter`](/docs/chains/celo/celo-api-endpoints/eth-new-block-filter)               | [`eth_newFilter`](/docs/chains/celo/celo-api-endpoints/eth-new-filter)                      |
| [`eth_newPendingTransactionFilter`](/docs/chains/celo/celo-api-endpoints/eth-new-pending-transaction-filter) | [`eth_sendRawTransaction`](/docs/chains/celo/celo-api-endpoints/eth-send-raw-transaction)   |
| [`eth_sendRawTransactionSync`](/docs/chains/celo/celo-api-endpoints/eth-send-raw-transaction-sync) | [`eth_simulateV1`](/docs/chains/celo/celo-api-endpoints/eth-simulate-v-1)                   |
| [`eth_submitWork`](/docs/chains/celo/celo-api-endpoints/eth-submit-work)                        | [`eth_subscribe`](/docs/chains/celo/celo-api-endpoints/eth-subscribe)                       |
| [`eth_syncing`](/docs/chains/celo/celo-api-endpoints/eth-syncing)                               | [`eth_uninstallFilter`](/docs/chains/celo/celo-api-endpoints/eth-uninstall-filter)          |
| [`eth_unsubscribe`](/docs/chains/celo/celo-api-endpoints/eth-unsubscribe)                       | [`net_listening`](/docs/chains/celo/celo-api-endpoints/net-listening)                       |
| [`net_peerCount`](/docs/chains/celo/celo-api-endpoints/net-peer-count)                          | [`net_version`](/docs/chains/celo/celo-api-endpoints/net-version)                           |
| [`txpool_content`](/docs/chains/celo/celo-api-endpoints/txpool-content)                         | [`web3_clientVersion`](/docs/chains/celo/celo-api-endpoints/web-3-client-version)           |
| [`web3_sha3`](/docs/chains/celo/celo-api-endpoints/web-3-sha-3)                                 |                                                                                             |

## Related APIs

The following Alchemy APIs are also supported on Celo:

* [Bundler API](/docs/wallets/transactions/low-level-infra/bundler/overview)
* [Gas Manager API](/docs/wallets/api-reference/gas-manager-admin-api/gas-abstraction-api-endpoints/alchemy-request-gas-and-paymaster-and-data)
* [Token API](/docs/reference/token-api-overview)
* [Transfers API](/docs/reference/transfers-api-quickstart)
* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)
* [NFT API](/docs/reference/nft-api-overview)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blobBaseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns the base fee per blob gas in wei for the current block.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-blob-base-fee

## Result

**Blob Base Fee** (string): The base fee per blob gas, in wei, as a hexadecimal encoded unsigned integer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blobBaseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_callMany

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Executes a list of transaction bundles without creating transactions on the blockchain. This method is particularly useful for simulating transactions to understand their potential outcomes. It supports simulating transactions at an intermediate state of a block, simulating multiple transactions with sequential dependencies, and overwriting block headers.


Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-call-many

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Bundles | object[] | Yes | A list of bundles where each bundle contains transactions and optional block overrides.  |
| Simulation context | object | Yes | The context for the simulation, specifying the blockNumber or Tag and transactionIndex.  |
| State overrides | object | No | An optional mapping for state overrides, following the eth_call standard.  |
| Timeout | integer | No | The maximum running time for the simulations in milliseconds, defaulting to 5000 milliseconds.  |

## Result

**Call results** (object[][]): A list of lists containing either the return value of the executed contract call or the reverted error code. Each bundle returns an array with one result per transaction. 

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "from": "0x1985ea6e9c68e1c272d8209f3b478ac2fdb25c87",
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gas": "0x0f4240",
            "gasPrice": "0x7896e72a",
            "data": "0xa9059cbb000000000000000000000000bc0e63965946815d105e7591407704e6e1964e590000000000000000000000000000000000000000000000000000000005f5e100"
          },
          {
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gasPrice": "0x7896e72a",
            "data": "0x70a08231000000000000000000000000bc0e63965946815d105e7591407704e6e1964e59"
          }
        ],
        "blockOverride": {
          "blockNumber": "0xbb5fe9"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    [
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000000000001"
      },
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000005f5e100"
      }
    ]
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "type": "string",
            "nonce": "string",
            "to": null,
            "from": "string",
            "gas": "string",
            "value": "string",
            "input": "string",
            "gasPrice": "string",
            "maxPriorityFeePerGas": "string",
            "maxFeePerGas": "string",
            "maxFeePerBlobGas": "string",
            "accessList": [
              {
                "address": "string",
                "storageKeys": [
                  "string"
                ]
              }
            ],
            "blobVersionedHashes": [
              "string"
            ],
            "blobs": [
              "string"
            ],
            "chainId": "string"
          }
        ],
        "blockOverride": {
          "blockNumber": "string",
          "blockHash": "string",
          "coinbase": "string",
          "timestamp": "string",
          "difficulty": "string",
          "gasLimit": "string",
          "baseFee": "string"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-sepolia.g.alchemy.com/v2/{apiKey}

Retrieves account information including balance, code, and nonce for a given address at a specified block.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the account information. |

## Result

**Account information** (object): An object containing the account's balance, code, and nonce.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "balance": "0x1cfe56f3795885980000",
    "code": "0x",
    "nonce": "0x5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-sepolia.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-sepolia.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-sepolia.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-sepolia.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-sepolia.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_newPendingTransactionFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-sepolia.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new pending transactions arrive.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-new-pending-transaction-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-sepolia.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newPendingTransactionFilter"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_sendRawTransactionSync

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Sends a raw transaction to the network and waits for the transaction to be mined.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-send-raw-transaction-sync

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction data | string | Yes | The signed transaction data, RLP-encoded and hex-encoded. |
| Timeout | integer | No | Maximum wait time in milliseconds. Must be a positive integer between 1 and the node-configured maximum timeout. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "transactionHash": "0x1234abcd...",
    "blockHash": "0xabcd1234...",
    "blockNumber": "0x10d4f",
    "cumulativeGasUsed": "0x5208",
    "gasUsed": "0x5208",
    "contractAddress": null,
    "logs": [],
    "status": "0x1"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ]
}'
```



------

# eth_simulateV1

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Enables simulation of complex transactions and state changes without modifying the blockchain.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-simulate-v-1

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Simulation object | object | Yes | The object containing all simulation details such as calls, overrides, etc. |

## Result

**Simulation result** (object[]): The result of the simulation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "baseFeePerGas": "0x9",
      "blobGasUsed": "0x0",
      "calls": [
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000001"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
              "transactionIndex": "0x0",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x0",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        },
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000002"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd",
              "transactionIndex": "0x1",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x1",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        }
      ],
      "difficulty": "0x0",
      "excessBlobGas": "0x3b80000",
      "extraData": "0x",
      "gasLimit": "0x22550dd",
      "gasUsed": "0xa410",
      "hash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "miner": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
      "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "nonce": "0x0000000000000000",
      "number": "0x1530a5e",
      "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "parentHash": "0x513a0aa73024f294cdbcb0312af0c920850035f0552d7349ebb30717de30b1cc",
      "receiptsRoot": "0x75308898d571eafb5cd8cde8278bf5b3d13c5f6ec074926de3bb895b519264e1",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "size": "0x29c",
      "stateRoot": "0x65ea44c8bd5f9edbf269b6446b460b3e7378abb25c78fd5d70f0e2ef59296b25",
      "timestamp": "0x67f43327",
      "transactions": [
        "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
        "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd"
      ],
      "transactionsRoot": "0xd6902f31ae9d2169b77cd88611c6afd691ea5a7e604e44c71f663fda0c5d1c28",
      "uncles": [],
      "withdrawals": [],
      "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    }
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_peerCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of peers currently connected to the client.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/net-peer-count

## Result

**peerCount** (string): The number of connected peers as a hex string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_peerCount"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# txpool_content

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of the exact details of all transactions currently pending for inclusion in the next blocks, as well as ones that are being scheduled for future execution.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/txpool-content

## Result

**content** (object): Object with pending and queued transactions grouped by sender address and nonce.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "txpool_content"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://celo-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/celo/celo-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://celo-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Celo Chain API FAQ

> Frequently asked questions about the Celo Chain API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Celo Chain?

Celo Chain is a mobile-first blockchain platform designed to provide accessible financial services to anyone with a mobile phone. It focuses on enabling fast, low-cost transactions and aims to create a decentralized financial system that benefits users and developers alike.

## What is the Celo Chain API?

The Celo Chain API lets you interact with the Celo Chain network through a collection of JSON-RPC methods. It provides tools, including the Celo Sepolia testnet, to interact with the blockchain, enabling transactions, smart contract deployment, and data retrieval.

## How can I get started using the Celo Chain API?

Explained in [Celo Chain API Quickstart](/docs/reference/celo-chain-api-quickstart).

## Is Celo Chain EVM compatible?

Yes, Celo Chain is fully compatible with the Ethereum Virtual Machine (EVM). This compatibility lets you port your Ethereum projects to Celo Chain with minimal changes, benefiting from the chain's mobile-first approach and low transaction fees.

## What API does Celo Chain use?

Celo Chain uses the JSON-RPC API standard for blockchain interactions. This is the same standard used by Ethereum.

## What is a Celo Chain API key?

When accessing the Celo Chain network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network.

For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup).

## What testnet should I use for Celo?
Use the Celo Sepolia testnet for Celo. This testnet provides an environment to deploy and test applications. You can obtain tokens from the [Celo Sepolia Faucet](https://faucet.celo.org/celo-sepolia).

## Which libraries support Celo Chain?

Given Celo Chain's EVM compatibility, popular Ethereum libraries like ethers.js and web3.js are fully compatible with Celo Chain. You can develop and integrate seamlessly if you're familiar with Ethereum's development ecosystem.

## What programming languages work with Celo Chain?

Similar to Ethereum, Celo Chain supports a range of programming languages for blockchain interaction and smart contract development, including Solidity for smart contracts, as well as JavaScript and TypeScript for dApp development and offchain interactions.

## What does Celo Chain use for gas?

Celo Chain uses CELO, its native cryptocurrency, for transaction fees, gas, and other network activities.

## What methods does Alchemy support for the Celo Chain API?

You can find the list of all the methods Alchemy supports for the Celo Chain API on the [Celo API Endpoints](/docs/chains#celo-apis) page.

## My question isn't here, where can I get help?

If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Citrea API Quickstart

> How to get started building on Citrea using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Citrea is a Bitcoin L2 zk-rollup with a Type-2 zkEVM that keeps data availability and settlement on Bitcoin—via its BitVM-based "Clementine" two-way peg—bringing full EVM compatibility to BTC.

The Citrea API lets you interact with the Citrea network through a set of JSON-RPC methods. If you've worked with Ethereum's JSON-RPC APIs, the design will feel familiar.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Citrea client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http, defineChain } from "viem";

const citrea = defineChain({
  id: 5115,
  name: "Citrea",
  nativeCurrency: { name: "cBTC", symbol: "cBTC", decimals: 18 },
  rpcUrls: {
    default: { http: ["https://citrea-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
  },
});

const client = createPublicClient({
  chain: citrea,
  transport: http("https://citrea-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (cBTC):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Citrea APIs

For the full list of Citrea APIs, see the [Citrea API Endpoints](/docs/chains#citrea-apis).

------

# Citrea API Overview

> Overview of available Citrea API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Citrea APIs

📙 Get started with our [Citrea API Quickstart Guide](/docs/reference/citrea-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`citrea_getL2StatusHeightsByL1Height`](/docs/chains/citrea/citrea-api-endpoints/citrea-get-l-2-status-heights-by-l-1-height) | [`citrea_getLastCommittedL2Height`](/docs/chains/citrea/citrea-api-endpoints/citrea-get-last-committed-l-2-height) |
| [`citrea_getLastProvenL2Height`](/docs/chains/citrea/citrea-api-endpoints/citrea-get-last-proven-l-2-height) | [`citrea_sendRawDepositTransaction`](/docs/chains/citrea/citrea-api-endpoints/citrea-send-raw-deposit-transaction) |
| [`citrea_syncStatus`](/docs/chains/citrea/citrea-api-endpoints/citrea-sync-status)              | [`eth_blockNumber`](/docs/chains/citrea/citrea-api-endpoints/eth-block-number)              |
| [`eth_call`](/docs/chains/citrea/citrea-api-endpoints/eth-call)                                 | [`eth_chainId`](/docs/chains/citrea/citrea-api-endpoints/eth-chain-id)                      |
| [`eth_createAccessList`](/docs/chains/citrea/citrea-api-endpoints/eth-create-access-list)       | [`eth_estimateDiffSize`](/docs/chains/citrea/citrea-api-endpoints/eth-estimate-diff-size)   |
| [`eth_estimateGas`](/docs/chains/citrea/citrea-api-endpoints/eth-estimate-gas)                  | [`eth_feeHistory`](/docs/chains/citrea/citrea-api-endpoints/eth-fee-history)                |
| [`eth_fillTransaction`](/docs/chains/citrea/citrea-api-endpoints/eth-fill-transaction)          | [`eth_gasPrice`](/docs/chains/citrea/citrea-api-endpoints/eth-gas-price)                    |
| [`eth_getAccount`](/docs/chains/citrea/citrea-api-endpoints/eth-get-account)                    | [`eth_getBalance`](/docs/chains/citrea/citrea-api-endpoints/eth-get-balance)                |
| [`eth_getBlockByHash`](/docs/chains/citrea/citrea-api-endpoints/eth-get-block-by-hash)          | [`eth_getBlockByNumber`](/docs/chains/citrea/citrea-api-endpoints/eth-get-block-by-number)  |
| [`eth_getBlockReceipts`](/docs/chains/citrea/citrea-api-endpoints/eth-get-block-receipts)       | [`eth_getBlockTransactionCountByHash`](/docs/chains/citrea/citrea-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/citrea/citrea-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/citrea/citrea-api-endpoints/eth-get-code)                      |
| [`eth_getFilterChanges`](/docs/chains/citrea/citrea-api-endpoints/eth-get-filter-changes)       | [`eth_getFilterLogs`](/docs/chains/citrea/citrea-api-endpoints/eth-get-filter-logs)         |
| [`eth_getLogs`](/docs/chains/citrea/citrea-api-endpoints/eth-get-logs)                          | [`eth_getProof`](/docs/chains/citrea/citrea-api-endpoints/eth-get-proof)                    |
| [`eth_getRawTransactionByHash`](/docs/chains/citrea/citrea-api-endpoints/eth-get-raw-transaction-by-hash) | [`eth_getStorageAt`](/docs/chains/citrea/citrea-api-endpoints/eth-get-storage-at)           |
| [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/citrea/citrea-api-endpoints/eth-get-transaction-by-block-hash-and-index) | [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/citrea/citrea-api-endpoints/eth-get-transaction-by-block-number-and-index) |
| [`eth_getTransactionByHash`](/docs/chains/citrea/citrea-api-endpoints/eth-get-transaction-by-hash) | [`eth_getTransactionCount`](/docs/chains/citrea/citrea-api-endpoints/eth-get-transaction-count) |
| [`eth_getTransactionReceipt`](/docs/chains/citrea/citrea-api-endpoints/eth-get-transaction-receipt) | [`eth_getUncleByBlockHashAndIndex`](/docs/chains/citrea/citrea-api-endpoints/eth-get-uncle-by-block-hash-and-index) |
| [`eth_maxPriorityFeePerGas`](/docs/chains/citrea/citrea-api-endpoints/eth-max-priority-fee-per-gas) | [`eth_newBlockFilter`](/docs/chains/citrea/citrea-api-endpoints/eth-new-block-filter)       |
| [`eth_newFilter`](/docs/chains/citrea/citrea-api-endpoints/eth-new-filter)                      | [`eth_sendRawTransaction`](/docs/chains/citrea/citrea-api-endpoints/eth-send-raw-transaction) |
| [`eth_submitWork`](/docs/chains/citrea/citrea-api-endpoints/eth-submit-work)                    | [`eth_subscribe`](/docs/chains/citrea/citrea-api-endpoints/eth-subscribe)                   |
| [`eth_syncing`](/docs/chains/citrea/citrea-api-endpoints/eth-syncing)                           | [`eth_uninstallFilter`](/docs/chains/citrea/citrea-api-endpoints/eth-uninstall-filter)      |
| [`eth_unsubscribe`](/docs/chains/citrea/citrea-api-endpoints/eth-unsubscribe)                   | [`ledger_getHeadL2Block`](/docs/chains/citrea/citrea-api-endpoints/ledger-get-head-l-2-block) |
| [`ledger_getHeadL2BlockHeight`](/docs/chains/citrea/citrea-api-endpoints/ledger-get-head-l-2-block-height) | [`ledger_getL2BlockByHash`](/docs/chains/citrea/citrea-api-endpoints/ledger-get-l-2-block-by-hash) |
| [`ledger_getL2BlockByNumber`](/docs/chains/citrea/citrea-api-endpoints/ledger-get-l-2-block-by-number) | [`ledger_getL2BlockRange`](/docs/chains/citrea/citrea-api-endpoints/ledger-get-l-2-block-range) |
| [`ledger_getL2GenesisStateRoot`](/docs/chains/citrea/citrea-api-endpoints/ledger-get-l-2-genesis-state-root) | [`ledger_getLastScannedL1Height`](/docs/chains/citrea/citrea-api-endpoints/ledger-get-last-scanned-l-1-height) |
| [`ledger_getLastVerifiedBatchProof`](/docs/chains/citrea/citrea-api-endpoints/ledger-get-last-verified-batch-proof) | [`ledger_getSequencerCommitmentByIndex`](/docs/chains/citrea/citrea-api-endpoints/ledger-get-sequencer-commitment-by-index) |
| [`ledger_getSequencerCommitmentsOnSlotByHash`](/docs/chains/citrea/citrea-api-endpoints/ledger-get-sequencer-commitments-on-slot-by-hash) | [`ledger_getSequencerCommitmentsOnSlotByNumber`](/docs/chains/citrea/citrea-api-endpoints/ledger-get-sequencer-commitments-on-slot-by-number) |
| [`ledger_getVerifiedBatchProofsBySlotHeight`](/docs/chains/citrea/citrea-api-endpoints/ledger-get-verified-batch-proofs-by-slot-height) | [`net_listening`](/docs/chains/citrea/citrea-api-endpoints/net-listening)                   |
| [`net_version`](/docs/chains/citrea/citrea-api-endpoints/net-version)                           | [`web3_clientVersion`](/docs/chains/citrea/citrea-api-endpoints/web-3-client-version)       |
| [`web3_sha3`](/docs/chains/citrea/citrea-api-endpoints/web-3-sha-3)                             |                                                                                             |

## Related APIs

The following Alchemy APIs are also supported on Citrea:

* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)

------

# citrea_getL2StatusHeightsByL1Height

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns committed and proven L2 heights as of a given Bitcoin block.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/citrea-get-l-2-status-heights-by-l-1-height

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| l1_height | integer | Yes | Bitcoin block height to query. |

## Result

**L2 status heights** (object): Committed and proven L2 heights as of the specified L1 block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "citrea_getL2StatusHeightsByL1Height",
  "params": [
    800000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "committed": {
      "height": 12489007,
      "commitment_index": 3444
    },
    "proven": {
      "height": 11457999,
      "commitment_index": 2401
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "citrea_getL2StatusHeightsByL1Height",
  "params": [
    800000
  ]
}'
```



------

# citrea_getLastCommittedL2Height

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the latest L2 block height that has been committed to Bitcoin via sequencer commitment.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/citrea-get-last-committed-l-2-height

## Result

**Last committed L2 height** (object): Latest committed L2 height and its sequencer commitment index.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "height": 12489007,
    "commitment_index": 3444
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "citrea_getLastCommittedL2Height"
}'
```



------

# citrea_getLastProvenL2Height

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the latest L2 block height that has been proven on Bitcoin with a validity proof.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/citrea-get-last-proven-l-2-height

## Result

**Last proven L2 height** (object): Latest proven L2 height and its sequencer commitment index.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "height": 11457999,
    "commitment_index": 2401
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "citrea_getLastProvenL2Height"
}'
```



------

# citrea_sendRawDepositTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw deposit transaction to the Citrea sequencer. The node first simulates the
deposit; if valid, it is queued for inclusion.


Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/citrea-send-raw-deposit-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| deposit | string | Yes | Raw serialized deposit tx data (hex). |

## Result

**Submission result** (null): Success returns null.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "citrea_sendRawDepositTransaction",
  "params": [
    "0x01020304..."
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": null,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "citrea_sendRawDepositTransaction",
  "params": [
    "0x01020304..."
  ]
}'
```



------

# citrea_syncStatus

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current synchronization status of the local Citrea node for both L1 (Bitcoin) and L2 (Citrea).
The response reports either `{ Synced: <blockHeight> }` or `{ Syncing: { headBlockNumber, syncedBlockNumber } }`
for each layer.


Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/citrea-sync-status

## Result

**Synchronization status** (object): L1 and L2 synchronization status of the node.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "l1Status": {
      "Synced": 19224
    },
    "l2Status": {
      "Synced": 2326433
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "citrea_syncStatus"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-testnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateDiffSize

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns estimated diff size and gas consumption for a potential transaction.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-estimate-diff-size

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | Transaction object to simulate (same shape as `eth_estimateGas`). |
| Block | string or enum | No | Block number or tag at which to estimate (defaults to 'latest' if omitted). |

## Result

**Estimation** (object): Estimated gas usage and L1 diff size.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateDiffSize",
  "params": [
    {
      "from": "0x0452663bfc46B86aC93d8220D9847cF5220D7642",
      "to": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
      "value": "10000"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "gas": "0x5208",
    "l1DiffSize": "0x11"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateDiffSize",
  "params": [
    {
      "from": "0x0452663bfc46B86aC93d8220D9847cF5220D7642",
      "to": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
      "value": "10000"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-testnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# ledger_getHeadL2Block

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the latest (head) L2 block.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/ledger-get-head-l-2-block

## Result

**L2 block** (object): Latest L2 block (same structure as ledger_getL2BlockByNumber).

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "header": {
      "height": "0xf438d",
      "hash": "999528b4d08dc8d0b05cbace0f5e661f36d824cedde1ffa75dc0c197b355c111",
      "prev_hash": "3dd4a535bc994f8f8d7d1f814be99f73dc522aa314905ca9985e479b350f17e7",
      "state_root": "c55d26ed7c1733d6be6283f68ab87db37271bf476008eba5231f5d321e0efe2c",
      "signature": "69f712ea23731ce8432867526084e260d1aeef9290f4c26889361e3bb5e168724bfe328986a56752778a2a93c360b9c291614ce4e15d4b1c2fac7bf31c7068e9",
      "l1_fee_rate": "0x9502f900",
      "timestamp": "0x67089f9c",
      "tx_merkle_root": "13148bcd464a1ef2824f13372513eda01d2f83d498790bf558060dc0bf4cbcbb"
    },
    "txs": [
      "00400000004f3f...0000"
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "ledger_getHeadL2Block"
}'
```



------

# ledger_getHeadL2BlockHeight

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the block number of the latest L2 block.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/ledger-get-head-l-2-block-height

## Result

**Latest L2 block height** (string): Latest L2 block height in hex format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xbed0d6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "ledger_getHeadL2BlockHeight"
}'
```



------

# ledger_getL2BlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns a complete L2 block by its block hash.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/ledger-get-l-2-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hash | string | Yes | 32-byte L2 block hash (hex, without 0x). |

## Result

**L2 block** (object): Full L2 block object (header and transactions).

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "ledger_getL2BlockByHash",
  "params": [
    "999528b4d08dc8d0b05cbace0f5e661f36d824cedde1ffa75dc0c197b355c111"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "header": {
      "height": "0xf438d",
      "hash": "999528b4d08dc8d0b05cbace0f5e661f36d824cedde1ffa75dc0c197b355c111",
      "prev_hash": "3dd4a535bc994f8f8d7d1f814be99f73dc522aa314905ca9985e479b350f17e7",
      "state_root": "c55d26ed7c1733d6be6283f68ab87db37271bf476008eba5231f5d321e0efe2c",
      "signature": "69f712ea23731ce8432867526084e260d1aeef9290f4c26889361e3bb5e168724bfe328986a56752778a2a93c360b9c291614ce4e15d4b1c2fac7bf31c7068e9",
      "l1_fee_rate": "0x9502f900",
      "timestamp": "0x67089f9c",
      "tx_merkle_root": "13148bcd464a1ef2824f13372513eda01d2f83d498790bf558060dc0bf4cbcbb"
    },
    "txs": [
      "00400000004f3fe920c0195eab45c67026fde19b23853c34e709c18e625e43702ca325f13f7a924be8beed58eb6afdaa596392fa7b40ccff1ead3a33e4db7617034366c2600201edff3b3ee593dbef54e2fbdd421070db55e2de2aebe75f398bd85ac97ed364ba0000000101000000b100000002f8ae8213fb6e018401312d0183021953945da3155a299558bcaa8da073ad74ed0827fb64a380b844a9059cbb000000000000000000000000ae45cbe2d1e90358cbd216bc16f2c9267a4ea80a00000000000000000000000000000000000000000000003b16c9e8eeb7c80000c080a04d09d171896b18b3651da059780fd92748b9813f1a6a11f26550cd759862fb99a03cb268a677ffdb6eb2e563e5ffda0fb32df547828ecf67affb03c087772daadc00000000000000009994040000000000"
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "ledger_getL2BlockByHash",
  "params": [
    "999528b4d08dc8d0b05cbace0f5e661f36d824cedde1ffa75dc0c197b355c111"
  ]
}'
```



------

# ledger_getL2BlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns a complete L2 block by its block number.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/ledger-get-l-2-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| number | integer | Yes | L2 block height to fetch. |

## Result

**L2 block** (object): Full L2 block object (header and transactions).

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "ledger_getL2BlockByNumber",
  "params": [
    1000333
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "header": {
      "height": "0xf438d",
      "hash": "999528b4d08dc8d0b05cbace0f5e661f36d824cedde1ffa75dc0c197b355c111",
      "prev_hash": "3dd4a535bc994f8f8d7d1f814be99f73dc522aa314905ca9985e479b350f17e7",
      "state_root": "c55d26ed7c1733d6be6283f68ab87db37271bf476008eba5231f5d321e0efe2c",
      "signature": "69f712ea23731ce8432867526084e260d1aeef9290f4c26889361e3bb5e168724bfe328986a56752778a2a93c360b9c291614ce4e15d4b1c2fac7bf31c7068e9",
      "l1_fee_rate": "0x9502f900",
      "timestamp": "0x67089f9c",
      "tx_merkle_root": "13148bcd464a1ef2824f13372513eda01d2f83d498790bf558060dc0bf4cbcbb"
    },
    "txs": [
      "00400000004f3fe920c0195eab45c67026fde19b23853c34e709c18e625e43702ca325f13f7a924be8beed58eb6afdaa596392fa7b40ccff1ead3a33e4db7617034366c2600201edff3b3ee593dbef54e2fbdd421070db55e2de2aebe75f398bd85ac97ed364ba0000000101000000b100000002f8ae8213fb6e018401312d0183021953945da3155a299558bcaa8da073ad74ed0827fb64a380b844a9059cbb000000000000000000000000ae45cbe2d1e90358cbd216bc16f2c9267a4ea80a00000000000000000000000000000000000000000000003b16c9e8eeb7c80000c080a04d09d171896b18b3651da059780fd92748b9813f1a6a11f26550cd759862fb99a03cb268a677ffdb6eb2e563e5ffda0fb32df547828ecf67affb03c087772daadc00000000000000009994040000000000"
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "ledger_getL2BlockByNumber",
  "params": [
    1000333
  ]
}'
```



------

# ledger_getL2BlockRange

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns all L2 blocks in the inclusive range [start, end].

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/ledger-get-l-2-block-range

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| start | integer | Yes | First block number in range. |
| end | integer | Yes | Last block number in range. |

## Result

**L2 blocks** (object[]): Array of full L2 blocks (same structure as ledger_getL2BlockByNumber).

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "ledger_getL2BlockRange",
  "params": [
    1000333,
    1000335
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "header": {
        "height": "0xf438d",
        "hash": "999528b4d08dc8d0b05cbace0f5e661f36d824cedde1ffa75dc0c197b355c111",
        "prev_hash": "3dd4a535bc994f8f8d7d1f814be99f73dc522aa314905ca9985e479b350f17e7",
        "state_root": "c55d26ed7c1733d6be6283f68ab87db37271bf476008eba5231f5d321e0efe2c",
        "signature": "69f712ea23731ce8432867526084e260d1aeef9290f4c26889361e3bb5e168724bfe328986a56752778a2a93c360b9c291614ce4e15d4b1c2fac7bf31c7068e9",
        "l1_fee_rate": "0x9502f900",
        "timestamp": "0x67089f9c",
        "tx_merkle_root": "13148bcd464a1ef2824f13372513eda01d2f83d498790bf558060dc0bf4cbcbb"
      },
      "txs": [
        "00400000004f3f...0000"
      ]
    },
    {
      "header": {
        "height": "0xf438e",
        "hash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "prev_hash": "999528b4d08dc8d0b05cbace0f5e661f36d824cedde1ffa75dc0c197b355c111",
        "state_root": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
        "signature": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
        "l1_fee_rate": "0x9502f900",
        "timestamp": "0x67089f9d",
        "tx_merkle_root": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
      },
      "txs": []
    },
    {
      "header": {
        "height": "0xf438f",
        "hash": "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
        "prev_hash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "state_root": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
        "signature": "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",
        "l1_fee_rate": "0x9502f900",
        "timestamp": "0x67089f9e",
        "tx_merkle_root": "2222222222222222222222222222222222222222222222222222222222222222"
      },
      "txs": []
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "ledger_getL2BlockRange",
  "params": [
    1000333,
    1000335
  ]
}'
```



------

# ledger_getL2GenesisStateRoot

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the 32-byte genesis state root for L2.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/ledger-get-l-2-genesis-state-root

## Result

**L2 genesis state root** (string): 32-byte genesis state root (hex).

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x785c6d461111b5e9fdc515e0955d55baddfd8eb2dd2769342cc58060d6f5e0c5",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "ledger_getL2GenesisStateRoot"
}'
```



------

# ledger_getLastScannedL1Height

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the highest L1 block number the node has scanned so far.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/ledger-get-last-scanned-l-1-height

## Result

**Last scanned L1 block height** (string): Last scanned L1 block height (hex quantity).

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x15e53",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "ledger_getLastScannedL1Height"
}'
```



------

# ledger_getLastVerifiedBatchProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the most recent verified batch proof.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/ledger-get-last-verified-batch-proof

## Result

**Verified batch proof** (object): Latest verified batch proof (same structure as an item from ledger_getVerifiedBatchProofsBySlotHeight).

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "proof": "0x0300000000000000000000000000000081670c116a84c0351f18c3...",
    "proofOutput": {
      "stateRoots": [
        "0x5e2a5b8da99b65c5eba4b36f2368321dad95c08c641d698b09ca6756caac589e",
        "0x182a9543bf64a90e78f7d810dedebdf4da3322752db5ee5533fae564e31033f7"
      ],
      "finalL2BlockHash": "0x8fe769cdb2d34f60b5a625caa8697ae1d1f213b558c9dc9e681059f18732e608",
      "stateDiff": {
        "0x412f612f0201edff3b3ee593dbef54e2fbdd421070db55e2de2aebe75f398bd85ac97ed364": "0xf4fd64e249e658fdb748f83190e47f0b1cd5e87fe30d005c257d7a94cca458e7167e690000000000"
      },
      "lastL2Height": "0xae0e97",
      "sequencerCommitmentIndexRange": [
        "0x92c",
        "0x92e"
      ],
      "sequencerCommitmentHashes": [
        "0x8a9cd0b9fda255370073abff4176416665d14552d5f0d671998ca89523041b36"
      ],
      "lastL1HashOnBitcoinLightClientContract": "0xa1717b35aa14be01ce037d1a346c4c1714afcfa5e8a66a35af5ead0000000000",
      "previousCommitmentIndex": "0x92b",
      "previousCommitmentHash": "0xa37a45539d40448d22f6da7978ca58f5845b72a5043129941817099471198749"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "ledger_getLastVerifiedBatchProof"
}'
```



------

# ledger_getSequencerCommitmentByIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns a sequencer commitment by its global index.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/ledger-get-sequencer-commitment-by-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| index | string | Yes | Commitment index (hex quantity). |

## Result

**Sequencer commitment** (object): Commitment identified by the supplied index.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "ledger_getSequencerCommitmentByIndex",
  "params": [
    "0xba5"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "merkleRoot": "0xd6dc3eb1a59be7bc1ece68318f82a60919f0f98d8c648337d588ce243a17f473",
    "index": "0xba5",
    "l2EndBlockNumber": "0xb7a20b"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "ledger_getSequencerCommitmentByIndex",
  "params": [
    "0xba5"
  ]
}'
```



------

# ledger_getSequencerCommitmentsOnSlotByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns sequencer commitment(s) found in the DA slot identified by its L1 block hash.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/ledger-get-sequencer-commitments-on-slot-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hash | string | Yes | 32-byte DA slot hash (hex, without 0x). |

## Result

**Sequencer commitments** (object[]): Array of commitments found at the DA slot hash.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "ledger_getSequencerCommitmentsOnSlotByHash",
  "params": [
    "788636f732f490c5072582c7dcde85e34d737c8a4d98e792a59c9d0100000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "merkleRoot": "0xd6dc3eb1a59be7bc1ece68318f82a60919f0f98d8c648337d588ce243a17f473",
      "index": "0xba5",
      "l2EndBlockNumber": "0xb7a20b"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "ledger_getSequencerCommitmentsOnSlotByHash",
  "params": [
    "788636f732f490c5072582c7dcde85e34d737c8a4d98e792a59c9d0100000000"
  ]
}'
```



------

# ledger_getSequencerCommitmentsOnSlotByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns sequencer commitment(s) found in the specified DA slot height.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/ledger-get-sequencer-commitments-on-slot-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| height | integer | Yes | L1 DA slot height. |

## Result

**Sequencer commitments** (null or object[]): Array of commitments found at the DA slot height (or null if none).

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "ledger_getSequencerCommitmentsOnSlotByNumber",
  "params": [
    88001
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "merkleRoot": "0xd6dc3eb1a59be7bc1ece68318f82a60919f0f98d8c648337d588ce243a17f473",
      "index": "0xba5",
      "l2EndBlockNumber": "0xb7a20b"
    },
    {
      "merkleRoot": "0xf85a8f3f872fe8079fe778a2f6a8ebd92cf3d1a7c6324af025c8bffbb46d1811",
      "index": "0xba6",
      "l2EndBlockNumber": "0xb7a5f3"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "ledger_getSequencerCommitmentsOnSlotByNumber",
  "params": [
    88001
  ]
}'
```



------

# ledger_getVerifiedBatchProofsBySlotHeight

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns verified ZK batch proof(s) for the specified DA slot height.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/ledger-get-verified-batch-proofs-by-slot-height

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| height | integer | Yes | DA slot height (L1). |

## Result

**Verified batch proofs** (object[]): Array of verified batch proofs for the given slot height.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "ledger_getVerifiedBatchProofsBySlotHeight",
  "params": [
    85890
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "proof": "0x0300000000000000000000000000000081670c116a84c0351f18c3...",
      "proofOutput": {
        "stateRoots": [
          "0x5e2a5b8da99b65c5eba4b36f2368321dad95c08c641d698b09ca6756caac589e",
          "0x182a9543bf64a90e78f7d810dedebdf4da3322752db5ee5533fae564e31033f7"
        ],
        "finalL2BlockHash": "0x8fe769cdb2d34f60b5a625caa8697ae1d1f213b558c9dc9e681059f18732e608",
        "stateDiff": {
          "0x412f612f0201edff3b3ee593dbef54e2fbdd421070db55e2de2aebe75f398bd85ac97ed364": "0xf4fd64e249e658fdb748f83190e47f0b1cd5e87fe30d005c257d7a94cca458e7167e690000000000"
        },
        "lastL2Height": "0xae0e97",
        "sequencerCommitmentIndexRange": [
          "0x92c",
          "0x92e"
        ],
        "sequencerCommitmentHashes": [
          "0x8a9cd0b9fda255370073abff4176416665d14552d5f0d671998ca89523041b36"
        ],
        "lastL1HashOnBitcoinLightClientContract": "0xa1717b35aa14be01ce037d1a346c4c1714afcfa5e8a66a35af5ead0000000000",
        "previousCommitmentIndex": "0x92b",
        "previousCommitmentHash": "0xa37a45539d40448d22f6da7978ca58f5845b72a5043129941817099471198749"
      }
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "ledger_getVerifiedBatchProofsBySlotHeight",
  "params": [
    85890
  ]
}'
```



------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://citrea-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/citrea/citrea-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://citrea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Citrea API FAQ

> Frequently asked questions about the Citrea API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Citrea?
Citrea is a Bitcoin L2 zk-rollup with a Type-2 zkEVM that keeps data availability and settlement on Bitcoin—via its BitVM-based “Clementine” two-way peg—bringing full EVM compatibility to BTC.

## How do I get started with Citrea?
Check out our [Citrea API Quickstart guide](/docs/reference/citrea-api-quickstart) to get started building on Citrea.

## What is the Citrea API?
The Citrea API lets you interface with the Citrea testnet (mainnet coming soon). With this API, you can execute transactions, query onchain data, and interact with the Citrea network using the JSON-RPC standard.

## Is Citrea EVM compatible?
Yes, Citrea is EVM compatible.

## What API does Citrea use?
Citrea uses the JSON-RPC API standard. This API is essential for any blockchain interaction on the Citrea network, allowing you to read block/transaction data, query chain information, execute smart contracts, and store data onchain.

## What methods are supported on Citrea?
Citrea supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Citrea API Endpoints](/docs/chains#citrea-apis) for a complete list.

## What is a Citrea API key?
When accessing the Citrea network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup).

## Which libraries support Citrea?
Common Ethereum libraries like [ethers.js](https://docs.ethers.org/v5/) should be compatible with Citrea, given its EVM nature.

## My question isn’t here, where can I get help?
If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Clankermon API Quickstart

> How to get started building on Clankermon using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Clankermon is a Base-aligned gaming appchain that makes fully onchain gameplay fast and cheap using a Smart Sequencer.

The Clankermon API lets you interact with the Clankermon network through a set of JSON-RPC methods. If you've worked with Ethereum's JSON-RPC APIs, the design will feel familiar.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Clankermon client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http, defineChain } from "viem";

const clankermon = defineChain({
  id: 80085,
  name: "Clankermon",
  nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 },
  rpcUrls: {
    default: { http: ["https://clankermon-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
  },
});

const client = createPublicClient({
  chain: clankermon,
  transport: http("https://clankermon-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (ETH):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Clankermon APIs

For the full list of Clankermon APIs, see the [Clankermon API Endpoints](/docs/chains#clankermon-apis).

------

# Clankermon API Overview

> Overview of available Clankermon API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Clankermon APIs

📙 Get started with our [Clankermon API Quickstart Guide](/docs/reference/clankermon-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/clankermon/clankermon-api-endpoints/eth-accounts)                 | [`eth_blobBaseFee`](/docs/chains/clankermon/clankermon-api-endpoints/eth-blob-base-fee)     |
| [`eth_blockNumber`](/docs/chains/clankermon/clankermon-api-endpoints/eth-block-number)          | [`eth_call`](/docs/chains/clankermon/clankermon-api-endpoints/eth-call)                     |
| [`eth_chainId`](/docs/chains/clankermon/clankermon-api-endpoints/eth-chain-id)                  | [`eth_estimateGas`](/docs/chains/clankermon/clankermon-api-endpoints/eth-estimate-gas)      |
| [`eth_feeHistory`](/docs/chains/clankermon/clankermon-api-endpoints/eth-fee-history)            | [`eth_gasPrice`](/docs/chains/clankermon/clankermon-api-endpoints/eth-gas-price)            |
| [`eth_getAccount`](/docs/chains/clankermon/clankermon-api-endpoints/eth-get-account)            | [`eth_getBalance`](/docs/chains/clankermon/clankermon-api-endpoints/eth-get-balance)        |
| [`eth_getBlockByHash`](/docs/chains/clankermon/clankermon-api-endpoints/eth-get-block-by-hash)  | [`eth_getBlockByNumber`](/docs/chains/clankermon/clankermon-api-endpoints/eth-get-block-by-number) |
| [`eth_getBlockReceipts`](/docs/chains/clankermon/clankermon-api-endpoints/eth-get-block-receipts) | [`eth_getBlockTransactionCountByHash`](/docs/chains/clankermon/clankermon-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/clankermon/clankermon-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/clankermon/clankermon-api-endpoints/eth-get-code)              |
| [`eth_getFilterChanges`](/docs/chains/clankermon/clankermon-api-endpoints/eth-get-filter-changes) | [`eth_getFilterLogs`](/docs/chains/clankermon/clankermon-api-endpoints/eth-get-filter-logs) |
| [`eth_getLogs`](/docs/chains/clankermon/clankermon-api-endpoints/eth-get-logs)                  | [`eth_getProof`](/docs/chains/clankermon/clankermon-api-endpoints/eth-get-proof)            |
| [`eth_getRawTransactionByHash`](/docs/chains/clankermon/clankermon-api-endpoints/eth-get-raw-transaction-by-hash) | [`eth_getStorageAt`](/docs/chains/clankermon/clankermon-api-endpoints/eth-get-storage-at)   |
| [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/clankermon/clankermon-api-endpoints/eth-get-transaction-by-block-hash-and-index) | [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/clankermon/clankermon-api-endpoints/eth-get-transaction-by-block-number-and-index) |
| [`eth_getTransactionByHash`](/docs/chains/clankermon/clankermon-api-endpoints/eth-get-transaction-by-hash) | [`eth_getTransactionCount`](/docs/chains/clankermon/clankermon-api-endpoints/eth-get-transaction-count) |
| [`eth_getTransactionReceipt`](/docs/chains/clankermon/clankermon-api-endpoints/eth-get-transaction-receipt) | [`eth_getUncleCountByBlockHash`](/docs/chains/clankermon/clankermon-api-endpoints/eth-get-uncle-count-by-block-hash) |
| [`eth_getUncleCountByBlockNumber`](/docs/chains/clankermon/clankermon-api-endpoints/eth-get-uncle-count-by-block-number) | [`eth_maxPriorityFeePerGas`](/docs/chains/clankermon/clankermon-api-endpoints/eth-max-priority-fee-per-gas) |
| [`eth_newBlockFilter`](/docs/chains/clankermon/clankermon-api-endpoints/eth-new-block-filter)   | [`eth_newFilter`](/docs/chains/clankermon/clankermon-api-endpoints/eth-new-filter)          |
| [`eth_sendRawTransaction`](/docs/chains/clankermon/clankermon-api-endpoints/eth-send-raw-transaction) | [`eth_submitWork`](/docs/chains/clankermon/clankermon-api-endpoints/eth-submit-work)        |
| [`eth_subscribe`](/docs/chains/clankermon/clankermon-api-endpoints/eth-subscribe)               | [`eth_syncing`](/docs/chains/clankermon/clankermon-api-endpoints/eth-syncing)               |
| [`eth_uninstallFilter`](/docs/chains/clankermon/clankermon-api-endpoints/eth-uninstall-filter)  | [`eth_unsubscribe`](/docs/chains/clankermon/clankermon-api-endpoints/eth-unsubscribe)       |
| [`net_listening`](/docs/chains/clankermon/clankermon-api-endpoints/net-listening)               | [`net_version`](/docs/chains/clankermon/clankermon-api-endpoints/net-version)               |
| [`web3_clientVersion`](/docs/chains/clankermon/clankermon-api-endpoints/web-3-client-version)   | [`web3_sha3`](/docs/chains/clankermon/clankermon-api-endpoints/web-3-sha-3)                 |

## Related APIs

The following Alchemy APIs are also supported on Clankermon:

* [Debug API](/docs/reference/debug-api-quickstart)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blobBaseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the base fee per blob gas in wei for the current block.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-blob-base-fee

## Result

**Blob Base Fee** (string): The base fee per blob gas, in wei, as a hexadecimal encoded unsigned integer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blobBaseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://clankermon-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/clankermon/clankermon-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://clankermon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Clankermon API FAQ

> Frequently asked questions about the Clankermon API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Clankermon?
Clankermon is a Base-aligned gaming appchain that makes fully onchain gameplay fast and cheap using a Smart Sequencer.

## How do I get started with Clankermon?
Check out our [Clankermon API Quickstart guide](/docs/reference/clankermon-api-quickstart) to get started building on Clankermon.

## What is the Clankermon API?
The Clankermon API lets you interface with the Clankermon mainnet. With this API, you can execute transactions, query onchain data, and interact with the Clankermon network using the JSON-RPC standard.

## Is Clankermon EVM compatible?
Yes, Clankermon is EVM compatible.

## What API does Clankermon use?
Clankermon uses the JSON-RPC API standard. This API is essential for any blockchain interaction on the Clankermon network, allowing you to read block/transaction data, query chain information, execute smart contracts, and store data onchain.

## What methods are supported on Clankermon?
Clankermon supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Clankermon API Endpoints](/docs/chains#clankermon-apis) for a complete list.

## What is a Clankermon API key?
When accessing the Clankermon network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup).

## Which libraries support Clankermon?
Common Ethereum libraries like [ethers.js](https://docs.ethers.org/v5/) should be compatible with Clankermon, given its EVM nature.

## My question isn’t here, where can I get help?
If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# CrossFi API Quickstart

> How to get started building on CrossFi using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

CrossFi is a blockchain platform built to enable seamless cross-chain asset transfers and decentralized finance (DeFi) applications. With a focus on interoperability, security, and scalability, CrossFi provides developers and users with a powerful ecosystem for deploying decentralized applications (dApps) that can operate across multiple blockchain networks.

The CrossFi API lets you interact with the CrossFi network through a collection of JSON-RPC methods. If you're familiar with Ethereum's JSON-RPC APIs, working with CrossFi is intuitive and straightforward.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a CrossFi client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http, defineChain } from "viem";

const crossfi = defineChain({
  id: 4158,
  name: "CrossFi",
  nativeCurrency: { name: "XFI", symbol: "XFI", decimals: 18 },
  rpcUrls: {
    default: { http: ["https://crossfi-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
  },
});

const client = createPublicClient({
  chain: crossfi,
  transport: http("https://crossfi-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (XFI):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# CrossFi APIs

For the full list of CrossFi APIs, see the [CrossFi API Endpoints](/docs/chains#crossfi-apis).

------

# CrossFi API Overview

> Overview of available CrossFi API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## CrossFi APIs

📙 Get started with our [CrossFi API Quickstart Guide](/docs/reference/crossfi-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_blockNumber`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-block-number)               | [`eth_call`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-call)                          |
| [`eth_chainId`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-chain-id)                       | [`eth_estimateGas`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-estimate-gas)           |
| [`eth_feeHistory`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-fee-history)                 | [`eth_gasPrice`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-gas-price)                 |
| [`eth_getAccount`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-account)                 | [`eth_getBalance`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-balance)             |
| [`eth_getBlockByHash`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-block-by-hash)       | [`eth_getBlockByNumber`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-block-by-number) |
| [`eth_getBlockTransactionCountByHash`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-block-transaction-count-by-hash) | [`eth_getBlockTransactionCountByNumber`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-block-transaction-count-by-number) |
| [`eth_getCode`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-code)                       | [`eth_getFilterChanges`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-filter-changes) |
| [`eth_getFilterLogs`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-filter-logs)          | [`eth_getLogs`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-logs)                   |
| [`eth_getProof`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-proof)                     | [`eth_getRawTransactionByHash`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-raw-transaction-by-hash) |
| [`eth_getStorageAt`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-storage-at)            | [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-transaction-by-block-hash-and-index) |
| [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-transaction-by-block-number-and-index) | [`eth_getTransactionByHash`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-transaction-by-hash) |
| [`eth_getTransactionCount`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-transaction-count) | [`eth_getTransactionReceipt`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-transaction-receipt) |
| [`eth_getUncleCountByBlockHash`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-uncle-count-by-block-hash) | [`eth_getUncleCountByBlockNumber`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-uncle-count-by-block-number) |
| [`eth_maxPriorityFeePerGas`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-max-priority-fee-per-gas) | [`eth_newBlockFilter`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-new-block-filter)    |
| [`eth_newFilter`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-new-filter)                   | [`eth_protocolVersion`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-protocol-version)   |
| [`eth_sendRawTransaction`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-send-raw-transaction) | [`eth_submitWork`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-submit-work)             |
| [`eth_subscribe`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-subscribe)                    | [`eth_syncing`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-syncing)                    |
| [`eth_uninstallFilter`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-uninstall-filter)       | [`eth_unsubscribe`](/docs/chains/crossfi/cross-fi-api-endpoints/eth-unsubscribe)            |
| [`net_listening`](/docs/chains/crossfi/cross-fi-api-endpoints/net-listening)                    | [`net_version`](/docs/chains/crossfi/cross-fi-api-endpoints/net-version)                    |
| [`web3_clientVersion`](/docs/chains/crossfi/cross-fi-api-endpoints/web-3-client-version)        | [`web3_sha3`](/docs/chains/crossfi/cross-fi-api-endpoints/web-3-sha-3)                      |

## Related APIs

The following Alchemy APIs are also supported on CrossFi:

* [Debug API](/docs/reference/debug-api-quickstart)

------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-testnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_protocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-testnet.g.alchemy.com/v2/{apiKey}

Returns the current protocol version used by the client.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-protocol-version

## Result

**Protocol Version** (string): The protocol version as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3f",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_protocolVersion"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-testnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-testnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://crossfi-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/crossfi/cross-fi-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://crossfi-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# CrossFi API FAQ

> Frequently Asked Questions about the CrossFi API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is CrossFi?

CrossFi is a blockchain platform designed to enable cross-chain interoperability and decentralized finance (DeFi) solutions. It provides a robust infrastructure for transferring assets between multiple blockchain networks, making it ideal for developers building decentralized applications (dApps) that require seamless cross-chain functionality.

## What is the CrossFi API?

The CrossFi API lets you interact with the CrossFi network through a set of JSON-RPC methods. It supports operations such as asset transfers across chains, smart contract deployment, and data retrieval, letting you integrate cross-chain functionality into your applications.

## How can I get started using the CrossFi API?

For a step-by-step guide, check out the [CrossFi API Quickstart](/docs/reference/crossfi-api-quickstart).

## Is CrossFi EVM compatible?

Yes, CrossFi is EVM-compatible, allowing you to deploy Ethereum-based smart contracts and applications on its network, while also supporting interoperability with other blockchain ecosystems.

## What API does CrossFi use?

CrossFi uses the JSON-RPC API standard, enabling efficient blockchain interactions. It provides a consistent and secure interface for cross-chain transactions and other decentralized operations.

## What is a CrossFi API key?

When accessing the CrossFi network via a service provider like Alchemy, you need an API key to send transactions and retrieve data. An API key provides secure and authenticated access to the network.

For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup).

## Which libraries support CrossFi?

CrossFi supports popular Ethereum-based libraries like Web3.js and Ethers.js, so you can leverage existing tools for cross-chain and DeFi applications.

## What programming languages work with CrossFi?

CrossFi supports Solidity for smart contract development due to its EVM compatibility. For offchain interactions, you can use JavaScript, TypeScript, or other widely-used web development languages.

## What does CrossFi use for gas?

CrossFi uses its native token, XFI, to pay for transaction fees, gas, and other network operations.

## What methods does Alchemy support for the CrossFi API?

You can find the full list of methods supported by Alchemy for the CrossFi API on the [CrossFi API Endpoints](/docs/chains#crossfi-apis) page.

## My question isn't here, where can I get help?

If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Degen API Quickstart

> How to get started building on Degen using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Degen Chain is an Arbitrum–based Layer-3 that settles on Base and uses DEGEN as gas, delivering ultra-low-cost transactions for Farcaster mini-apps and trading-style apps.

The Degen API lets you interact with the Degen network through a set of JSON-RPC methods. If you've worked with Ethereum's JSON-RPC APIs, the design will feel familiar.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Degen client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { degen } from "viem/chains";

const client = createPublicClient({
  chain: degen,
  transport: http("https://degen-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (DEGEN):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Degen APIs

For the full list of Degen APIs, see the [Degen API Endpoints](/docs/chains#degen-apis).

------

# Degen API Overview

> Overview of available Degen API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Degen APIs

📙 Get started with our [Degen API Quickstart Guide](/docs/reference/degen-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/degen/degen-api-endpoints/eth-accounts)                           | [`eth_blockNumber`](/docs/chains/degen/degen-api-endpoints/eth-block-number)                |
| [`eth_call`](/docs/chains/degen/degen-api-endpoints/eth-call)                                   | [`eth_chainId`](/docs/chains/degen/degen-api-endpoints/eth-chain-id)                        |
| [`eth_estimateGas`](/docs/chains/degen/degen-api-endpoints/eth-estimate-gas)                    | [`eth_feeHistory`](/docs/chains/degen/degen-api-endpoints/eth-fee-history)                  |
| [`eth_fillTransaction`](/docs/chains/degen/degen-api-endpoints/eth-fill-transaction)            | [`eth_gasPrice`](/docs/chains/degen/degen-api-endpoints/eth-gas-price)                      |
| [`eth_getAccount`](/docs/chains/degen/degen-api-endpoints/eth-get-account)                      | [`eth_getBalance`](/docs/chains/degen/degen-api-endpoints/eth-get-balance)                  |
| [`eth_getBlockByHash`](/docs/chains/degen/degen-api-endpoints/eth-get-block-by-hash)            | [`eth_getBlockByNumber`](/docs/chains/degen/degen-api-endpoints/eth-get-block-by-number)    |
| [`eth_getBlockReceipts`](/docs/chains/degen/degen-api-endpoints/eth-get-block-receipts)         | [`eth_getBlockTransactionCountByHash`](/docs/chains/degen/degen-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/degen/degen-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/degen/degen-api-endpoints/eth-get-code)                        |
| [`eth_getFilterChanges`](/docs/chains/degen/degen-api-endpoints/eth-get-filter-changes)         | [`eth_getFilterLogs`](/docs/chains/degen/degen-api-endpoints/eth-get-filter-logs)           |
| [`eth_getLogs`](/docs/chains/degen/degen-api-endpoints/eth-get-logs)                            | [`eth_getProof`](/docs/chains/degen/degen-api-endpoints/eth-get-proof)                      |
| [`eth_getRawTransactionByHash`](/docs/chains/degen/degen-api-endpoints/eth-get-raw-transaction-by-hash) | [`eth_getStorageAt`](/docs/chains/degen/degen-api-endpoints/eth-get-storage-at)             |
| [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/degen/degen-api-endpoints/eth-get-transaction-by-block-hash-and-index) | [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/degen/degen-api-endpoints/eth-get-transaction-by-block-number-and-index) |
| [`eth_getTransactionByHash`](/docs/chains/degen/degen-api-endpoints/eth-get-transaction-by-hash) | [`eth_getTransactionCount`](/docs/chains/degen/degen-api-endpoints/eth-get-transaction-count) |
| [`eth_getTransactionReceipt`](/docs/chains/degen/degen-api-endpoints/eth-get-transaction-receipt) | [`eth_getUncleCountByBlockHash`](/docs/chains/degen/degen-api-endpoints/eth-get-uncle-count-by-block-hash) |
| [`eth_getUncleCountByBlockNumber`](/docs/chains/degen/degen-api-endpoints/eth-get-uncle-count-by-block-number) | [`eth_maxPriorityFeePerGas`](/docs/chains/degen/degen-api-endpoints/eth-max-priority-fee-per-gas) |
| [`eth_newBlockFilter`](/docs/chains/degen/degen-api-endpoints/eth-new-block-filter)             | [`eth_newFilter`](/docs/chains/degen/degen-api-endpoints/eth-new-filter)                    |
| [`eth_sendRawTransaction`](/docs/chains/degen/degen-api-endpoints/eth-send-raw-transaction)     | [`eth_simulateV1`](/docs/chains/degen/degen-api-endpoints/eth-simulate-v-1)                 |
| [`eth_submitWork`](/docs/chains/degen/degen-api-endpoints/eth-submit-work)                      | [`eth_subscribe`](/docs/chains/degen/degen-api-endpoints/eth-subscribe)                     |
| [`eth_syncing`](/docs/chains/degen/degen-api-endpoints/eth-syncing)                             | [`eth_uninstallFilter`](/docs/chains/degen/degen-api-endpoints/eth-uninstall-filter)        |
| [`eth_unsubscribe`](/docs/chains/degen/degen-api-endpoints/eth-unsubscribe)                     | [`net_listening`](/docs/chains/degen/degen-api-endpoints/net-listening)                     |
| [`net_version`](/docs/chains/degen/degen-api-endpoints/net-version)                             | [`txpool_content`](/docs/chains/degen/degen-api-endpoints/txpool-content)                   |
| [`web3_clientVersion`](/docs/chains/degen/degen-api-endpoints/web-3-client-version)             | [`web3_sha3`](/docs/chains/degen/degen-api-endpoints/web-3-sha-3)                           |

## Related APIs

The following Alchemy APIs are also supported on Degen:

* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_simulateV1

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Enables simulation of complex transactions and state changes without modifying the blockchain.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-simulate-v-1

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Simulation object | object | Yes | The object containing all simulation details such as calls, overrides, etc. |

## Result

**Simulation result** (object[]): The result of the simulation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "baseFeePerGas": "0x9",
      "blobGasUsed": "0x0",
      "calls": [
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000001"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
              "transactionIndex": "0x0",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x0",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        },
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000002"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd",
              "transactionIndex": "0x1",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x1",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        }
      ],
      "difficulty": "0x0",
      "excessBlobGas": "0x3b80000",
      "extraData": "0x",
      "gasLimit": "0x22550dd",
      "gasUsed": "0xa410",
      "hash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "miner": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
      "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "nonce": "0x0000000000000000",
      "number": "0x1530a5e",
      "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "parentHash": "0x513a0aa73024f294cdbcb0312af0c920850035f0552d7349ebb30717de30b1cc",
      "receiptsRoot": "0x75308898d571eafb5cd8cde8278bf5b3d13c5f6ec074926de3bb895b519264e1",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "size": "0x29c",
      "stateRoot": "0x65ea44c8bd5f9edbf269b6446b460b3e7378abb25c78fd5d70f0e2ef59296b25",
      "timestamp": "0x67f43327",
      "transactions": [
        "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
        "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd"
      ],
      "transactionsRoot": "0xd6902f31ae9d2169b77cd88611c6afd691ea5a7e604e44c71f663fda0c5d1c28",
      "uncles": [],
      "withdrawals": [],
      "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    }
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# txpool_content

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of the exact details of all transactions currently pending for inclusion in the next blocks, as well as ones that are being scheduled for future execution.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/txpool-content

## Result

**content** (object): Object with pending and queued transactions grouped by sender address and nonce.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "txpool_content"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://degen-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/degen/degen-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://degen-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Degen API FAQ

> Frequently asked questions about the Degen API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Degen?
Degen Chain is an Arbitrum-based Layer-3 that settles on Base and uses DEGEN as gas, delivering ultra-low-cost transactions for Farcaster mini-apps and trading-style apps.

## How do I get started with Degen?
Check out our [Degen API Quickstart guide](/docs/reference/degen-api-quickstart) to get started building on Degen.

## What is the Degen API?
The Degen API lets you interface with the Degen mainnet. With this API, you can execute transactions, query onchain data, and interact with the Degen network using the JSON-RPC standard.

## Is Degen EVM compatible?
Yes, Degen is EVM compatible.

## What API does Degen use?
Degen uses the JSON-RPC API standard. This API is essential for any blockchain interaction on the Degen network, allowing you to read block/transaction data, query chain information, execute smart contracts, and store data onchain.

## What methods are supported on Degen?
Degen supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Degen API Endpoints](/docs/chains#degen-apis) for a complete list.

## What is a Degen API key?
When accessing the Degen network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup).

## Which libraries support Degen?
Common Ethereum libraries like [ethers.js](https://docs.ethers.org/v5/) should be compatible with Degen, given its EVM nature.

## My question isn’t here, where can I get help?
If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Dogecoin API Quickstart

> Get started building on Dogecoin and using the JSON-RPC API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Introduction

The Dogecoin API gives you access to the Dogecoin blockchain through a standard set of JSON-RPC methods. With this API, you can retrieve block and transaction data, inspect the mempool, broadcast transactions, and more.

Dogecoin uses a UTXO-based model and exposes its functionality via the JSON-RPC protocol. This quickstart will help you make your first request.

***

## What is the Dogecoin Chain API?

The Dogecoin Chain API allows applications to communicate with a Dogecoin node using the JSON-RPC protocol. Like Bitcoin, Dogecoin relies on a UTXO (Unspent Transaction Output) model, which means balances are tracked by outputs that are explicitly spent or unspent.

Alchemy's Dogecoin API gives developers a consistent interface to query blockchain data, submit transactions, and monitor network activity. This includes:

* Retrieving raw or decoded transaction data
* Querying block headers and full blocks
* Monitoring mempool entries and states
* Submitting and testing raw transactions

If you've worked with Bitcoin or other JSON-RPC-compatible chains, the structure will feel familiar.

***

## Getting started

### 1. Choose a package manager (npm or yarn)

Select a package manager to manage your project's dependencies. The choice between `npm` and `yarn` depends on your preference or project requirements.

| npm                                                                                                                       | yarn                                                                                                |
| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |

### 2. Set up your project

Open your terminal and run the following commands:

<CodeGroup>
  ```text npm
  mkdir dogecoin-api-quickstart
  cd dogecoin-api-quickstart
  npm init --yes
  ```

  ```text yarn
  mkdir dogecoin-api-quickstart
  cd dogecoin-api-quickstart
  yarn init --yes
  ```
</CodeGroup>

This creates a new directory named `dogecoin-api-quickstart` and initializes a Node.js project within it.

### 3. Make your first request

Install Axios, a popular HTTP client, to make API requests:

<CodeGroup>
  ```bash bash
  npm install axios
  # Or with yarn
  # yarn add axios
  ```
</CodeGroup>

Create an `index.js` file in your project directory and paste the following code:

<CodeGroup>
  ```javascript javascript
  const axios = require('axios');

  const url = `https://dogecoin-mainnet.g.alchemy.com/v2/${apiKey}`;

  const payload = {
    jsonrpc: '2.0',
    id: 1,
    method: 'getblockcount',
    params: []
  };

  axios.post(url, payload)
    .then(response => {
      console.log('Current block height:', response.data.result);
    })
    .catch(error => {
      console.error('Error fetching block count:', error);
    });
  ```
</CodeGroup>

Replace `apiKey` with your actual Alchemy API key that you can get from the [Alchemy Dashboard](https://dashboard.alchemy.com/signup).

### 4. Run your script

To execute your script and make a request to the Dogecoin API, run:

<CodeGroup>
  ```bash bash
  node index.js
  ```
</CodeGroup>

You should see the current block height on Dogecoin printed to your console:

```shell
Current block height: 5421894
```

## Next steps

You've made your first request to the Dogecoin API. With this foundation, you can dive deeper into the [JSON-RPC methods available on Dogecoin](/docs/dogecoin/dogecoin-api-overview) and start building on it.

------

# Dogecoin API Overview

> Overview of available Dogecoin API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Dogecoin APIs

📙 Get started with our [Dogecoin API Quickstart Guide](/docs/reference/dogecoin-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`createrawtransaction`](/docs/chains/dogecoin/dogecoin-api-endpoints/createrawtransaction)     | [`decoderawtransaction`](/docs/chains/dogecoin/dogecoin-api-endpoints/decoderawtransaction) |
| [`decodescript`](/docs/chains/dogecoin/dogecoin-api-endpoints/decodescript)                     | [`estimatesmartfee`](/docs/chains/dogecoin/dogecoin-api-endpoints/estimatesmartfee)         |
| [`getbestblockhash`](/docs/chains/dogecoin/dogecoin-api-endpoints/getbestblockhash)             | [`getblock`](/docs/chains/dogecoin/dogecoin-api-endpoints/getblock)                         |
| [`getblockchaininfo`](/docs/chains/dogecoin/dogecoin-api-endpoints/getblockchaininfo)           | [`getblockcount`](/docs/chains/dogecoin/dogecoin-api-endpoints/getblockcount)               |
| [`getblockfilter`](/docs/chains/dogecoin/dogecoin-api-endpoints/getblockfilter)                 | [`getblockhash`](/docs/chains/dogecoin/dogecoin-api-endpoints/getblockhash)                 |
| [`getblockheader`](/docs/chains/dogecoin/dogecoin-api-endpoints/getblockheader)                 | [`getblockstats`](/docs/chains/dogecoin/dogecoin-api-endpoints/getblockstats)               |
| [`getblocktemplate`](/docs/chains/dogecoin/dogecoin-api-endpoints/getblocktemplate)             | [`getchaintips`](/docs/chains/dogecoin/dogecoin-api-endpoints/getchaintips)                 |
| [`getchaintxstats`](/docs/chains/dogecoin/dogecoin-api-endpoints/getchaintxstats)               | [`getconnectioncount`](/docs/chains/dogecoin/dogecoin-api-endpoints/getconnectioncount)     |
| [`getdifficulty`](/docs/chains/dogecoin/dogecoin-api-endpoints/getdifficulty)                   | [`getindexinfo`](/docs/chains/dogecoin/dogecoin-api-endpoints/getindexinfo)                 |
| [`getmemoryinfo`](/docs/chains/dogecoin/dogecoin-api-endpoints/getmemoryinfo)                   | [`getmempoolancestors`](/docs/chains/dogecoin/dogecoin-api-endpoints/getmempoolancestors)   |
| [`getmempooldescendants`](/docs/chains/dogecoin/dogecoin-api-endpoints/getmempooldescendants)   | [`getmempoolinfo`](/docs/chains/dogecoin/dogecoin-api-endpoints/getmempoolinfo)             |
| [`getnetworkhashps`](/docs/chains/dogecoin/dogecoin-api-endpoints/getnetworkhashps)             | [`getnetworkinfo`](/docs/chains/dogecoin/dogecoin-api-endpoints/getnetworkinfo)             |
| [`getrawmempool`](/docs/chains/dogecoin/dogecoin-api-endpoints/getrawmempool)                   | [`getrawtransaction`](/docs/chains/dogecoin/dogecoin-api-endpoints/getrawtransaction)       |
| [`gettxout`](/docs/chains/dogecoin/dogecoin-api-endpoints/gettxout)                             | [`gettxoutproof`](/docs/chains/dogecoin/dogecoin-api-endpoints/gettxoutproof)               |
| [`gettxoutsetinfo`](/docs/chains/dogecoin/dogecoin-api-endpoints/gettxoutsetinfo)               | [`sendrawtransaction`](/docs/chains/dogecoin/dogecoin-api-endpoints/sendrawtransaction)     |
| [`submitblock`](/docs/chains/dogecoin/dogecoin-api-endpoints/submitblock)                       | [`submitheader`](/docs/chains/dogecoin/dogecoin-api-endpoints/submitheader)                 |
| [`submitpackage`](/docs/chains/dogecoin/dogecoin-api-endpoints/submitpackage)                   | [`testmempoolaccept`](/docs/chains/dogecoin/dogecoin-api-endpoints/testmempoolaccept)       |
| [`validateaddress`](/docs/chains/dogecoin/dogecoin-api-endpoints/validateaddress)               | [`verifymessage`](/docs/chains/dogecoin/dogecoin-api-endpoints/verifymessage)               |

------

# createrawtransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Creates a transaction spending the given inputs and creating new outputs. Outputs can be addresses or data. Returns hex-encoded raw transaction. Note that the transaction's inputs are not signed, and it is not stored in the wallet or transmitted to the network.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/createrawtransaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| inputs | object[] | Yes | An array of transaction inputs. |
| outputs | object[] or object | Yes | An array or object with outputs (key-value pairs, where keys are addresses or 'data', and values are BTC amounts or hex). |
| locktime | integer | No | Raw locktime. Non-0 value also activates inputs. |
| replaceable | boolean | No | Whether to mark transaction as BIP125 replaceable. Allows this transaction to be replaced by a transaction with higher fees. |

## Result

**result** (string): Hex-encoded raw transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "createrawtransaction",
  "params": [
    [
      {
        "txid": "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
        "vout": 0
      }
    ],
    [
      {
        "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa": 0.01
      }
    ],
    0,
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0200000001546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b0000000000fdffffff01c0c62d000000000017a914751e76e8199196d454941c45d1b3a323f1433bd68700000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "createrawtransaction",
  "params": [
    [
      {
        "txid": "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
        "vout": 0
      }
    ],
    [
      {
        "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa": 0.01
      }
    ],
    0,
    false
  ]
}'
```



------

# decoderawtransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Decodes a serialized, hex-encoded Bitcoin transaction. Returns detailed information about inputs, outputs, size, witness data, etc.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/decoderawtransaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hexstring | string | Yes | The transaction hex string to decode. |
| iswitness | boolean | No | Indicates whether the transaction includes witness data. If omitted, heuristic decoding is applied.  |

## Result

**result** (object): A JSON object representing the decoded transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "decoderawtransaction",
  "params": [
    "0200000000010142d6bd07c424e975fe821c978e720f9a55f9981d62c290cea5ccd06b455d79b90000000000fdffffff028096980000000000160014d3620fe180a0beb8fcc9682fe92e5a25f0feccd370cd2f0100000000160014076d998f6b12c3d1da6217d967154f42a5e0afd30247304402204549b10ea1698d4b4605be1d3bfff810f6135395386207664a66f5bb8bd1470902205fb86c95bfbe7b502195ffa65276d292fb074fe18ba171ef0a35395211384091012103cb5de30b343b35cc09b50f064eb289dd3e252f6985fc4309fba795cc950316afcfa50d00",
    true
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "txid": "a4cf344758af60ab8d4812477a7d3eee8854595db70ab39cf68f9dc509b13929",
    "hash": "48d1de9e93391ac3d83e5e97ce94ebd1db0f88553e45a6dffad3501c82408995",
    "size": 222,
    "vsize": 141,
    "weight": 564,
    "version": 2,
    "locktime": 862954048,
    "vin": [
      {
        "txid": "b9795d456bd0cca5ce90c2621d98f9559a0f728e971c82fe75e924c407bdd642",
        "vout": 0,
        "scriptSig": {
          "asm": "",
          "hex": ""
        },
        "sequence": 4294967293,
        "txinwitness": [
          "304402204549b10ea1698d4b4605be1d3bfff810f6135395386207664a66f5bb8bd1470902205fb86c95bfbe7b502195ffa65276d292fb074fe18ba171ef0a35395211384091",
          "03cb5de30b343b35cc09b50f064eb289dd3e252f6985fc4309fba795cc950316af"
        ]
      }
    ],
    "vout": [
      {
        "value": 0.1,
        "n": 0,
        "scriptPubKey": {
          "asm": "OP_DUP OP_HASH160 d3620fe180a0beb8fcc9682fe92e5a25f0feccd3 OP_EQUALVERIFY OP_CHECKSIG",
          "desc": "addr(1BM1sAcrfV6d4zPKytzziu4McLQDsFC2Qc)",
          "hex": "76a914d3620fe180a0beb8fcc9682fe92e5a25f0feccd388ac",
          "type": "pubkeyhash"
        }
      },
      {
        "value": 0.65281824,
        "n": 1,
        "scriptPubKey": {
          "asm": "OP_DUP OP_HASH160 076d998f6b12c3d1da6217d967154f42a5e0afd3 OP_EQUALVERIFY OP_CHECKSIG",
          "desc": "addr(1iPoHeR3z1EidftGXMcEppzA1UupGPs2u)",
          "hex": "76a914076d998f6b12c3d1da6217d967154f42a5e0afd388ac",
          "type": "pubkeyhash"
        }
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "decoderawtransaction",
  "params": [
    "0200000000010142d6bd07c424e975fe821c978e720f9a55f9981d62c290cea5ccd06b455d79b90000000000fdffffff028096980000000000160014d3620fe180a0beb8fcc9682fe92e5a25f0feccd370cd2f0100000000160014076d998f6b12c3d1da6217d967154f42a5e0afd30247304402204549b10ea1698d4b4605be1d3bfff810f6135395386207664a66f5bb8bd1470902205fb86c95bfbe7b502195ffa65276d292fb074fe18ba171ef0a35395211384091012103cb5de30b343b35cc09b50f064eb289dd3e252f6985fc4309fba795cc950316afcfa50d00",
    true
  ]
}'
```



------

# decodescript

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Decodes a hex-encoded script and provides detailed information about it.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/decodescript

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hexstring | string | Yes | The hex-encoded script. |

## Result

**result** (object): Decoded script information.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "decodescript",
  "params": [
    "0014751e76e8199196d454941c45d1b3a323f1433bd6"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "asm": "0 751e76e8199196d454941c45d1b3a323f1433bd6",
    "desc": "addr(bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4)#uyjndxcw",
    "address": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4",
    "type": "witness_v0_keyhash",
    "p2sh": "3JvL6Ymt8MVWiCNHC7oWU6nLeHNJKLZGLN"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "decodescript",
  "params": [
    "0014751e76e8199196d454941c45d1b3a323f1433bd6"
  ]
}'
```



------

# estimatesmartfee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Estimates the approximate fee per kilobyte required for a transaction to begin confirmation within `conf_target` blocks. Uses BIP 141 virtual transaction size.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/estimatesmartfee

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| conf_target | integer | Yes | Number of blocks within which confirmation is targeted. |
| estimate_mode | enum | No | Fee estimate mode. Options are "UNSET", "ECONOMICAL", or "CONSERVATIVE".  |

## Result

**result** (object): Estimated fee rate and corresponding target blocks.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "estimatesmartfee",
  "params": [
    1,
    "UNSET"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "feerate": 0.00002465,
    "blocks": 2
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "estimatesmartfee",
  "params": [
    1,
    "UNSET"
  ]
}'
```



------

# getbestblockhash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the hash of the most-work fully-validated tip block in the active Bitcoin blockchain.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/getbestblockhash

## Result

**result** (string): The hash of the best block in the longest chain.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "00000000000000000001fe9b58c5ccd401de62139c29e7dbfd32bd3cf14b650c",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getbestblockhash"
}'
```



------

# getblock

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block, based on the provided block hash.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/getblock

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockhash | string | Yes | The hash of the block to retrieve. |
| verbosity | enum | No | Level of detail to return.  - 0: hex-encoded string, - 1: basic block info, - 2: with transactions, - 3: with transactions + input prevouts.  |

## Result

**result** (object): The block object or hex string, depending on verbosity.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblock",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    2
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "hash": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "confirmations": 151,
    "height": 894470,
    "version": 537067520,
    "versionHex": "20030000",
    "merkleroot": "9d93ae25de98e5ed33aec9ccfea612c3b5b181a60171ba564ec1634786b04bc6",
    "time": 1745931642,
    "mediantime": 1745928076,
    "nonce": 766301978,
    "bits": "170248b6",
    "target": "0000000000000000000248b60000000000000000000000000000000000000000",
    "difficulty": 123234387977050.9,
    "chainwork": "0000000000000000000000000000000000000000bf64054821a76841a63cb26e",
    "nTx": 2186,
    "previousblockhash": "00000000000000000001aa9a63c6c0774a767f7a4d37d2bce3658728de76a146",
    "nextblockhash": "00000000000000000000cb8a1d7945b960985579525957bcc37b22174f1ecb31",
    "strippedsize": 844254,
    "size": 1460798,
    "weight": 3993560,
    "tx": [
      "c86b4846175942038cc9da086e506aa8a441beada92f1678fb1fe35d640366db"
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblock",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    2
  ]
}'
```



------

# getblockchaininfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object containing state details related to blockchain processing, network, and storage information.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/getblockchaininfo

## Result

**result** (object): Blockchain status information.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "chain": "main",
    "blocks": 894713,
    "headers": 894713,
    "bestblockhash": "00000000000000000000eb0ae1714d3ec43cfaac74769f3bcde489daf116e4ca",
    "bits": "170248b6",
    "target": "0000000000000000000248b60000000000000000000000000000000000000000",
    "difficulty": 123234387977050.9,
    "time": 1746083867,
    "mediantime": 1746081100,
    "verificationprogress": 0.9999993374725104,
    "initialblockdownload": false,
    "chainwork": "0000000000000000000000000000000000000000bfce6962cc3162143b67a1d4",
    "size_on_disk": 745999541195,
    "pruned": false,
    "warnings": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockchaininfo"
}'
```



------

# getblockcount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of blocks in the longest fully validated blockchain.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/getblockcount

## Result

**result** (integer): The number of blocks in the current best blockchain.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": 894623,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockcount"
}'
```



------

# getblockfilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the BIP 157 content filter for a specified block. Requires the blockfilterindex to be enabled.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/getblockfilter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockhash | string | Yes | The hash of the block. |
| filtertype | enum | No | The type name of the filter. Currently only 'basic' is supported. |

## Result

**result** (object): The block filter details.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblockfilter",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "basic"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "filter": "0180c3b80144ec1762e9eb8e5b2e072f7d8c8c8c0c2c2a2a2a2a2a2a2a2a2a",
    "header": "1e1e1f1f2020202021212121222222222323232324242424252525252626262"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockfilter",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "basic"
  ]
}'
```



------

# getblockhash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the hash of the block at a given height (index) in the active Bitcoin blockchain.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/getblockhash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| height | integer | Yes | The height of the block to retrieve the hash for. |

## Result

**result** (string): The hash of the block at the specified height.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblockhash",
  "params": [
    894470
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockhash",
  "params": [
    894470
  ]
}'
```



------

# getblockheader

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the block header for the specified block hash.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/getblockheader

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockhash | string | Yes | The block hash to retrieve the header for. |
| verbose | boolean | No | Whether to return a JSON object (true) or raw hex-encoded string (false). Default is true.  |

## Result

**result** (object or string): The block header as an object or hex string depending on verbose.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblockheader",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    true
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "hash": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "confirmations": 154,
    "height": 894470,
    "version": 537067520,
    "versionHex": "20030000",
    "merkleroot": "9d93ae25de98e5ed33aec9ccfea612c3b5b181a60171ba564ec1634786b04bc6",
    "time": 1745931642,
    "mediantime": 1745928076,
    "nonce": 766301978,
    "bits": "170248b6",
    "difficulty": 123234387977050.9,
    "chainwork": "0000000000000000000000000000000000000000bf64054821a76841a63cb26e",
    "nTx": 2186,
    "previousblockhash": "00000000000000000001aa9a63c6c0774a767f7a4d37d2bce3658728de76a146",
    "nextblockhash": "00000000000000000000cb8a1d7945b960985579525957bcc37b22174f1ecb31"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockheader",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    true
  ]
}'
```



------

# getblockstats

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Calculates various statistics for a given block by hash or height.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/getblockstats

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hash_or_height | string or integer | Yes | The block hash (string) or height (integer) of the target block. |
| stats | string[] | No | Optional list of specific stats to retrieve. If empty or omitted, returns all stats.  |

## Result

**result** (object): A set of statistical metrics for the specified block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblockstats",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    []
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "avgfee": 1565,
    "avgfeerate": 3,
    "avgtxsize": 668,
    "blockhash": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "feerate_percentiles": [
      2,
      2,
      3,
      3,
      4
    ],
    "height": 894470,
    "ins": 7718,
    "outs": 5666,
    "maxfee": 376692,
    "maxfeerate": 79,
    "maxtxsize": 200604,
    "medianfee": 453,
    "mediantime": 1745928076,
    "mediantxsize": 228,
    "minfee": 141,
    "minfeerate": 1,
    "mintxsize": 150,
    "subsidy": 312500000,
    "swtotal_size": 1049707,
    "swtotal_weight": 2349304,
    "swtxs": 2075,
    "time": 1745931642,
    "total_out": 271147032190,
    "total_size": 1460379,
    "total_weight": 3991992,
    "totalfee": 3420664,
    "txs": 2186,
    "utxo_increase": -2052,
    "utxo_size_inc": -137484,
    "utxo_increase_actual": -2841,
    "utxo_size_inc_actual": -199799
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockstats",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    []
  ]
}'
```



------

# getblocktemplate

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns data needed to construct a block to mine. This method is used by miners to request a block template  for mining new blocks. It can be customized with various parameters to specify the desired mining capabilities and rules.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/getblocktemplate

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| template_request | object | No | A JSON object containing the template request parameters. |

## Result

**result** (object): A block template object containing all necessary data for mining.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblocktemplate",
  "params": [
    {
      "mode": "template",
      "capabilities": [
        "coinbasetxn",
        "workid",
        "coinbase/append"
      ],
      "rules": [
        "segwit"
      ]
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "version": 536870912,
    "previousblockhash": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "transactions": [],
    "coinbaseaux": {
      "flags": ""
    },
    "coinbasevalue": 625000000,
    "target": "0000000000000000000248b60000000000000000000000000000000000000000",
    "mintime": 1745928076,
    "mutable": [
      "time",
      "transactions",
      "prevblock"
    ],
    "noncerange": "00000000ffffffff",
    "sigoplimit": 80000,
    "sizelimit": 4000000,
    "curtime": 1745931642,
    "bits": "170248b6",
    "height": 894471
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblocktemplate",
  "params": [
    {
      "mode": "template",
      "capabilities": [
        "coinbasetxn",
        "workid",
        "coinbase/append"
      ],
      "rules": [
        "segwit"
      ]
    }
  ]
}'
```



------

# getchaintips

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about all known tips in the block tree, including the active chain tip and orphaned branches.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/getchaintips

## Result

**result** (object[]): An array of chain tip information objects.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "height": 894712,
      "hash": "00000000000000000000e6518eac47199bcf0108b1c7d194b00ef5a9df794427",
      "branchlen": 0,
      "status": "active"
    },
    {
      "height": 894657,
      "hash": "00000000000000000002311b7c31f1ffef1261bb53740958ed98c600ae2abd41",
      "branchlen": 1,
      "status": "valid-fork"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getchaintips"
}'
```



------

# getchaintxstats

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Calculates statistics about the overall transaction rate and volume of the blockchain over a window of blocks.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/getchaintxstats

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nblocks | integer | No | The size of the window in number of blocks. Defaults to approximately one month. |
| blockhash | string | No | The block hash at which the window ends. Defaults to chain tip. |

## Result

**result** (object): The calculated chain transaction statistics.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getchaintxstats",
  "params": [
    0,
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "time": 1745931642,
    "txcount": 1184990717,
    "window_final_block_hash": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "window_final_block_height": 894470,
    "window_block_count": 0
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getchaintxstats",
  "params": [
    1,
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80"
  ]
}'
```



------

# getconnectioncount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of connections to other nodes (both inbound and outbound).


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/getconnectioncount

## Result

**result** (integer): The total number of connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": 10,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getconnectioncount"
}'
```



------

# getdifficulty

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the proof-of-work difficulty as a multiple of the minimum difficulty.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/getdifficulty

## Result

**result** (number): The difficulty of the current best block as a floating-point number.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": 123234387977050.9,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getdifficulty"
}'
```



------

# getindexinfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the state of one or all available indices currently running.  You can optionally filter the results by a specific index name.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/getindexinfo

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| index_name | string | No | Filter results for an index with a specific name.  |

## Result

**result** (object): A mapping of index names to their respective info.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getindexinfo",
  "params": [
    "txindex"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "txindex": {
      "synced": true,
      "best_block_height": 894717
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getindexinfo",
  "params": [
    "txindex"
  ]
}'
```



------

# getmemoryinfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about memory usage, either general statistics ("stats") or heap information ("mallocinfo").


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/getmemoryinfo

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| mode | enum | No | Determines what kind of information is returned: - "stats" returns general statistics about memory usage. - "mallocinfo" returns an XML string describing low-level heap state.  |

## Result

**result** (object): Memory usage details.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getmemoryinfo",
  "params": [
    "stats"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "locked": {
      "used": 352,
      "free": 65184,
      "total": 65536,
      "locked": 65536,
      "chunks_used": 1,
      "chunks_free": 1
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getmemoryinfo",
  "params": [
    "stats"
  ]
}'
```



------

# getmempoolancestors

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the in-mempool ancestors of a given transaction.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/getmempoolancestors

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txid | string | Yes | The transaction ID whose ancestors to retrieve. |
| verbose | boolean | No | Whether to return detailed info (true) or just txids (false). |

## Result

**result** (string[] or object): The mempool ancestors of the specified transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getmempoolancestors",
  "params": [
    "b86ae732473ff2c91c04073ec9cbef5e4ddaa701741e141e41345df72122b795",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "6f8c6e8d3021d8a1db71eae3cb8db00f1c99d0f94f3b5782e6cfc155b55f3c55",
    "a4d47b8bdee5f5b8c098c9ac9aa4e3ec113d9f305a4f723d617a92439ab244cb"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getmempoolancestors",
  "params": [
    "b86ae732473ff2c91c04073ec9cbef5e4ddaa701741e141e41345df72122b795",
    false
  ]
}'
```



------

# getmempooldescendants

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the in-mempool descendants of a given transaction.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/getmempooldescendants

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txid | string | Yes | The transaction ID whose descendants to retrieve. |
| verbose | boolean | No | Whether to return detailed info (true) or just txids (false). |

## Result

**result** (string[] or object): The mempool descendants of the specified transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getmempooldescendants",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "c3b9f342fc90837fd4a22878b59fdf5cdeae1b4e4586224b0df1b3a2e3e6e9c8",
    "a2e34d98cb7e98b8d85d3a991c8d1cbd3e7a3f17b4acdf4768c88fa3e0e9d8bc"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getmempooldescendants",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    false
  ]
}'
```



------

# getmempoolinfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Provides information about the TX memory pool's current state, including memory usage, transaction count, and relay fee settings.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/getmempoolinfo

## Result

**result** (object): Mempool state information.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "loaded": true,
    "size": 4889,
    "bytes": 13816734,
    "usage": 49380080,
    "total_fee": 0.14547621,
    "maxmempool": 300000000,
    "mempoolminfee": 0.00001,
    "minrelaytxfee": 0.00001,
    "incrementalrelayfee": 0.00001,
    "unbroadcastcount": 0,
    "fullrbf": true
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getmempoolinfo"
}'
```



------

# getnetworkhashps

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the estimated network hashes per second based on the last n blocks. Pass in nblocks to override the default number of blocks, or -1 to get the value since the last difficulty change.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/getnetworkhashps

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nblocks | integer | No | The number of blocks to use for the calculation. Default is 120. Use -1 to calculate since last difficulty change. |
| height | integer | No | To estimate at the time of the given height. Default is -1 (current tip). |

## Result

**result** (number): Hashes per second estimated.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getnetworkhashps",
  "params": [
    120,
    -1
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": 412345678900000000000,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getnetworkhashps",
  "params": [
    120,
    -1
  ]
}'
```



------

# getnetworkinfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object containing various state info regarding P2P networking, including version information, network status, connections, and relay fees.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/getnetworkinfo

## Result

**result** (object): Object containing P2P networking state information.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "version": 270000,
    "subversion": "/Satoshi:27.0.0/",
    "protocolversion": 70016,
    "localservices": "0000000000000409",
    "localservicesnames": [
      "NETWORK",
      "WITNESS",
      "NETWORK_LIMITED"
    ],
    "localrelay": true,
    "timeoffset": 0,
    "connections": 10,
    "connections_in": 2,
    "connections_out": 8,
    "networkactive": true,
    "networks": [
      {
        "name": "ipv4",
        "limited": false,
        "reachable": true,
        "proxy": "",
        "proxy_randomize_credentials": false
      },
      {
        "name": "ipv6",
        "limited": false,
        "reachable": true,
        "proxy": "",
        "proxy_randomize_credentials": false
      },
      {
        "name": "onion",
        "limited": true,
        "reachable": false,
        "proxy": "",
        "proxy_randomize_credentials": false
      }
    ],
    "relayfee": 0.00001,
    "incrementalfee": 0.00001,
    "localaddresses": [],
    "warnings": ""
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getnetworkinfo"
}'
```



------

# getrawmempool

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns either a list of transaction IDs currently in the mempool or detailed metadata for each transaction, depending on the verbosity level.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/getrawmempool

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| verbose | boolean | No | If true, returns detailed info per transaction. If false, returns a list of txids.  |
| mempool_sequence | boolean | No | When verbose is false, includes mempool sequence number in the response.  |

## Result

**result** (object): Mempool data depending on verbosity level.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getrawmempool",
  "params": [
    false,
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "txids": [
      "5f10285c6fee80d1982df9893742d0c5aed5aa4fcca3aa4331d7fa071ba4d5ce",
      "30ad6eacfc8b83de7b91f8df705e081945c9d8a7a05506de38a1842dd856550b"
    ],
    "mempool_sequence": 1386211
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getrawmempool",
  "params": [
    false,
    false
  ]
}'
```



------

# getrawtransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction representation for a given transaction ID (`txid`).  If `verbose` is true, returns a JSON object with detailed information;  otherwise, returns a serialized hex-encoded string.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/getrawtransaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txid | string | Yes | The transaction ID to fetch. |
| verbose | boolean | No | Return verbose JSON or just the raw hex string. |
| blockhash | string | No | The block in which to look for the transaction (if not in the mempool). |

## Result

**result** (string or object): Raw transaction data.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getrawtransaction",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    false,
    "000000000000000000013c7104486ef1aa53e8ac99b8a8ac02a113b58457ed8b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0100000001d074a22eedb6e7258c15368988826e6c73c6577fff490f42afeb8cd7be858032010000006b48304502210084689df7816df6f8a85c72a8cf4d52c2957657d619f5d126dbfc5f866d7561e80220415f8fbd095f53f0a8a4aa11496b126bc87dd020771d3d30c58f374a0f02bf420121024a42999af129d16c92bc0a0b18b39e2550769711845817d1f69932762d431ebcffffffff02ab6502000000000017a91453ca847feb3986cf2be405429e7e513484e0bc938780c6b001000000001976a914ebbfc363611943f588194465c1febdba9bf3883988ac00000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getrawtransaction",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    false,
    "000000000000000000013c7104486ef1aa53e8ac99b8a8ac02a113b58457ed8b"
  ]
}'
```



------

# gettxout

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns details about an unspent transaction output (UTXO), optionally including mempool data.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/gettxout

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txid | string | Yes | The transaction ID. |
| n | integer | Yes | The vout number. |
| include_mempool | boolean | No | Whether to include outputs spent in the mempool. Default is true.  |

## Result

**result** (object): Details about the specified unspent output, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "gettxout",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    0,
    true
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "bestblock": "00000000000000000000944aba5f33a268df0c95a8bacdf42e5d10f8c7d51f94",
    "confirmations": 7,
    "value": 0.00157099,
    "scriptPubKey": {
      "asm": "OP_HASH160 53ca847feb3986cf2be405429e7e513484e0bc93 OP_EQUAL",
      "desc": "addr(39L4cdhha5ueasiKz1wRVd75fHdB9NV2t7)#29pkvxg9",
      "hex": "a91453ca847feb3986cf2be405429e7e513484e0bc9387",
      "address": "39L4cdhha5ueasiKz1wRVd75fHdB9NV2t7",
      "type": "scripthash"
    },
    "coinbase": false
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "gettxout",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    1,
    true
  ]
}'
```



------

# gettxoutproof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns a hex-encoded proof that the specified transaction(s) were included in a block. This proof can be used to verify the inclusion of transactions without relying on a full node.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/gettxoutproof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txids | string[] | Yes | An array of transaction IDs to generate proof for. |
| blockhash | string | No | The block in which to search for the txid(s). If omitted, the node will try to locate it. |

## Result

**result** (string): A hex-encoded proof that the specified transactions are part of a block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "gettxoutproof",
  "params": [
    [
      "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b"
    ],
    "000000000000000000013c7104486ef1aa53e8ac99b8a8ac02a113b58457ed8b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0080ce25cae416f1da89e4cd3b9f7674acfa3cc43e4d71e10aeb0000000000000000000029cc4a072d5cba23dd0e821d8d711f56124f19015b70abaf08ca4f2124a429fc3e23136...",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "gettxoutproof",
  "params": [
    [
      "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b"
    ],
    "000000000000000000013c7104486ef1aa53e8ac99b8a8ac02a113b58457ed8b"
  ]
}'
```



------

# gettxoutsetinfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns statistics about the unspent transaction output (UTXO) set. Only the current chain tip is supported; querying specific blocks is not available.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/gettxoutsetinfo

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| use_index | boolean | No | Whether to use `coinstatsindex` if available. Defaults to true.  |

## Result

**result** (object): Statistics on the current state of the UTXO set.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "gettxoutsetinfo",
  "params": [
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "height": 894719,
    "bestblock": "000000000000000000022d8a0f2096e71b1fe50b486dcda415857bb0cc5a2ca8",
    "txouts": 174434793,
    "bogosize": 13652712508,
    "hash_serialized_3": "d9183d9a82433fbd0b9370da065fb84bbd1bb5004816f242ce0f2268c0394b2e",
    "total_amount": 19858278.9908868,
    "transactions": 121919431,
    "disk_size": 12197514429
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "gettxoutsetinfo",
  "params": [
    false
  ]
}'
```



------

# sendrawtransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Broadcasts a raw transaction (hex-encoded) to the network. Useful for rebroadcasting transactions not originating from your wallet.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/sendrawtransaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hexstring | string | Yes | The hex-encoded raw transaction. |
| maxfeerate | number or string | No | Reject transactions whose fee rate is higher than this value (in BTC/kB). Set to 0 to disable the check.  |

## Result

**result** (string): The transaction ID (txid) of the submitted transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "sendrawtransaction",
  "params": [
    "0200000000010153fc6712e0c6cbfd15e56743f2a16bba3c0b17837d4fd33d68d2d930739e2b130000000000ffffffff01c0c62d0000000000160014c24b61118d4a2b36257b65e1ea7f15f85e41ff0402483045022100ac32e935715a57ec1d642a5e178c37f74c013bf8e4edc4cb1c79f5352f136e87022020b0b3192347d1b84e9b89d00a2ecb290f18f9c39e514fa3ef2b7a889e7b6c1b012103ab0b56c7aa6254a80c124e04d2149f7fc376afedfe4623f3c59b87c279eaeb1400000000",
    0.1
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1b6d7a0196d78d84c31408982f8fa6bc7383d29c96c5e2b3a55e1f1575dc1cfb",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "sendrawtransaction",
  "params": [
    "0200000000010153fc6712e0c6cbfd15e56743f2a16bba3c0b17837d4fd33d68d2d930739e2b130000000000ffffffff01c0c62d0000000000160014c24b61118d4a2b36257b65e1ea7f15f85e41ff0402483045022100ac32e935715a57ec1d642a5e178c37f74c013bf8e4edc4cb1c79f5352f136e87022020b0b3192347d1b84e9b89d00a2ecb290f18f9c39e514fa3ef2b7a889e7b6c1b012103ab0b56c7aa6254a80c124e04d2149f7fc376afedfe4623f3c59b87c279eaeb1400000000",
    0.1
  ]
}'
```



------

# submitblock

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Attempts to submit a new block to the network. The block data must be hex-encoded.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/submitblock

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hexdata | string | Yes | The hex-encoded block data to submit. |
| dummy | string | No | Dummy value for compatibility with BIP22. This value is ignored.  |

## Result

**result** (null or string): Returns null when valid, or a string error message according to BIP22 otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "submitblock",
  "params": [
    "0000002073bd2184edd74c5c5b4c0c5be04d0e8f5d6b7d5b3b1b1d8e8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": null,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "submitblock",
  "params": [
    "0000002073bd2184edd74c5c5b4c0c5be04d0e8f5d6b7d5b3b1b1d8e8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c",
    "string"
  ]
}'
```



------

# submitheader

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Decodes the given hex-encoded block header and submits it as a candidate chain tip if valid. Throws an error if the header is invalid. This can be used to mine on top of a particular block without  having the full block data.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/submitheader

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hexdata | string | Yes | The hex-encoded block header to submit. |

## Result

**result** (null or string): Returns null if the header was accepted, or a string describing the rejection reason.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "submitheader",
  "params": [
    "0000002073bd2184edd74c5c5b4c0c5be04d0e8f5d6b7d5b3b1b1d8e8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": null,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "submitheader",
  "params": [
    "0000002073bd2184edd74c5c5b4c0c5be04d0e8f5d6b7d5b3b1b1d8e8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c"
  ]
}'
```



------

# submitpackage

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Submits a package containing multiple raw transactions to the mempool for validation and acceptance.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/submitpackage

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| package | string[] | Yes | An array of raw transactions (serialized hex strings) to be submitted as a package.  |

## Result

**result** (object): Transaction results keyed by `wtxid`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "submitpackage",
  "params": [
    [
      "0200000000010153fc6712e0c6cbfd15e56743f2a16bba3c0b17837d4fd33d68d2d930739e2b130000000000ffffffff01c0c62d0000000000160014c24b61118d4a2b36257b65e1ea7f15f85e41ff0402483045022100ac32e935715a57ec1d642a5e178c37f74c013bf8e4edc4cb1c79f5352f136e87022020b0b3192347d1b84e9b89d00a2ecb290f18f9c39e514fa3ef2b7a889e7b6c1b012103ab0b56c7aa6254a80c124e04d2149f7fc376afedfe4623f3c59b87c279eaeb1400000000"
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "package_msg": "transaction failed",
    "tx-results": {
      "6dbccbd4775598af6e9713cd84e90e80431ecc7e932c4b832ab3966ad988bc08": {
        "txid": "c67ecf450828d639a8cf3d74f168fe6bd9a1121a1167a1d46908d703f871c3a6",
        "error": "bad-txns-inputs-missingorspent"
      }
    },
    "replaced-transactions": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "submitpackage",
  "params": [
    [
      "0200000000010153fc6712e0c6cbfd15e56743f2a16bba3c0b17837d4fd33d68d2d930739e2b130000000000ffffffff01c0c62d0000000000160014c24b61118d4a2b36257b65e1ea7f15f85e41ff0402483045022100ac32e935715a57ec1d642a5e178c37f74c013bf8e4edc4cb1c79f5352f136e87022020b0b3192347d1b84e9b89d00a2ecb290f18f9c39e514fa3ef2b7a889e7b6c1b012103ab0b56c7aa6254a80c124e04d2149f7fc376afedfe4623f3c59b87c279eaeb1400000000"
    ]
  ]
}'
```



------

# testmempoolaccept

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Indicates whether one or more raw transactions (serialized, hex-encoded) would be accepted by the mempool.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/testmempoolaccept

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| rawtxs | string[] | Yes | An array of hex-encoded raw transactions to test for mempool acceptance.  |
| maxfeerate | number | No | Reject transactions whose fee rate is higher than the specified value, expressed in BTC/kB.  |

## Result

**result** (object[]): Result of the mempool acceptance test for each transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "testmempoolaccept",
  "params": [
    [
      "0200000000010142d6bd07c424e975fe821c978e720f9a55f9981d62c290cea5ccd06b455d79b90000000000fdffffff028096980000000000160014d3620fe180a0beb8fcc9682fe92e5a25f0feccd370cd2f0100000000160014076d998f6b12c3d1da6217d967154f42a5e0afd30247304402204549b10ea1698d4b4605be1d3bfff810f6135395386207664a66f5bb8bd1470902205fb86c95bfbe7b502195ffa65276d292fb074fe18ba171ef0a35395211384091012103cb5de30b343b35cc09b50f064eb289dd3e252f6985fc4309fba795cc950316afcfa50d00"
    ],
    0
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "txid": "054183ee699ff12cf1c9f4413f421c3cf0a8febc6b82a1d8751a30f5e0fd54c0",
      "wtxid": "b07f26a908955f8071620896476d6e2ca6b6610e5edc9e55f19185ca9536c8de",
      "allowed": true
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "testmempoolaccept",
  "params": [
    [
      "0200000000010142d6bd07c424e975fe821c978e720f9a55f9981d62c290cea5ccd06b455d79b90000000000fdffffff028096980000000000160014d3620fe180a0beb8fcc9682fe92e5a25f0feccd370cd2f0100000000160014076d998f6b12c3d1da6217d967154f42a5e0afd30247304402204549b10ea1698d4b4605be1d3bfff810f6135395386207664a66f5bb8bd1470902205fb86c95bfbe7b502195ffa65276d292fb074fe18ba171ef0a35395211384091012103cb5de30b343b35cc09b50f064eb289dd3e252f6985fc4309fba795cc950316afcfa50d00"
    ],
    1
  ]
}'
```



------

# validateaddress

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Verifies the validity of a given Bitcoin address and provides additional metadata about it.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/validateaddress

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The Bitcoin address to validate. |

## Result

**result** (object): Validation result and metadata about the address.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "validateaddress",
  "params": [
    "39L4cdhha5ueasiKz1wRVd75fHdB9NV2t7"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "isvalid": true,
    "address": "39L4cdhha5ueasiKz1wRVd75fHdB9NV2t7",
    "scriptPubKey": "a91453ca847feb3986cf2be405429e7e513484e0bc9387",
    "isscript": true,
    "iswitness": false
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "validateaddress",
  "params": [
    "39L4cdhha5ueasiKz1wRVd75fHdB9NV2t7"
  ]
}'
```



------

# verifymessage

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

Verifies a message signature using the corresponding Bitcoin address. Returns true if the signature is valid and matches the given address.


Reference: https://www.alchemy.com/docs/chains/dogecoin/dogecoin-api-endpoints/verifymessage

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The Bitcoin address to use for the signature. |
| signature | string | Yes | The base64-encoded signature provided by the signer. |
| message | string | Yes | The message that was signed. |

## Result

**result** (boolean): Whether the signature is valid for the message and address.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "verifymessage",
  "params": [
    "1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY",
    "G9oR+mz9QwPZq2boSmjdtbX0VNdD+dLOFRzJ93ZDHNwhnOtJb1EDAKCK3NmPIzctQDAazX9gh3d+zdoFKc69bQ4=",
    "Test message from Bitcoin"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "verifymessage",
  "params": [
    "1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY",
    "G9oR+mz9QwPZq2boSmjdtbX0VNdD+dLOFRzJ93ZDHNwhnOtJb1EDAKCK3NmPIzctQDAazX9gh3d+zdoFKc69bQ4=",
    "Test message from Bitcoin"
  ]
}'
```



------

# UTXO Overview

> Understand how the Unspent Transaction Output (UTXO) model tracks balances on Dogecoin.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

Dogecoin uses the **Unspent Transaction Output (UTXO) model** to track user balances, in contrast to the **account model** used by Ethereum and other EVM chains.

## UTXO-based model

UTXO stands for *Unspent Transaction Output*. Instead of tracking an account's overall balance, the network maintains a set of UTXOs: outputs from past transactions that credit specific addresses with a specific amount.

When someone says they own 3 DOGE, what they actually hold is one or more UTXOs that together sum to 3 DOGE. To spend that balance, a wallet selects specific UTXOs as inputs to a new transaction.

## What is a UTXO?

A UTXO is the output of a previous transaction that has not yet been spent. Every time a transaction is confirmed:

* The inputs reference one or more UTXOs from previous transactions.
* The outputs create new UTXOs credited to the recipient addresses.
* Any leftover value (input minus output minus fee) returns to the sender as a "change" UTXO.

So each transaction consumes old UTXOs and produces new ones. The full set of UTXOs at any point in time represents the network's spendable state.

## Properties of UTXOs

* **Non-fungible.** Each UTXO is a distinct object referenced by its transaction ID and output index.
* **Specific to spend.** To spend a UTXO you must refer to that exact UTXO, not just an aggregate balance.
* **Change creates new UTXOs.** Any leftover from the input value becomes a new UTXO sent back to the spender.
* **Single-use.** A UTXO can only be spent once; double-spending is prevented at consensus.
* **Script-locked.** Each UTXO carries a locking script that defines the conditions under which it can be spent (typically a signature from the owning private key).

## Account model vs UTXO model

|                    | Account model (Ethereum, EVM chains)                        | UTXO model (Dogecoin)                                                             |
| ------------------ | ----------------------------------------------------------- | --------------------------------------------------------------------------------- |
| User balance       | Single overall account state (e.g. address X holds 4.2 ETH) | Sum of specific UTXOs (e.g. address X owns 29 UTXOs totalling 2.65 DOGE)          |
| Query model        | Direct: read account balance                                | Compute: aggregate over an address's UTXOs                                        |
| Privacy            | Repeated address use correlates activity                    | Rotating addresses per output is the recommended privacy model                    |
| Transaction model  | State transition: balance update                            | Input/output: consume UTXOs, create new ones                                      |

## Querying UTXO data with Alchemy

Alchemy's UTXO API gives you a clean REST interface to fetch Dogecoin addresses, balances, balance history, UTXOs, and block/transaction data. See the UTXO API endpoints in the sidebar, or the [UTXO migration guide](https://www.alchemy.com/docs/bitcoin/utxo-migration-guide) if you're moving from QuickNode, BlockCypher, or Blockdaemon.

------

# Get Block Hash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/block-index/{block_height}

Returns the block hash for a given block height on the selected network.

Reference: https://www.alchemy.com/docs/chains/dogecoin/utxo-api-endpoints/utxo-api-endpoints/get-block-hash-by-index

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| block_height | integer | Yes | Block height as a non-negative integer. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/block-index/860730
```



------

# Get Transaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/tx/{txid}

Returns normalized transaction data for the given transaction ID. Response shape is consistent across UTXO networks. Empty fields are omitted.


Reference: https://www.alchemy.com/docs/chains/dogecoin/utxo-api-endpoints/utxo-api-endpoints/get-transaction

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| txid | string | Yes | Hex-encoded transaction ID. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/tx/bdd9010d7a666d3b7d3c7434b1ed98ccdf51e07aa69f00919f191f6a5e217482
```



------

# Get Transaction Specific

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/tx-specific/{txid}

Returns transaction data in the exact format returned by the underlying coin backend, including all chain-specific fields not surfaced by the normalized `/tx/{txid}` endpoint.


Reference: https://www.alchemy.com/docs/chains/dogecoin/utxo-api-endpoints/utxo-api-endpoints/get-transaction-specific

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| txid | string | Yes | Hex-encoded transaction ID. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/tx-specific/bdd9010d7a666d3b7d3c7434b1ed98ccdf51e07aa69f00919f191f6a5e217482
```



------

# Get Address

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/address/{address}

Returns balances and transactions for the given Dogecoin address. Transactions are sorted newest-first by block height.


Reference: https://www.alchemy.com/docs/chains/dogecoin/utxo-api-endpoints/utxo-api-endpoints/get-address

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| address | string | Yes | Dogecoin address. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| page | integer | No | Page of returned transactions, starting from 1. |
| pageSize | integer | No | Number of transactions returned per page (max 1000). |
| from | integer | No | Filter transactions starting from this block height. |
| to | integer | No | Filter transactions up to this block height. |
| details | enum | No | Level of detail to return. |
| secondary | string | No | Secondary (fiat) currency code for balance conversion, e.g. `usd` or `eur`. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/address/DH5yaieqoZN36fDVciNyRueRGvGLR3mr7L
```



------

# Get Xpub

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/xpub/{xpub}

Returns balances and transactions for an xpub or output descriptor on Dogecoin. Supports BIP44 derivation. The BIP version is determined by the xpub prefix or by an explicit output descriptor.


Reference: https://www.alchemy.com/docs/chains/dogecoin/utxo-api-endpoints/utxo-api-endpoints/get-xpub

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| xpub | string | Yes | Extended public key or output descriptor. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| page | integer | No |  |
| pageSize | integer | No |  |
| from | integer | No |  |
| to | integer | No |  |
| details | enum | No |  |
| tokens | enum | No | Which derived addresses to return. |
| secondary | string | No | Secondary (fiat) currency code for balance conversion. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/xpub/xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz
```



------

# Get UTXOs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/utxo/{descriptor}

Returns the unspent transaction outputs for a Dogecoin address, xpub, or output descriptor. Includes confirmed and unconfirmed UTXOs by default; pass `confirmed=true` to limit to confirmed only. UTXOs are sorted newest-first.


Reference: https://www.alchemy.com/docs/chains/dogecoin/utxo-api-endpoints/utxo-api-endpoints/get-utxo

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| descriptor | string | Yes | Dogecoin address, xpub, or output descriptor. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| confirmed | boolean | No | When `true`, exclude unconfirmed UTXOs. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/utxo/DH5yaieqoZN36fDVciNyRueRGvGLR3mr7L
```



------

# Get Block

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/block/{block}

Returns information about a block on Dogecoin, including transactions, by block hash or block height. Results are paginated.


Reference: https://www.alchemy.com/docs/chains/dogecoin/utxo-api-endpoints/utxo-api-endpoints/get-block

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| block | string | Yes | Block height (integer) or block hash (hex string). |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| page | integer | No |  |
| pageSize | integer | No |  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/block/860730
```



------

# Send Transaction (GET)

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/sendtx/{hex}

Broadcasts a signed raw Dogecoin transaction encoded as a hex string in the path. Returns the transaction ID on success. The example value below is the hex of an already-confirmed Dogecoin transaction; re-sending it will respond with the Bitcoin-Core `-27: transaction already in block chain` error. Substitute your own signed raw-transaction hex to broadcast. For larger payloads, use the POST variant.


Reference: https://www.alchemy.com/docs/chains/dogecoin/utxo-api-endpoints/utxo-api-endpoints/send-transaction-get

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| hex | string | Yes | Hex-encoded raw transaction bytes. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/sendtx/0100000001d051d9ef4f425d17e563bf7b8deb069dc6c1ede2d11e992db86d1ee7da74b7e6010000006b4830450221009fb8326bb131eae26db852816b6ce964525d8ff61e2b303e34bedb08307cb482022073ead61ededcd78577d23376cd7d485690dbb45700da8b6e8d3c71de1289529901210265a3c00a588c899676681e166c916ed030385c9da5a4c8d4b9029eed88a56d44ffffffff02dc6c9931000000001976a914830a7420e63d76244ff7cbd1c248e94c1446325988acf7c00bad270000001976a9140be4c25349ee33a3f3d9674fdd31618918cacd4588ac00000000
```



------

# Send Transaction (POST)

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/sendtx/

Broadcasts a signed raw Dogecoin transaction by sending hex bytes in the request body. The trailing slash on the path is mandatory; see the [Blockbook API reference](https://github.com/trezor/blockbook/blob/master/docs/api.md#send-transaction). Use this for larger payloads (request body limit 8 MiB). Returns the transaction ID on success.

> **Heads up**: the POST variant currently returns `{ "error": "Parse error" }` (HTTP 400) > on the Alchemy proxy regardless of body format. Until that upstream issue is resolved, > prefer the GET variant above for hex payloads under the URL-length limit.


Reference: https://www.alchemy.com/docs/chains/dogecoin/utxo-api-endpoints/utxo-api-endpoints/send-transaction-post

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/sendtx/
```



------

# Get Tickers List

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/tickers-list/

Returns the list of available currency rate tickers (secondary currencies) for Dogecoin at a given timestamp, along with the actual data timestamp.

> **Heads up**: this endpoint currently returns HTTP 503 `Unable to complete request at this > time` on the Alchemy proxy. The schema and request shape below are documented for > reference; "Try It" will not return live data until the upstream service is restored.


Reference: https://www.alchemy.com/docs/chains/dogecoin/utxo-api-endpoints/utxo-api-endpoints/get-tickers-list

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| timestamp | integer | Yes | Unix timestamp for the requested currency list. |
| token | string | No | Token symbol or contract/address key for token-specific rates. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url 'https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/tickers-list/?timestamp=1578391200'
```



------

# Get Tickers

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/tickers/

Returns the Dogecoin currency rate for the specified currency and timestamp. If the requested currency is unavailable for that timestamp, the closest rate is returned with the actual rate timestamp.

> **Heads up**: this endpoint currently returns HTTP 503 `Unable to complete request at this > time` on the Alchemy proxy. The schema and request shape below are documented for > reference; "Try It" will not return live data until the upstream service is restored.


Reference: https://www.alchemy.com/docs/chains/dogecoin/utxo-api-endpoints/utxo-api-endpoints/get-tickers

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| currency | string | No | Fiat or crypto currency code (e.g. `usd`, `eur`, `eth`). Omit to return all. |
| timestamp | integer | No | Unix timestamp. Omit to return the latest. |
| block | string | No | Block height or hash whose timestamp should be used for historical rates. |
| token | string | No | Token symbol or contract/address key for token-specific rates. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/tickers/
```



------

# Get Balance History

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/balancehistory/{address}

Returns the balance history for the specified Dogecoin address. Optionally enrich each bucket with secondary (fiat) currency rates at the time of the transaction.


Reference: https://www.alchemy.com/docs/chains/dogecoin/utxo-api-endpoints/utxo-api-endpoints/get-balance-history

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| address | string | Yes | Dogecoin address. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| from | integer | Yes | Start of the history range as a Unix timestamp. |
| to | integer | Yes | End of the history range as a Unix timestamp. |
| fiatcurrency | string | No | Fiat currency code to enrich each bucket with. |
| groupBy | integer | No | Aggregation interval in seconds. Defaults to 3600. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url 'https://dogecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/balancehistory/DH5yaieqoZN36fDVciNyRueRGvGLR3mr7L?from=1386474927&to=1757280000'
```



------

# UTXO WebSockets

> Stream block, transaction, address, and fiat rate updates from Dogecoin over a persistent WebSocket connection.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

The UTXO WebSockets API streams real-time events from Dogecoin over a persistent connection, powered by [Trezor Blockbook](https://github.com/trezor/blockbook). Use it to push-subscribe to new blocks, new transactions, transactions affecting specific addresses, and fiat rate updates, with the same data shapes returned by the [UTXO REST API](/docs/dogecoin/utxo).

<Info>
  When the chain reorganizes, the server emits new block events for the new chain. You may see multiple events at the same height; treat the latest one as canonical.
</Info>

# Supported Networks

* `dogecoin-mainnet`

# Connection

Open a WebSocket connection using the standard Alchemy WebSocket URL for the network:

<CodeGroup>
  ```shell wscat
  wscat -c wss://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}
  ```
</CodeGroup>

Replace `{apiKey}` with your Alchemy API key from the [Alchemy Dashboard](https://dashboard.alchemy.com/). The WebSocket URL for an app uses the same host as its HTTPS URL, just with the `wss://` scheme.

# Message format

Every client message uses the following envelope:

```json
{
  "id": "1",
  "method": "<request or subscription name>",
  "params": { ... }
}
```

* `id`: a client-chosen string. The server echoes it back on every response so you can correlate.
* `method`: the request method or subscription name.
* `params`: method-specific arguments. Use `{}` when none.

A connection can hold only one active subscription per event type. Sending a second `subscribeAddresses` replaces the previous address list. To stop receiving events, close the connection.

# Subscriptions

## subscribeNewBlock

Emits an event each time a new block is added to the chain.

### Parameters

* None.

### Response

* `id`: `string` - The id you sent on the request.
* `data`:
  * `height`: `number` - Block height.
  * `hash`: `string` - Block hash.

### Request

<CodeGroup>
  ```shell wscat
  // open the websocket
  wscat -c wss://dogecoin-mainnet.g.alchemy.com/v2/{apiKey}

  // then send the subscription
  {"id":"1","method":"subscribeNewBlock","params":{}}
  ```
</CodeGroup>

### Result

<CodeGroup>
  ```json result
  {"id":"1","data":{"subscribed":true}}

  {
    "id":"1",
    "data":{
      "height":5300123,
      "hash":"<doge block hash>"
    }
  }
  ```
</CodeGroup>

## subscribeNewTransaction

Emits every new transaction added to the blockchain, across all addresses.

<Info>
  This subscription is a high-volume firehose and requires the backend to be running with the `-enablesubnewtx` flag. It may not be enabled on all networks. If you do not receive events after subscribing, fall back to `subscribeAddresses` for targeted updates.
</Info>

### Parameters

* None.

### Response

* `id`: `string` - The id you sent on the request.
* `data`: a transaction object using the same shape as `GET /api/v2/tx/{txid}`. See the [Get transaction reference](https://github.com/trezor/blockbook/blob/master/docs/api.md#get-transaction) for the full field list.

### Request

<CodeGroup>
  ```shell wscat
  {"id":"2","method":"subscribeNewTransaction","params":{}}
  ```
</CodeGroup>

### Result

<CodeGroup>
  ```json result
  {"id":"2","data":{"subscribed":true}}

  {
    "id":"2",
    "data":{
      "txid":"<doge txid>",
      "version":2,
      "vin":[
        {
          "txid":"<input txid>",
          "vout":1,
          "n":0,
          "addresses":["DTnt7vZG7sRfSc4QyqGSzqWLqA8DUFTpXY"],
          "isAddress":true,
          "value":"10106300"
        }
      ],
      "vout":[
        {
          "value":"175000",
          "n":0,
          "addresses":["D6ravJL6Fgxtgp8k2XZZt1QfUmwwGuLwQJ"],
          "isAddress":true
        }
      ],
      "blockHeight":-1,
      "confirmations":0,
      "value":"10063100",
      "valueIn":"10106300",
      "fees":"43200"
    }
  }
  ```
</CodeGroup>

## subscribeAddresses

Emits an event when a new transaction touches any of the supplied addresses. Optionally also emits when those transactions confirm in a new block.

### Parameters

* `addresses`: `string[]` - One or more addresses to watch. Sending a new `subscribeAddresses` request replaces the previous list. Dogecoin uses P2PKH (`D...`) and P2SH (`A...`, `9...`) address formats.
* `newBlockTxs`: `boolean` *(optional)* - When `true`, also emits an event when a watched transaction is included in a new block, not just when it enters the mempool. Defaults to `false`.

### Response

* `id`: `string` - The id you sent on the request.
* `data`:
  * Initial: `{ "subscribed": true }`.
  * On each event: `{ "address": <string>, "tx": <Tx> }` where `Tx` follows the same shape as `GET /api/v2/tx/{txid}`.

### Request

<CodeGroup>
  ```shell wscat
  {
    "id":"3",
    "method":"subscribeAddresses",
    "params":{
      "addresses":[
        "DTnt7vZG7sRfSc4QyqGSzqWLqA8DUFTpXY",
        "D6ravJL6Fgxtgp8k2XZZt1QfUmwwGuLwQJ"
      ],
      "newBlockTxs":true
    }
  }
  ```
</CodeGroup>

### Result

<CodeGroup>
  ```json result
  {"id":"3","data":{"subscribed":true}}

  {
    "id":"3",
    "data":{
      "address":"DTnt7vZG7sRfSc4QyqGSzqWLqA8DUFTpXY",
      "tx":{
        "txid":"<doge txid>",
        "vin":[
          {
            "n":0,
            "addresses":["DTnt7vZG7sRfSc4QyqGSzqWLqA8DUFTpXY"],
            "isAddress":true,
            "value":"10106300"
          }
        ],
        "vout":[
          {
            "value":"175000",
            "n":0,
            "addresses":["D6ravJL6Fgxtgp8k2XZZt1QfUmwwGuLwQJ"],
            "isAddress":true
          }
        ],
        "blockHeight":-1,
        "confirmations":0,
        "value":"10063100",
        "fees":"43200"
      }
    }
  }
  ```
</CodeGroup>

## subscribeFiatRates

Emits an event when the fiat rate ticker for the chain's native asset updates.

### Parameters

* `currency`: `string` *(optional)* - Filter to a single fiat currency (e.g. `"usd"`, `"eur"`). When omitted, the server emits all available currencies on each update.

### Response

* `id`: `string` - The id you sent on the request.
* `data`:
  * Initial: `{ "subscribed": true }`.
  * On each event: `{ "rates": { "<currency>": <number>, ... } }`.

### Request

<CodeGroup>
  ```shell wscat
  {"id":"4","method":"subscribeFiatRates","params":{"currency":"usd"}}
  ```
</CodeGroup>

### Result

<CodeGroup>
  ```json result
  {"id":"4","data":{"subscribed":true}}

  {"id":"4","data":{"rates":{"usd":0.0834}}}
  ```
</CodeGroup>

# Request methods

In addition to subscriptions, the WebSocket connection accepts the same one-shot requests as the [UTXO REST API](/docs/chains/dogecoin/utxo-api-endpoints/utxo-api-endpoints). They are useful when you have already opened a connection for subscriptions and want to fetch ad-hoc data without a separate HTTP round-trip.

| Method                       | REST equivalent                                  | Description                                                       |
| ---------------------------- | ------------------------------------------------ | ----------------------------------------------------------------- |
| `getInfo`                    | `GET /api/`                                      | Backend and Blockbook status                                      |
| `getBlockHash`               | `GET /api/v2/block-index/{block_height}`         | Block hash for a given height                                     |
| `getAccountInfo`             | `GET /api/v2/address/{address}`, `/xpub/{xpub}`  | Balances and transactions for an address or xpub                  |
| `getAccountUtxo`             | `GET /api/v2/utxo/{descriptor}`                  | UTXOs for an address or xpub                                      |
| `getTransaction`             | `GET /api/v2/tx/{txid}`                          | Normalized transaction data                                       |
| `getTransactionSpecific`     | `GET /api/v2/tx-specific/{txid}`                 | Coin-specific raw transaction                                     |
| `getBalanceHistory`          | `GET /api/v2/balancehistory/{address}`           | Address balance history grouped by time                           |
| `estimateFee`                | n/a                                              | Fee estimate for a target confirmation depth                      |
| `sendTransaction`            | `POST /api/v2/sendtx/`                           | Broadcast a signed raw transaction                                |
| `getCurrentFiatRates`        | `GET /api/v2/tickers/`                           | Current fiat rates                                                |
| `getFiatRatesTickersList`    | `GET /api/v2/tickers-list/`                      | List of available fiat tickers for a timestamp                    |
| `getFiatRatesForTimestamps`  | n/a                                              | Historical fiat rates for specific timestamps                     |
| `getMempoolFilters`          | n/a                                              | Compact block filters for the mempool (for light clients)         |
| `getBlockFilter`             | n/a                                              | Compact block filter for a given block                            |
| `ping`                       | n/a                                              | Connection health check                                           |

For request and response payload shapes, see the [Trezor Blockbook WebSocket API reference](https://github.com/trezor/blockbook/blob/master/docs/api.md#websocket-api). The payloads are the same as the REST API; only the connection layer differs.

# WebSocket limits

The following limits apply to Alchemy WebSocket connections:

* 100 concurrent connections per app on the FREE tier; 2,000 on all other tiers.
* 1,000 unique subscriptions per connection.

See [Best Practices for Using WebSockets](/docs/reference/best-practices-for-using-websockets-in-web3) for connection-management tips and [Compute Unit Costs](/docs/reference/compute-unit-costs) for billing details.

# See also

* [UTXO Overview](/docs/dogecoin/utxo)
* [UTXO API Endpoints](/docs/chains/dogecoin/utxo-api-endpoints/utxo-api-endpoints)
* [UTXO Migration Guide](/docs/bitcoin/utxo-migration-guide)

------

# Dogecoin API FAQ

> Frequently asked questions about the Dogecoin API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Dogecoin?

Dogecoin (DOGE) is a peer-to-peer cryptocurrency launched in 2013. Originally derived from Litecoin (and indirectly Bitcoin), it uses a Scrypt-based proof-of-work consensus and is known for its active community and low transaction fees.

## What is the Dogecoin API?

The Dogecoin API allows you to interact with the Dogecoin network using JSON-RPC methods. Through the API, you can retrieve data about blocks, transactions, and the mempool, as well as broadcast new transactions to the network.

## How can I get started using the Dogecoin API?

Check out our [Dogecoin API Quickstart](/docs/reference/dogecoin-api-quickstart) guide for setup instructions, sample code, and your first API call.

## Does Dogecoin support smart contracts?

Dogecoin supports basic Bitcoin-style scripting but does not have a full smart contract virtual machine like Ethereum.

## What API standard does Dogecoin use?

Dogecoin Core implements a standard JSON-RPC interface for querying blockchain data and submitting transactions, derived from Bitcoin Core.

## What is a Dogecoin API key?

When accessing the Dogecoin network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network.

## Which libraries can I use with the Dogecoin API?

You can use any HTTP client that supports JSON payloads, e.g. `axios`, `fetch`, `requests`, or `curl`. Bitcoin-Core-compatible libraries like `bitcoin-core` (Node.js) and `python-bitcoinrpc` also work with Dogecoin's RPC interface.

## What programming languages are compatible with the API?

The API works with any programming language that can send JSON over HTTP. Common choices include JavaScript/TypeScript, Python, Go, and Java.

## What is used for fees in Dogecoin?

Dogecoin transaction fees are paid in DOGE. They are calculated per byte of transaction data and are used to incentivize miners to include transactions in blocks.

## What methods does Alchemy support for the Dogecoin API?

You can find a full list of supported JSON-RPC methods on the [Dogecoin API Overview](/docs/dogecoin/dogecoin-api-overview) page.

## My question isn't listed here, where can I get help?

If you have any questions or feedback, please contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Fantom Network Deprecation Notice

> Important notice regarding the deprecation of the Fantom network and API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## ⚠️ Deprecation Notice

Due to Fantom migrating to Sonic, Alchemy will discontinue support for Fantom mainnet nodes on October 7, 2025.
Please migrate your apps and infrastructure to Sonic chain before that date to avoid service disruption.

You can find more information about Sonic chain [here](/docs/reference/sonic-api-quickstart).

------

# Flow EVM API Quickstart

> How to get started building on Flow EVM using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Flow is a blockchain designed for the next generation of apps, games, and digital assets. Known for its high performance, scalability, and developer-friendly features, Flow offers a robust environment for deploying decentralized applications (dApps).

The Flow API lets you interact with the Flow network through a collection of JSON-RPC methods. If you're familiar with Ethereum's JSON-RPC APIs, working with Flow is intuitive and straightforward.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Flow EVM client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { flowTestnet } from "viem/chains";

const client = createPublicClient({
  chain: flowTestnet,
  transport: http("https://flow-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (FLOW):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Flow EVM APIs

For the full list of Flow EVM APIs, see the [Flow EVM API Endpoints](/docs/chains#flow-apis).

------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves account information including balance, code, and nonce for a given address at a specified block.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the account information. |

## Result

**Account information** (object): An object containing the account's balance, code, and nonce.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "balance": "0x1cfe56f3795885980000",
    "code": "0x",
    "nonce": "0x5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_protocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current protocol version used by the client.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-protocol-version

## Result

**Protocol Version** (string): The protocol version as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3f",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_protocolVersion"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# txpool_content

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of the exact details of all transactions currently pending for inclusion in the next blocks, as well as ones that are being scheduled for future execution.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/txpool-content

## Result

**content** (object): Object with pending and queued transactions grouped by sender address and nonce.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "txpool_content"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://flow-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/flow-evm/flow-evm-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://flow-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Flow API FAQ

> Frequently asked questions about the Flow API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Flow?

Flow is a layer one blockchain with support for both Solidity and Cadence, a next-gen smart contract language. Any smart contract that works on Ethereum or an EVM L2 works on Flow.

## What is the Flow API?

The Flow API enables interaction with the Flow network through JSON-RPC methods. It provides tools for transactions, smart contract deployment, and data retrieval.

## How can I get started using the Flow API?

Refer to the [Flow API Quickstart guide](/docs/reference/flow-evm-api-quickstart) for setup instructions.

## Is Flow EVM-compatible?

Flow supports full EVM equivalence. Solidity contracts work out of the box on Flow and can access Flow's protocol benefits without code changes. That means Solidity devs can tap into Flow's user base and unique IPs without any implementation risk.

## What API does Flow use?

Flow uses a JSON-RPC API standard tailored to its multi-role architecture.

## What is a Flow API key?

When accessing Flow via a node provider, you use an API key to interact with the network.

For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup).

## What programming languages work with Flow?

Flow uses Cadence, a resource-oriented programming language, for smart contracts. For offchain interactions and dApp development, you can use JavaScript, TypeScript, or other web development languages. Flow now also works with Solidity.

## Which libraries support Flow?

Flow has its own set of libraries and tools designed specifically for its ecosystem. However, it also supports integrations with popular libraries like fcl-js (Flow Client Library) which facilitates interaction with the Flow blockchain.

## What does Flow use for gas?

$FLOW, the native cryptocurrency, is used for transaction fees and gas.

## What methods does Alchemy support for the Flow API?

Refer to the [Flow API Endpoints](/docs/chains#flow-apis) for a complete list of Alchemy-supported methods.

## Where can I get additional help?

If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Fraxtal API Quickstart

> How to get started building on Fraxtal using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Fraxtal (Frax Chain) is an EVM-equivalent Layer-2 built on Optimism's OP Stack that uses FRAX as gas and rewards onchain activity via Flox/FXTL to scale the Frax ecosystem.

The Fraxtal API lets you interact with the Fraxtal network through a set of JSON-RPC methods. If you've worked with Ethereum's JSON-RPC APIs, the design will feel familiar.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Fraxtal client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { fraxtal } from "viem/chains";

const client = createPublicClient({
  chain: fraxtal,
  transport: http("https://frax-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (frxETH):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Fraxtal APIs

For the full list of Fraxtal APIs, see the [Fraxtal API Endpoints](/docs/chains#fraxtal-apis).

------

# Frax API Overview

> Overview of available Frax API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Frax APIs

📙 Get started with our [Frax API Quickstart Guide](/docs/reference/frax-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_blockNumber`](/docs/chains/frax/frax-api-endpoints/eth-block-number)                      | [`eth_call`](/docs/chains/frax/frax-api-endpoints/eth-call)                                 |
| [`eth_chainId`](/docs/chains/frax/frax-api-endpoints/eth-chain-id)                              | [`eth_estimateGas`](/docs/chains/frax/frax-api-endpoints/eth-estimate-gas)                  |
| [`eth_gasPrice`](/docs/chains/frax/frax-api-endpoints/eth-gas-price)                            | [`eth_getAccount`](/docs/chains/frax/frax-api-endpoints/eth-get-account)                    |
| [`eth_getBalance`](/docs/chains/frax/frax-api-endpoints/eth-get-balance)                        | [`eth_getBlockByHash`](/docs/chains/frax/frax-api-endpoints/eth-get-block-by-hash)          |
| [`eth_getBlockByNumber`](/docs/chains/frax/frax-api-endpoints/eth-get-block-by-number)          | [`eth_getBlockTransactionCountByHash`](/docs/chains/frax/frax-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/frax/frax-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/frax/frax-api-endpoints/eth-get-code)                          |
| [`eth_getFilterChanges`](/docs/chains/frax/frax-api-endpoints/eth-get-filter-changes)           | [`eth_getFilterLogs`](/docs/chains/frax/frax-api-endpoints/eth-get-filter-logs)             |
| [`eth_getLogs`](/docs/chains/frax/frax-api-endpoints/eth-get-logs)                              | [`eth_getRawTransactionByHash`](/docs/chains/frax/frax-api-endpoints/eth-get-raw-transaction-by-hash) |
| [`eth_getStorageAt`](/docs/chains/frax/frax-api-endpoints/eth-get-storage-at)                   | [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/frax/frax-api-endpoints/eth-get-transaction-by-block-hash-and-index) |
| [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/frax/frax-api-endpoints/eth-get-transaction-by-block-number-and-index) | [`eth_getTransactionByHash`](/docs/chains/frax/frax-api-endpoints/eth-get-transaction-by-hash) |
| [`eth_getTransactionCount`](/docs/chains/frax/frax-api-endpoints/eth-get-transaction-count)     | [`eth_getTransactionReceipt`](/docs/chains/frax/frax-api-endpoints/eth-get-transaction-receipt) |
| [`eth_newBlockFilter`](/docs/chains/frax/frax-api-endpoints/eth-new-block-filter)               | [`eth_newFilter`](/docs/chains/frax/frax-api-endpoints/eth-new-filter)                      |
| [`eth_sendRawTransaction`](/docs/chains/frax/frax-api-endpoints/eth-send-raw-transaction)       | [`eth_submitWork`](/docs/chains/frax/frax-api-endpoints/eth-submit-work)                    |
| [`eth_subscribe`](/docs/chains/frax/frax-api-endpoints/eth-subscribe)                           | [`eth_uninstallFilter`](/docs/chains/frax/frax-api-endpoints/eth-uninstall-filter)          |
| [`eth_unsubscribe`](/docs/chains/frax/frax-api-endpoints/eth-unsubscribe)                       | [`net_version`](/docs/chains/frax/frax-api-endpoints/net-version)                           |
| [`web3_clientVersion`](/docs/chains/frax/frax-api-endpoints/web-3-client-version)               | [`web3_sha3`](/docs/chains/frax/frax-api-endpoints/web-3-sha-3)                             |

## Related APIs

The following Alchemy APIs are also supported on Frax:

* [Bundler API](/docs/wallets/transactions/low-level-infra/bundler/overview)
* [Gas Manager API](/docs/wallets/api-reference/gas-manager-admin-api/gas-abstraction-api-endpoints/alchemy-request-gas-and-paymaster-and-data)
* [Debug API](/docs/reference/debug-api-quickstart)

------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://frax-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/frax/frax-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://frax-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Frax API FAQ

> Frequently asked questions about the Frax API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Frax?
Fraxtal (Frax Chain) is an EVM-equivalent Layer-2 built on Optimism’s OP Stack that uses FRAX as gas and rewards onchain activity via Flox/FXTL to scale the Frax ecosystem.

## How do I get started with Frax?
Check out our [Frax API Quickstart guide](/docs/reference/frax-api-quickstart) to get started building on Frax.

## What is the Frax API?
The Frax API lets you interface with the Frax mainnet. With this API, you can execute transactions, query onchain data, and interact with the Frax network using the JSON-RPC standard.

## Is Frax EVM compatible?
Yes, Frax is EVM compatible.

## What API does Frax use?
Frax uses the JSON-RPC API standard. This API is essential for any blockchain interaction on the Frax network, allowing you to read block/transaction data, query chain information, execute smart contracts, and store data onchain.

## What methods are supported on Frax?
Fraxtal supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Fraxtal API Endpoints](/docs/chains#fraxtal-apis) for a complete list.

## What is a Frax API key?
When accessing the Frax network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup).

## Which libraries support Frax?
Common Ethereum libraries like [ethers.js](https://docs.ethers.org/v5/) should be compatible with Frax, given its EVM nature.

## My question isn’t here, where can I get help?
If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Geist Network Deprecation Notice

> Important notice regarding the deprecation of the Geist network and API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## ⚠️ Deprecation Notice

**The Geist network has been officially deprecated and is no longer supported.**

Effective immediately, all Geist network services are being phased out, including JSON-RPC API endpoints and network infrastructure.

## Migration options

We strongly recommend migrating to **Base**, as the Aavegotchi ecosystem (Geist's primary use case) has officially moved there following a community vote.

**Recommended:**
* **[Base](/docs/reference/base-api-quickstart)**: Primary recommendation - where Aavegotchi and the gaming ecosystem have migrated

**Alternative options:**
* **[Arbitrum](/docs/reference/arbitrum-api-quickstart)**: The underlying framework that powered Geist
* **[Polygon](/docs/reference/polygon-pos-api-quickstart)**: For other gaming and NFT applications
* **[Ethereum](/docs/reference/ethereum-api-quickstart)**: For scalable Ethereum applications

## Next steps

1. Choose an alternative network for your application
2. Update your API endpoints and configuration
3. Contact support through the [Alchemy Dashboard](https://dashboard.alchemy.com) if you need assistance

------

# Gensyn API Quickstart

> How to get started building on Gensyn using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Gensyn Chain is an EVM-compatible custom Ethereum rollup purpose-built for machine learning -- coordinating jobs, verifying training, and paying compute providers onchain.

The Gensyn API lets you interact with the Gensyn network through a set of JSON-RPC methods. If you've worked with Ethereum's JSON-RPC APIs, the design will feel familiar.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Gensyn client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http, defineChain } from "viem";

const gensyn = defineChain({
  id: 685689,
  name: "Gensyn",
  nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 },
  rpcUrls: {
    default: { http: ["https://gensyn-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
  },
});

const client = createPublicClient({
  chain: gensyn,
  transport: http("https://gensyn-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (ETH):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Gensyn APIs

For the full list of Gensyn APIs, see the [Gensyn API Endpoints](/docs/chains#gensyn-apis).

------

# Gensyn API Overview

> Overview of available Gensyn API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Gensyn APIs

📙 Get started with our [Gensyn API Quickstart Guide](/docs/reference/gensyn-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`debug_executionWitness`](/docs/chains/gensyn/gensyn-api-endpoints/debug-execution-witness)    | [`debug_executionWitnessByHash`](/docs/chains/gensyn/gensyn-api-endpoints/debug-execution-witness-by-hash) |
| [`eth_accounts`](/docs/chains/gensyn/gensyn-api-endpoints/eth-accounts)                         | [`eth_blobBaseFee`](/docs/chains/gensyn/gensyn-api-endpoints/eth-blob-base-fee)             |
| [`eth_blockNumber`](/docs/chains/gensyn/gensyn-api-endpoints/eth-block-number)                  | [`eth_call`](/docs/chains/gensyn/gensyn-api-endpoints/eth-call)                             |
| [`eth_chainId`](/docs/chains/gensyn/gensyn-api-endpoints/eth-chain-id)                          | [`eth_createAccessList`](/docs/chains/gensyn/gensyn-api-endpoints/eth-create-access-list)   |
| [`eth_estimateGas`](/docs/chains/gensyn/gensyn-api-endpoints/eth-estimate-gas)                  | [`eth_feeHistory`](/docs/chains/gensyn/gensyn-api-endpoints/eth-fee-history)                |
| [`eth_fillTransaction`](/docs/chains/gensyn/gensyn-api-endpoints/eth-fill-transaction)          | [`eth_gasPrice`](/docs/chains/gensyn/gensyn-api-endpoints/eth-gas-price)                    |
| [`eth_getAccount`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-account)                    | [`eth_getAccountInfo`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-account-info)       |
| [`eth_getBalance`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-balance)                    | [`eth_getBlockByHash`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-block-by-hash)      |
| [`eth_getBlockByNumber`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-block-by-number)      | [`eth_getBlockReceipts`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-block-receipts)   |
| [`eth_getBlockTransactionCountByHash`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-block-transaction-count-by-hash) | [`eth_getBlockTransactionCountByNumber`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-block-transaction-count-by-number) |
| [`eth_getCode`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-code)                          | [`eth_getFilterChanges`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-filter-changes)   |
| [`eth_getFilterLogs`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-filter-logs)             | [`eth_getLogs`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-logs)                      |
| [`eth_getProof`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-proof)                        | [`eth_getRawTransactionByHash`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-raw-transaction-by-hash) |
| [`eth_getStorageAt`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-storage-at)               | [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-transaction-by-block-hash-and-index) |
| [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-transaction-by-block-number-and-index) | [`eth_getTransactionByHash`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-transaction-by-hash) |
| [`eth_getTransactionCount`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-transaction-count) | [`eth_getTransactionReceipt`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-transaction-receipt) |
| [`eth_getUncleByBlockHashAndIndex`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-uncle-by-block-hash-and-index) | [`eth_getUncleByBlockNumberAndIndex`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-uncle-by-block-number-and-index) |
| [`eth_getUncleCountByBlockHash`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-uncle-count-by-block-hash) | [`eth_getUncleCountByBlockNumber`](/docs/chains/gensyn/gensyn-api-endpoints/eth-get-uncle-count-by-block-number) |
| [`eth_maxPriorityFeePerGas`](/docs/chains/gensyn/gensyn-api-endpoints/eth-max-priority-fee-per-gas) | [`eth_newBlockFilter`](/docs/chains/gensyn/gensyn-api-endpoints/eth-new-block-filter)       |
| [`eth_newFilter`](/docs/chains/gensyn/gensyn-api-endpoints/eth-new-filter)                      | [`eth_newPendingTransactionFilter`](/docs/chains/gensyn/gensyn-api-endpoints/eth-new-pending-transaction-filter) |
| [`eth_sendRawTransaction`](/docs/chains/gensyn/gensyn-api-endpoints/eth-send-raw-transaction)   | [`eth_sendRawTransactionSync`](/docs/chains/gensyn/gensyn-api-endpoints/eth-send-raw-transaction-sync) |
| [`eth_simulateV1`](/docs/chains/gensyn/gensyn-api-endpoints/eth-simulate-v-1)                   | [`eth_submitWork`](/docs/chains/gensyn/gensyn-api-endpoints/eth-submit-work)                |
| [`eth_subscribe`](/docs/chains/gensyn/gensyn-api-endpoints/eth-subscribe)                       | [`eth_syncing`](/docs/chains/gensyn/gensyn-api-endpoints/eth-syncing)                       |
| [`eth_uninstallFilter`](/docs/chains/gensyn/gensyn-api-endpoints/eth-uninstall-filter)          | [`eth_unsubscribe`](/docs/chains/gensyn/gensyn-api-endpoints/eth-unsubscribe)               |
| [`net_listening`](/docs/chains/gensyn/gensyn-api-endpoints/net-listening)                       | [`net_peerCount`](/docs/chains/gensyn/gensyn-api-endpoints/net-peer-count)                  |
| [`net_version`](/docs/chains/gensyn/gensyn-api-endpoints/net-version)                           | [`txpool_content`](/docs/chains/gensyn/gensyn-api-endpoints/txpool-content)                 |
| [`web3_clientVersion`](/docs/chains/gensyn/gensyn-api-endpoints/web-3-client-version)           | [`web3_sha3`](/docs/chains/gensyn/gensyn-api-endpoints/web-3-sha-3)                         |

## Related APIs

The following Alchemy APIs are also supported on Gensyn:

* [Bundler API](/docs/wallets/transactions/low-level-infra/bundler/overview)
* [Gas Manager API](/docs/wallets/api-reference/gas-manager-admin-api/gas-abstraction-api-endpoints/alchemy-request-gas-and-paymaster-and-data)
* [Token API](/docs/reference/token-api-overview)
* [Transfers API](/docs/reference/transfers-api-quickstart)
* [Debug API](/docs/reference/debug-api-quickstart)

------

# debug_executionWitness

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns the execution witness for the given block number.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/debug-execution-witness

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockNumber | string or enum | Yes | The block number or tag. |

## Result

**executionWitness** (object): The execution witness data.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "debug_executionWitness",
  "params": [
    "string"
  ]
}'
```



------

# debug_executionWitnessByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns the execution witness for the given block hash.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/debug-execution-witness-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockHash | string | Yes | The block hash. |

## Result

**executionWitness** (object): The execution witness data.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "debug_executionWitnessByHash",
  "params": [
    "string"
  ]
}'
```



------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blobBaseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns the base fee per blob gas in wei for the current block.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-blob-base-fee

## Result

**Blob Base Fee** (string): The base fee per blob gas, in wei, as a hexadecimal encoded unsigned integer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blobBaseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves account information including balance, code, and nonce for a given address at a specified block.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the account information. |

## Result

**Account information** (object): An object containing the account's balance, code, and nonce.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "balance": "0x1cfe56f3795885980000",
    "code": "0x",
    "nonce": "0x5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_newPendingTransactionFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new pending transactions arrive.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-new-pending-transaction-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newPendingTransactionFilter"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_sendRawTransactionSync

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Sends a raw transaction to the network and waits for the transaction to be mined.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-send-raw-transaction-sync

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction data | string | Yes | The signed transaction data, RLP-encoded and hex-encoded. |
| Timeout | integer | No | Maximum wait time in milliseconds. Must be a positive integer between 1 and the node-configured maximum timeout. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "transactionHash": "0x1234abcd...",
    "blockHash": "0xabcd1234...",
    "blockNumber": "0x10d4f",
    "cumulativeGasUsed": "0x5208",
    "gasUsed": "0x5208",
    "contractAddress": null,
    "logs": [],
    "status": "0x1"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ]
}'
```



------

# eth_simulateV1

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Enables simulation of complex transactions and state changes without modifying the blockchain.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-simulate-v-1

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Simulation object | object | Yes | The object containing all simulation details such as calls, overrides, etc. |

## Result

**Simulation result** (object[]): The result of the simulation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "baseFeePerGas": "0x9",
      "blobGasUsed": "0x0",
      "calls": [
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000001"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
              "transactionIndex": "0x0",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x0",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        },
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000002"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd",
              "transactionIndex": "0x1",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x1",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        }
      ],
      "difficulty": "0x0",
      "excessBlobGas": "0x3b80000",
      "extraData": "0x",
      "gasLimit": "0x22550dd",
      "gasUsed": "0xa410",
      "hash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "miner": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
      "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "nonce": "0x0000000000000000",
      "number": "0x1530a5e",
      "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "parentHash": "0x513a0aa73024f294cdbcb0312af0c920850035f0552d7349ebb30717de30b1cc",
      "receiptsRoot": "0x75308898d571eafb5cd8cde8278bf5b3d13c5f6ec074926de3bb895b519264e1",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "size": "0x29c",
      "stateRoot": "0x65ea44c8bd5f9edbf269b6446b460b3e7378abb25c78fd5d70f0e2ef59296b25",
      "timestamp": "0x67f43327",
      "transactions": [
        "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
        "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd"
      ],
      "transactionsRoot": "0xd6902f31ae9d2169b77cd88611c6afd691ea5a7e604e44c71f663fda0c5d1c28",
      "uncles": [],
      "withdrawals": [],
      "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    }
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_peerCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of peers currently connected to the client.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/net-peer-count

## Result

**peerCount** (string): The number of connected peers as a hex string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_peerCount"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# txpool_content

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of the exact details of all transactions currently pending for inclusion in the next blocks, as well as ones that are being scheduled for future execution.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/txpool-content

## Result

**content** (object): Object with pending and queued transactions grouped by sender address and nonce.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "txpool_content"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gensyn-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/gensyn/gensyn-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gensyn-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Gensyn API FAQ

> Frequently asked questions about the Gensyn API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Gensyn?
Gensyn Chain is an EVM-compatible custom Ethereum rollup purpose-built for machine learning -- coordinating jobs, verifying training, and paying compute providers onchain.

## How do I get started with Gensyn?
Check out our [Gensyn API Quickstart guide](/docs/reference/gensyn-api-quickstart) to get started building on Gensyn.

## What is the Gensyn API?
The Gensyn API lets you interface with the Gensyn mainnet. With this API, you can execute transactions, query onchain data, and interact with the Gensyn network using the JSON-RPC standard.

## Is Gensyn EVM compatible?
Yes, Gensyn is EVM compatible.

## What API does Gensyn use?
Gensyn uses the JSON-RPC API standard. This API is essential for any blockchain interaction on the Gensyn network, allowing you to read block/transaction data, query chain information, execute smart contracts, and store data onchain.

## What methods are supported on Gensyn?
Gensyn supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Gensyn API Endpoints](/docs/chains#gensyn-apis) for a complete list.

## What is a Gensyn API key?
When accessing the Gensyn network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup).

## Which libraries support Gensyn?
Common Ethereum libraries like [ethers.js](https://docs.ethers.org/v5/) should be compatible with Gensyn, given its EVM nature.

## My question isn’t here, where can I get help?
If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Gnosis Chain API Quickstart

> How to get started building on Gnosis Chain using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Gnosis Chain (formerly xDai) is an EVM-compatible blockchain known for its stable and low-cost transactions. Designed to support the needs of decentralized applications (dApps), Gnosis Chain provides a reliable and efficient environment for deploying Ethereum-based applications.

The Gnosis Chain API lets you interact with the Gnosis Chain network through a collection of JSON-RPC methods. If you're familiar with Ethereum's JSON-RPC APIs, working with Gnosis Chain is intuitive and straightforward.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Gnosis Chain client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { gnosis } from "viem/chains";

const client = createPublicClient({
  chain: gnosis,
  transport: http("https://gnosis-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (xDAI):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Gnosis Chain APIs

For the full list of Gnosis Chain APIs, see the [Gnosis Chain API Endpoints](/docs/chains#gnosis-apis).

------

# Gnosis API Overview

> Overview of available Gnosis API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Gnosis APIs

📙 Get started with our [Gnosis API Quickstart Guide](/docs/reference/gnosis-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/gnosis/gnosis-api-endpoints/eth-accounts)                         | [`eth_blobBaseFee`](/docs/chains/gnosis/gnosis-api-endpoints/eth-blob-base-fee)             |
| [`eth_blockNumber`](/docs/chains/gnosis/gnosis-api-endpoints/eth-block-number)                  | [`eth_call`](/docs/chains/gnosis/gnosis-api-endpoints/eth-call)                             |
| [`eth_chainId`](/docs/chains/gnosis/gnosis-api-endpoints/eth-chain-id)                          | [`eth_createAccessList`](/docs/chains/gnosis/gnosis-api-endpoints/eth-create-access-list)   |
| [`eth_estimateGas`](/docs/chains/gnosis/gnosis-api-endpoints/eth-estimate-gas)                  | [`eth_feeHistory`](/docs/chains/gnosis/gnosis-api-endpoints/eth-fee-history)                |
| [`eth_gasPrice`](/docs/chains/gnosis/gnosis-api-endpoints/eth-gas-price)                        | [`eth_getAccount`](/docs/chains/gnosis/gnosis-api-endpoints/eth-get-account)                |
| [`eth_getAccountInfo`](/docs/chains/gnosis/gnosis-api-endpoints/eth-get-account-info)           | [`eth_getBalance`](/docs/chains/gnosis/gnosis-api-endpoints/eth-get-balance)                |
| [`eth_getBlockByHash`](/docs/chains/gnosis/gnosis-api-endpoints/eth-get-block-by-hash)          | [`eth_getBlockByNumber`](/docs/chains/gnosis/gnosis-api-endpoints/eth-get-block-by-number)  |
| [`eth_getBlockReceipts`](/docs/chains/gnosis/gnosis-api-endpoints/eth-get-block-receipts)       | [`eth_getBlockTransactionCountByHash`](/docs/chains/gnosis/gnosis-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/gnosis/gnosis-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/gnosis/gnosis-api-endpoints/eth-get-code)                      |
| [`eth_getFilterChanges`](/docs/chains/gnosis/gnosis-api-endpoints/eth-get-filter-changes)       | [`eth_getFilterLogs`](/docs/chains/gnosis/gnosis-api-endpoints/eth-get-filter-logs)         |
| [`eth_getLogs`](/docs/chains/gnosis/gnosis-api-endpoints/eth-get-logs)                          | [`eth_getProof`](/docs/chains/gnosis/gnosis-api-endpoints/eth-get-proof)                    |
| [`eth_getRawTransactionByHash`](/docs/chains/gnosis/gnosis-api-endpoints/eth-get-raw-transaction-by-hash) | [`eth_getStorageAt`](/docs/chains/gnosis/gnosis-api-endpoints/eth-get-storage-at)           |
| [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/gnosis/gnosis-api-endpoints/eth-get-transaction-by-block-hash-and-index) | [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/gnosis/gnosis-api-endpoints/eth-get-transaction-by-block-number-and-index) |
| [`eth_getTransactionByHash`](/docs/chains/gnosis/gnosis-api-endpoints/eth-get-transaction-by-hash) | [`eth_getTransactionCount`](/docs/chains/gnosis/gnosis-api-endpoints/eth-get-transaction-count) |
| [`eth_getTransactionReceipt`](/docs/chains/gnosis/gnosis-api-endpoints/eth-get-transaction-receipt) | [`eth_getUncleByBlockHashAndIndex`](/docs/chains/gnosis/gnosis-api-endpoints/eth-get-uncle-by-block-hash-and-index) |
| [`eth_getUncleCountByBlockHash`](/docs/chains/gnosis/gnosis-api-endpoints/eth-get-uncle-count-by-block-hash) | [`eth_getUncleCountByBlockNumber`](/docs/chains/gnosis/gnosis-api-endpoints/eth-get-uncle-count-by-block-number) |
| [`eth_maxPriorityFeePerGas`](/docs/chains/gnosis/gnosis-api-endpoints/eth-max-priority-fee-per-gas) | [`eth_newBlockFilter`](/docs/chains/gnosis/gnosis-api-endpoints/eth-new-block-filter)       |
| [`eth_newFilter`](/docs/chains/gnosis/gnosis-api-endpoints/eth-new-filter)                      | [`eth_newPendingTransactionFilter`](/docs/chains/gnosis/gnosis-api-endpoints/eth-new-pending-transaction-filter) |
| [`eth_protocolVersion`](/docs/chains/gnosis/gnosis-api-endpoints/eth-protocol-version)          | [`eth_sendRawTransaction`](/docs/chains/gnosis/gnosis-api-endpoints/eth-send-raw-transaction) |
| [`eth_sendRawTransactionSync`](/docs/chains/gnosis/gnosis-api-endpoints/eth-send-raw-transaction-sync) | [`eth_simulateV1`](/docs/chains/gnosis/gnosis-api-endpoints/eth-simulate-v-1)               |
| [`eth_submitWork`](/docs/chains/gnosis/gnosis-api-endpoints/eth-submit-work)                    | [`eth_subscribe`](/docs/chains/gnosis/gnosis-api-endpoints/eth-subscribe)                   |
| [`eth_syncing`](/docs/chains/gnosis/gnosis-api-endpoints/eth-syncing)                           | [`eth_uninstallFilter`](/docs/chains/gnosis/gnosis-api-endpoints/eth-uninstall-filter)      |
| [`eth_unsubscribe`](/docs/chains/gnosis/gnosis-api-endpoints/eth-unsubscribe)                   | [`net_listening`](/docs/chains/gnosis/gnosis-api-endpoints/net-listening)                   |
| [`net_version`](/docs/chains/gnosis/gnosis-api-endpoints/net-version)                           | [`web3_clientVersion`](/docs/chains/gnosis/gnosis-api-endpoints/web-3-client-version)       |
| [`web3_sha3`](/docs/chains/gnosis/gnosis-api-endpoints/web-3-sha-3)                             |                                                                                             |

## Related APIs

The following Alchemy APIs are also supported on Gnosis:

* [Token API](/docs/reference/token-api-overview)
* [Transfers API](/docs/reference/transfers-api-quickstart)
* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)
* [NFT API](/docs/reference/nft-api-overview)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blobBaseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-chiado.g.alchemy.com/v2/{apiKey}

Returns the base fee per blob gas in wei for the current block.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-blob-base-fee

## Result

**Blob Base Fee** (string): The base fee per blob gas, in wei, as a hexadecimal encoded unsigned integer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-chiado.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blobBaseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves account information including balance, code, and nonce for a given address at a specified block.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the account information. |

## Result

**Account information** (object): An object containing the account's balance, code, and nonce.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "balance": "0x1cfe56f3795885980000",
    "code": "0x",
    "nonce": "0x5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_newPendingTransactionFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new pending transactions arrive.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-new-pending-transaction-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newPendingTransactionFilter"
}'
```



------

# eth_protocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current protocol version used by the client.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-protocol-version

## Result

**Protocol Version** (string): The protocol version as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3f",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_protocolVersion"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_sendRawTransactionSync

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Sends a raw transaction to the network and waits for the transaction to be mined.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-send-raw-transaction-sync

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction data | string | Yes | The signed transaction data, RLP-encoded and hex-encoded. |
| Timeout | integer | No | Maximum wait time in milliseconds. Must be a positive integer between 1 and the node-configured maximum timeout. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "transactionHash": "0x1234abcd...",
    "blockHash": "0xabcd1234...",
    "blockNumber": "0x10d4f",
    "cumulativeGasUsed": "0x5208",
    "gasUsed": "0x5208",
    "contractAddress": null,
    "logs": [],
    "status": "0x1"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ]
}'
```



------

# eth_simulateV1

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Enables simulation of complex transactions and state changes without modifying the blockchain.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-simulate-v-1

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Simulation object | object | Yes | The object containing all simulation details such as calls, overrides, etc. |

## Result

**Simulation result** (object[]): The result of the simulation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "baseFeePerGas": "0x9",
      "blobGasUsed": "0x0",
      "calls": [
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000001"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
              "transactionIndex": "0x0",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x0",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        },
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000002"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd",
              "transactionIndex": "0x1",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x1",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        }
      ],
      "difficulty": "0x0",
      "excessBlobGas": "0x3b80000",
      "extraData": "0x",
      "gasLimit": "0x22550dd",
      "gasUsed": "0xa410",
      "hash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "miner": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
      "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "nonce": "0x0000000000000000",
      "number": "0x1530a5e",
      "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "parentHash": "0x513a0aa73024f294cdbcb0312af0c920850035f0552d7349ebb30717de30b1cc",
      "receiptsRoot": "0x75308898d571eafb5cd8cde8278bf5b3d13c5f6ec074926de3bb895b519264e1",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "size": "0x29c",
      "stateRoot": "0x65ea44c8bd5f9edbf269b6446b460b3e7378abb25c78fd5d70f0e2ef59296b25",
      "timestamp": "0x67f43327",
      "transactions": [
        "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
        "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd"
      ],
      "transactionsRoot": "0xd6902f31ae9d2169b77cd88611c6afd691ea5a7e604e44c71f663fda0c5d1c28",
      "uncles": [],
      "withdrawals": [],
      "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    }
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://gnosis-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/gnosis/gnosis-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://gnosis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Gnosis Chain API FAQ

> Frequently asked questions about the Gnosis API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Gnosis Chain?

Gnosis Chain (formerly xDai) is a high-performance blockchain designed to offer developers stable and low-cost transactions. It is Ethereum Virtual Machine (EVM) compatible, enabling developers to deploy Ethereum-based applications seamlessly on it.

## What is the Gnosis Chain API?

The Gnosis Chain API lets you interact with the Gnosis Chain network through a collection of JSON-RPC methods. Because it's compatible with the Ethereum ecosystem, you'll find working with Gnosis Chain familiar if you've used Ethereum's JSON-RPC APIs.

## How can I get started using the Gnosis Chain API?

Explained in [Gnosis Chain Quickstart](/docs/reference/gnosis-api-quickstart).

## Is Gnosis Chain EVM compatible?

Yes, Gnosis Chain is fully compatible with the Ethereum Virtual Machine (EVM). This compatibility allows Ethereum developers to port their projects to Gnosis Chain with minimal changes, taking advantage of the chain's stability and low transaction fees.

## What API does Gnosis Chain use?

Gnosis Chain uses the JSON-RPC API standard for blockchain interactions. This is the same standard used by Ethereum.

## What is a Gnosis Chain API key?

When you access the Gnosis Chain network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network.

For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!

## Which libraries support Gnosis Chain?

Because Gnosis Chain is EVM-compatible, popular Ethereum libraries like ethers.js and web3.js work with Gnosis Chain. If you're familiar with Ethereum's development ecosystem, you can integrate with minimal changes.

## What programming languages work with Gnosis Chain?

Like Ethereum, Gnosis Chain supports a range of programming languages for blockchain interaction and smart contract development, including Solidity for smart contracts, as well as JavaScript and TypeScript for dApp development and offchain interactions.

## What does Gnosis Chain use for gas?

Gnosis Chain uses xDai, a stablecoin pegged to the US dollar, for transaction fees, gas, and other network activities.

## What methods does Alchemy support for the Gnosis Chain API?

You can find the list of all the methods Alchemy supports for the Gnosis Chain API on [Gnosis Chain API Endpoints](/docs/reference/gnosis-chain-api-endpoints) page.

## My question isn't here, where can I get help?

If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Humanity API Quickstart

> How to get started building on Humanity using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Humanity Protocol is a zkEVM Layer-2 for decentralized identity that uses palm-biometric Proof-of-Humanity and zero-knowledge proofs to issue privacy-preserving, Sybil-resistant credentials.

The Humanity API lets you interact with the Humanity network through a set of JSON-RPC methods. If you've worked with Ethereum's JSON-RPC APIs, the design will feel familiar.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Humanity client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http, defineChain } from "viem";

const humanity = defineChain({
  id: 1942999413,
  name: "Humanity",
  nativeCurrency: { name: "HMT", symbol: "HMT", decimals: 18 },
  rpcUrls: {
    default: { http: ["https://humanity-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
  },
});

const client = createPublicClient({
  chain: humanity,
  transport: http("https://humanity-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (HMT):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Humanity APIs

For the full list of Humanity APIs, see the [Humanity API Endpoints](/docs/chains#humanity-apis).

------

# Humanity API Overview

> Overview of available Humanity API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Humanity APIs

📙 Get started with our [Humanity API Quickstart Guide](/docs/reference/humanity-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/humanity/humanity-api-endpoints/eth-accounts)                     | [`eth_blobBaseFee`](/docs/chains/humanity/humanity-api-endpoints/eth-blob-base-fee)         |
| [`eth_blockNumber`](/docs/chains/humanity/humanity-api-endpoints/eth-block-number)              | [`eth_call`](/docs/chains/humanity/humanity-api-endpoints/eth-call)                         |
| [`eth_chainId`](/docs/chains/humanity/humanity-api-endpoints/eth-chain-id)                      | [`eth_estimateGas`](/docs/chains/humanity/humanity-api-endpoints/eth-estimate-gas)          |
| [`eth_feeHistory`](/docs/chains/humanity/humanity-api-endpoints/eth-fee-history)                | [`eth_fillTransaction`](/docs/chains/humanity/humanity-api-endpoints/eth-fill-transaction)  |
| [`eth_gasPrice`](/docs/chains/humanity/humanity-api-endpoints/eth-gas-price)                    | [`eth_getAccount`](/docs/chains/humanity/humanity-api-endpoints/eth-get-account)            |
| [`eth_getBalance`](/docs/chains/humanity/humanity-api-endpoints/eth-get-balance)                | [`eth_getBlockByHash`](/docs/chains/humanity/humanity-api-endpoints/eth-get-block-by-hash)  |
| [`eth_getBlockByNumber`](/docs/chains/humanity/humanity-api-endpoints/eth-get-block-by-number)  | [`eth_getBlockReceipts`](/docs/chains/humanity/humanity-api-endpoints/eth-get-block-receipts) |
| [`eth_getBlockTransactionCountByHash`](/docs/chains/humanity/humanity-api-endpoints/eth-get-block-transaction-count-by-hash) | [`eth_getBlockTransactionCountByNumber`](/docs/chains/humanity/humanity-api-endpoints/eth-get-block-transaction-count-by-number) |
| [`eth_getCode`](/docs/chains/humanity/humanity-api-endpoints/eth-get-code)                      | [`eth_getFilterChanges`](/docs/chains/humanity/humanity-api-endpoints/eth-get-filter-changes) |
| [`eth_getFilterLogs`](/docs/chains/humanity/humanity-api-endpoints/eth-get-filter-logs)         | [`eth_getLogs`](/docs/chains/humanity/humanity-api-endpoints/eth-get-logs)                  |
| [`eth_getProof`](/docs/chains/humanity/humanity-api-endpoints/eth-get-proof)                    | [`eth_getRawTransactionByHash`](/docs/chains/humanity/humanity-api-endpoints/eth-get-raw-transaction-by-hash) |
| [`eth_getStorageAt`](/docs/chains/humanity/humanity-api-endpoints/eth-get-storage-at)           | [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/humanity/humanity-api-endpoints/eth-get-transaction-by-block-hash-and-index) |
| [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/humanity/humanity-api-endpoints/eth-get-transaction-by-block-number-and-index) | [`eth_getTransactionByHash`](/docs/chains/humanity/humanity-api-endpoints/eth-get-transaction-by-hash) |
| [`eth_getTransactionCount`](/docs/chains/humanity/humanity-api-endpoints/eth-get-transaction-count) | [`eth_getTransactionReceipt`](/docs/chains/humanity/humanity-api-endpoints/eth-get-transaction-receipt) |
| [`eth_getUncleCountByBlockHash`](/docs/chains/humanity/humanity-api-endpoints/eth-get-uncle-count-by-block-hash) | [`eth_getUncleCountByBlockNumber`](/docs/chains/humanity/humanity-api-endpoints/eth-get-uncle-count-by-block-number) |
| [`eth_maxPriorityFeePerGas`](/docs/chains/humanity/humanity-api-endpoints/eth-max-priority-fee-per-gas) | [`eth_newBlockFilter`](/docs/chains/humanity/humanity-api-endpoints/eth-new-block-filter)   |
| [`eth_newFilter`](/docs/chains/humanity/humanity-api-endpoints/eth-new-filter)                  | [`eth_sendRawTransaction`](/docs/chains/humanity/humanity-api-endpoints/eth-send-raw-transaction) |
| [`eth_submitWork`](/docs/chains/humanity/humanity-api-endpoints/eth-submit-work)                | [`eth_subscribe`](/docs/chains/humanity/humanity-api-endpoints/eth-subscribe)               |
| [`eth_syncing`](/docs/chains/humanity/humanity-api-endpoints/eth-syncing)                       | [`eth_uninstallFilter`](/docs/chains/humanity/humanity-api-endpoints/eth-uninstall-filter)  |
| [`eth_unsubscribe`](/docs/chains/humanity/humanity-api-endpoints/eth-unsubscribe)               | [`net_listening`](/docs/chains/humanity/humanity-api-endpoints/net-listening)               |
| [`net_version`](/docs/chains/humanity/humanity-api-endpoints/net-version)                       | [`web3_clientVersion`](/docs/chains/humanity/humanity-api-endpoints/web-3-client-version)   |
| [`web3_sha3`](/docs/chains/humanity/humanity-api-endpoints/web-3-sha-3)                         |                                                                                             |

## Related APIs

The following Alchemy APIs are also supported on Humanity:

* [Debug API](/docs/reference/debug-api-quickstart)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blobBaseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns the base fee per blob gas in wei for the current block.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-blob-base-fee

## Result

**Blob Base Fee** (string): The base fee per blob gas, in wei, as a hexadecimal encoded unsigned integer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blobBaseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://humanity-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/humanity/humanity-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://humanity-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Humanity API FAQ

> Frequently asked questions about the Humanity API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Humanity?
Humanity Protocol is a zkEVM Layer-2 for decentralized identity that uses palm-biometric Proof-of-Humanity and zero-knowledge proofs to issue privacy-preserving, Sybil-resistant credentials.

## How do I get started with Humanity?
Check out our [Humanity API Quickstart guide](/docs/reference/humanity-api-quickstart) to get started building on Humanity.

## What is the Humanity API?
The Humanity API lets you interface with the Humanity mainnet. You can execute transactions, query onchain data, and interact with the Humanity network using the JSON-RPC standard.

## Is Humanity EVM compatible?
Yes, Humanity is EVM compatible.

## What API does Humanity use?
Humanity uses the JSON-RPC API standard. This API handles all blockchain interaction on the Humanity network, letting you read block/transaction data, query chain information, execute smart contracts, and store data onchain.

## What methods are supported on Humanity?
Humanity supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Humanity API Endpoints](/docs/chains#humanity-apis) for a complete list.

## What is a Humanity API key?
When you access the Humanity network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!

## Which libraries support Humanity?
Common Ethereum libraries like [ethers.js](https://docs.ethers.org/v5/) should be compatible with Humanity, given its EVM nature.

## My question isn’t here, where can I get help?
If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# HyperEVM API Quickstart

> How to get started building on HyperEVM using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Check out the [Hyperliquid Alchemy Wallets Guide](https://www.alchemy.com/docs/wallets/recipes/hyperliquid-wallets) for enabling email and social login for user authentication and the ability to sign and send transactions.

HyperEVM is a high-performance, Ethereum-compatible execution layer developed by HyperLiquid that enables smart contracts to run natively alongside its decentralized trading engine, combining low-latency performance with full EVM compatibility.

The HyperEVM API lets you interact with the HyperEVM network through a set of JSON-RPC methods. If you've worked with Ethereum's JSON-RPC APIs, the design will feel familiar.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a HyperEVM client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { hyperliquid } from "viem/chains";

const client = createPublicClient({
  chain: hyperliquid,
  transport: http("https://hyperliquid-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (HYPE):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# HyperEVM APIs

For the full list of HyperEVM APIs, see the [HyperEVM API Endpoints](/docs/chains#hyperliquid-apis).

------

# Hyperliquid API Overview

> Overview of available Hyperliquid API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Hyperliquid APIs

📙 Get started with our [Hyperliquid API Quickstart Guide](/docs/reference/hyperliquid-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-accounts)               | [`eth_bigBlockGasPrice`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-big-block-gas-price) |
| [`eth_blobBaseFee`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-blob-base-fee)       | [`eth_blockNumber`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-block-number)    |
| [`eth_call`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-call)                       | [`eth_callMany`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-call-many)          |
| [`eth_chainId`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-chain-id)                | [`eth_createAccessList`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-create-access-list) |
| [`eth_estimateGas`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-estimate-gas)        | [`eth_feeHistory`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-fee-history)      |
| [`eth_gasPrice`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-gas-price)              | [`eth_getAccount`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-account)      |
| [`eth_getAccountInfo`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-account-info) | [`eth_getBalance`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-balance)      |
| [`eth_getBlockByHash`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-block-by-hash) | [`eth_getBlockByNumber`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-block-by-number) |
| [`eth_getBlockReceipts`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-block-receipts) | [`eth_getBlockReceiptsWithSystemTx`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-block-receipts-with-system-tx) |
| [`eth_getBlockTransactionCountByHash`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-block-transaction-count-by-hash) | [`eth_getBlockTransactionCountByNumber`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-block-transaction-count-by-number) |
| [`eth_getCode`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-code)                | [`eth_getFilterChanges`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-filter-changes) |
| [`eth_getFilterLogs`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-filter-logs)   | [`eth_getLogs`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-logs)            |
| [`eth_getRawTransactionByHash`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-raw-transaction-by-hash) | [`eth_getStorageAt`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-storage-at) |
| [`eth_getSystemTxsByBlockHash`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-system-txs-by-block-hash) | [`eth_getSystemTxsByBlockNumber`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-system-txs-by-block-number) |
| [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-transaction-by-block-hash-and-index) | [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-transaction-by-block-number-and-index) |
| [`eth_getTransactionByHash`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-transaction-by-hash) | [`eth_getTransactionCount`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-transaction-count) |
| [`eth_getTransactionReceipt`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-transaction-receipt) | [`eth_getUncleByBlockHashAndIndex`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-uncle-by-block-hash-and-index) |
| [`eth_getUncleByBlockNumberAndIndex`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-uncle-by-block-number-and-index) | [`eth_getUncleCountByBlockHash`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-uncle-count-by-block-hash) |
| [`eth_getUncleCountByBlockNumber`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-uncle-count-by-block-number) | [`eth_maxPriorityFeePerGas`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-max-priority-fee-per-gas) |
| [`eth_newBlockFilter`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-new-block-filter) | [`eth_newFilter`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-new-filter)        |
| [`eth_newPendingTransactionFilter`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-new-pending-transaction-filter) | [`eth_sendRawTransaction`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-send-raw-transaction) |
| [`eth_simulateV1`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-simulate-v-1)         | [`eth_submitWork`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-submit-work)      |
| [`eth_subscribe`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-subscribe)             | [`eth_syncing`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-syncing)             |
| [`eth_uninstallFilter`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-uninstall-filter) | [`eth_unsubscribe`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-unsubscribe)     |
| [`eth_usingBigBlocks`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-using-big-blocks) | [`net_listening`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/net-listening)         |
| [`net_version`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/net-version)                 | [`web3_clientVersion`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/web-3-client-version) |
| [`web3_sha3`](/docs/chains/hyperliquid/hyperliquid-api-endpoints/web-3-sha-3)                   |                                                                                             |

## Related APIs

The following Alchemy APIs are also supported on Hyperliquid:

* [Bundler API](/docs/wallets/transactions/low-level-infra/bundler/overview)
* [Gas Manager API](/docs/wallets/api-reference/gas-manager-admin-api/gas-abstraction-api-endpoints/alchemy-request-gas-and-paymaster-and-data)
* [Token API](/docs/reference/token-api-overview)
* [Transfers API](/docs/reference/transfers-api-quickstart)
* [Debug API](/docs/reference/debug-api-quickstart)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_bigBlockGasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns the base fee for the next big block. HyperEVM uses a dual-block architecture with fast blocks (1-second interval, 2M gas limit) and big blocks (1-minute interval, 30M gas limit). This method returns the base fee specifically for big blocks, as opposed to eth_gasPrice which returns the base fee for the next fast block.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-big-block-gas-price

## Result

**gasPrice** (string): A hex-encoded unsigned integer representing the gas price in wei for big blocks.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_bigBlockGasPrice"
}'
```



------

# eth_blobBaseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-testnet.g.alchemy.com/v2/{apiKey}

Returns the base fee per blob gas in wei for the current block.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-blob-base-fee

## Result

**Blob Base Fee** (string): The base fee per blob gas, in wei, as a hexadecimal encoded unsigned integer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blobBaseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_callMany

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Executes a list of transaction bundles without creating transactions on the blockchain. This method is particularly useful for simulating transactions to understand their potential outcomes. It supports simulating transactions at an intermediate state of a block, simulating multiple transactions with sequential dependencies, and overwriting block headers.


Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-call-many

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Bundles | object[] | Yes | A list of bundles where each bundle contains transactions and optional block overrides.  |
| Simulation context | object | Yes | The context for the simulation, specifying the blockNumber or Tag and transactionIndex.  |
| State overrides | object | No | An optional mapping for state overrides, following the eth_call standard.  |
| Timeout | integer | No | The maximum running time for the simulations in milliseconds, defaulting to 5000 milliseconds.  |

## Result

**Call results** (object[][]): A list of lists containing either the return value of the executed contract call or the reverted error code. Each bundle returns an array with one result per transaction. 

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "from": "0x1985ea6e9c68e1c272d8209f3b478ac2fdb25c87",
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gas": "0x0f4240",
            "gasPrice": "0x7896e72a",
            "data": "0xa9059cbb000000000000000000000000bc0e63965946815d105e7591407704e6e1964e590000000000000000000000000000000000000000000000000000000005f5e100"
          },
          {
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gasPrice": "0x7896e72a",
            "data": "0x70a08231000000000000000000000000bc0e63965946815d105e7591407704e6e1964e59"
          }
        ],
        "blockOverride": {
          "blockNumber": "0xbb5fe9"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    [
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000000000001"
      },
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000005f5e100"
      }
    ]
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "type": "string",
            "nonce": "string",
            "to": null,
            "from": "string",
            "gas": "string",
            "value": "string",
            "input": "string",
            "gasPrice": "string",
            "maxPriorityFeePerGas": "string",
            "maxFeePerGas": "string",
            "maxFeePerBlobGas": "string",
            "accessList": [
              {
                "address": "string",
                "storageKeys": [
                  "string"
                ]
              }
            ],
            "blobVersionedHashes": [
              "string"
            ],
            "blobs": [
              "string"
            ],
            "chainId": "string"
          }
        ],
        "blockOverride": {
          "blockNumber": "string",
          "blockHash": "string",
          "coinbase": "string",
          "timestamp": "string",
          "difficulty": "string",
          "gasLimit": "string",
          "baseFee": "string"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves account information including balance, code, and nonce for a given address at a specified block.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the account information. |

## Result

**Account information** (object): An object containing the account's balance, code, and nonce.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "balance": "0x1cfe56f3795885980000",
    "code": "0x",
    "nonce": "0x5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockReceiptsWithSystemTx

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns all transaction receipts for a given block, including receipts for system transactions that originate from HyperCore. System transactions are created by the system address and are not included in the regular receipt list returned by eth_getBlockReceipts.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-block-receipts-with-system-tx

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockNumberOrTag | string | Yes | A hex-encoded block number, or a block tag such as "latest", "earliest", or "pending". |

## Result

**receipts** (object[]): An array of transaction receipt objects including system transaction receipts.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceiptsWithSystemTx",
  "params": [
    "string"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getSystemTxsByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns the system transactions for a block identified by hash. System transactions originate from HyperCore and are sent from the system address 0x2222222222222222222222222222222222222222. They represent operations such as HyperCore-to-HyperEVM transfers and have gasPrice of 0x0.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-system-txs-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockHash | string | Yes | The 32-byte hex-encoded hash of the block. |

## Result

**transactions** (object[]): An array of system transaction objects for the specified block.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getSystemTxsByBlockHash",
  "params": [
    "string"
  ]
}'
```



------

# eth_getSystemTxsByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns the system transactions for a block identified by number or tag. System transactions originate from HyperCore and are sent from the system address 0x2222222222222222222222222222222222222222.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-system-txs-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockNumber | string | Yes | A hex-encoded block number, or a block tag such as "latest", "earliest", or "pending". |

## Result

**transactions** (object[]): An array of system transaction objects for the specified block.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getSystemTxsByBlockNumber",
  "params": [
    "string"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-testnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-testnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-testnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-testnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_newPendingTransactionFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-testnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new pending transactions arrive.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-new-pending-transaction-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newPendingTransactionFilter"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_simulateV1

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Enables simulation of complex transactions and state changes without modifying the blockchain.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-simulate-v-1

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Simulation object | object | Yes | The object containing all simulation details such as calls, overrides, etc. |

## Result

**Simulation result** (object[]): The result of the simulation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "baseFeePerGas": "0x9",
      "blobGasUsed": "0x0",
      "calls": [
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000001"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
              "transactionIndex": "0x0",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x0",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        },
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000002"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd",
              "transactionIndex": "0x1",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x1",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        }
      ],
      "difficulty": "0x0",
      "excessBlobGas": "0x3b80000",
      "extraData": "0x",
      "gasLimit": "0x22550dd",
      "gasUsed": "0xa410",
      "hash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "miner": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
      "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "nonce": "0x0000000000000000",
      "number": "0x1530a5e",
      "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "parentHash": "0x513a0aa73024f294cdbcb0312af0c920850035f0552d7349ebb30717de30b1cc",
      "receiptsRoot": "0x75308898d571eafb5cd8cde8278bf5b3d13c5f6ec074926de3bb895b519264e1",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "size": "0x29c",
      "stateRoot": "0x65ea44c8bd5f9edbf269b6446b460b3e7378abb25c78fd5d70f0e2ef59296b25",
      "timestamp": "0x67f43327",
      "transactions": [
        "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
        "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd"
      ],
      "transactionsRoot": "0xd6902f31ae9d2169b77cd88611c6afd691ea5a7e604e44c71f663fda0c5d1c28",
      "uncles": [],
      "withdrawals": [],
      "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    }
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# eth_usingBigBlocks

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns whether the specified address has opted into using big blocks. In HyperEVM's dual-block architecture, users can set an usingBigBlocks flag via the evmUserModify L1 action to direct their transactions to big blocks instead of fast blocks.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/eth-using-big-blocks

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The 20-byte hex-encoded Ethereum address to check. |

## Result

**usingBigBlocks** (boolean): A boolean indicating whether the address is using big blocks.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_usingBigBlocks",
  "params": [
    "string"
  ]
}'
```



------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-testnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://hyperliquid-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/hyperliquid/hyperliquid-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://hyperliquid-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Info endpoint

> Reference for the Hyperliquid Info endpoint, including pagination, perpetuals vs spot usage, and user address querying.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Info endpoint

### Pagination

Responses that take a time range will only return 500 elements or distinct blocks of data. To query larger ranges, use the last returned timestamp as the next `startTime` for pagination.

### Perpetuals vs spot

The endpoints in this section work for both Perpetuals and Spot. For perpetuals `coin` is the name returned in the `meta` response. For Spot, coin should be `PURR/USDC` for PURR, and `@{index}` e.g. `@1` for all other spot tokens where index is the index of the spot pair in the `universe` field of the `spotMeta` response. For example, the spot index for HYPE on mainnet is `@107` because the token index of HYPE is 150 and the spot pair `@107` has tokens `[150, 0]`. Note that some assets may be remapped on user interfaces. For example, `BTC/USDC` on app.hyperliquid.xyz corresponds to `UBTC/USDC` on mainnet HyperCore. The L1 name on the [hyperliquid token details page](https://app.hyperliquid.xyz/explorer/token/0x8f254b963e8468305d409b33aa137c67) can be used to detect remappings.

### User address query

To query the account data associated with a master or sub-account, you must pass in the actual address of that account. A common pitfall is to use an agent wallet's address which leads to an empty result.

## Retrieve a user's open orders

`POST` `https://hyperliquid-mainnet.g.alchemy.com/v2/${apiKey}/info`

See a user's open orders

#### Headers

| Name                                           | Type   | Description        |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type\* | String | "application/json" |

#### Request Body

| Name                                   | Type   | Description                                                                                                                                  |
| -------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| type\* | String | "openOrders"                                                                                                                                 |
| user\* | String | Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.                                                 |
| dex                                    | String | Perp dex name. Defaults to the empty string which represents the first perp dex. Spot open orders are only included with the first perp dex. |

**Response:**

```json
[
    {
        "coin": "BTC",
        "limitPx": "29792.0",
        "oid": 91490942,
        "side": "A",
        "sz": "0.0",
        "timestamp": 1681247412573
    }
]
```

## Retrieve a user's open orders with additional frontend info

`POST` `https://hyperliquid-mainnet.g.alchemy.com/v2/${apiKey}/info`

#### Headers

| Name                                           | Type   | Description        |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type\* | String | "application/json" |

#### Request Body

| Name                                   | Type   | Description                                                                                                                                  |
| -------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| type\* | String | "frontendOpenOrders"                                                                                                                         |
| user\* | String | Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000.                                                 |
| dex                                    | String | Perp dex name. Defaults to the empty string which represents the first perp dex. Spot open orders are only included with the first perp dex. |

**Response:**

```json
[
    {
        "coin": "BTC",
        "isPositionTpsl": false,
        "isTrigger": false,
        "limitPx": "29792.0",
        "oid": 91490942,
        "orderType": "Limit",
        "origSz": "5.0",
        "reduceOnly": false,
        "side": "A",
        "sz": "5.0",
        "timestamp": 1681247412573,
        "triggerCondition": "N/A",
        "triggerPx": "0.0",
    }
]
```

## Query user rate limits

`POST` `https://hyperliquid-mainnet.g.alchemy.com/v2/${apiKey}/info`

#### Request Body

| Name | Type   | Description                                                                                 |
| ---- | ------ | ------------------------------------------------------------------------------------------- |
| user | String | Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000 |
| type | String | userRateLimit                                                                               |

**Response:**

```json
{
  "cumVlm": "2854574.593578",
  "nRequestsUsed": 2890,
  "nRequestsCap": 2864574
}
```

## Check builder fee approval

`POST` `https://hyperliquid-mainnet.g.alchemy.com/v2/${apiKey}/info`

**Headers**

| Name                                           | Value              |
| ---------------------------------------------- | ------------------ |
| Content-Type\* | "application/json" |

**Body**

| Name                                      | Type   | Description                                                                                  |
| ----------------------------------------- | ------ | -------------------------------------------------------------------------------------------- |
| type\*    | String | "maxBuilderFee"                                                                              |
| user\*    | String | Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000. |
| builder\* | String | Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000. |

**Response:**

```json
1 // maximum fee approved in tenths of a basis point i.e. 1 means 0.001%
```

## Retrieve a user's subaccounts

`POST` `https://hyperliquid-mainnet.g.alchemy.com/v2/${apiKey}/info`

#### Headers

| Name                                           | Type   | Description        |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type\* | String | "application/json" |

#### Request Body

| Name                                   | Type   | Description                                                                                  |
| -------------------------------------- | ------ | -------------------------------------------------------------------------------------------- |
| type\* | String | "subAccounts"                                                                                |
| user\* | String | Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000. |

**Response:**

```json
[
  {
    "name": "Test",
    "subAccountUser": "0x035605fc2f24d65300227189025e90a0d947f16c",
    "master": "0x8c967e73e6b15087c42a10d344cff4c96d877f1d",
    "clearinghouseState": {
      "marginSummary": {
        "accountValue": "29.78001",
        "totalNtlPos": "0.0",
        "totalRawUsd": "29.78001",
        "totalMarginUsed": "0.0"
      },
      "crossMarginSummary": {
        "accountValue": "29.78001",
        "totalNtlPos": "0.0",
        "totalRawUsd": "29.78001",
        "totalMarginUsed": "0.0"
      },
      "crossMaintenanceMarginUsed": "0.0",
      "withdrawable": "29.78001",
      "assetPositions": [],
      "time": 1733968369395
    },
    "spotState": {
      "balances": [
        {
          "coin": "USDC",
          "token": 0,
          "total": "0.22",
          "hold": "0.0",
          "entryNtl": "0.0"
        }
      ]
    }
  }
]
```

## Retrieve a user's vault deposits

`POST` `https://hyperliquid-mainnet.g.alchemy.com/v2/${apiKey}/info`

#### Headers

| Name                                           | Type   | Description        |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type\* | String | "application/json" |

#### Request Body

| Name                                   | Type   | Description                                                                                  |
| -------------------------------------- | ------ | -------------------------------------------------------------------------------------------- |
| type\* | String | "userVaultEquities"                                                                          |
| user\* | String | Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000. |

**Response:**

```json
[
  {
    "vaultAddress": "0xdfc24b077bc1425ad1dea75bcb6f8158e10df303",
    "equity": "742500.082809",
  }
]
```

## Query a user's role

`POST` `https://hyperliquid-mainnet.g.alchemy.com/v2/${apiKey}/info`

#### Headers

| Name                                           | Type   | Description        |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type\* | String | "application/json" |

#### Request Body

| Name                                   | Type   | Description                                                                                  |
| -------------------------------------- | ------ | -------------------------------------------------------------------------------------------- |
| type\* | String | "userRole"                                                                                   |
| user\* | String | Address in 42-character hexadecimal format; e.g. 0x0000000000000000000000000000000000000000. |

**Response (User):**

```json
{"role":"user"} # "missing", "user", "agent", "vault", or "subAccount"
```

**Response (Agent):**

```json
{"role":"agent", "data": {"user": "0x..."}}
```

**Response (Vault):**

```json
{"role":"vault"}
```

**Response (Subaccount):**

```json
{"role":"subAccount", "data":{"master":"0x..."}}
```

**Response (Missing):**

```json
{"role":"missing"}
```

## Query a user's fees

`POST` `https://hyperliquid-mainnet.g.alchemy.com/v2/${apiKey}/info`

#### Headers

| Name                                           | Type   | Description        |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type\* | String | "application/json" |

#### Request Body

| Name                                   | Type   | Description                                                          |
| -------------------------------------- | ------ | -------------------------------------------------------------------- |
| type\* | String | "userFees"                                                           |
| user\* | String | hexadecimal format; e.g. 0x0000000000000000000000000000000000000000. |

**Response:**

```json
{
  "dailyUserVlm": [
    {
      "date": "2025-05-23",
      "userCross": "0.0",
      "userAdd": "0.0",
      "exchange": "2852367.0770729999"
    },
    ...
  ],
  "feeSchedule": {
    "cross": "0.00045",
    "add": "0.00015",
    "spotCross": "0.0007",
    "spotAdd": "0.0004",
    "tiers": {
      "vip": [
        {
          "ntlCutoff": "5000000.0",
          "cross": "0.0004",
          "add": "0.00012",
          "spotCross": "0.0006",
          "spotAdd": "0.0003"
        },
        ...
      ],
      "mm": [
        {
          "makerFractionCutoff": "0.005",
          "add": "-0.00001"
        },
        ...
      ]
    },
    "referralDiscount": "0.04",
    "stakingDiscountTiers": [
      {
        "bpsOfMaxSupply": "0.0",
        "discount": "0.0"
      },
      {
        "bpsOfMaxSupply": "0.0001",
        "discount": "0.05"
      },
      ...
    ]
  },
  "userCrossRate": "0.000315",
  "userAddRate": "0.000105",
  "userSpotCrossRate": "0.00049",
  "userSpotAddRate": "0.00028",
  "activeReferralDiscount": "0.0",
  "trial": null,
  "feeTrialReward": "0.0",
  "nextTrialAvailableTimestamp": null,
  "stakingLink": {
    "type": "tradingUser",
    "stakingUser": "0x54c049d9c7d3c92c2462bf3d28e083f3d6805061"
  },
  "activeStakingDiscount": {
    "bpsOfMaxSupply": "4.7577998927",
    "discount": "0.3"
  }
}
```

## Query a user's staking delegations

`POST` `https://hyperliquid-mainnet.g.alchemy.com/v2/${apiKey}/info`

#### Headers

| Name                                           | Type   | Description        |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type\* | String | "application/json" |

#### Request Body

| Name                                   | Type   | Description                                                          |
| -------------------------------------- | ------ | -------------------------------------------------------------------- |
| type\* | String | "delegations"                                                        |
| user\* | String | hexadecimal format; e.g. 0x0000000000000000000000000000000000000000. |

**Response:**

```json
[
    {
        "validator":"0x5ac99df645f3414876c816caa18b2d234024b487",
        "amount":"12060.16529862",
        "lockedUntilTimestamp":1735466781353
    },
    ...
]
```

## Query a user's staking summary

`POST` `https://hyperliquid-mainnet.g.alchemy.com/v2/${apiKey}/info`

#### Headers

| Name                                           | Type   | Description        |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type\* | String | "application/json" |

#### Request Body

| Name                                   | Type   | Description                                                          |
| -------------------------------------- | ------ | -------------------------------------------------------------------- |
| type\* | String | "delegatorSummary"                                                   |
| user\* | String | hexadecimal format; e.g. 0x0000000000000000000000000000000000000000. |

**Response:**

```json
{
    "delegated": "12060.16529862",
    "undelegated": "0.0",
    "totalPendingWithdrawal": "0.0",
    "nPendingWithdrawals": 0
}
```

## Query a user's HIP-3 DEX abstraction state

`POST` `https://hyperliquid-mainnet.g.alchemy.com/v2/${apiKey}/info`

#### Headers

| Name                                           | Type   | Description        |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type\* | String | "application/json" |

#### Request Body

| Name                                   | Type   | Description                                                          |
| -------------------------------------- | ------ | -------------------------------------------------------------------- |
| type\* | String | "userDexAbstraction"                                                 |
| user\* | String | hexadecimal format; e.g. 0x0000000000000000000000000000000000000000. |

**Response:**

```json
true
```

------

# Hyperevm API FAQ

> Frequently asked questions about the Hyperevm API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is HyperEVM?

HyperEVM is a high-performance, Ethereum-compatible execution layer developed by HyperLiquid that enables smart contracts to run natively alongside its decentralized trading engine, combining low-latency performance with full EVM compatibility.

## How do I get started with HyperEVM?

Check out our [HyperEVM API Quickstart guide](/docs/reference/hyperliquid-api-quickstart) to get started building on HyperEVM.

## What is the HyperEVM API?

The HyperEVM API lets you interface with the HyperEVM mainnet. You can execute transactions, query onchain data, and interact with the HyperEVM network using the JSON-RPC standard.

## Is HyperEVM EVM compatible?

Yes, HyperEVM is EVM compatible.

## What API does HyperEVM use?

HyperEVM uses the JSON-RPC API standard. This API handles all blockchain interaction on the HyperEVM network, letting you read block/transaction data, query chain information, execute smart contracts, and store data onchain.

## What is a HyperEVM API key?

When you access the HyperEVM network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network.

For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!

## Which libraries support HyperEVM?

Common Ethereum libraries like [ethers.js](https://docs.ethers.org/v5/) and [web3.js](https://web3js.readthedocs.io/en/v1.8.2/) should be compatible with HyperEVM, given its EVM nature.

## What programming languages work with HyperEVM?

Languages that work with Ethereum, such as JavaScript, Solidity, TypeScript, and Shell, should also be compatible with HyperEVM. Solidity remains the primary choice for smart contract development, while JavaScript is ideal for offchain interactions.

## What does HyperEVM use for gas?

The native currency of the HyperEVM blockchain is HYPE. It serves as the primary gas token for transactions and smart contract executions within the Hyperliquid ecosystem.

## What methods does Alchemy support for the HyperEVM API?

You can find the list of all the methods Alchemy supports for the HyperEVM API on the [HyperEVM API Endpoints](/docs/chains#hyperliquid-apis) page.

## My question isn't here, where can I get help?

If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Injective API Quickstart

> How to get started building on Injective and using the JSON-RPC API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

*To use the Injective API, you need an Alchemy account. [Create a free account](https://dashboard.alchemy.com/signup) to get started.*

## What is Injective?

Injective is a high-performance Layer 1 blockchain built on the Cosmos SDK, purpose-built for decentralized finance (DeFi) applications such as decentralized exchanges, prediction markets, and lending protocols. It features full EVM compatibility, allowing developers to deploy Ethereum-based smart contracts while benefiting from fast finality and low transaction costs.

## What is the Injective API?

The Injective API lets you interact with Injective Mainnet or Injective Testnet through JSON-RPC. Mainnet chain ID is `0x6f0` (1776); testnet is `0x59f` (1439). If you've worked with Ethereum's JSON-RPC APIs, the interface will be familiar. For the full Node API method list, see the [Injective API overview](/docs/injective/injective-api-overview). Testnet-only methods document coverage on their own reference pages; use the [Debug API](/docs/reference/debug-api-quickstart) for `debug_*` RPC.

## Get started

### 1. Choose a package manager (npm or yarn)

Pick a package manager for your project's dependencies.

<CodeGroup>
  ```shell npm
  # Begin with npm by following the npm documentation
  # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
  ```

  ```shell yarn
  # For yarn, refer to yarn's installation guide
  # https://classic.yarnpkg.com/lang/en/docs/install
  ```
</CodeGroup>

### 2. Set up your project

Run the following commands to create and initialize your project:

<CodeGroup>
  ```shell npm
  mkdir injective-api-quickstart
  cd injective-api-quickstart
  npm init --yes
  ```

  ```shell yarn
  mkdir injective-api-quickstart
  cd injective-api-quickstart
  yarn init --yes
  ```
</CodeGroup>

This creates a new directory named `injective-api-quickstart` and initializes a Node.js project within it.

### 3. Make your first request

Install Axios to make API requests:

<CodeGroup>
  ```shell npm
  npm install axios
  ```

  ```shell yarn
  yarn add axios
  ```
</CodeGroup>

Create an `index.js` file in your project directory and paste the following code:

<CodeGroup>
  ```javascript index.js
  const axios = require('axios');

  const url = "https://injective-mainnet.g.alchemy.com/v2/YOUR_API_KEY";

  const payload = {
    jsonrpc: '2.0',
    id: 1,
    method: 'eth_blockNumber',
    params: []
  };

  axios.post(url, payload)
    .then(response => {
      console.log('Latest Block:', response.data.result);
    })
    .catch(error => {
      console.error(error);
    });
  ```
</CodeGroup>

Replace `YOUR_API_KEY` with your Alchemy API key from the [Alchemy Dashboard](https://dashboard.alchemy.com/signup). For Injective Testnet, use `https://injective-testnet.g.alchemy.com/v2/YOUR_API_KEY` instead.

### 4. Run your script

Run your script to make a request to the Injective network:

<CodeGroup>
  ```shell shell
  node index.js
  ```
</CodeGroup>

You should see the latest block number from Injective in your console:

<CodeGroup>
  ```shell shell
  Latest Block: 0x...
  ```
</CodeGroup>

## Next steps

You've made your first request to the Injective network. Explore the JSON-RPC methods available on Injective and start building your dApps.

------

# Injective API Overview

> Overview of available Injective API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Injective APIs

📙 Get started with our [Injective API Quickstart Guide](/docs/reference/injective-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_blockNumber`](/docs/chains/injective/injective-api-endpoints/eth-block-number)            | [`eth_call`](/docs/chains/injective/injective-api-endpoints/eth-call)                       |
| [`eth_chainId`](/docs/chains/injective/injective-api-endpoints/eth-chain-id)                    | [`eth_estimateGas`](/docs/chains/injective/injective-api-endpoints/eth-estimate-gas)        |
| [`eth_feeHistory`](/docs/chains/injective/injective-api-endpoints/eth-fee-history)              | [`eth_fillTransaction`](/docs/chains/injective/injective-api-endpoints/eth-fill-transaction) |
| [`eth_gasPrice`](/docs/chains/injective/injective-api-endpoints/eth-gas-price)                  | [`eth_getAccount`](/docs/chains/injective/injective-api-endpoints/eth-get-account)          |
| [`eth_getBalance`](/docs/chains/injective/injective-api-endpoints/eth-get-balance)              | [`eth_getBlockByHash`](/docs/chains/injective/injective-api-endpoints/eth-get-block-by-hash) |
| [`eth_getBlockByNumber`](/docs/chains/injective/injective-api-endpoints/eth-get-block-by-number) | [`eth_getBlockReceipts`](/docs/chains/injective/injective-api-endpoints/eth-get-block-receipts) |
| [`eth_getBlockTransactionCountByHash`](/docs/chains/injective/injective-api-endpoints/eth-get-block-transaction-count-by-hash) | [`eth_getBlockTransactionCountByNumber`](/docs/chains/injective/injective-api-endpoints/eth-get-block-transaction-count-by-number) |
| [`eth_getCode`](/docs/chains/injective/injective-api-endpoints/eth-get-code)                    | [`eth_getFilterChanges`](/docs/chains/injective/injective-api-endpoints/eth-get-filter-changes) |
| [`eth_getFilterLogs`](/docs/chains/injective/injective-api-endpoints/eth-get-filter-logs)       | [`eth_getLogs`](/docs/chains/injective/injective-api-endpoints/eth-get-logs)                |
| [`eth_getProof`](/docs/chains/injective/injective-api-endpoints/eth-get-proof)                  | [`eth_getRawTransactionByHash`](/docs/chains/injective/injective-api-endpoints/eth-get-raw-transaction-by-hash) |
| [`eth_getStorageAt`](/docs/chains/injective/injective-api-endpoints/eth-get-storage-at)         | [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/injective/injective-api-endpoints/eth-get-transaction-by-block-hash-and-index) |
| [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/injective/injective-api-endpoints/eth-get-transaction-by-block-number-and-index) | [`eth_getTransactionByHash`](/docs/chains/injective/injective-api-endpoints/eth-get-transaction-by-hash) |
| [`eth_getTransactionCount`](/docs/chains/injective/injective-api-endpoints/eth-get-transaction-count) | [`eth_getTransactionReceipt`](/docs/chains/injective/injective-api-endpoints/eth-get-transaction-receipt) |
| [`eth_getUncleByBlockHashAndIndex`](/docs/chains/injective/injective-api-endpoints/eth-get-uncle-by-block-hash-and-index) | [`eth_getUncleByBlockNumberAndIndex`](/docs/chains/injective/injective-api-endpoints/eth-get-uncle-by-block-number-and-index) |
| [`eth_getUncleCountByBlockHash`](/docs/chains/injective/injective-api-endpoints/eth-get-uncle-count-by-block-hash) | [`eth_getUncleCountByBlockNumber`](/docs/chains/injective/injective-api-endpoints/eth-get-uncle-count-by-block-number) |
| [`eth_maxPriorityFeePerGas`](/docs/chains/injective/injective-api-endpoints/eth-max-priority-fee-per-gas) | [`eth_newBlockFilter`](/docs/chains/injective/injective-api-endpoints/eth-new-block-filter) |
| [`eth_newFilter`](/docs/chains/injective/injective-api-endpoints/eth-new-filter)                | [`eth_newPendingTransactionFilter`](/docs/chains/injective/injective-api-endpoints/eth-new-pending-transaction-filter) |
| [`eth_protocolVersion`](/docs/chains/injective/injective-api-endpoints/eth-protocol-version)    | [`eth_sendRawTransaction`](/docs/chains/injective/injective-api-endpoints/eth-send-raw-transaction) |
| [`eth_submitWork`](/docs/chains/injective/injective-api-endpoints/eth-submit-work)              | [`eth_subscribe`](/docs/chains/injective/injective-api-endpoints/eth-subscribe)             |
| [`eth_syncing`](/docs/chains/injective/injective-api-endpoints/eth-syncing)                     | [`eth_uninstallFilter`](/docs/chains/injective/injective-api-endpoints/eth-uninstall-filter) |
| [`eth_unsubscribe`](/docs/chains/injective/injective-api-endpoints/eth-unsubscribe)             | [`net_listening`](/docs/chains/injective/injective-api-endpoints/net-listening)             |
| [`net_peerCount`](/docs/chains/injective/injective-api-endpoints/net-peer-count)                | [`net_version`](/docs/chains/injective/injective-api-endpoints/net-version)                 |
| [`web3_clientVersion`](/docs/chains/injective/injective-api-endpoints/web-3-client-version)     | [`web3_sha3`](/docs/chains/injective/injective-api-endpoints/web-3-sha-3)                   |

## Related APIs

The following Alchemy APIs are also supported on Injective:

* [Debug API](/docs/reference/debug-api-quickstart)

------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

**Injective:** Enabled on [Injective Testnet](https://injective-testnet.g.alchemy.com/v2) only. Not enabled on Injective Mainnet.


Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_newPendingTransactionFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new pending transactions arrive.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-new-pending-transaction-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newPendingTransactionFilter"
}'
```



------

# eth_protocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current protocol version used by the client.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-protocol-version

## Result

**Protocol Version** (string): The protocol version as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3f",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_protocolVersion"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

**Injective:** Enabled on [Injective Testnet](https://injective-testnet.g.alchemy.com/v2) only. Not enabled on Injective Mainnet.


Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

**Injective:** Enabled on [Injective Testnet](https://injective-testnet.g.alchemy.com/v2) only. Not enabled on Injective Mainnet.


Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_peerCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of peers currently connected to the client.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/net-peer-count

## Result

**peerCount** (string): The number of connected peers as a hex string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_peerCount"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://injective-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/injective/injective-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://injective-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Injective API FAQ

> Frequently asked questions about the Injective API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Injective?
Injective is a high-performance Layer 1 blockchain built on the Cosmos SDK, purpose-built for decentralized finance (DeFi) applications such as decentralized exchanges, prediction markets, and lending protocols. It features full EVM compatibility, allowing developers to deploy Ethereum-based smart contracts while benefiting from fast finality and low transaction costs.

## How do I get started with Injective?
See the [Injective API quickstart guide](/docs/reference/injective-api-quickstart) to start building on Injective.

## What is the Injective API?
The Injective API lets you interact with Injective Mainnet and Injective Testnet. You can execute transactions, query onchain data, and interact with the network using the JSON-RPC standard.

## Is Injective EVM compatible?
Yes, Injective is EVM compatible.

## What API does Injective use?
Injective uses the JSON-RPC API standard. This API enables blockchain interaction on the Injective network, letting you read block and transaction data, query chain information, execute smart contracts, and store data onchain.

## What methods are supported on Injective?
Injective supports the standard Ethereum JSON-RPC surface for both mainnet and testnet. A few methods (`eth_getBlockReceipts`, `eth_syncing`, and `net_listening`) are enabled on **Injective Testnet only**; each of those method reference pages calls that out in its description. For **`debug_*`** methods, use the separate [Debug API](/docs/reference/debug-api-quickstart) documentation (its OpenRPC spec is not the Injective chain spec). See the [Injective API overview](/docs/injective/injective-api-overview) for chain IDs and the full Node API method list.

## What is an Injective API key?
When you access the Injective network through a node provider like Alchemy, you use an API key to send transactions and retrieve data. We recommend you [sign up for a free API key](https://dashboard.alchemy.com/signup).

## Which libraries support Injective?
Common Ethereum libraries like [ethers.js](https://docs.ethers.org/v5/) are compatible with Injective, given its EVM nature.

## Where can I get more help?
If you have questions or feedback, contact us at support@alchemy.com or open a ticket in the [Alchemy Dashboard](https://dashboard.alchemy.com).

------

# Ink API Quickstart

> How to get started building on Ink using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Ink is a cutting-edge Layer 2 blockchain solution developed by Kraken, designed to bridge centralized and decentralized finance. Built on the OP Stack within the Optimism Superchain ecosystem, Ink offers sub-second block times, optimized gas fees, and high performance. It aims to simplify DeFi access, leveraging Kraken's established infrastructure while inheriting Ethereum's robust security.

The Ink API lets you interact with the Ink network through a set of JSON-RPC methods. If you've worked with Ethereum's JSON-RPC APIs, the design will feel familiar.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an Ink client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { ink } from "viem/chains";

const client = createPublicClient({
  chain: ink,
  transport: http("https://ink-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (ETH):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Ink APIs

For the full list of Ink APIs, see the [Ink API Endpoints](/docs/chains#ink-apis).

------

# Ink API Overview

> Overview of available Ink API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Ink APIs

📙 Get started with our [Ink API Quickstart Guide](/docs/reference/ink-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/ink/ink-api-endpoints/eth-accounts)                               | [`eth_blobBaseFee`](/docs/chains/ink/ink-api-endpoints/eth-blob-base-fee)                   |
| [`eth_blockNumber`](/docs/chains/ink/ink-api-endpoints/eth-block-number)                        | [`eth_call`](/docs/chains/ink/ink-api-endpoints/eth-call)                                   |
| [`eth_callMany`](/docs/chains/ink/ink-api-endpoints/eth-call-many)                              | [`eth_chainId`](/docs/chains/ink/ink-api-endpoints/eth-chain-id)                            |
| [`eth_createAccessList`](/docs/chains/ink/ink-api-endpoints/eth-create-access-list)             | [`eth_estimateGas`](/docs/chains/ink/ink-api-endpoints/eth-estimate-gas)                    |
| [`eth_feeHistory`](/docs/chains/ink/ink-api-endpoints/eth-fee-history)                          | [`eth_fillTransaction`](/docs/chains/ink/ink-api-endpoints/eth-fill-transaction)            |
| [`eth_gasPrice`](/docs/chains/ink/ink-api-endpoints/eth-gas-price)                              | [`eth_getAccount`](/docs/chains/ink/ink-api-endpoints/eth-get-account)                      |
| [`eth_getAccountInfo`](/docs/chains/ink/ink-api-endpoints/eth-get-account-info)                 | [`eth_getBalance`](/docs/chains/ink/ink-api-endpoints/eth-get-balance)                      |
| [`eth_getBlockByHash`](/docs/chains/ink/ink-api-endpoints/eth-get-block-by-hash)                | [`eth_getBlockByNumber`](/docs/chains/ink/ink-api-endpoints/eth-get-block-by-number)        |
| [`eth_getBlockReceipts`](/docs/chains/ink/ink-api-endpoints/eth-get-block-receipts)             | [`eth_getBlockTransactionCountByHash`](/docs/chains/ink/ink-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/ink/ink-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/ink/ink-api-endpoints/eth-get-code)                            |
| [`eth_getFilterChanges`](/docs/chains/ink/ink-api-endpoints/eth-get-filter-changes)             | [`eth_getFilterLogs`](/docs/chains/ink/ink-api-endpoints/eth-get-filter-logs)               |
| [`eth_getLogs`](/docs/chains/ink/ink-api-endpoints/eth-get-logs)                                | [`eth_getProof`](/docs/chains/ink/ink-api-endpoints/eth-get-proof)                          |
| [`eth_getRawTransactionByHash`](/docs/chains/ink/ink-api-endpoints/eth-get-raw-transaction-by-hash) | [`eth_getStorageAt`](/docs/chains/ink/ink-api-endpoints/eth-get-storage-at)                 |
| [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/ink/ink-api-endpoints/eth-get-transaction-by-block-hash-and-index) | [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/ink/ink-api-endpoints/eth-get-transaction-by-block-number-and-index) |
| [`eth_getTransactionByHash`](/docs/chains/ink/ink-api-endpoints/eth-get-transaction-by-hash)    | [`eth_getTransactionCount`](/docs/chains/ink/ink-api-endpoints/eth-get-transaction-count)   |
| [`eth_getTransactionReceipt`](/docs/chains/ink/ink-api-endpoints/eth-get-transaction-receipt)   | [`eth_getUncleByBlockHashAndIndex`](/docs/chains/ink/ink-api-endpoints/eth-get-uncle-by-block-hash-and-index) |
| [`eth_getUncleByBlockNumberAndIndex`](/docs/chains/ink/ink-api-endpoints/eth-get-uncle-by-block-number-and-index) | [`eth_getUncleCountByBlockHash`](/docs/chains/ink/ink-api-endpoints/eth-get-uncle-count-by-block-hash) |
| [`eth_getUncleCountByBlockNumber`](/docs/chains/ink/ink-api-endpoints/eth-get-uncle-count-by-block-number) | [`eth_maxPriorityFeePerGas`](/docs/chains/ink/ink-api-endpoints/eth-max-priority-fee-per-gas) |
| [`eth_newBlockFilter`](/docs/chains/ink/ink-api-endpoints/eth-new-block-filter)                 | [`eth_newFilter`](/docs/chains/ink/ink-api-endpoints/eth-new-filter)                        |
| [`eth_protocolVersion`](/docs/chains/ink/ink-api-endpoints/eth-protocol-version)                | [`eth_sendRawTransaction`](/docs/chains/ink/ink-api-endpoints/eth-send-raw-transaction)     |
| [`eth_simulateV1`](/docs/chains/ink/ink-api-endpoints/eth-simulate-v-1)                         | [`eth_submitWork`](/docs/chains/ink/ink-api-endpoints/eth-submit-work)                      |
| [`eth_subscribe`](/docs/chains/ink/ink-api-endpoints/eth-subscribe)                             | [`eth_syncing`](/docs/chains/ink/ink-api-endpoints/eth-syncing)                             |
| [`eth_uninstallFilter`](/docs/chains/ink/ink-api-endpoints/eth-uninstall-filter)                | [`eth_unsubscribe`](/docs/chains/ink/ink-api-endpoints/eth-unsubscribe)                     |
| [`net_listening`](/docs/chains/ink/ink-api-endpoints/net-listening)                             | [`net_peerCount`](/docs/chains/ink/ink-api-endpoints/net-peer-count)                        |
| [`net_version`](/docs/chains/ink/ink-api-endpoints/net-version)                                 | [`web3_clientVersion`](/docs/chains/ink/ink-api-endpoints/web-3-client-version)             |
| [`web3_sha3`](/docs/chains/ink/ink-api-endpoints/web-3-sha-3)                                   |                                                                                             |

## Related APIs

The following Alchemy APIs are also supported on Ink:

* [Bundler API](/docs/wallets/transactions/low-level-infra/bundler/overview)
* [Gas Manager API](/docs/wallets/api-reference/gas-manager-admin-api/gas-abstraction-api-endpoints/alchemy-request-gas-and-paymaster-and-data)
* [Token API](/docs/reference/token-api-overview)
* [Transfers API](/docs/reference/transfers-api-quickstart)
* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blobBaseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns the base fee per blob gas in wei for the current block.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-blob-base-fee

## Result

**Blob Base Fee** (string): The base fee per blob gas, in wei, as a hexadecimal encoded unsigned integer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blobBaseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_callMany

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Executes a list of transaction bundles without creating transactions on the blockchain. This method is particularly useful for simulating transactions to understand their potential outcomes. It supports simulating transactions at an intermediate state of a block, simulating multiple transactions with sequential dependencies, and overwriting block headers.


Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-call-many

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Bundles | object[] | Yes | A list of bundles where each bundle contains transactions and optional block overrides.  |
| Simulation context | object | Yes | The context for the simulation, specifying the blockNumber or Tag and transactionIndex.  |
| State overrides | object | No | An optional mapping for state overrides, following the eth_call standard.  |
| Timeout | integer | No | The maximum running time for the simulations in milliseconds, defaulting to 5000 milliseconds.  |

## Result

**Call results** (object[][]): A list of lists containing either the return value of the executed contract call or the reverted error code. Each bundle returns an array with one result per transaction. 

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "from": "0x1985ea6e9c68e1c272d8209f3b478ac2fdb25c87",
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gas": "0x0f4240",
            "gasPrice": "0x7896e72a",
            "data": "0xa9059cbb000000000000000000000000bc0e63965946815d105e7591407704e6e1964e590000000000000000000000000000000000000000000000000000000005f5e100"
          },
          {
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gasPrice": "0x7896e72a",
            "data": "0x70a08231000000000000000000000000bc0e63965946815d105e7591407704e6e1964e59"
          }
        ],
        "blockOverride": {
          "blockNumber": "0xbb5fe9"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    [
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000000000001"
      },
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000005f5e100"
      }
    ]
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "type": "string",
            "nonce": "string",
            "to": null,
            "from": "string",
            "gas": "string",
            "value": "string",
            "input": "string",
            "gasPrice": "string",
            "maxPriorityFeePerGas": "string",
            "maxFeePerGas": "string",
            "maxFeePerBlobGas": "string",
            "accessList": [
              {
                "address": "string",
                "storageKeys": [
                  "string"
                ]
              }
            ],
            "blobVersionedHashes": [
              "string"
            ],
            "blobs": [
              "string"
            ],
            "chainId": "string"
          }
        ],
        "blockOverride": {
          "blockNumber": "string",
          "blockHash": "string",
          "coinbase": "string",
          "timestamp": "string",
          "difficulty": "string",
          "gasLimit": "string",
          "baseFee": "string"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves account information including balance, code, and nonce for a given address at a specified block.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the account information. |

## Result

**Account information** (object): An object containing the account's balance, code, and nonce.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "balance": "0x1cfe56f3795885980000",
    "code": "0x",
    "nonce": "0x5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-sepolia.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-sepolia.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-sepolia.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-sepolia.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_protocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-sepolia.g.alchemy.com/v2/{apiKey}

Returns the current protocol version used by the client.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-protocol-version

## Result

**Protocol Version** (string): The protocol version as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3f",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-sepolia.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_protocolVersion"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_simulateV1

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Enables simulation of complex transactions and state changes without modifying the blockchain.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-simulate-v-1

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Simulation object | object | Yes | The object containing all simulation details such as calls, overrides, etc. |

## Result

**Simulation result** (object[]): The result of the simulation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "baseFeePerGas": "0x9",
      "blobGasUsed": "0x0",
      "calls": [
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000001"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
              "transactionIndex": "0x0",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x0",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        },
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000002"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd",
              "transactionIndex": "0x1",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x1",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        }
      ],
      "difficulty": "0x0",
      "excessBlobGas": "0x3b80000",
      "extraData": "0x",
      "gasLimit": "0x22550dd",
      "gasUsed": "0xa410",
      "hash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "miner": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
      "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "nonce": "0x0000000000000000",
      "number": "0x1530a5e",
      "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "parentHash": "0x513a0aa73024f294cdbcb0312af0c920850035f0552d7349ebb30717de30b1cc",
      "receiptsRoot": "0x75308898d571eafb5cd8cde8278bf5b3d13c5f6ec074926de3bb895b519264e1",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "size": "0x29c",
      "stateRoot": "0x65ea44c8bd5f9edbf269b6446b460b3e7378abb25c78fd5d70f0e2ef59296b25",
      "timestamp": "0x67f43327",
      "transactions": [
        "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
        "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd"
      ],
      "transactionsRoot": "0xd6902f31ae9d2169b77cd88611c6afd691ea5a7e604e44c71f663fda0c5d1c28",
      "uncles": [],
      "withdrawals": [],
      "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    }
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_peerCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of peers currently connected to the client.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/net-peer-count

## Result

**peerCount** (string): The number of connected peers as a hex string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_peerCount"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://ink-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/ink/ink-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://ink-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Ink API FAQ

> Frequently asked questions about the Ink API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Ink Chain?

Ink Chain is a high-performance Layer 2 blockchain developed by Kraken, designed to offer users a seamless bridge to DeFi with low transaction costs and fast execution times. It is built on Optimism's Superchain and is compatible with the Ethereum ecosystem, enabling developers to deploy Ethereum-based applications seamlessly on it.

## What is the Ink Chain API?

The Ink Chain API lets you interact with the Ink network through a collection of JSON-RPC methods. Because it's compatible with the Ethereum ecosystem, you'll find working with Ink familiar if you've used Ethereum's JSON-RPC APIs.

## How can I get started using the Ink API?

Explained in [Ink API Quickstart](/docs/reference/ink-api-quickstart).

## Is Ink EVM compatible?

Yes, Ink Chain is fully compatible with the Ethereum Virtual Machine (EVM). This compatibility allows Ethereum developers to port their projects to Ink with minimal changes, taking advantage of the chain's high throughput and low transaction fees.

## What API does Ink use?

Ink Chain uses the JSON-RPC API standard for blockchain interactions. This is the same standard used by Ethereum.

## What is an Ink API key?

When you access the Ink network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network.

For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!

## Which libraries support Ink?

Because Ink is compatible with the Ethereum ecosystem, popular Ethereum libraries like ethers.js and web3.js work with Ink. If you're familiar with Ethereum's development ecosystem, you can integrate with minimal changes.

## What programming languages work with Ink?

Like Ethereum, Ink supports a range of programming languages for blockchain interaction and smart contract development, including Solidity for smart contracts, as well as JavaScript and TypeScript for dApp development and offchain interactions.

## What does Ink use for gas?

Ink uses ETH for transaction fees and gas, similar to other Layer 2 solutions built on Optimism's Superchain.

## What methods does Kraken support for the Ink API?

You can find the list of all the methods Alchemy supports for the Ink API on the [Ink API Endpoints](/docs/chains#ink-apis) page.

## My question isn't here, where can I get help?

If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Jovay API Quickstart

> How to get started building on Jovay and using the JSON-RPC API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

*To use the Jovay API, you need an Alchemy account. [Create a free account](https://dashboard.alchemy.com/signup) to get started.*

## What is Jovay?

Jovay is a high-performance Ethereum Layer 2 blockchain built by Ant Digital Technologies, designed for real-world asset (RWA) tokenization. It uses a dual-prover architecture combining Trusted Execution Environments (TEE) and Zero-Knowledge Proofs (ZKP) for cross-verified security, achieving sub-second response times and throughput of up to 22,000 TPS.

## What is the Jovay API?

The Jovay API lets you interact with the Jovay network through a set of JSON-RPC methods. If you've worked with Ethereum's JSON-RPC APIs, the interface will be familiar.

## Get started

### 1. Choose a package manager (npm or yarn)

Pick a package manager for your project's dependencies.

<CodeGroup>
  ```shell npm
  # Begin with npm by following the npm documentation
  # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
  ```

  ```shell yarn
  # For yarn, refer to yarn's installation guide
  # https://classic.yarnpkg.com/lang/en/docs/install
  ```
</CodeGroup>

### 2. Set up your project

Run the following commands to create and initialize your project:

<CodeGroup>
  ```shell npm
  mkdir jovay-api-quickstart
  cd jovay-api-quickstart
  npm init --yes
  ```

  ```shell yarn
  mkdir jovay-api-quickstart
  cd jovay-api-quickstart
  yarn init --yes
  ```
</CodeGroup>

This creates a new directory named `jovay-api-quickstart` and initializes a Node.js project within it.

### 3. Make your first request

Install Axios to make API requests:

<CodeGroup>
  ```shell npm
  npm install axios
  ```

  ```shell yarn
  yarn add axios
  ```
</CodeGroup>

Create an `index.js` file in your project directory and paste the following code:

<CodeGroup>
  ```javascript index.js
  const axios = require('axios');

  const url = 'https://jovay-mainnet.g.alchemy.com/v2/${your-api-key}';

  const payload = {
    jsonrpc: '2.0',
    id: 1,
    method: 'eth_blockNumber',
    params: []
  };

  axios.post(url, payload)
    .then(response => {
      console.log('Latest Block:', response.data.result);
    })
    .catch(error => {
      console.error(error);
    });
  ```
</CodeGroup>

Replace `your-api-key` with your actual Alchemy API key from the [Alchemy Dashboard](https://dashboard.alchemy.com/signup).

### 4. Run your script

Run your script to make a request to the Jovay network:

<CodeGroup>
  ```shell shell
  node index.js
  ```
</CodeGroup>

You should see the latest block number from Jovay in your console:

<CodeGroup>
  ```shell shell
  Latest Block: 0x...
  ```
</CodeGroup>

## Next steps

You've made your first request to the Jovay network. Explore the JSON-RPC methods available on Jovay and start building your dApps.

------

# Jovay API Overview

> Overview of available Jovay API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Jovay APIs

📙 Get started with our [Jovay API Quickstart Guide](/docs/reference/jovay-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/jovay/jovay-api-endpoints/eth-accounts)                           | [`eth_blockNumber`](/docs/chains/jovay/jovay-api-endpoints/eth-block-number)                |
| [`eth_call`](/docs/chains/jovay/jovay-api-endpoints/eth-call)                                   | [`eth_chainId`](/docs/chains/jovay/jovay-api-endpoints/eth-chain-id)                        |
| [`eth_estimateGas`](/docs/chains/jovay/jovay-api-endpoints/eth-estimate-gas)                    | [`eth_feeHistory`](/docs/chains/jovay/jovay-api-endpoints/eth-fee-history)                  |
| [`eth_gasPrice`](/docs/chains/jovay/jovay-api-endpoints/eth-gas-price)                          | [`eth_getAccount`](/docs/chains/jovay/jovay-api-endpoints/eth-get-account)                  |
| [`eth_getBalance`](/docs/chains/jovay/jovay-api-endpoints/eth-get-balance)                      | [`eth_getBlockByHash`](/docs/chains/jovay/jovay-api-endpoints/eth-get-block-by-hash)        |
| [`eth_getBlockByNumber`](/docs/chains/jovay/jovay-api-endpoints/eth-get-block-by-number)        | [`eth_getBlockTransactionCountByHash`](/docs/chains/jovay/jovay-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/jovay/jovay-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/jovay/jovay-api-endpoints/eth-get-code)                        |
| [`eth_getFilterChanges`](/docs/chains/jovay/jovay-api-endpoints/eth-get-filter-changes)         | [`eth_getFilterLogs`](/docs/chains/jovay/jovay-api-endpoints/eth-get-filter-logs)           |
| [`eth_getLogs`](/docs/chains/jovay/jovay-api-endpoints/eth-get-logs)                            | [`eth_getRawTransactionByHash`](/docs/chains/jovay/jovay-api-endpoints/eth-get-raw-transaction-by-hash) |
| [`eth_getStorageAt`](/docs/chains/jovay/jovay-api-endpoints/eth-get-storage-at)                 | [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/jovay/jovay-api-endpoints/eth-get-transaction-by-block-hash-and-index) |
| [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/jovay/jovay-api-endpoints/eth-get-transaction-by-block-number-and-index) | [`eth_getTransactionByHash`](/docs/chains/jovay/jovay-api-endpoints/eth-get-transaction-by-hash) |
| [`eth_getTransactionCount`](/docs/chains/jovay/jovay-api-endpoints/eth-get-transaction-count)   | [`eth_getTransactionReceipt`](/docs/chains/jovay/jovay-api-endpoints/eth-get-transaction-receipt) |
| [`eth_getUncleByBlockHashAndIndex`](/docs/chains/jovay/jovay-api-endpoints/eth-get-uncle-by-block-hash-and-index) | [`eth_getUncleByBlockNumberAndIndex`](/docs/chains/jovay/jovay-api-endpoints/eth-get-uncle-by-block-number-and-index) |
| [`eth_getUncleCountByBlockHash`](/docs/chains/jovay/jovay-api-endpoints/eth-get-uncle-count-by-block-hash) | [`eth_getUncleCountByBlockNumber`](/docs/chains/jovay/jovay-api-endpoints/eth-get-uncle-count-by-block-number) |
| [`eth_maxPriorityFeePerGas`](/docs/chains/jovay/jovay-api-endpoints/eth-max-priority-fee-per-gas) | [`eth_newBlockFilter`](/docs/chains/jovay/jovay-api-endpoints/eth-new-block-filter)         |
| [`eth_newFilter`](/docs/chains/jovay/jovay-api-endpoints/eth-new-filter)                        | [`eth_protocolVersion`](/docs/chains/jovay/jovay-api-endpoints/eth-protocol-version)        |
| [`eth_sendRawTransaction`](/docs/chains/jovay/jovay-api-endpoints/eth-send-raw-transaction)     | [`eth_submitWork`](/docs/chains/jovay/jovay-api-endpoints/eth-submit-work)                  |
| [`eth_subscribe`](/docs/chains/jovay/jovay-api-endpoints/eth-subscribe)                         | [`eth_uninstallFilter`](/docs/chains/jovay/jovay-api-endpoints/eth-uninstall-filter)        |
| [`eth_unsubscribe`](/docs/chains/jovay/jovay-api-endpoints/eth-unsubscribe)                     | [`net_peerCount`](/docs/chains/jovay/jovay-api-endpoints/net-peer-count)                    |
| [`net_version`](/docs/chains/jovay/jovay-api-endpoints/net-version)                             | [`txpool_content`](/docs/chains/jovay/jovay-api-endpoints/txpool-content)                   |
| [`web3_clientVersion`](/docs/chains/jovay/jovay-api-endpoints/web-3-client-version)             | [`web3_sha3`](/docs/chains/jovay/jovay-api-endpoints/web-3-sha-3)                           |

## Related APIs

The following Alchemy APIs are also supported on Jovay:

* [Debug API](/docs/reference/debug-api-quickstart)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_protocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current protocol version used by the client.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-protocol-version

## Result

**Protocol Version** (string): The protocol version as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3f",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_protocolVersion"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_peerCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of peers currently connected to the client.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/net-peer-count

## Result

**peerCount** (string): The number of connected peers as a hex string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_peerCount"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# txpool_content

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of the exact details of all transactions currently pending for inclusion in the next blocks, as well as ones that are being scheduled for future execution.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/txpool-content

## Result

**content** (object): Object with pending and queued transactions grouped by sender address and nonce.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "txpool_content"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://jovay-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/jovay/jovay-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://jovay-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Jovay API FAQ

> Frequently asked questions about the Jovay API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Jovay?
Jovay is a high-performance Ethereum Layer 2 blockchain built by Ant Digital Technologies, designed for real-world asset (RWA) tokenization. It uses a dual-prover architecture combining Trusted Execution Environments (TEE) and Zero-Knowledge Proofs (ZKP) for cross-verified security, achieving sub-second response times and throughput of up to 22,000 TPS.

## How do I get started with Jovay?
See the [Jovay API quickstart guide](/docs/reference/jovay-api-quickstart) to start building on Jovay.

## What is the Jovay API?
The Jovay API lets you interact with the Jovay mainnet. You can execute transactions, query onchain data, and interact with the Jovay network using the JSON-RPC standard.

## Is Jovay EVM compatible?
Yes, Jovay is EVM compatible.

## What API does Jovay use?
Jovay uses the JSON-RPC API standard. This API enables blockchain interaction on the Jovay network, letting you read block and transaction data, query chain information, execute smart contracts, and store data onchain.

## What methods are supported on Jovay?
Jovay supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Check the Jovay API endpoints documentation for a complete list.

## What is a Jovay API key?
When you access the Jovay network through a node provider like Alchemy, you use an API key to send transactions and retrieve data. We recommend you [sign up for a free API key](https://dashboard.alchemy.com/signup).

## Which libraries support Jovay?
Common Ethereum libraries like [ethers.js](https://docs.ethers.org/v5/) are compatible with Jovay, given its EVM nature.

## Where can I get more help?
If you have questions or feedback, contact us at support@alchemy.com or open a ticket in the [Alchemy Dashboard](https://dashboard.alchemy.com).

------

# Lens API Quickstart

> How to get started building on Lens using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Lens Network is a decentralized social media infrastructure built on Ethereum using zkSync's technology. It aims to create open and fair social spaces by leveraging hybrid scaling solutions for high-throughput, low-cost transactions. Lens empowers users with control over their social identity and connections, enabling seamless movement across applications and fostering an environment with reduced censorship and enhanced freedom of expression.

<Info>
  We currently only support Lens Sepolia testnet.
</Info>

The Lens API lets you interact with the Lens network through a set of JSON-RPC methods. If you've worked with Ethereum's JSON-RPC APIs, the design will feel familiar.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Lens client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http, defineChain } from "viem";

const lensTestnet = defineChain({
  id: 37111,
  name: "Lens Sepolia Testnet",
  nativeCurrency: { name: "GRASS", symbol: "GRASS", decimals: 18 },
  rpcUrls: {
    default: { http: ["https://lens-sepolia.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
  },
});

const client = createPublicClient({
  chain: lensTestnet,
  transport: http("https://lens-sepolia.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (GRASS):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Lens APIs

For the full list of Lens APIs, see the [Lens API Endpoints](/docs/chains#lens-apis).

------

# Lens API Overview

> Overview of available Lens API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Lens APIs

📙 Get started with our [Lens API Quickstart Guide](/docs/reference/lens-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/lens/lens-api-endpoints/eth-accounts)                             | [`eth_blockNumber`](/docs/chains/lens/lens-api-endpoints/eth-block-number)                  |
| [`eth_call`](/docs/chains/lens/lens-api-endpoints/eth-call)                                     | [`eth_chainId`](/docs/chains/lens/lens-api-endpoints/eth-chain-id)                          |
| [`eth_estimateGas`](/docs/chains/lens/lens-api-endpoints/eth-estimate-gas)                      | [`eth_feeHistory`](/docs/chains/lens/lens-api-endpoints/eth-fee-history)                    |
| [`eth_fillTransaction`](/docs/chains/lens/lens-api-endpoints/eth-fill-transaction)              | [`eth_gasPrice`](/docs/chains/lens/lens-api-endpoints/eth-gas-price)                        |
| [`eth_getAccount`](/docs/chains/lens/lens-api-endpoints/eth-get-account)                        | [`eth_getAccountInfo`](/docs/chains/lens/lens-api-endpoints/eth-get-account-info)           |
| [`eth_getBalance`](/docs/chains/lens/lens-api-endpoints/eth-get-balance)                        | [`eth_getBlockByHash`](/docs/chains/lens/lens-api-endpoints/eth-get-block-by-hash)          |
| [`eth_getBlockByNumber`](/docs/chains/lens/lens-api-endpoints/eth-get-block-by-number)          | [`eth_getBlockReceipts`](/docs/chains/lens/lens-api-endpoints/eth-get-block-receipts)       |
| [`eth_getBlockTransactionCountByHash`](/docs/chains/lens/lens-api-endpoints/eth-get-block-transaction-count-by-hash) | [`eth_getBlockTransactionCountByNumber`](/docs/chains/lens/lens-api-endpoints/eth-get-block-transaction-count-by-number) |
| [`eth_getCode`](/docs/chains/lens/lens-api-endpoints/eth-get-code)                              | [`eth_getFilterChanges`](/docs/chains/lens/lens-api-endpoints/eth-get-filter-changes)       |
| [`eth_getFilterLogs`](/docs/chains/lens/lens-api-endpoints/eth-get-filter-logs)                 | [`eth_getLogs`](/docs/chains/lens/lens-api-endpoints/eth-get-logs)                          |
| [`eth_getRawTransactionByHash`](/docs/chains/lens/lens-api-endpoints/eth-get-raw-transaction-by-hash) | [`eth_getStorageAt`](/docs/chains/lens/lens-api-endpoints/eth-get-storage-at)               |
| [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/lens/lens-api-endpoints/eth-get-transaction-by-block-hash-and-index) | [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/lens/lens-api-endpoints/eth-get-transaction-by-block-number-and-index) |
| [`eth_getTransactionByHash`](/docs/chains/lens/lens-api-endpoints/eth-get-transaction-by-hash)  | [`eth_getTransactionCount`](/docs/chains/lens/lens-api-endpoints/eth-get-transaction-count) |
| [`eth_getTransactionReceipt`](/docs/chains/lens/lens-api-endpoints/eth-get-transaction-receipt) | [`eth_getUncleCountByBlockHash`](/docs/chains/lens/lens-api-endpoints/eth-get-uncle-count-by-block-hash) |
| [`eth_getUncleCountByBlockNumber`](/docs/chains/lens/lens-api-endpoints/eth-get-uncle-count-by-block-number) | [`eth_maxPriorityFeePerGas`](/docs/chains/lens/lens-api-endpoints/eth-max-priority-fee-per-gas) |
| [`eth_newBlockFilter`](/docs/chains/lens/lens-api-endpoints/eth-new-block-filter)               | [`eth_newFilter`](/docs/chains/lens/lens-api-endpoints/eth-new-filter)                      |
| [`eth_newPendingTransactionFilter`](/docs/chains/lens/lens-api-endpoints/eth-new-pending-transaction-filter) | [`eth_protocolVersion`](/docs/chains/lens/lens-api-endpoints/eth-protocol-version)          |
| [`eth_sendRawTransaction`](/docs/chains/lens/lens-api-endpoints/eth-send-raw-transaction)       | [`eth_submitWork`](/docs/chains/lens/lens-api-endpoints/eth-submit-work)                    |
| [`eth_subscribe`](/docs/chains/lens/lens-api-endpoints/eth-subscribe)                           | [`eth_syncing`](/docs/chains/lens/lens-api-endpoints/eth-syncing)                           |
| [`eth_uninstallFilter`](/docs/chains/lens/lens-api-endpoints/eth-uninstall-filter)              | [`eth_unsubscribe`](/docs/chains/lens/lens-api-endpoints/eth-unsubscribe)                   |
| [`net_listening`](/docs/chains/lens/lens-api-endpoints/net-listening)                           | [`net_peerCount`](/docs/chains/lens/lens-api-endpoints/net-peer-count)                      |
| [`net_version`](/docs/chains/lens/lens-api-endpoints/net-version)                               | [`web3_clientVersion`](/docs/chains/lens/lens-api-endpoints/web-3-client-version)           |
| [`web3_sha3`](/docs/chains/lens/lens-api-endpoints/web-3-sha-3)                                 | [`zks_estimateFee`](/docs/chains/lens/lens-api-endpoints/zks-estimate-fee)                  |
| [`zks_estimateGasL1ToL2`](/docs/chains/lens/lens-api-endpoints/zks-estimate-gas-l-1-to-l-2)     | [`zks_gasPerPubdata`](/docs/chains/lens/lens-api-endpoints/zks-gas-per-pubdata)             |
| [`zks_getAllAccountBalances`](/docs/chains/lens/lens-api-endpoints/zks-get-all-account-balances) | [`zks_getBaseTokenL1Address`](/docs/chains/lens/lens-api-endpoints/zks-get-base-token-l-1-address) |
| [`zks_getBlockDetails`](/docs/chains/lens/lens-api-endpoints/zks-get-block-details)             | [`zks_getBridgeContracts`](/docs/chains/lens/lens-api-endpoints/zks-get-bridge-contracts)   |
| [`zks_getBridgehubContract`](/docs/chains/lens/lens-api-endpoints/zks-get-bridgehub-contract)   | [`zks_getBytecodeByHash`](/docs/chains/lens/lens-api-endpoints/zks-get-bytecode-by-hash)    |
| [`zks_getConfirmedTokens`](/docs/chains/lens/lens-api-endpoints/zks-get-confirmed-tokens)       | [`zks_getFeeParams`](/docs/chains/lens/lens-api-endpoints/zks-get-fee-params)               |
| [`zks_getL1BatchBlockRange`](/docs/chains/lens/lens-api-endpoints/zks-get-l-1-batch-block-range) | [`zks_getL1BatchDetails`](/docs/chains/lens/lens-api-endpoints/zks-get-l-1-batch-details)   |
| [`zks_getL1GasPrice`](/docs/chains/lens/lens-api-endpoints/zks-get-l-1-gas-price)               | [`zks_getL2ToL1LogProof`](/docs/chains/lens/lens-api-endpoints/zks-get-l-2-to-l-1-log-proof) |
| [`zks_getL2ToL1MsgProof`](/docs/chains/lens/lens-api-endpoints/zks-get-l-2-to-l-1-msg-proof)    | [`zks_getMainContract`](/docs/chains/lens/lens-api-endpoints/zks-get-main-contract)         |
| [`zks_getProof`](/docs/chains/lens/lens-api-endpoints/zks-get-proof)                            | [`zks_getProtocolVersion`](/docs/chains/lens/lens-api-endpoints/zks-get-protocol-version)   |
| [`zks_getRawBlockTransactions`](/docs/chains/lens/lens-api-endpoints/zks-get-raw-block-transactions) | [`zks_getTestnetPaymaster`](/docs/chains/lens/lens-api-endpoints/zks-get-testnet-paymaster) |
| [`zks_getTransactionDetails`](/docs/chains/lens/lens-api-endpoints/zks-get-transaction-details) | [`zks_L1BatchNumber`](/docs/chains/lens/lens-api-endpoints/zks-l-1-batch-number)            |
| [`zks_L1ChainId`](/docs/chains/lens/lens-api-endpoints/zks-l-1-chain-id)                        | [`zks_sendRawTransactionWithDetailedOutput`](/docs/chains/lens/lens-api-endpoints/zks-send-raw-transaction-with-detailed-output) |

## Related APIs

The following Alchemy APIs are also supported on Lens:

* [Token API](/docs/reference/token-api-overview)
* [Transfers API](/docs/reference/transfers-api-quickstart)
* [Debug API](/docs/reference/debug-api-quickstart)
* [NFT API](/docs/reference/nft-api-overview)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves account information including balance, code, and nonce for a given address at a specified block.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the account information. |

## Result

**Account information** (object): An object containing the account's balance, code, and nonce.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "balance": "0x1cfe56f3795885980000",
    "code": "0x",
    "nonce": "0x5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_newPendingTransactionFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new pending transactions arrive.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-new-pending-transaction-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newPendingTransactionFilter"
}'
```



------

# eth_protocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current protocol version used by the client.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-protocol-version

## Result

**Protocol Version** (string): The protocol version as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3f",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_protocolVersion"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_peerCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of peers currently connected to the client.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/net-peer-count

## Result

**peerCount** (string): The number of connected peers as a hex string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_peerCount"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# zks_estimateFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Estimates the fee for a given call request.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-estimate-fee

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Call object | object | Yes | The transaction call object containing details about the transaction. |

## Result

**Fee estimation** (object): The estimated gas and fee details for the given call request.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_estimateFee",
  "params": [
    {
      "from": "0x1111111111111111111111111111111111111111",
      "to": "0x2222222222222222222222222222222222222222",
      "data": "0xffffffff"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "gas_limit": "0x1ea9a9",
    "max_fee_per_gas": "0x17d7840",
    "max_priority_fee_per_gas": "0x0",
    "gas_per_pubdata_limit": "0x5340"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_estimateFee",
  "params": [
    {
      "from": "0x1111111111111111111111111111111111111111",
      "to": "0x2222222222222222222222222222222222222222",
      "data": "0xffffffff"
    }
  ]
}'
```



------

# zks_estimateGasL1ToL2

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Estimates the gas required for an L1 to L2 transaction.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-estimate-gas-l-1-to-l-2

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Call object | object | Yes | The transaction call object containing details about the transaction. |

## Result

**Gas estimate** (string): The estimated gas amount in hexadecimal format.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_estimateGasL1ToL2",
  "params": [
    {
      "from": "0x1111111111111111111111111111111111111111",
      "to": "0x2222222222222222222222222222222222222222",
      "data": "0xffffffff"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x25f64db",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_estimateGasL1ToL2",
  "params": [
    {
      "from": "0x1111111111111111111111111111111111111111",
      "to": "0x2222222222222222222222222222222222222222",
      "data": "0xffffffff"
    }
  ]
}'
```



------

# zks_gasPerPubdata

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current gas price per pubdata byte. This value is used to calculate the L1 data availability cost for transactions on zkSync Era. The pubdata refers to the data that needs to be posted to L1 for data availability.


Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-gas-per-pubdata

## Result

**Gas per pubdata** (string): The current gas per pubdata byte value in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x320",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_gasPerPubdata"
}'
```



------

# zks_getAllAccountBalances

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Gets all account balances for a given address.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-get-all-account-balances

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The account address. |

## Result

**Balances** (object): An object mapping token addresses to their balances.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_getAllAccountBalances",
  "params": [
    "0x98E9D288743839e96A8005a6B51C770Bbf7788C0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "0x0000000000000000000000000000000000000000": "0x7c07ef5b520cb7d"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getAllAccountBalances",
  "params": [
    "0x98E9D288743839e96A8005a6B51C770Bbf7788C0"
  ]
}'
```



------

# zks_getBaseTokenL1Address

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the L1 base token address.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-get-base-token-l-1-address

## Result

**Base token L1 address** (string): Layer 1 Ethereum address of base token.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000001",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getBaseTokenL1Address"
}'
```



------

# zks_getBlockDetails

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves details for a given block.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-get-block-details

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number | string | Yes | The number of the block. |

## Result

**Block details** (object): Detailed information about the specified block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_getBlockDetails",
  "params": [
    140599
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": 140599,
    "l1BatchNumber": 1617,
    "timestamp": 1679815038,
    "l1TxCount": 0,
    "l2TxCount": 20,
    "rootHash": "0xf1adac176fc939313eea4b72055db0622a10bbd9b7a83097286e84e471d2e7df",
    "status": "verified",
    "commitTxHash": "0xd045e3698f018cb233c3817eb53a41a4c5b28784ffe659da246aa33bda34350c",
    "committedAt": "2023-03-26T07:21:21.046817Z",
    "proveTxHash": "0x1591e9b16ff6eb029cc865614094b2e6dd872c8be40b15cc56164941ed723a1a",
    "provenAt": "2023-03-26T19:48:35.200565Z",
    "executeTxHash": "0xbb66aa75f437bb4255cf751badfc6b142e8d4d3a4e531c7b2e737a22870ff19e",
    "executedAt": "2023-03-27T07:44:52.187764Z",
    "l1GasPrice": 20690385511,
    "l2FairGasPrice": 250000000,
    "baseSystemContractsHashes": {
      "bootloader": "0x010007793a328ef16cc7086708f7f3292ff9b5eed9e7e539c184228f461bf4ef",
      "default_aa": "0x0100067d861e2f5717a12c3e869cfb657793b86bbb0caa05cc1421f16c5217bc"
    },
    "operatorAddress": "0xfeee860e7aae671124e9a4e61139f3a5085dfeee",
    "protocolVersion": "Version5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getBlockDetails",
  "params": [
    "string"
  ]
}'
```



------

# zks_getBridgeContracts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the addresses of canonical bridge contracts for zkSync Era.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-get-bridge-contracts

## Result

**Bridge contracts** (object): Object containing the addresses of bridge contracts.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "l1Erc20DefaultBridge": "0x57891966931eb4bb6fb81430e6ce0a03aabde063",
    "l2Erc20DefaultBridge": "0x11f943b2c77b743ab90f4a0ae7d5a4e7fca3e102",
    "l1WethBridge": "0x0000000000000000000000000000000000000000",
    "l2WethBridge": "0x0000000000000000000000000000000000000000"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getBridgeContracts"
}'
```



------

# zks_getBridgehubContract

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the address of the zkSync bridgehub contract.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-get-bridgehub-contract

## Result

**Bridgehub contract address** (string): Layer 1 Ethereum address of bridgehub contract.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x303a465b659cbb0ab36ee643ea362c509eeb5213",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getBridgehubContract"
}'
```



------

# zks_getBytecodeByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the bytecode of a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-get-bytecode-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction. |

## Result

**Bytecode** (integer[]): Array of the transaction's bytecode.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_getBytecodeByHash",
  "params": [
    "0x0100067d861e2f5717a12c3e869cfb657793b86bbb0caa05cc1421f16c5217bc"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    0,
    4,
    0,
    255,
    18,
    34
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getBytecodeByHash",
  "params": [
    "0x0100067d861e2f5717a12c3e869cfb657793b86bbb0caa05cc1421f16c5217bc"
  ]
}'
```



------

# zks_getConfirmedTokens

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the confirmed tokens on zkSync.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-get-confirmed-tokens

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| From token ID | integer | Yes | Token ID from which to start listing. |
| Limit | integer | Yes | Maximum number of tokens to list. |

## Result

**Confirmed tokens** (object[]): List of confirmed tokens on zkSync.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_getConfirmedTokens",
  "params": [
    1,
    3
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "l1Address": "0xb6ed7644c69416d67b522e20bc294a9a9b405b31",
      "l2Address": "0xfea352c0d005a1e4ac7e092ef14fca18b8e6c8fd",
      "name": "0xBitcoin Token",
      "symbol": "0xBTC",
      "decimals": 8
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getConfirmedTokens",
  "params": [
    1,
    3
  ]
}'
```



------

# zks_getFeeParams

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the current fee parameters.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-get-fee-params

## Result

**Fee parameters** (object): Current fee parameters.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "V2": {
      "config": {
        "minimal_l2_gas_price": 25000000,
        "compute_overhead_part": 0,
        "pubdata_overhead_part": 1,
        "batch_overhead_l1_gas": 800000,
        "max_gas_per_batch": 200000000,
        "max_pubdata_per_batch": 240000
      },
      "l1_gas_price": 46226388803,
      "l1_pubdata_price": 100780475095
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getFeeParams"
}'
```



------

# zks_getL1BatchBlockRange

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Returns the range of blocks contained within a batch given by the batch number.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-get-l-1-batch-block-range

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| L1BatchNumber | string | Yes | The layer 1 batch number. |

## Result

**Block range** (string[]): Array containing the beginning and end block numbers in hexadecimal.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_getL1BatchBlockRange",
  "params": [
    12345
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0x116fec",
    "0x117015"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getL1BatchBlockRange",
  "params": [
    "string"
  ]
}'
```



------

# zks_getL1BatchDetails

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves details for a given L1 batch.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-get-l-1-batch-details

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| L1 batch number | string | Yes | L1 batch number. |

## Result

**L1 Batch Details** (object): Detailed information about the specified L1 batch.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_getL1BatchDetails",
  "params": [
    468355
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": 468355,
    "timestamp": 1711649164,
    "l1TxCount": 1,
    "l2TxCount": 2363,
    "rootHash": "0x7b31ef880f09238f13b71a0f6bfea340b9c76d01bba0712af6aa0a4f224be167",
    "status": "verified",
    "commitTxHash": "0x5b2598bf1260d498c1c6a05326f7416ef2a602b8a1ac0f75b583cd6e08ae83cb",
    "committedAt": "2024-03-28T18:24:49.713730Z",
    "proveTxHash": "0xc02563331d0a83d634bc4190750e920fc26b57096ec72dd100af2ab037b43912",
    "provenAt": "2024-03-29T03:09:19.634524Z",
    "executeTxHash": "0xbe1ba1fdd17c2421cf2dabe2908fafa26ff4fa2190a7724d16295dd9df72b144",
    "executedAt": "2024-03-29T18:18:04.204270Z",
    "l1GasPrice": 47875552051,
    "l2FairGasPrice": 25000000,
    "baseSystemContractsHashes": {
      "bootloader": "0x010007ede999d096c84553fb514d3d6ca76fbf39789dda76bfeda9f3ae06236e",
      "default_aa": "0x0100055b041eb28aff6e3a6e0f37c31fd053fc9ef142683b05e5f0aee6934066"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getL1BatchDetails",
  "params": [
    "string"
  ]
}'
```



------

# zks_getL1GasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the current L1 gas price.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-get-l-1-gas-price

## Result

**L1 gas price** (string): Current L1 gas price.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x11cccd9f58",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getL1GasPrice"
}'
```



------

# zks_getL2ToL1LogProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the log proof for an L2 to L1 transaction.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-get-l-2-to-l-1-log-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The transaction hash. |
| Log index | integer | No | Index of the log. |

## Result

**Log proof** (object): The log proof for the specified transaction and log index.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_getL2ToL1LogProof",
  "params": [
    "0x2a1c6c74b184965c0cb015aae9ea134fd96215d2e4f4979cfec12563295f610e"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "proof": [
      "0x8c48910df2ca7de509daf50b3182fcdf2dd6c422c6704054fd857d6c9516d6fc",
      "0xc5028885760b8b596c4fa11497c783752cb3a3fb3b8e6b52d7e54b9f1c63521e",
      "0xeb1f451eb8163723ee19940cf3a8f2a2afdf51100ce8ba25839bd94a057cda16",
      "0x7aabfd367dea2b5306b8071c246b99566dae551a1dbd40da791e66c4f696b236",
      "0xe4733f281f18ba3ea8775dd62d2fcd84011c8c938f16ea5790fd29a03bf8db89",
      "0x1798a1fd9c8fbb818c98cff190daa7cc10b6e5ac9716b4a2649f7c2ebcef2272",
      "0x66d7c5983afe44cf15ea8cf565b34c6c31ff0cb4dd744524f7842b942d08770d",
      "0xb04e5ee349086985f74b73971ce9dfe76bbed95c84906c5dffd96504e1e5396c",
      "0xac506ecb5465659b3a927143f6d724f91d8d9c4bdb2463aee111d9aa869874db"
    ],
    "id": 0,
    "root": "0x920c63cb0066a08da45f0a9bf934517141bd72d8e5a51421a94b517bf49a0d39"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getL2ToL1LogProof",
  "params": [
    "0x2a1c6c74b184965c0cb015aae9ea134fd96215d2e4f4979cfec12563295f610e",
    1
  ]
}'
```



------

# zks_getL2ToL1MsgProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the proof for an L2 to L1 message.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-get-l-2-to-l-1-msg-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| L2 block number | string | Yes | The L2 block number. |
| Sender address | string | Yes | The sender's address. |
| Message hash | string | Yes | The message hash. |
| Log position | integer | No | The log position in L2. |

## Result

**Message Proof** (object): The proof for the L2 to L1 message.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_getL2ToL1MsgProof",
  "params": [
    100000,
    "0x1111111111111111111111111111111111111111",
    "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    0
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "proof": [
      "0x8c48910df2ca7de509daf50b3182fcdf2dd6c422c6704054fd857d6c9516d6fc"
    ],
    "root": "0x920c63cb0066a08da45f0a9bf934517141bd72d8e5a51421a94b517bf49a0d39",
    "id": 0
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getL2ToL1MsgProof",
  "params": [
    "string",
    "0x1111111111111111111111111111111111111111",
    "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    1
  ]
}'
```



------

# zks_getMainContract

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the address of the zkSync main contract.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-get-main-contract

## Result

**Main contract address** (string): The address of the zkSync main contract.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x000000000000000000000000000000000000800a",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getMainContract"
}'
```



------

# zks_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

This method generates Merkle proofs for one or more storage values associated with a specific account, accompanied by a proof of their authenticity.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | Account address to fetch storage values and proofs for. |
| Storage keys | string[] | Yes | The storage keys in the account. |
| L1 batch number | string | Yes | Number of the L1 batch specifying the point in time at which the requested values are returned. |

## Result

**Proof** (object): The account details and proofs for storage keys.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_getProof",
  "params": [
    "0x0000000000000000000000000000000000008003",
    [
      "0x8b65c0cf1012ea9f393197eb24619fd814379b298b238285649e14f936a5eb12"
    ],
    354895
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "address": "0x0000000000000000000000000000000000008003",
    "storageProof": [
      {
        "key": "0x8b65c0cf1012ea9f393197eb24619fd814379b298b238285649e14f936a5eb12",
        "proof": [
          "0xe3e8e49a998b3abf8926f62a5a832d829aadc1b7e059f1ea59ffbab8e11edfb7"
        ],
        "value": "0x0000000000000000000000000000000000000000000000000000000000000060",
        "index": 27900957
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getProof",
  "params": [
    "0x0000000000000000000000000000000000008003",
    [
      "0x8b65c0cf1012ea9f393197eb24619fd814379b298b238285649e14f936a5eb12"
    ],
    "string"
  ]
}'
```



------

# zks_getProtocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the current protocol version.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-get-protocol-version

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Version ID | integer | No | Specific version ID to query. |

## Result

**Protocol version** (object): Current protocol version information.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "version_id": 22,
    "timestamp": 1710264138,
    "verification_keys_hashes": {
      "params": {
        "recursion_node_level_vk_hash": "0x5a3ef282b21e12fe1f4438e5bb158fc5060b160559c5158c6389d62d9fe3d080",
        "recursion_leaf_level_vk_hash": "0x400a4b532c6f072c00d1806ef299300d4c104f4ac55bd8698ade78894fcadc0a",
        "recursion_circuits_set_vks_hash": "0x0000000000000000000000000000000000000000000000000000000000000000"
      },
      "recursion_scheduler_level_vk_hash": "0x063c6fb5c70404c2867f413a8e35563ad3d040b1ad8c11786231bfdba7b472c7"
    },
    "base_system_contracts": {
      "bootloader": "0x010007ede999d096c84553fb514d3d6ca76fbf39789dda76bfeda9f3ae06236e",
      "default_aa": "0x0100055b041eb28aff6e3a6e0f37c31fd053fc9ef142683b05e5f0aee6934066"
    },
    "l2_system_upgrade_tx_hash": null
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getProtocolVersion",
  "params": [
    1
  ]
}'
```



------

# zks_getRawBlockTransactions

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Lists transactions in a block without processing them.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-get-raw-block-transactions

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number | string | Yes | Number of the block. |

## Result

**Raw transactions** (object[]): Array of raw transactions within the specified block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_getRawBlockTransactions",
  "params": [
    30098049
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "common_data": {
        "L2": {
          "nonce": 117,
          "fee": {
            "gas_limit": "0xbadbc",
            "max_fee_per_gas": "0x202fbf0",
            "max_priority_fee_per_gas": "0x0",
            "gas_per_pubdata_limit": "0xc350"
          },
          "initiatorAddress": "0xe7734c4a8201af41db64da90eddb4c19bbf64710",
          "signature": [
            203,
            118,
            119,
            63,
            1,
            54,
            91,
            252,
            188,
            23,
            120,
            51,
            4,
            28
          ],
          "transactionType": "EIP1559Transaction",
          "input": {
            "hash": "0x970c9480960818b05832f7e5b76a0c46956003c34942e005672d7ddc537aaa59",
            "data": [
              2,
              249,
              1,
              111,
              1305,
              187,
              2,
              170,
              21,
              166,
              251,
              255
            ]
          },
          "paymasterParams": {
            "paymaster": "0x0000000000000000000000000000000000000000",
            "paymasterInput": []
          }
        }
      },
      "execute": {
        "contractAddress": "0x5155704bb41fde152ad3e1ae402e8e8b9ba335d3",
        "calldata": "0xfa0x5155704bb41fde152ad3e1ae402e8e8b9ba335d3",
        "value": "0x0",
        "factoryDeps": null
      },
      "received_timestamp_ms": 1711649348872,
      "raw_bytes": "0x02f9016f8201447580840202fbf"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getRawBlockTransactions",
  "params": [
    "string"
  ]
}'
```



------

# zks_getTestnetPaymaster

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the testnet paymaster address, specifically for interactions within the testnet environment.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-get-testnet-paymaster

## Result

**Paymaster address** (string): The address of the testnet paymaster.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3cb2b87d10ac01736a65688f3e0fb1b070b3eea3",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getTestnetPaymaster"
}'
```



------

# zks_getTransactionDetails

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves details for a given transaction.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-get-transaction-details

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction. |

## Result

**Transaction details** (object): Detailed information about the specified transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "zks_getTransactionDetails",
  "params": [
    "0x22de7debaa98758afdaee89f447ff43bab5da3de6acca7528b281cc2f1be2ee9"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "isL1Originated": true,
    "status": "verified",
    "fee": "0x0",
    "gasPerPubdata": "0x320",
    "initiatorAddress": "0x87869cb87c4fa78ca278df358e890ff73b42a39e",
    "receivedAt": "2023-03-03T23:52:24.169Z",
    "ethCommitTxHash": "0x3da5b6eda357189c9243c41c5a33b1b2ed0169be172705d74681a25217702772",
    "ethProveTxHash": "0x2f482d3ea163f5be0c2aca7819d0beb80415be1a310e845a2d726fbc4ac54c80",
    "ethExecuteTxHash": "0xdaff5fd7ff91333b161de54534b4bb6a78e5325329959a0863bf0aae2b0fdcc6"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_getTransactionDetails",
  "params": [
    "0x22de7debaa98758afdaee89f447ff43bab5da3de6acca7528b281cc2f1be2ee9"
  ]
}'
```



------

# zks_L1BatchNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the current L1 batch number.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-l-1-batch-number

## Result

**L1 Batch Number** (string): Hexadecimal representation of the current L1 batch number.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x72af2",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_L1BatchNumber"
}'
```



------

# zks_L1ChainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves the L1 chain ID.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-l-1-chain-id

## Result

**L1 Chain ID** (string): The hexadecimal representation of the L1 chain ID.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_L1ChainId"
}'
```



------

# zks_sendRawTransactionWithDetailedOutput

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://lens-mainnet.g.alchemy.com/v2/{apiKey}

Executes a transaction and returns its hash, storage logs, and events that would have been generated if the transaction had already been included in the block.

Reference: https://www.alchemy.com/docs/chains/lens/lens-api-endpoints/zks-send-raw-transaction-with-detailed-output

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| data | string | Yes | The signed transaction. Typically, signed with a library such as ethers.js. |

## Result

**Transaction details** (object): Details about the transaction execution

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "transactionHash": "0xd586a9381ac33a70d1c34704664209242ee90316878fc1695aa8e4cf553c8595",
    "storageLogs": [
      {
        "address": "0x000000000000000000000000000000000000800b",
        "key": "0x7",
        "writtenValue": "0x40000000000000000000000006641f961"
      },
      {
        "address": "0x000000000000000000000000000000000000800b",
        "key": "0x6",
        "writtenValue": "0x5f5e100"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://lens-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "zks_sendRawTransactionWithDetailedOutput",
  "params": [
    "string"
  ]
}'
```



------

# Lens API FAQ

> Frequently asked questions about the Lens API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Lens Network?

Lens Network is a decentralized social networking infrastructure built on top of Ethereum. It aims to create open and fair social spaces designed for mass adoption, leveraging zkSync's ZK Stack technology to achieve scalability, security, and decentralization.

## What is the Lens Protocol?

Lens Protocol is the core set of smart contracts that power the Lens Network. It enables users to own their social graph and data, allowing for interoperable social applications and features like profiles, posts, comments, and follows.

## How does Lens Network differ from traditional social media?

Lens Network is onchain, meaning user data is distributed across a network of computers rather than controlled by a single entity. This gives users ownership of their social media identity and connections, allowing for greater freedom of expression and less censorship at the network level.

## What technology does Lens Network use?

Lens Network is built on zkSync's ZK Stack, utilizing zero-knowledge (ZK) rollup technology. It will implement a hybrid architecture combining Validium and Volition scaling solutions to achieve high scalability while maintaining security.

## What are the phases of Lens Network's rollout?

Lens Network will be rolled out in three phases:

1. Seed: Validium on Ethereum
2. Grow: Introduction of a Data Availability (DA) provider
3. Bloom: Full implementation of Volition technology

## What is Validium?

Validium is a scaling solution that computes and posts state transitions to Ethereum while storing the state itself in a separate data availability location. This approach helps keep transaction costs down while maintaining security.

## What is Volition?

Volition is a scaling setup that enables two different transaction policies on the same infrastructure. It allows for using Validium for social transactions and rollup for financial transactions, providing flexibility in balancing security and scalability.

## How will Lens Network improve user experience?

Lens Network aims to offer a smooth user experience comparable to Web2 applications, including:

* Gasless and signless transactions
* Embedded wallet support
* Easy bridging across networks
* Subsecond transaction completion times

## Will the new Lens Network be cross-chain compatible?

Yes, the new version of Lens Protocol will function as a cross-chain protocol. While the main hub will be on Lens Network with zkSync, instances can be deployed on other EVM (and non-EVM) networks, allowing developers to build social applications on various supported networks.

## Impact on existing Lens users and apps

Users and applications can continue using the existing Lens Protocol and later migrate to Lens Network if they choose. The Lens team will support a smooth migration process for those who wish to transition.

## How does Lens Network address the blockchain "trilemma"?

Lens Network addresses the blockchain trilemma (balancing scalability, security, and decentralization) by using ZK rollup technology and a hybrid architecture. This approach allows for high scalability while maintaining sufficient security for social interactions and full security for financial transactions.

## How can developers get involved with Lens Network?

Developers are encouraged to build new experiences on the Lens Network architecture. They can participate in discussions and contribute feedback through the LIP (Lens Improvement Proposal) process.

## My question isn't here, where can I get help?

If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Linea Chain API Quickstart

> How to get started building on Linea using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Linea is an EVM-compatible blockchain designed to provide scalability and efficiency for decentralized applications (dApps). Known for its high throughput and low transaction costs, Linea offers a robust environment for deploying Ethereum-based applications.

The Linea API lets you interact with the Linea network through a collection of JSON-RPC methods. If you're familiar with Ethereum's JSON-RPC APIs, working with Linea will feel natural.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Linea client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { linea } from "viem/chains";

const client = createPublicClient({
  chain: linea,
  transport: http("https://linea-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (ETH):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Linea APIs

For the full list of Linea APIs, see the [Linea API Endpoints](/docs/chains#linea-apis).

------

# Linea API Overview

> Overview of available Linea API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Linea APIs

📙 Get started with our [Linea API Quickstart Guide](/docs/reference/linea-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/linea/linea-api-endpoints/eth-accounts)                           | [`eth_blobBaseFee`](/docs/chains/linea/linea-api-endpoints/eth-blob-base-fee)               |
| [`eth_blockNumber`](/docs/chains/linea/linea-api-endpoints/eth-block-number)                    | [`eth_call`](/docs/chains/linea/linea-api-endpoints/eth-call)                               |
| [`eth_chainId`](/docs/chains/linea/linea-api-endpoints/eth-chain-id)                            | [`eth_createAccessList`](/docs/chains/linea/linea-api-endpoints/eth-create-access-list)     |
| [`eth_estimateGas`](/docs/chains/linea/linea-api-endpoints/eth-estimate-gas)                    | [`eth_feeHistory`](/docs/chains/linea/linea-api-endpoints/eth-fee-history)                  |
| [`eth_fillTransaction`](/docs/chains/linea/linea-api-endpoints/eth-fill-transaction)            | [`eth_gasPrice`](/docs/chains/linea/linea-api-endpoints/eth-gas-price)                      |
| [`eth_getAccount`](/docs/chains/linea/linea-api-endpoints/eth-get-account)                      | [`eth_getBalance`](/docs/chains/linea/linea-api-endpoints/eth-get-balance)                  |
| [`eth_getBlockByHash`](/docs/chains/linea/linea-api-endpoints/eth-get-block-by-hash)            | [`eth_getBlockByNumber`](/docs/chains/linea/linea-api-endpoints/eth-get-block-by-number)    |
| [`eth_getBlockReceipts`](/docs/chains/linea/linea-api-endpoints/eth-get-block-receipts)         | [`eth_getBlockTransactionCountByHash`](/docs/chains/linea/linea-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/linea/linea-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/linea/linea-api-endpoints/eth-get-code)                        |
| [`eth_getFilterChanges`](/docs/chains/linea/linea-api-endpoints/eth-get-filter-changes)         | [`eth_getFilterLogs`](/docs/chains/linea/linea-api-endpoints/eth-get-filter-logs)           |
| [`eth_getLogs`](/docs/chains/linea/linea-api-endpoints/eth-get-logs)                            | [`eth_getProof`](/docs/chains/linea/linea-api-endpoints/eth-get-proof)                      |
| [`eth_getRawTransactionByHash`](/docs/chains/linea/linea-api-endpoints/eth-get-raw-transaction-by-hash) | [`eth_getStorageAt`](/docs/chains/linea/linea-api-endpoints/eth-get-storage-at)             |
| [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/linea/linea-api-endpoints/eth-get-transaction-by-block-hash-and-index) | [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/linea/linea-api-endpoints/eth-get-transaction-by-block-number-and-index) |
| [`eth_getTransactionByHash`](/docs/chains/linea/linea-api-endpoints/eth-get-transaction-by-hash) | [`eth_getTransactionCount`](/docs/chains/linea/linea-api-endpoints/eth-get-transaction-count) |
| [`eth_getTransactionReceipt`](/docs/chains/linea/linea-api-endpoints/eth-get-transaction-receipt) | [`eth_getUncleByBlockHashAndIndex`](/docs/chains/linea/linea-api-endpoints/eth-get-uncle-by-block-hash-and-index) |
| [`eth_getUncleByBlockNumberAndIndex`](/docs/chains/linea/linea-api-endpoints/eth-get-uncle-by-block-number-and-index) | [`eth_getUncleCountByBlockHash`](/docs/chains/linea/linea-api-endpoints/eth-get-uncle-count-by-block-hash) |
| [`eth_getUncleCountByBlockNumber`](/docs/chains/linea/linea-api-endpoints/eth-get-uncle-count-by-block-number) | [`eth_maxPriorityFeePerGas`](/docs/chains/linea/linea-api-endpoints/eth-max-priority-fee-per-gas) |
| [`eth_newBlockFilter`](/docs/chains/linea/linea-api-endpoints/eth-new-block-filter)             | [`eth_newFilter`](/docs/chains/linea/linea-api-endpoints/eth-new-filter)                    |
| [`eth_newPendingTransactionFilter`](/docs/chains/linea/linea-api-endpoints/eth-new-pending-transaction-filter) | [`eth_protocolVersion`](/docs/chains/linea/linea-api-endpoints/eth-protocol-version)        |
| [`eth_sendRawTransaction`](/docs/chains/linea/linea-api-endpoints/eth-send-raw-transaction)     | [`eth_simulateV1`](/docs/chains/linea/linea-api-endpoints/eth-simulate-v-1)                 |
| [`eth_submitWork`](/docs/chains/linea/linea-api-endpoints/eth-submit-work)                      | [`eth_subscribe`](/docs/chains/linea/linea-api-endpoints/eth-subscribe)                     |
| [`eth_syncing`](/docs/chains/linea/linea-api-endpoints/eth-syncing)                             | [`eth_uninstallFilter`](/docs/chains/linea/linea-api-endpoints/eth-uninstall-filter)        |
| [`eth_unsubscribe`](/docs/chains/linea/linea-api-endpoints/eth-unsubscribe)                     | [`linea_estimateGas`](/docs/chains/linea/linea-api-endpoints/linea-estimate-gas)            |
| [`linea_getProof`](/docs/chains/linea/linea-api-endpoints/linea-get-proof)                      | [`linea_getTransactionExclusionStatusV1`](/docs/chains/linea/linea-api-endpoints/linea-get-transaction-exclusion-status-v-1) |
| [`net_listening`](/docs/chains/linea/linea-api-endpoints/net-listening)                         | [`net_peerCount`](/docs/chains/linea/linea-api-endpoints/net-peer-count)                    |
| [`net_version`](/docs/chains/linea/linea-api-endpoints/net-version)                             | [`txpool_content`](/docs/chains/linea/linea-api-endpoints/txpool-content)                   |
| [`web3_clientVersion`](/docs/chains/linea/linea-api-endpoints/web-3-client-version)             | [`web3_sha3`](/docs/chains/linea/linea-api-endpoints/web-3-sha-3)                           |

## Related APIs

The following Alchemy APIs are also supported on Linea:

* [Token API](/docs/reference/token-api-overview)
* [Transfers API](/docs/reference/transfers-api-quickstart)
* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)
* [NFT API](/docs/reference/nft-api-overview)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blobBaseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-sepolia.g.alchemy.com/v2/{apiKey}

Returns the base fee per blob gas in wei for the current block.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-blob-base-fee

## Result

**Blob Base Fee** (string): The base fee per blob gas, in wei, as a hexadecimal encoded unsigned integer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-sepolia.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blobBaseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

<Info> [linea_estimateGas](/docs/node/linea/linea-api-endpoints/linea-estimate-gas) uses the same inputs as the standard eth_estimateGas, but returns the recommended gas limit, the base fee per gas, and the priority fee per gas. We recommend using `linea_estimateGas` for more accurate results. </Info>


Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_newPendingTransactionFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new pending transactions arrive.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-new-pending-transaction-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newPendingTransactionFilter"
}'
```



------

# eth_protocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current protocol version used by the client.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-protocol-version

## Result

**Protocol Version** (string): The protocol version as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3f",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_protocolVersion"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_simulateV1

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Enables simulation of complex transactions and state changes without modifying the blockchain.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-simulate-v-1

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Simulation object | object | Yes | The object containing all simulation details such as calls, overrides, etc. |

## Result

**Simulation result** (object[]): The result of the simulation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "baseFeePerGas": "0x9",
      "blobGasUsed": "0x0",
      "calls": [
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000001"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
              "transactionIndex": "0x0",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x0",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        },
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000002"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd",
              "transactionIndex": "0x1",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x1",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        }
      ],
      "difficulty": "0x0",
      "excessBlobGas": "0x3b80000",
      "extraData": "0x",
      "gasLimit": "0x22550dd",
      "gasUsed": "0xa410",
      "hash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "miner": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
      "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "nonce": "0x0000000000000000",
      "number": "0x1530a5e",
      "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "parentHash": "0x513a0aa73024f294cdbcb0312af0c920850035f0552d7349ebb30717de30b1cc",
      "receiptsRoot": "0x75308898d571eafb5cd8cde8278bf5b3d13c5f6ec074926de3bb895b519264e1",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "size": "0x29c",
      "stateRoot": "0x65ea44c8bd5f9edbf269b6446b460b3e7378abb25c78fd5d70f0e2ef59296b25",
      "timestamp": "0x67f43327",
      "transactions": [
        "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
        "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd"
      ],
      "transactionsRoot": "0xd6902f31ae9d2169b77cd88611c6afd691ea5a7e604e44c71f663fda0c5d1c28",
      "uncles": [],
      "withdrawals": [],
      "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    }
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# linea_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns the estimated amount of gas required to allow the transaction to complete and be published on Ethereum. This method does not submit the transaction to the blockchain. The priorityFeePerGas returned includes the cost of submitting the transaction to Ethereum, which can vary based on the size of the calldata.


Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/linea-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Call object | object | Yes | The transaction call object. |
| State override object | object | No | Optional object to override account state for simulation. |

## Result

**Gas estimation result** (object): Estimated gas limit, base fee, and priority fee.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "linea_estimateGas",
  "params": [
    {
      "from": "0x42c27251C710864Cf76f1b9918Ace3E585e6E21b",
      "value": "0x1",
      "gasPrice": "0x100000000",
      "gas": "0x21000"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "gasLimit": "0xcf08",
    "baseFeePerGas": "0x7",
    "priorityFeePerGas": "0x43a82a4"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "linea_estimateGas",
  "params": [
    {
      "from": "0x42c27251C710864Cf76f1b9918Ace3E585e6E21b",
      "value": "0x1",
      "gasPrice": "0x100000000",
      "gas": "0x21000"
    },
    {
      "property1": {
        "balance": "string",
        "nonce": "string",
        "code": "string",
        "stateDiff": {
          "property1": "string"
        }
      }
    }
  ]
}'
```



------

# linea_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the account and optionally storage values of the specified account, including the Merkle proof. This method is similar to eth_getProof and follows the same format.


Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/linea-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The address of the account. |
| storageKeys | string[] | Yes | An array of storage keys to generate proofs for. |
| blockNumber | string or enum | Yes | The block number or tag at which to get the proof. |

## Result

**Account proof** (object): The account and storage proof data.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "linea_getProof",
  "params": [
    "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
    [
      "0x0000000000000000000000000000000000000000000000000000000000000000"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "address": "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
    "accountProof": [
      "0xf90211a...0029"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "value": "0x0",
        "proof": [
          "0xf90211a...0029"
        ]
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "linea_getProof",
  "params": [
    "0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
    [
      "0x0000000000000000000000000000000000000000000000000000000000000000"
    ],
    "string"
  ]
}'
```



------

# linea_getTransactionExclusionStatusV1

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the status of a transaction's exclusion from blocks. This helps identify if a transaction was excluded due to rate limiting, sequencer rules, or other reasons specific to Linea.


Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/linea-get-transaction-exclusion-status-v-1

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| transactionHash | string | Yes | The hash of the transaction to check. |

## Result

**Exclusion status** (object): The exclusion status of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "linea_getTransactionExclusionStatusV1",
  "params": [
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "txHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "from": "0x1234567890123456789012345678901234567890",
    "status": "EXCLUDED",
    "reasonMessage": "Transaction exceeds Linea gas limit",
    "blockNumber": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "linea_getTransactionExclusionStatusV1",
  "params": [
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
  ]
}'
```



------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_peerCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of peers currently connected to the client.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/net-peer-count

## Result

**peerCount** (string): The number of connected peers as a hex string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_peerCount"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# txpool_content

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of the exact details of all transactions currently pending for inclusion in the next blocks, as well as ones that are being scheduled for future execution.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/txpool-content

## Result

**content** (object): Object with pending and queued transactions grouped by sender address and nonce.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "txpool_content"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://linea-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/linea/linea-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://linea-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Linea Chain API FAQ

> Frequently asked questions about the Linea Chain API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Linea Chain?

Linea Chain is a high-performance blockchain designed to provide a scalable and efficient platform for decentralized applications (dApps). It aims to deliver rapid transaction speeds and low costs, making it an ideal choice for developers looking to build scalable and efficient blockchain solutions.

## What is the Linea Chain API?

The Linea Chain API facilitates interaction with the Linea Chain network through a collection of JSON-RPC methods. It provides developers with tools to interact with the blockchain, enabling functionalities such as transactions, smart contract deployment, and data retrieval.

## How can I get started using the Linea Chain API?

Explained in [Linea Chain API Quickstart](/docs/reference/linea-chain-api-quickstart).

## Is Linea Chain EVM compatible?

Yes, Linea Chain is fully compatible with the Ethereum Virtual Machine (EVM). This compatibility allows Ethereum developers to port their projects to Linea Chain with minimal changes, benefiting from the chain's high throughput and low transaction fees.

## What API does Linea Chain use?

Linea Chain uses the JSON-RPC API standard for blockchain interactions. This is the same standard used by Ethereum.

## What is a Linea Chain API key?

When you access the Linea Chain network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network.

For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!

## Which libraries support Linea Chain?

Because Linea Chain is EVM-compatible, popular Ethereum libraries like ethers.js and web3.js work with Linea Chain. If you're familiar with Ethereum's development ecosystem, you can integrate with minimal changes.

## What programming languages work with Linea Chain?

Like Ethereum, Linea Chain supports a range of programming languages for blockchain interaction and smart contract development, including Solidity for smart contracts, as well as JavaScript and TypeScript for dApp development and offchain interactions.

## What does Linea Chain use for gas?

Linea Chain uses LINEA, its native cryptocurrency, for transaction fees, gas, and other network activities.

## What methods does Alchemy support for the Linea Chain API?

You can find the list of all the methods Alchemy supports for the Linea Chain API on the [Linea API Endpoints](/docs/chains#linea-apis) page.

## My question isn't here, where can I get help?

If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Litecoin API Quickstart

> Get started building on Litecoin and using the JSON-RPC API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

# Introduction

The Litecoin API gives you access to the Litecoin blockchain through a standard set of JSON-RPC methods. With this API, you can retrieve block and transaction data, inspect the mempool, broadcast transactions, and more.

Litecoin uses a UTXO-based model and exposes its functionality via the JSON-RPC protocol. This quickstart will help you make your first request.

***

## What is the Litecoin Chain API?

The Litecoin Chain API allows applications to communicate with a Litecoin node using the JSON-RPC protocol. Like Bitcoin, Litecoin relies on a UTXO (Unspent Transaction Output) model, which means balances are tracked by outputs that are explicitly spent or unspent.

Alchemy's Litecoin API gives developers a consistent interface to query blockchain data, submit transactions, and monitor network activity. This includes:

* Retrieving raw or decoded transaction data
* Querying block headers and full blocks
* Monitoring mempool entries and states
* Submitting and testing raw transactions

If you've worked with Bitcoin or other JSON-RPC-compatible chains, the structure will feel familiar.

***

## Getting started

### 1. Choose a package manager (npm or yarn)

Select a package manager to manage your project's dependencies. The choice between `npm` and `yarn` depends on your preference or project requirements.

| npm                                                                                                                       | yarn                                                                                                |
| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| Begin with `npm` by following the [npm documentation](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). | For `yarn`, refer to [yarn's installation guide](https://classic.yarnpkg.com/lang/en/docs/install). |

### 2. Set up your project

Open your terminal and run the following commands:

<CodeGroup>
  ```text npm
  mkdir litecoin-api-quickstart
  cd litecoin-api-quickstart
  npm init --yes
  ```

  ```text yarn
  mkdir litecoin-api-quickstart
  cd litecoin-api-quickstart
  yarn init --yes
  ```
</CodeGroup>

This creates a new directory named `litecoin-api-quickstart` and initializes a Node.js project within it.

### 3. Make your first request

Install Axios, a popular HTTP client, to make API requests:

<CodeGroup>
  ```bash bash
  npm install axios
  # Or with yarn
  # yarn add axios
  ```
</CodeGroup>

Create an `index.js` file in your project directory and paste the following code:

<CodeGroup>
  ```javascript javascript
  const axios = require('axios');

  const url = `https://litecoin-mainnet.g.alchemy.com/v2/${apiKey}`;

  const payload = {
    jsonrpc: '2.0',
    id: 1,
    method: 'getblockcount',
    params: []
  };

  axios.post(url, payload)
    .then(response => {
      console.log('Current block height:', response.data.result);
    })
    .catch(error => {
      console.error('Error fetching block count:', error);
    });
  ```
</CodeGroup>

Replace `apiKey` with your actual Alchemy API key that you can get from the [Alchemy Dashboard](https://dashboard.alchemy.com/signup).

### 4. Run your script

To execute your script and make a request to the Litecoin API, run:

<CodeGroup>
  ```bash bash
  node index.js
  ```
</CodeGroup>

You should see the current block height on Litecoin printed to your console:

```shell
Current block height: 2954312
```

## Next steps

You've made your first request to the Litecoin API. With this foundation, you can dive deeper into the [JSON-RPC methods available on Litecoin](/docs/litecoin/litecoin-api-overview) and start building on it.

------

# Litecoin API Overview

> Overview of available Litecoin API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Litecoin APIs

📙 Get started with our [Litecoin API Quickstart Guide](/docs/reference/litecoin-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`createrawtransaction`](/docs/chains/litecoin/litecoin-api-endpoints/createrawtransaction)     | [`decoderawtransaction`](/docs/chains/litecoin/litecoin-api-endpoints/decoderawtransaction) |
| [`decodescript`](/docs/chains/litecoin/litecoin-api-endpoints/decodescript)                     | [`estimatesmartfee`](/docs/chains/litecoin/litecoin-api-endpoints/estimatesmartfee)         |
| [`getbestblockhash`](/docs/chains/litecoin/litecoin-api-endpoints/getbestblockhash)             | [`getblock`](/docs/chains/litecoin/litecoin-api-endpoints/getblock)                         |
| [`getblockchaininfo`](/docs/chains/litecoin/litecoin-api-endpoints/getblockchaininfo)           | [`getblockcount`](/docs/chains/litecoin/litecoin-api-endpoints/getblockcount)               |
| [`getblockfilter`](/docs/chains/litecoin/litecoin-api-endpoints/getblockfilter)                 | [`getblockhash`](/docs/chains/litecoin/litecoin-api-endpoints/getblockhash)                 |
| [`getblockheader`](/docs/chains/litecoin/litecoin-api-endpoints/getblockheader)                 | [`getblockstats`](/docs/chains/litecoin/litecoin-api-endpoints/getblockstats)               |
| [`getblocktemplate`](/docs/chains/litecoin/litecoin-api-endpoints/getblocktemplate)             | [`getchaintips`](/docs/chains/litecoin/litecoin-api-endpoints/getchaintips)                 |
| [`getchaintxstats`](/docs/chains/litecoin/litecoin-api-endpoints/getchaintxstats)               | [`getconnectioncount`](/docs/chains/litecoin/litecoin-api-endpoints/getconnectioncount)     |
| [`getdifficulty`](/docs/chains/litecoin/litecoin-api-endpoints/getdifficulty)                   | [`getindexinfo`](/docs/chains/litecoin/litecoin-api-endpoints/getindexinfo)                 |
| [`getmemoryinfo`](/docs/chains/litecoin/litecoin-api-endpoints/getmemoryinfo)                   | [`getmempoolancestors`](/docs/chains/litecoin/litecoin-api-endpoints/getmempoolancestors)   |
| [`getmempooldescendants`](/docs/chains/litecoin/litecoin-api-endpoints/getmempooldescendants)   | [`getmempoolinfo`](/docs/chains/litecoin/litecoin-api-endpoints/getmempoolinfo)             |
| [`getnetworkhashps`](/docs/chains/litecoin/litecoin-api-endpoints/getnetworkhashps)             | [`getnetworkinfo`](/docs/chains/litecoin/litecoin-api-endpoints/getnetworkinfo)             |
| [`getrawmempool`](/docs/chains/litecoin/litecoin-api-endpoints/getrawmempool)                   | [`getrawtransaction`](/docs/chains/litecoin/litecoin-api-endpoints/getrawtransaction)       |
| [`gettxout`](/docs/chains/litecoin/litecoin-api-endpoints/gettxout)                             | [`gettxoutproof`](/docs/chains/litecoin/litecoin-api-endpoints/gettxoutproof)               |
| [`gettxoutsetinfo`](/docs/chains/litecoin/litecoin-api-endpoints/gettxoutsetinfo)               | [`sendrawtransaction`](/docs/chains/litecoin/litecoin-api-endpoints/sendrawtransaction)     |
| [`submitblock`](/docs/chains/litecoin/litecoin-api-endpoints/submitblock)                       | [`submitheader`](/docs/chains/litecoin/litecoin-api-endpoints/submitheader)                 |
| [`submitpackage`](/docs/chains/litecoin/litecoin-api-endpoints/submitpackage)                   | [`testmempoolaccept`](/docs/chains/litecoin/litecoin-api-endpoints/testmempoolaccept)       |
| [`validateaddress`](/docs/chains/litecoin/litecoin-api-endpoints/validateaddress)               | [`verifymessage`](/docs/chains/litecoin/litecoin-api-endpoints/verifymessage)               |

------

# createrawtransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Creates a transaction spending the given inputs and creating new outputs. Outputs can be addresses or data. Returns hex-encoded raw transaction. Note that the transaction's inputs are not signed, and it is not stored in the wallet or transmitted to the network.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/createrawtransaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| inputs | object[] | Yes | An array of transaction inputs. |
| outputs | object[] or object | Yes | An array or object with outputs (key-value pairs, where keys are addresses or 'data', and values are BTC amounts or hex). |
| locktime | integer | No | Raw locktime. Non-0 value also activates inputs. |
| replaceable | boolean | No | Whether to mark transaction as BIP125 replaceable. Allows this transaction to be replaced by a transaction with higher fees. |

## Result

**result** (string): Hex-encoded raw transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "createrawtransaction",
  "params": [
    [
      {
        "txid": "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
        "vout": 0
      }
    ],
    [
      {
        "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa": 0.01
      }
    ],
    0,
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0200000001546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b0000000000fdffffff01c0c62d000000000017a914751e76e8199196d454941c45d1b3a323f1433bd68700000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "createrawtransaction",
  "params": [
    [
      {
        "txid": "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
        "vout": 0
      }
    ],
    [
      {
        "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa": 0.01
      }
    ],
    0,
    false
  ]
}'
```



------

# decoderawtransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Decodes a serialized, hex-encoded Bitcoin transaction. Returns detailed information about inputs, outputs, size, witness data, etc.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/decoderawtransaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hexstring | string | Yes | The transaction hex string to decode. |
| iswitness | boolean | No | Indicates whether the transaction includes witness data. If omitted, heuristic decoding is applied.  |

## Result

**result** (object): A JSON object representing the decoded transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "decoderawtransaction",
  "params": [
    "0200000000010142d6bd07c424e975fe821c978e720f9a55f9981d62c290cea5ccd06b455d79b90000000000fdffffff028096980000000000160014d3620fe180a0beb8fcc9682fe92e5a25f0feccd370cd2f0100000000160014076d998f6b12c3d1da6217d967154f42a5e0afd30247304402204549b10ea1698d4b4605be1d3bfff810f6135395386207664a66f5bb8bd1470902205fb86c95bfbe7b502195ffa65276d292fb074fe18ba171ef0a35395211384091012103cb5de30b343b35cc09b50f064eb289dd3e252f6985fc4309fba795cc950316afcfa50d00",
    true
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "txid": "a4cf344758af60ab8d4812477a7d3eee8854595db70ab39cf68f9dc509b13929",
    "hash": "48d1de9e93391ac3d83e5e97ce94ebd1db0f88553e45a6dffad3501c82408995",
    "size": 222,
    "vsize": 141,
    "weight": 564,
    "version": 2,
    "locktime": 862954048,
    "vin": [
      {
        "txid": "b9795d456bd0cca5ce90c2621d98f9559a0f728e971c82fe75e924c407bdd642",
        "vout": 0,
        "scriptSig": {
          "asm": "",
          "hex": ""
        },
        "sequence": 4294967293,
        "txinwitness": [
          "304402204549b10ea1698d4b4605be1d3bfff810f6135395386207664a66f5bb8bd1470902205fb86c95bfbe7b502195ffa65276d292fb074fe18ba171ef0a35395211384091",
          "03cb5de30b343b35cc09b50f064eb289dd3e252f6985fc4309fba795cc950316af"
        ]
      }
    ],
    "vout": [
      {
        "value": 0.1,
        "n": 0,
        "scriptPubKey": {
          "asm": "OP_DUP OP_HASH160 d3620fe180a0beb8fcc9682fe92e5a25f0feccd3 OP_EQUALVERIFY OP_CHECKSIG",
          "desc": "addr(1BM1sAcrfV6d4zPKytzziu4McLQDsFC2Qc)",
          "hex": "76a914d3620fe180a0beb8fcc9682fe92e5a25f0feccd388ac",
          "type": "pubkeyhash"
        }
      },
      {
        "value": 0.65281824,
        "n": 1,
        "scriptPubKey": {
          "asm": "OP_DUP OP_HASH160 076d998f6b12c3d1da6217d967154f42a5e0afd3 OP_EQUALVERIFY OP_CHECKSIG",
          "desc": "addr(1iPoHeR3z1EidftGXMcEppzA1UupGPs2u)",
          "hex": "76a914076d998f6b12c3d1da6217d967154f42a5e0afd388ac",
          "type": "pubkeyhash"
        }
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "decoderawtransaction",
  "params": [
    "0200000000010142d6bd07c424e975fe821c978e720f9a55f9981d62c290cea5ccd06b455d79b90000000000fdffffff028096980000000000160014d3620fe180a0beb8fcc9682fe92e5a25f0feccd370cd2f0100000000160014076d998f6b12c3d1da6217d967154f42a5e0afd30247304402204549b10ea1698d4b4605be1d3bfff810f6135395386207664a66f5bb8bd1470902205fb86c95bfbe7b502195ffa65276d292fb074fe18ba171ef0a35395211384091012103cb5de30b343b35cc09b50f064eb289dd3e252f6985fc4309fba795cc950316afcfa50d00",
    true
  ]
}'
```



------

# decodescript

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Decodes a hex-encoded script and provides detailed information about it.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/decodescript

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hexstring | string | Yes | The hex-encoded script. |

## Result

**result** (object): Decoded script information.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "decodescript",
  "params": [
    "0014751e76e8199196d454941c45d1b3a323f1433bd6"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "asm": "0 751e76e8199196d454941c45d1b3a323f1433bd6",
    "desc": "addr(bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4)#uyjndxcw",
    "address": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4",
    "type": "witness_v0_keyhash",
    "p2sh": "3JvL6Ymt8MVWiCNHC7oWU6nLeHNJKLZGLN"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "decodescript",
  "params": [
    "0014751e76e8199196d454941c45d1b3a323f1433bd6"
  ]
}'
```



------

# estimatesmartfee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Estimates the approximate fee per kilobyte required for a transaction to begin confirmation within `conf_target` blocks. Uses BIP 141 virtual transaction size.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/estimatesmartfee

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| conf_target | integer | Yes | Number of blocks within which confirmation is targeted. |
| estimate_mode | enum | No | Fee estimate mode. Options are "UNSET", "ECONOMICAL", or "CONSERVATIVE".  |

## Result

**result** (object): Estimated fee rate and corresponding target blocks.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "estimatesmartfee",
  "params": [
    1,
    "UNSET"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "feerate": 0.00002465,
    "blocks": 2
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "estimatesmartfee",
  "params": [
    1,
    "UNSET"
  ]
}'
```



------

# getbestblockhash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the hash of the most-work fully-validated tip block in the active Bitcoin blockchain.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/getbestblockhash

## Result

**result** (string): The hash of the best block in the longest chain.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "00000000000000000001fe9b58c5ccd401de62139c29e7dbfd32bd3cf14b650c",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getbestblockhash"
}'
```



------

# getblock

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block, based on the provided block hash.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/getblock

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockhash | string | Yes | The hash of the block to retrieve. |
| verbosity | enum | No | Level of detail to return.  - 0: hex-encoded string, - 1: basic block info, - 2: with transactions, - 3: with transactions + input prevouts.  |

## Result

**result** (object): The block object or hex string, depending on verbosity.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblock",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    2
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "hash": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "confirmations": 151,
    "height": 894470,
    "version": 537067520,
    "versionHex": "20030000",
    "merkleroot": "9d93ae25de98e5ed33aec9ccfea612c3b5b181a60171ba564ec1634786b04bc6",
    "time": 1745931642,
    "mediantime": 1745928076,
    "nonce": 766301978,
    "bits": "170248b6",
    "target": "0000000000000000000248b60000000000000000000000000000000000000000",
    "difficulty": 123234387977050.9,
    "chainwork": "0000000000000000000000000000000000000000bf64054821a76841a63cb26e",
    "nTx": 2186,
    "previousblockhash": "00000000000000000001aa9a63c6c0774a767f7a4d37d2bce3658728de76a146",
    "nextblockhash": "00000000000000000000cb8a1d7945b960985579525957bcc37b22174f1ecb31",
    "strippedsize": 844254,
    "size": 1460798,
    "weight": 3993560,
    "tx": [
      "c86b4846175942038cc9da086e506aa8a441beada92f1678fb1fe35d640366db"
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblock",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    2
  ]
}'
```



------

# getblockchaininfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object containing state details related to blockchain processing, network, and storage information.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/getblockchaininfo

## Result

**result** (object): Blockchain status information.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "chain": "main",
    "blocks": 894713,
    "headers": 894713,
    "bestblockhash": "00000000000000000000eb0ae1714d3ec43cfaac74769f3bcde489daf116e4ca",
    "bits": "170248b6",
    "target": "0000000000000000000248b60000000000000000000000000000000000000000",
    "difficulty": 123234387977050.9,
    "time": 1746083867,
    "mediantime": 1746081100,
    "verificationprogress": 0.9999993374725104,
    "initialblockdownload": false,
    "chainwork": "0000000000000000000000000000000000000000bfce6962cc3162143b67a1d4",
    "size_on_disk": 745999541195,
    "pruned": false,
    "warnings": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockchaininfo"
}'
```



------

# getblockcount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of blocks in the longest fully validated blockchain.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/getblockcount

## Result

**result** (integer): The number of blocks in the current best blockchain.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": 894623,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockcount"
}'
```



------

# getblockfilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the BIP 157 content filter for a specified block. Requires the blockfilterindex to be enabled.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/getblockfilter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockhash | string | Yes | The hash of the block. |
| filtertype | enum | No | The type name of the filter. Currently only 'basic' is supported. |

## Result

**result** (object): The block filter details.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblockfilter",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "basic"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "filter": "0180c3b80144ec1762e9eb8e5b2e072f7d8c8c8c0c2c2a2a2a2a2a2a2a2a2a",
    "header": "1e1e1f1f2020202021212121222222222323232324242424252525252626262"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockfilter",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "basic"
  ]
}'
```



------

# getblockhash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the hash of the block at a given height (index) in the active Bitcoin blockchain.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/getblockhash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| height | integer | Yes | The height of the block to retrieve the hash for. |

## Result

**result** (string): The hash of the block at the specified height.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblockhash",
  "params": [
    894470
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockhash",
  "params": [
    894470
  ]
}'
```



------

# getblockheader

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the block header for the specified block hash.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/getblockheader

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockhash | string | Yes | The block hash to retrieve the header for. |
| verbose | boolean | No | Whether to return a JSON object (true) or raw hex-encoded string (false). Default is true.  |

## Result

**result** (object or string): The block header as an object or hex string depending on verbose.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblockheader",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    true
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "hash": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "confirmations": 154,
    "height": 894470,
    "version": 537067520,
    "versionHex": "20030000",
    "merkleroot": "9d93ae25de98e5ed33aec9ccfea612c3b5b181a60171ba564ec1634786b04bc6",
    "time": 1745931642,
    "mediantime": 1745928076,
    "nonce": 766301978,
    "bits": "170248b6",
    "difficulty": 123234387977050.9,
    "chainwork": "0000000000000000000000000000000000000000bf64054821a76841a63cb26e",
    "nTx": 2186,
    "previousblockhash": "00000000000000000001aa9a63c6c0774a767f7a4d37d2bce3658728de76a146",
    "nextblockhash": "00000000000000000000cb8a1d7945b960985579525957bcc37b22174f1ecb31"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockheader",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    true
  ]
}'
```



------

# getblockstats

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Calculates various statistics for a given block by hash or height.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/getblockstats

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hash_or_height | string or integer | Yes | The block hash (string) or height (integer) of the target block. |
| stats | string[] | No | Optional list of specific stats to retrieve. If empty or omitted, returns all stats.  |

## Result

**result** (object): A set of statistical metrics for the specified block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblockstats",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    []
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "avgfee": 1565,
    "avgfeerate": 3,
    "avgtxsize": 668,
    "blockhash": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "feerate_percentiles": [
      2,
      2,
      3,
      3,
      4
    ],
    "height": 894470,
    "ins": 7718,
    "outs": 5666,
    "maxfee": 376692,
    "maxfeerate": 79,
    "maxtxsize": 200604,
    "medianfee": 453,
    "mediantime": 1745928076,
    "mediantxsize": 228,
    "minfee": 141,
    "minfeerate": 1,
    "mintxsize": 150,
    "subsidy": 312500000,
    "swtotal_size": 1049707,
    "swtotal_weight": 2349304,
    "swtxs": 2075,
    "time": 1745931642,
    "total_out": 271147032190,
    "total_size": 1460379,
    "total_weight": 3991992,
    "totalfee": 3420664,
    "txs": 2186,
    "utxo_increase": -2052,
    "utxo_size_inc": -137484,
    "utxo_increase_actual": -2841,
    "utxo_size_inc_actual": -199799
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockstats",
  "params": [
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    []
  ]
}'
```



------

# getblocktemplate

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns data needed to construct a block to mine. This method is used by miners to request a block template  for mining new blocks. It can be customized with various parameters to specify the desired mining capabilities and rules.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/getblocktemplate

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| template_request | object | No | A JSON object containing the template request parameters. |

## Result

**result** (object): A block template object containing all necessary data for mining.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getblocktemplate",
  "params": [
    {
      "mode": "template",
      "capabilities": [
        "coinbasetxn",
        "workid",
        "coinbase/append"
      ],
      "rules": [
        "segwit"
      ]
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "version": 536870912,
    "previousblockhash": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "transactions": [],
    "coinbaseaux": {
      "flags": ""
    },
    "coinbasevalue": 625000000,
    "target": "0000000000000000000248b60000000000000000000000000000000000000000",
    "mintime": 1745928076,
    "mutable": [
      "time",
      "transactions",
      "prevblock"
    ],
    "noncerange": "00000000ffffffff",
    "sigoplimit": 80000,
    "sizelimit": 4000000,
    "curtime": 1745931642,
    "bits": "170248b6",
    "height": 894471
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblocktemplate",
  "params": [
    {
      "mode": "template",
      "capabilities": [
        "coinbasetxn",
        "workid",
        "coinbase/append"
      ],
      "rules": [
        "segwit"
      ]
    }
  ]
}'
```



------

# getchaintips

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about all known tips in the block tree, including the active chain tip and orphaned branches.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/getchaintips

## Result

**result** (object[]): An array of chain tip information objects.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "height": 894712,
      "hash": "00000000000000000000e6518eac47199bcf0108b1c7d194b00ef5a9df794427",
      "branchlen": 0,
      "status": "active"
    },
    {
      "height": 894657,
      "hash": "00000000000000000002311b7c31f1ffef1261bb53740958ed98c600ae2abd41",
      "branchlen": 1,
      "status": "valid-fork"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getchaintips"
}'
```



------

# getchaintxstats

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Calculates statistics about the overall transaction rate and volume of the blockchain over a window of blocks.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/getchaintxstats

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nblocks | integer | No | The size of the window in number of blocks. Defaults to approximately one month. |
| blockhash | string | No | The block hash at which the window ends. Defaults to chain tip. |

## Result

**result** (object): The calculated chain transaction statistics.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getchaintxstats",
  "params": [
    0,
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "time": 1745931642,
    "txcount": 1184990717,
    "window_final_block_hash": "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80",
    "window_final_block_height": 894470,
    "window_block_count": 0
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getchaintxstats",
  "params": [
    1,
    "00000000000000000000669ed57030eb18020ee7029c064f10505156be203d80"
  ]
}'
```



------

# getconnectioncount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of connections to other nodes (both inbound and outbound).


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/getconnectioncount

## Result

**result** (integer): The total number of connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": 10,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getconnectioncount"
}'
```



------

# getdifficulty

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the proof-of-work difficulty as a multiple of the minimum difficulty.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/getdifficulty

## Result

**result** (number): The difficulty of the current best block as a floating-point number.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": 123234387977050.9,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getdifficulty"
}'
```



------

# getindexinfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the state of one or all available indices currently running.  You can optionally filter the results by a specific index name.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/getindexinfo

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| index_name | string | No | Filter results for an index with a specific name.  |

## Result

**result** (object): A mapping of index names to their respective info.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getindexinfo",
  "params": [
    "txindex"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "txindex": {
      "synced": true,
      "best_block_height": 894717
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getindexinfo",
  "params": [
    "txindex"
  ]
}'
```



------

# getmemoryinfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about memory usage, either general statistics ("stats") or heap information ("mallocinfo").


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/getmemoryinfo

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| mode | enum | No | Determines what kind of information is returned: - "stats" returns general statistics about memory usage. - "mallocinfo" returns an XML string describing low-level heap state.  |

## Result

**result** (object): Memory usage details.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getmemoryinfo",
  "params": [
    "stats"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "locked": {
      "used": 352,
      "free": 65184,
      "total": 65536,
      "locked": 65536,
      "chunks_used": 1,
      "chunks_free": 1
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getmemoryinfo",
  "params": [
    "stats"
  ]
}'
```



------

# getmempoolancestors

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the in-mempool ancestors of a given transaction.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/getmempoolancestors

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txid | string | Yes | The transaction ID whose ancestors to retrieve. |
| verbose | boolean | No | Whether to return detailed info (true) or just txids (false). |

## Result

**result** (string[] or object): The mempool ancestors of the specified transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getmempoolancestors",
  "params": [
    "b86ae732473ff2c91c04073ec9cbef5e4ddaa701741e141e41345df72122b795",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "6f8c6e8d3021d8a1db71eae3cb8db00f1c99d0f94f3b5782e6cfc155b55f3c55",
    "a4d47b8bdee5f5b8c098c9ac9aa4e3ec113d9f305a4f723d617a92439ab244cb"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getmempoolancestors",
  "params": [
    "b86ae732473ff2c91c04073ec9cbef5e4ddaa701741e141e41345df72122b795",
    false
  ]
}'
```



------

# getmempooldescendants

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the in-mempool descendants of a given transaction.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/getmempooldescendants

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txid | string | Yes | The transaction ID whose descendants to retrieve. |
| verbose | boolean | No | Whether to return detailed info (true) or just txids (false). |

## Result

**result** (string[] or object): The mempool descendants of the specified transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getmempooldescendants",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "c3b9f342fc90837fd4a22878b59fdf5cdeae1b4e4586224b0df1b3a2e3e6e9c8",
    "a2e34d98cb7e98b8d85d3a991c8d1cbd3e7a3f17b4acdf4768c88fa3e0e9d8bc"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getmempooldescendants",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    false
  ]
}'
```



------

# getmempoolinfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Provides information about the TX memory pool's current state, including memory usage, transaction count, and relay fee settings.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/getmempoolinfo

## Result

**result** (object): Mempool state information.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "loaded": true,
    "size": 4889,
    "bytes": 13816734,
    "usage": 49380080,
    "total_fee": 0.14547621,
    "maxmempool": 300000000,
    "mempoolminfee": 0.00001,
    "minrelaytxfee": 0.00001,
    "incrementalrelayfee": 0.00001,
    "unbroadcastcount": 0,
    "fullrbf": true
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getmempoolinfo"
}'
```



------

# getnetworkhashps

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the estimated network hashes per second based on the last n blocks. Pass in nblocks to override the default number of blocks, or -1 to get the value since the last difficulty change.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/getnetworkhashps

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nblocks | integer | No | The number of blocks to use for the calculation. Default is 120. Use -1 to calculate since last difficulty change. |
| height | integer | No | To estimate at the time of the given height. Default is -1 (current tip). |

## Result

**result** (number): Hashes per second estimated.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getnetworkhashps",
  "params": [
    120,
    -1
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": 412345678900000000000,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getnetworkhashps",
  "params": [
    120,
    -1
  ]
}'
```



------

# getnetworkinfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object containing various state info regarding P2P networking, including version information, network status, connections, and relay fees.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/getnetworkinfo

## Result

**result** (object): Object containing P2P networking state information.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "version": 270000,
    "subversion": "/Satoshi:27.0.0/",
    "protocolversion": 70016,
    "localservices": "0000000000000409",
    "localservicesnames": [
      "NETWORK",
      "WITNESS",
      "NETWORK_LIMITED"
    ],
    "localrelay": true,
    "timeoffset": 0,
    "connections": 10,
    "connections_in": 2,
    "connections_out": 8,
    "networkactive": true,
    "networks": [
      {
        "name": "ipv4",
        "limited": false,
        "reachable": true,
        "proxy": "",
        "proxy_randomize_credentials": false
      },
      {
        "name": "ipv6",
        "limited": false,
        "reachable": true,
        "proxy": "",
        "proxy_randomize_credentials": false
      },
      {
        "name": "onion",
        "limited": true,
        "reachable": false,
        "proxy": "",
        "proxy_randomize_credentials": false
      }
    ],
    "relayfee": 0.00001,
    "incrementalfee": 0.00001,
    "localaddresses": [],
    "warnings": ""
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getnetworkinfo"
}'
```



------

# getrawmempool

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns either a list of transaction IDs currently in the mempool or detailed metadata for each transaction, depending on the verbosity level.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/getrawmempool

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| verbose | boolean | No | If true, returns detailed info per transaction. If false, returns a list of txids.  |
| mempool_sequence | boolean | No | When verbose is false, includes mempool sequence number in the response.  |

## Result

**result** (object): Mempool data depending on verbosity level.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getrawmempool",
  "params": [
    false,
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "txids": [
      "5f10285c6fee80d1982df9893742d0c5aed5aa4fcca3aa4331d7fa071ba4d5ce",
      "30ad6eacfc8b83de7b91f8df705e081945c9d8a7a05506de38a1842dd856550b"
    ],
    "mempool_sequence": 1386211
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getrawmempool",
  "params": [
    false,
    false
  ]
}'
```



------

# getrawtransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction representation for a given transaction ID (`txid`).  If `verbose` is true, returns a JSON object with detailed information;  otherwise, returns a serialized hex-encoded string.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/getrawtransaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txid | string | Yes | The transaction ID to fetch. |
| verbose | boolean | No | Return verbose JSON or just the raw hex string. |
| blockhash | string | No | The block in which to look for the transaction (if not in the mempool). |

## Result

**result** (string or object): Raw transaction data.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "getrawtransaction",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    false,
    "000000000000000000013c7104486ef1aa53e8ac99b8a8ac02a113b58457ed8b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0100000001d074a22eedb6e7258c15368988826e6c73c6577fff490f42afeb8cd7be858032010000006b48304502210084689df7816df6f8a85c72a8cf4d52c2957657d619f5d126dbfc5f866d7561e80220415f8fbd095f53f0a8a4aa11496b126bc87dd020771d3d30c58f374a0f02bf420121024a42999af129d16c92bc0a0b18b39e2550769711845817d1f69932762d431ebcffffffff02ab6502000000000017a91453ca847feb3986cf2be405429e7e513484e0bc938780c6b001000000001976a914ebbfc363611943f588194465c1febdba9bf3883988ac00000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getrawtransaction",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    false,
    "000000000000000000013c7104486ef1aa53e8ac99b8a8ac02a113b58457ed8b"
  ]
}'
```



------

# gettxout

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns details about an unspent transaction output (UTXO), optionally including mempool data.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/gettxout

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txid | string | Yes | The transaction ID. |
| n | integer | Yes | The vout number. |
| include_mempool | boolean | No | Whether to include outputs spent in the mempool. Default is true.  |

## Result

**result** (object): Details about the specified unspent output, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "gettxout",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    0,
    true
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "bestblock": "00000000000000000000944aba5f33a268df0c95a8bacdf42e5d10f8c7d51f94",
    "confirmations": 7,
    "value": 0.00157099,
    "scriptPubKey": {
      "asm": "OP_HASH160 53ca847feb3986cf2be405429e7e513484e0bc93 OP_EQUAL",
      "desc": "addr(39L4cdhha5ueasiKz1wRVd75fHdB9NV2t7)#29pkvxg9",
      "hex": "a91453ca847feb3986cf2be405429e7e513484e0bc9387",
      "address": "39L4cdhha5ueasiKz1wRVd75fHdB9NV2t7",
      "type": "scripthash"
    },
    "coinbase": false
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "gettxout",
  "params": [
    "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b",
    1,
    true
  ]
}'
```



------

# gettxoutproof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns a hex-encoded proof that the specified transaction(s) were included in a block. This proof can be used to verify the inclusion of transactions without relying on a full node.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/gettxoutproof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| txids | string[] | Yes | An array of transaction IDs to generate proof for. |
| blockhash | string | No | The block in which to search for the txid(s). If omitted, the node will try to locate it. |

## Result

**result** (string): A hex-encoded proof that the specified transactions are part of a block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "gettxoutproof",
  "params": [
    [
      "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b"
    ],
    "000000000000000000013c7104486ef1aa53e8ac99b8a8ac02a113b58457ed8b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0080ce25cae416f1da89e4cd3b9f7674acfa3cc43e4d71e10aeb0000000000000000000029cc4a072d5cba23dd0e821d8d711f56124f19015b70abaf08ca4f2124a429fc3e23136...",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "gettxoutproof",
  "params": [
    [
      "546263a196ce5cf674d5002afc0231ab417c2e971fd4ed1735c7a4c63f44720b"
    ],
    "000000000000000000013c7104486ef1aa53e8ac99b8a8ac02a113b58457ed8b"
  ]
}'
```



------

# gettxoutsetinfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Returns statistics about the unspent transaction output (UTXO) set. Only the current chain tip is supported; querying specific blocks is not available.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/gettxoutsetinfo

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| use_index | boolean | No | Whether to use `coinstatsindex` if available. Defaults to true.  |

## Result

**result** (object): Statistics on the current state of the UTXO set.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "gettxoutsetinfo",
  "params": [
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "height": 894719,
    "bestblock": "000000000000000000022d8a0f2096e71b1fe50b486dcda415857bb0cc5a2ca8",
    "txouts": 174434793,
    "bogosize": 13652712508,
    "hash_serialized_3": "d9183d9a82433fbd0b9370da065fb84bbd1bb5004816f242ce0f2268c0394b2e",
    "total_amount": 19858278.9908868,
    "transactions": 121919431,
    "disk_size": 12197514429
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "gettxoutsetinfo",
  "params": [
    false
  ]
}'
```



------

# sendrawtransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Broadcasts a raw transaction (hex-encoded) to the network. Useful for rebroadcasting transactions not originating from your wallet.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/sendrawtransaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hexstring | string | Yes | The hex-encoded raw transaction. |
| maxfeerate | number or string | No | Reject transactions whose fee rate is higher than this value (in BTC/kB). Set to 0 to disable the check.  |

## Result

**result** (string): The transaction ID (txid) of the submitted transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "sendrawtransaction",
  "params": [
    "0200000000010153fc6712e0c6cbfd15e56743f2a16bba3c0b17837d4fd33d68d2d930739e2b130000000000ffffffff01c0c62d0000000000160014c24b61118d4a2b36257b65e1ea7f15f85e41ff0402483045022100ac32e935715a57ec1d642a5e178c37f74c013bf8e4edc4cb1c79f5352f136e87022020b0b3192347d1b84e9b89d00a2ecb290f18f9c39e514fa3ef2b7a889e7b6c1b012103ab0b56c7aa6254a80c124e04d2149f7fc376afedfe4623f3c59b87c279eaeb1400000000",
    0.1
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1b6d7a0196d78d84c31408982f8fa6bc7383d29c96c5e2b3a55e1f1575dc1cfb",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "sendrawtransaction",
  "params": [
    "0200000000010153fc6712e0c6cbfd15e56743f2a16bba3c0b17837d4fd33d68d2d930739e2b130000000000ffffffff01c0c62d0000000000160014c24b61118d4a2b36257b65e1ea7f15f85e41ff0402483045022100ac32e935715a57ec1d642a5e178c37f74c013bf8e4edc4cb1c79f5352f136e87022020b0b3192347d1b84e9b89d00a2ecb290f18f9c39e514fa3ef2b7a889e7b6c1b012103ab0b56c7aa6254a80c124e04d2149f7fc376afedfe4623f3c59b87c279eaeb1400000000",
    0.1
  ]
}'
```



------

# submitblock

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Attempts to submit a new block to the network. The block data must be hex-encoded.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/submitblock

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hexdata | string | Yes | The hex-encoded block data to submit. |
| dummy | string | No | Dummy value for compatibility with BIP22. This value is ignored.  |

## Result

**result** (null or string): Returns null when valid, or a string error message according to BIP22 otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "submitblock",
  "params": [
    "0000002073bd2184edd74c5c5b4c0c5be04d0e8f5d6b7d5b3b1b1d8e8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": null,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "submitblock",
  "params": [
    "0000002073bd2184edd74c5c5b4c0c5be04d0e8f5d6b7d5b3b1b1d8e8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c",
    "string"
  ]
}'
```



------

# submitheader

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Decodes the given hex-encoded block header and submits it as a candidate chain tip if valid. Throws an error if the header is invalid. This can be used to mine on top of a particular block without  having the full block data.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/submitheader

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hexdata | string | Yes | The hex-encoded block header to submit. |

## Result

**result** (null or string): Returns null if the header was accepted, or a string describing the rejection reason.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "submitheader",
  "params": [
    "0000002073bd2184edd74c5c5b4c0c5be04d0e8f5d6b7d5b3b1b1d8e8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": null,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "submitheader",
  "params": [
    "0000002073bd2184edd74c5c5b4c0c5be04d0e8f5d6b7d5b3b1b1d8e8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c8b8c"
  ]
}'
```



------

# submitpackage

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Submits a package containing multiple raw transactions to the mempool for validation and acceptance.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/submitpackage

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| package | string[] | Yes | An array of raw transactions (serialized hex strings) to be submitted as a package.  |

## Result

**result** (object): Transaction results keyed by `wtxid`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "submitpackage",
  "params": [
    [
      "0200000000010153fc6712e0c6cbfd15e56743f2a16bba3c0b17837d4fd33d68d2d930739e2b130000000000ffffffff01c0c62d0000000000160014c24b61118d4a2b36257b65e1ea7f15f85e41ff0402483045022100ac32e935715a57ec1d642a5e178c37f74c013bf8e4edc4cb1c79f5352f136e87022020b0b3192347d1b84e9b89d00a2ecb290f18f9c39e514fa3ef2b7a889e7b6c1b012103ab0b56c7aa6254a80c124e04d2149f7fc376afedfe4623f3c59b87c279eaeb1400000000"
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "package_msg": "transaction failed",
    "tx-results": {
      "6dbccbd4775598af6e9713cd84e90e80431ecc7e932c4b832ab3966ad988bc08": {
        "txid": "c67ecf450828d639a8cf3d74f168fe6bd9a1121a1167a1d46908d703f871c3a6",
        "error": "bad-txns-inputs-missingorspent"
      }
    },
    "replaced-transactions": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "submitpackage",
  "params": [
    [
      "0200000000010153fc6712e0c6cbfd15e56743f2a16bba3c0b17837d4fd33d68d2d930739e2b130000000000ffffffff01c0c62d0000000000160014c24b61118d4a2b36257b65e1ea7f15f85e41ff0402483045022100ac32e935715a57ec1d642a5e178c37f74c013bf8e4edc4cb1c79f5352f136e87022020b0b3192347d1b84e9b89d00a2ecb290f18f9c39e514fa3ef2b7a889e7b6c1b012103ab0b56c7aa6254a80c124e04d2149f7fc376afedfe4623f3c59b87c279eaeb1400000000"
    ]
  ]
}'
```



------

# testmempoolaccept

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Indicates whether one or more raw transactions (serialized, hex-encoded) would be accepted by the mempool.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/testmempoolaccept

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| rawtxs | string[] | Yes | An array of hex-encoded raw transactions to test for mempool acceptance.  |
| maxfeerate | number | No | Reject transactions whose fee rate is higher than the specified value, expressed in BTC/kB.  |

## Result

**result** (object[]): Result of the mempool acceptance test for each transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "testmempoolaccept",
  "params": [
    [
      "0200000000010142d6bd07c424e975fe821c978e720f9a55f9981d62c290cea5ccd06b455d79b90000000000fdffffff028096980000000000160014d3620fe180a0beb8fcc9682fe92e5a25f0feccd370cd2f0100000000160014076d998f6b12c3d1da6217d967154f42a5e0afd30247304402204549b10ea1698d4b4605be1d3bfff810f6135395386207664a66f5bb8bd1470902205fb86c95bfbe7b502195ffa65276d292fb074fe18ba171ef0a35395211384091012103cb5de30b343b35cc09b50f064eb289dd3e252f6985fc4309fba795cc950316afcfa50d00"
    ],
    0
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "txid": "054183ee699ff12cf1c9f4413f421c3cf0a8febc6b82a1d8751a30f5e0fd54c0",
      "wtxid": "b07f26a908955f8071620896476d6e2ca6b6610e5edc9e55f19185ca9536c8de",
      "allowed": true
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "testmempoolaccept",
  "params": [
    [
      "0200000000010142d6bd07c424e975fe821c978e720f9a55f9981d62c290cea5ccd06b455d79b90000000000fdffffff028096980000000000160014d3620fe180a0beb8fcc9682fe92e5a25f0feccd370cd2f0100000000160014076d998f6b12c3d1da6217d967154f42a5e0afd30247304402204549b10ea1698d4b4605be1d3bfff810f6135395386207664a66f5bb8bd1470902205fb86c95bfbe7b502195ffa65276d292fb074fe18ba171ef0a35395211384091012103cb5de30b343b35cc09b50f064eb289dd3e252f6985fc4309fba795cc950316afcfa50d00"
    ],
    1
  ]
}'
```



------

# validateaddress

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Verifies the validity of a given Bitcoin address and provides additional metadata about it.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/validateaddress

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The Bitcoin address to validate. |

## Result

**result** (object): Validation result and metadata about the address.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "validateaddress",
  "params": [
    "39L4cdhha5ueasiKz1wRVd75fHdB9NV2t7"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "isvalid": true,
    "address": "39L4cdhha5ueasiKz1wRVd75fHdB9NV2t7",
    "scriptPubKey": "a91453ca847feb3986cf2be405429e7e513484e0bc9387",
    "isscript": true,
    "iswitness": false
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "validateaddress",
  "params": [
    "39L4cdhha5ueasiKz1wRVd75fHdB9NV2t7"
  ]
}'
```



------

# verifymessage

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

Verifies a message signature using the corresponding Bitcoin address. Returns true if the signature is valid and matches the given address.


Reference: https://www.alchemy.com/docs/chains/litecoin/litecoin-api-endpoints/verifymessage

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The Bitcoin address to use for the signature. |
| signature | string | Yes | The base64-encoded signature provided by the signer. |
| message | string | Yes | The message that was signed. |

## Result

**result** (boolean): Whether the signature is valid for the message and address.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "verifymessage",
  "params": [
    "1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY",
    "G9oR+mz9QwPZq2boSmjdtbX0VNdD+dLOFRzJ93ZDHNwhnOtJb1EDAKCK3NmPIzctQDAazX9gh3d+zdoFKc69bQ4=",
    "Test message from Bitcoin"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "verifymessage",
  "params": [
    "1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY",
    "G9oR+mz9QwPZq2boSmjdtbX0VNdD+dLOFRzJ93ZDHNwhnOtJb1EDAKCK3NmPIzctQDAazX9gh3d+zdoFKc69bQ4=",
    "Test message from Bitcoin"
  ]
}'
```



------

# UTXO Overview

> Understand how the Unspent Transaction Output (UTXO) model tracks balances on Litecoin.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

Litecoin uses the **Unspent Transaction Output (UTXO) model** to track user balances, in contrast to the **account model** used by Ethereum and other EVM chains.

## UTXO-based model

UTXO stands for *Unspent Transaction Output*. Instead of tracking an account's overall balance, the network maintains a set of UTXOs: outputs from past transactions that credit specific addresses with a specific amount.

When someone says they own 3 LTC, what they actually hold is one or more UTXOs that together sum to 3 LTC. To spend that balance, a wallet selects specific UTXOs as inputs to a new transaction.

## What is a UTXO?

A UTXO is the output of a previous transaction that has not yet been spent. Every time a transaction is confirmed:

* The inputs reference one or more UTXOs from previous transactions.
* The outputs create new UTXOs credited to the recipient addresses.
* Any leftover value (input minus output minus fee) returns to the sender as a "change" UTXO.

So each transaction consumes old UTXOs and produces new ones. The full set of UTXOs at any point in time represents the network's spendable state.

## Properties of UTXOs

* **Non-fungible.** Each UTXO is a distinct object referenced by its transaction ID and output index.
* **Specific to spend.** To spend a UTXO you must refer to that exact UTXO, not just an aggregate balance.
* **Change creates new UTXOs.** Any leftover from the input value becomes a new UTXO sent back to the spender.
* **Single-use.** A UTXO can only be spent once; double-spending is prevented at consensus.
* **Script-locked.** Each UTXO carries a locking script that defines the conditions under which it can be spent (typically a signature from the owning private key).

## Account model vs UTXO model

|                    | Account model (Ethereum, EVM chains)                        | UTXO model (Litecoin)                                                             |
| ------------------ | ----------------------------------------------------------- | --------------------------------------------------------------------------------- |
| User balance       | Single overall account state (e.g. address X holds 4.2 ETH) | Sum of specific UTXOs (e.g. address X owns 29 UTXOs totalling 2.65 LTC)           |
| Query model        | Direct: read account balance                                | Compute: aggregate over an address's UTXOs                                        |
| Privacy            | Repeated address use correlates activity                    | Rotating addresses per output is the recommended privacy model                    |
| Transaction model  | State transition: balance update                            | Input/output: consume UTXOs, create new ones                                      |

## Querying UTXO data with Alchemy

Alchemy's UTXO API gives you a clean REST interface to fetch Litecoin addresses, balances, balance history, UTXOs, and block/transaction data. See the UTXO API endpoints in the sidebar, or the [UTXO migration guide](https://www.alchemy.com/docs/bitcoin/utxo-migration-guide) if you're moving from QuickNode, BlockCypher, or Blockdaemon.

------

# Get Block Hash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/block-index/{block_height}

Returns the block hash for a given block height on the selected network.

Reference: https://www.alchemy.com/docs/chains/litecoin/utxo-api-endpoints/utxo-api-endpoints/get-block-hash-by-index

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| block_height | integer | Yes | Block height as a non-negative integer. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/block-index/860730
```



------

# Get Transaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/tx/{txid}

Returns normalized transaction data for the given transaction ID. Response shape is consistent across UTXO networks. Empty fields are omitted.


Reference: https://www.alchemy.com/docs/chains/litecoin/utxo-api-endpoints/utxo-api-endpoints/get-transaction

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| txid | string | Yes | Hex-encoded transaction ID. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/tx/d9a5e3a3cb19be98a2ed6a205a22d207892e1c0ba8faf0301abcd94d5f545545
```



------

# Get Transaction Specific

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/tx-specific/{txid}

Returns transaction data in the exact format returned by the underlying coin backend, including all chain-specific fields not surfaced by the normalized `/tx/{txid}` endpoint.


Reference: https://www.alchemy.com/docs/chains/litecoin/utxo-api-endpoints/utxo-api-endpoints/get-transaction-specific

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| txid | string | Yes | Hex-encoded transaction ID. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/tx-specific/d9a5e3a3cb19be98a2ed6a205a22d207892e1c0ba8faf0301abcd94d5f545545
```



------

# Get Address

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/address/{address}

Returns balances and transactions for the given Litecoin address. Transactions are sorted newest-first by block height.


Reference: https://www.alchemy.com/docs/chains/litecoin/utxo-api-endpoints/utxo-api-endpoints/get-address

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| address | string | Yes | Litecoin address. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| page | integer | No | Page of returned transactions, starting from 1. |
| pageSize | integer | No | Number of transactions returned per page (max 1000). |
| from | integer | No | Filter transactions starting from this block height. |
| to | integer | No | Filter transactions up to this block height. |
| details | enum | No | Level of detail to return. |
| secondary | string | No | Secondary (fiat) currency code for balance conversion, e.g. `usd` or `eur`. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/address/Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2
```



------

# Get Xpub

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/xpub/{xpub}

Returns balances and transactions for an xpub or output descriptor on Litecoin. Supports BIP44, BIP49, BIP84, and BIP86 (Taproot) derivation schemes. The BIP version is determined by the xpub prefix or by an explicit output descriptor.


Reference: https://www.alchemy.com/docs/chains/litecoin/utxo-api-endpoints/utxo-api-endpoints/get-xpub

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| xpub | string | Yes | Extended public key or output descriptor. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| page | integer | No |  |
| pageSize | integer | No |  |
| from | integer | No |  |
| to | integer | No |  |
| details | enum | No |  |
| tokens | enum | No | Which derived addresses to return. |
| secondary | string | No | Secondary (fiat) currency code for balance conversion. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/xpub/xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz
```



------

# Get UTXOs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/utxo/{descriptor}

Returns the unspent transaction outputs for a Litecoin address, xpub, or output descriptor. Includes confirmed and unconfirmed UTXOs by default; pass `confirmed=true` to limit to confirmed only. UTXOs are sorted newest-first.


Reference: https://www.alchemy.com/docs/chains/litecoin/utxo-api-endpoints/utxo-api-endpoints/get-utxo

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| descriptor | string | Yes | Litecoin address, xpub, or output descriptor. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| confirmed | boolean | No | When `true`, exclude unconfirmed UTXOs. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/utxo/Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2
```



------

# Get Block

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/block/{block}

Returns information about a block on Litecoin, including transactions, by block hash or block height. Results are paginated.


Reference: https://www.alchemy.com/docs/chains/litecoin/utxo-api-endpoints/utxo-api-endpoints/get-block

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| block | string | Yes | Block height (integer) or block hash (hex string). |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| page | integer | No |  |
| pageSize | integer | No |  |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/block/860730
```



------

# Send Transaction (GET)

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/sendtx/{hex}

Broadcasts a signed raw Litecoin transaction encoded as a hex string in the path. Returns the transaction ID on success. The example value below is the hex of an already-confirmed Litecoin transaction; re-sending it will respond with the Bitcoin-Core `-27: Transaction already in block chain` error. Substitute your own signed raw-transaction hex to broadcast. For larger payloads, use the POST variant.


Reference: https://www.alchemy.com/docs/chains/litecoin/utxo-api-endpoints/utxo-api-endpoints/send-transaction-get

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| hex | string | Yes | Hex-encoded raw transaction bytes. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/sendtx/0200000001f7df89b3b77892f0e897508e728c499ea410503ff7fcfee0b1565dbe1244003e150000006a47304402200d49aa9e5e883f600a0d21c5258d731b8b5c10e521fcae83284d0bfd81a73857022051cee4e2cdaa29535a52b0dbb6e540882f52a09f73bbaa738dbeeb3ae8e3bca101210318d87bcd93c083e8ff34d4321280f04d4e43c585a1320688982fae054f398ba0ffffffff02a0860100000000001976a914be7846a7ac1fa99117c8ea7472f240c68f01eb8f88ac36792900000000001976a914d73e63c04a6cbad8d5dc94fdbef5175d2364e32f88ac00000000
```



------

# Send Transaction (POST)

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/sendtx/

Broadcasts a signed raw Litecoin transaction by sending hex bytes in the request body. The trailing slash on the path is mandatory; see the [Blockbook API reference](https://github.com/trezor/blockbook/blob/master/docs/api.md#send-transaction). Use this for larger payloads (request body limit 8 MiB). Returns the transaction ID on success.

> **Heads up**: the POST variant currently returns `{ "error": "Parse error" }` (HTTP 400) > on the Alchemy proxy regardless of body format. Until that upstream issue is resolved, > prefer the GET variant above for hex payloads under the URL-length limit.


Reference: https://www.alchemy.com/docs/chains/litecoin/utxo-api-endpoints/utxo-api-endpoints/send-transaction-post

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/sendtx/
```



------

# Get Tickers List

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/tickers-list/

Returns the list of available currency rate tickers (secondary currencies) for Litecoin at a given timestamp, along with the actual data timestamp.

> **Heads up**: this endpoint currently returns HTTP 503 `Unable to complete request at this > time` on the Alchemy proxy. The schema and request shape below are documented for > reference; "Try It" will not return live data until the upstream service is restored.


Reference: https://www.alchemy.com/docs/chains/litecoin/utxo-api-endpoints/utxo-api-endpoints/get-tickers-list

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| timestamp | integer | Yes | Unix timestamp for the requested currency list. |
| token | string | No | Token symbol or contract/address key for token-specific rates. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url 'https://litecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/tickers-list/?timestamp=1578391200'
```



------

# Get Tickers

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/tickers/

Returns the Litecoin currency rate for the specified currency and timestamp. If the requested currency is unavailable for that timestamp, the closest rate is returned with the actual rate timestamp.

> **Heads up**: this endpoint currently returns HTTP 503 `Unable to complete request at this > time` on the Alchemy proxy. The schema and request shape below are documented for > reference; "Try It" will not return live data until the upstream service is restored.


Reference: https://www.alchemy.com/docs/chains/litecoin/utxo-api-endpoints/utxo-api-endpoints/get-tickers

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| currency | string | No | Fiat or crypto currency code (e.g. `usd`, `eur`, `eth`). Omit to return all. |
| timestamp | integer | No | Unix timestamp. Omit to return the latest. |
| block | string | No | Block height or hash whose timestamp should be used for historical rates. |
| token | string | No | Token symbol or contract/address key for token-specific rates. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://litecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/tickers/
```



------

# Get Balance History

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://litecoin-mainnet.g.alchemy.com/v2/{apiKey}/api/v2/balancehistory/{address}

Returns the balance history for the specified Litecoin address. Optionally enrich each bucket with secondary (fiat) currency rates at the time of the transaction.


Reference: https://www.alchemy.com/docs/chains/litecoin/utxo-api-endpoints/utxo-api-endpoints/get-balance-history

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes | For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup) |
| address | string | Yes | Litecoin address. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| from | integer | Yes | Start of the history range as a Unix timestamp. |
| to | integer | Yes | End of the history range as a Unix timestamp. |
| fiatcurrency | string | No | Fiat currency code to enrich each bucket with. |
| groupBy | integer | No | Aggregation interval in seconds. Defaults to 3600. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url 'https://litecoin-mainnet.g.alchemy.com/v2/docs-demo/api/v2/balancehistory/Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2?from=1318325224&to=1757280000'
```



------

# UTXO WebSockets

> Stream block, transaction, address, and fiat rate updates from Litecoin over a persistent WebSocket connection.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

The UTXO WebSockets API streams real-time events from Litecoin over a persistent connection, powered by [Trezor Blockbook](https://github.com/trezor/blockbook). Use it to push-subscribe to new blocks, new transactions, transactions affecting specific addresses, and fiat rate updates, with the same data shapes returned by the [UTXO REST API](/docs/litecoin/utxo).

<Info>
  When the chain reorganizes, the server emits new block events for the new chain. You may see multiple events at the same height; treat the latest one as canonical.
</Info>

# Supported Networks

* `litecoin-mainnet`
* `litecoin-testnet`

# Connection

Open a WebSocket connection using the standard Alchemy WebSocket URL for the network:

<CodeGroup>
  ```shell wscat
  wscat -c wss://litecoin-mainnet.g.alchemy.com/v2/{apiKey}
  ```
</CodeGroup>

Replace `{apiKey}` with your Alchemy API key from the [Alchemy Dashboard](https://dashboard.alchemy.com/). The WebSocket URL for an app uses the same host as its HTTPS URL, just with the `wss://` scheme.

# Message format

Every client message uses the following envelope:

```json
{
  "id": "1",
  "method": "<request or subscription name>",
  "params": { ... }
}
```

* `id`: a client-chosen string. The server echoes it back on every response so you can correlate.
* `method`: the request method or subscription name.
* `params`: method-specific arguments. Use `{}` when none.

A connection can hold only one active subscription per event type. Sending a second `subscribeAddresses` replaces the previous address list. To stop receiving events, close the connection.

# Subscriptions

## subscribeNewBlock

Emits an event each time a new block is added to the chain.

### Parameters

* None.

### Response

* `id`: `string` - The id you sent on the request.
* `data`:
  * `height`: `number` - Block height.
  * `hash`: `string` - Block hash.

### Request

<CodeGroup>
  ```shell wscat
  // open the websocket
  wscat -c wss://litecoin-mainnet.g.alchemy.com/v2/{apiKey}

  // then send the subscription
  {"id":"1","method":"subscribeNewBlock","params":{}}
  ```
</CodeGroup>

### Result

<CodeGroup>
  ```json result
  {"id":"1","data":{"subscribed":true}}

  {
    "id":"1",
    "data":{
      "height":2700123,
      "hash":"<ltc block hash>"
    }
  }
  ```
</CodeGroup>

## subscribeNewTransaction

Emits every new transaction added to the blockchain, across all addresses.

<Info>
  This subscription is a high-volume firehose and requires the backend to be running with the `-enablesubnewtx` flag. It may not be enabled on all networks. If you do not receive events after subscribing, fall back to `subscribeAddresses` for targeted updates.
</Info>

### Parameters

* None.

### Response

* `id`: `string` - The id you sent on the request.
* `data`: a transaction object using the same shape as `GET /api/v2/tx/{txid}`. See the [Get transaction reference](https://github.com/trezor/blockbook/blob/master/docs/api.md#get-transaction) for the full field list.

### Request

<CodeGroup>
  ```shell wscat
  {"id":"2","method":"subscribeNewTransaction","params":{}}
  ```
</CodeGroup>

### Result

<CodeGroup>
  ```json result
  {"id":"2","data":{"subscribed":true}}

  {
    "id":"2",
    "data":{
      "txid":"<ltc txid>",
      "version":2,
      "vin":[
        {
          "txid":"<input txid>",
          "vout":1,
          "n":0,
          "addresses":["ltc1qwzrryqr3ja8w7hnja2spmkgfdcgvqwp5swz4af"],
          "isAddress":true,
          "value":"10106300"
        }
      ],
      "vout":[
        {
          "value":"175000",
          "n":0,
          "addresses":["LZ3PYJjuYP8t37iSh3M4U6PHj7vJYjY1Hf"],
          "isAddress":true
        }
      ],
      "blockHeight":-1,
      "confirmations":0,
      "value":"10063100",
      "valueIn":"10106300",
      "fees":"43200"
    }
  }
  ```
</CodeGroup>

## subscribeAddresses

Emits an event when a new transaction touches any of the supplied addresses. Optionally also emits when those transactions confirm in a new block.

### Parameters

* `addresses`: `string[]` - One or more addresses to watch. Sending a new `subscribeAddresses` request replaces the previous list. Both bech32 (`ltc1...`) and legacy (`L...`, `M...`) formats are accepted.
* `newBlockTxs`: `boolean` *(optional)* - When `true`, also emits an event when a watched transaction is included in a new block, not just when it enters the mempool. Defaults to `false`.

### Response

* `id`: `string` - The id you sent on the request.
* `data`:
  * Initial: `{ "subscribed": true }`.
  * On each event: `{ "address": <string>, "tx": <Tx> }` where `Tx` follows the same shape as `GET /api/v2/tx/{txid}`.

### Request

<CodeGroup>
  ```shell wscat
  {
    "id":"3",
    "method":"subscribeAddresses",
    "params":{
      "addresses":[
        "ltc1qwzrryqr3ja8w7hnja2spmkgfdcgvqwp5swz4af",
        "LZ3PYJjuYP8t37iSh3M4U6PHj7vJYjY1Hf"
      ],
      "newBlockTxs":true
    }
  }
  ```
</CodeGroup>

### Result

<CodeGroup>
  ```json result
  {"id":"3","data":{"subscribed":true}}

  {
    "id":"3",
    "data":{
      "address":"ltc1qwzrryqr3ja8w7hnja2spmkgfdcgvqwp5swz4af",
      "tx":{
        "txid":"<ltc txid>",
        "vin":[
          {
            "n":0,
            "addresses":["ltc1qwzrryqr3ja8w7hnja2spmkgfdcgvqwp5swz4af"],
            "isAddress":true,
            "value":"10106300"
          }
        ],
        "vout":[
          {
            "value":"175000",
            "n":0,
            "addresses":["LZ3PYJjuYP8t37iSh3M4U6PHj7vJYjY1Hf"],
            "isAddress":true
          }
        ],
        "blockHeight":-1,
        "confirmations":0,
        "value":"10063100",
        "fees":"43200"
      }
    }
  }
  ```
</CodeGroup>

## subscribeFiatRates

Emits an event when the fiat rate ticker for the chain's native asset updates.

### Parameters

* `currency`: `string` *(optional)* - Filter to a single fiat currency (e.g. `"usd"`, `"eur"`). When omitted, the server emits all available currencies on each update.

### Response

* `id`: `string` - The id you sent on the request.
* `data`:
  * Initial: `{ "subscribed": true }`.
  * On each event: `{ "rates": { "<currency>": <number>, ... } }`.

### Request

<CodeGroup>
  ```shell wscat
  {"id":"4","method":"subscribeFiatRates","params":{"currency":"usd"}}
  ```
</CodeGroup>

### Result

<CodeGroup>
  ```json result
  {"id":"4","data":{"subscribed":true}}

  {"id":"4","data":{"rates":{"usd":78.42}}}
  ```
</CodeGroup>

# Request methods

In addition to subscriptions, the WebSocket connection accepts the same one-shot requests as the [UTXO REST API](/docs/chains/litecoin/utxo-api-endpoints/utxo-api-endpoints). They are useful when you have already opened a connection for subscriptions and want to fetch ad-hoc data without a separate HTTP round-trip.

| Method                       | REST equivalent                                  | Description                                                       |
| ---------------------------- | ------------------------------------------------ | ----------------------------------------------------------------- |
| `getInfo`                    | `GET /api/`                                      | Backend and Blockbook status                                      |
| `getBlockHash`               | `GET /api/v2/block-index/{block_height}`         | Block hash for a given height                                     |
| `getAccountInfo`             | `GET /api/v2/address/{address}`, `/xpub/{xpub}`  | Balances and transactions for an address or xpub                  |
| `getAccountUtxo`             | `GET /api/v2/utxo/{descriptor}`                  | UTXOs for an address or xpub                                      |
| `getTransaction`             | `GET /api/v2/tx/{txid}`                          | Normalized transaction data                                       |
| `getTransactionSpecific`     | `GET /api/v2/tx-specific/{txid}`                 | Coin-specific raw transaction                                     |
| `getBalanceHistory`          | `GET /api/v2/balancehistory/{address}`           | Address balance history grouped by time                           |
| `estimateFee`                | n/a                                              | Fee estimate for a target confirmation depth                      |
| `sendTransaction`            | `POST /api/v2/sendtx/`                           | Broadcast a signed raw transaction                                |
| `getCurrentFiatRates`        | `GET /api/v2/tickers/`                           | Current fiat rates                                                |
| `getFiatRatesTickersList`    | `GET /api/v2/tickers-list/`                      | List of available fiat tickers for a timestamp                    |
| `getFiatRatesForTimestamps`  | n/a                                              | Historical fiat rates for specific timestamps                     |
| `getMempoolFilters`          | n/a                                              | Compact block filters for the mempool (for light clients)         |
| `getBlockFilter`             | n/a                                              | Compact block filter for a given block                            |
| `ping`                       | n/a                                              | Connection health check                                           |

For request and response payload shapes, see the [Trezor Blockbook WebSocket API reference](https://github.com/trezor/blockbook/blob/master/docs/api.md#websocket-api). The payloads are the same as the REST API; only the connection layer differs.

# WebSocket limits

The following limits apply to Alchemy WebSocket connections:

* 100 concurrent connections per app on the FREE tier; 2,000 on all other tiers.
* 1,000 unique subscriptions per connection.

See [Best Practices for Using WebSockets](/docs/reference/best-practices-for-using-websockets-in-web3) for connection-management tips and [Compute Unit Costs](/docs/reference/compute-unit-costs) for billing details.

# See also

* [UTXO Overview](/docs/litecoin/utxo)
* [UTXO API Endpoints](/docs/chains/litecoin/utxo-api-endpoints/utxo-api-endpoints)
* [UTXO Migration Guide](/docs/bitcoin/utxo-migration-guide)

------

# Litecoin API FAQ

> Frequently asked questions about the Litecoin API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Litecoin?

Litecoin (LTC) is a peer-to-peer cryptocurrency launched in 2011 by Charlie Lee. It is one of the oldest altcoins, derived from the Bitcoin codebase but with a faster block time (around 2.5 minutes) and the Scrypt proof-of-work hashing algorithm.

## What is the Litecoin API?

The Litecoin API allows you to interact with the Litecoin network using JSON-RPC methods. Through the API, you can retrieve data about blocks, transactions, and the mempool, as well as broadcast new transactions to the network.

## How can I get started using the Litecoin API?

Check out our [Litecoin API Quickstart](/docs/reference/litecoin-api-quickstart) guide for setup instructions, sample code, and your first API call.

## Does Litecoin support smart contracts?

Litecoin supports basic scripting, including SegWit and MWEB (MimbleWimble Extension Blocks) for privacy-preserving transactions, but does not have a full smart contract virtual machine like Ethereum.

## What API standard does Litecoin use?

Litecoin Core implements a standard JSON-RPC interface for querying blockchain data and submitting transactions, derived from Bitcoin Core.

## What is a Litecoin API key?

When accessing the Litecoin network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network.

## Which libraries can I use with the Litecoin API?

You can use any HTTP client that supports JSON payloads, e.g. `axios`, `fetch`, `requests`, or `curl`. Bitcoin-Core-compatible libraries like `bitcoin-core` (Node.js) and `python-bitcoinrpc` also work with Litecoin's RPC interface.

## What programming languages are compatible with the API?

The API works with any programming language that can send JSON over HTTP. Common choices include JavaScript/TypeScript, Python, Go, and Java.

## What is used for fees in Litecoin?

Litecoin transaction fees are paid in LTC. They are calculated per virtual byte (vByte) of transaction data and are used to incentivize miners to include transactions in blocks.

## What methods does Alchemy support for the Litecoin API?

You can find a full list of supported JSON-RPC methods on the [Litecoin API Overview](/docs/litecoin/litecoin-api-overview) page.

## My question isn't listed here, where can I get help?

If you have any questions or feedback, please contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Lumia Network Deprecation Notice

> Important notice regarding the deprecation of Lumia network support on Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## ⚠️ Deprecation Notice

As part of our annual process to evaluate the networks supported on Alchemy, we've decided to spin down support of Lumia.

Please migrate to an alternate provider.

For Lumia network documentation and alternative RPC providers, please visit:

* [Lumia Docs](https://docs.lumia.org)

------

# Mantle Chain API Quickstart

> How to get started building on Mantle using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Mantle is an EVM-compatible blockchain designed to provide high performance, scalability, and security for decentralized applications (dApps). Known for its fast and low-cost transactions, Mantle offers a robust environment for deploying Ethereum-based applications.

The Mantle API lets you interact with the Mantle network through a collection of JSON-RPC methods. If you're familiar with Ethereum's JSON-RPC APIs, working with Mantle will feel natural.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Mantle client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { mantle } from "viem/chains";

const client = createPublicClient({
  chain: mantle,
  transport: http("https://mantle-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (MNT):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Mantle APIs

For the full list of Mantle APIs, see the [Mantle API Endpoints](/docs/chains#mantle-apis).

------

# Mantle API Overview

> Overview of available Mantle API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Mantle APIs

📙 Get started with our [Mantle API Quickstart Guide](/docs/reference/mantle-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/mantle/mantle-api-endpoints/eth-accounts)                         | [`eth_blobBaseFee`](/docs/chains/mantle/mantle-api-endpoints/eth-blob-base-fee)             |
| [`eth_blockNumber`](/docs/chains/mantle/mantle-api-endpoints/eth-block-number)                  | [`eth_call`](/docs/chains/mantle/mantle-api-endpoints/eth-call)                             |
| [`eth_callMany`](/docs/chains/mantle/mantle-api-endpoints/eth-call-many)                        | [`eth_chainId`](/docs/chains/mantle/mantle-api-endpoints/eth-chain-id)                      |
| [`eth_createAccessList`](/docs/chains/mantle/mantle-api-endpoints/eth-create-access-list)       | [`eth_estimateGas`](/docs/chains/mantle/mantle-api-endpoints/eth-estimate-gas)              |
| [`eth_feeHistory`](/docs/chains/mantle/mantle-api-endpoints/eth-fee-history)                    | [`eth_fillTransaction`](/docs/chains/mantle/mantle-api-endpoints/eth-fill-transaction)      |
| [`eth_gasPrice`](/docs/chains/mantle/mantle-api-endpoints/eth-gas-price)                        | [`eth_getAccount`](/docs/chains/mantle/mantle-api-endpoints/eth-get-account)                |
| [`eth_getBalance`](/docs/chains/mantle/mantle-api-endpoints/eth-get-balance)                    | [`eth_getBlockByHash`](/docs/chains/mantle/mantle-api-endpoints/eth-get-block-by-hash)      |
| [`eth_getBlockByNumber`](/docs/chains/mantle/mantle-api-endpoints/eth-get-block-by-number)      | [`eth_getBlockReceipts`](/docs/chains/mantle/mantle-api-endpoints/eth-get-block-receipts)   |
| [`eth_getBlockTransactionCountByHash`](/docs/chains/mantle/mantle-api-endpoints/eth-get-block-transaction-count-by-hash) | [`eth_getBlockTransactionCountByNumber`](/docs/chains/mantle/mantle-api-endpoints/eth-get-block-transaction-count-by-number) |
| [`eth_getCode`](/docs/chains/mantle/mantle-api-endpoints/eth-get-code)                          | [`eth_getFilterChanges`](/docs/chains/mantle/mantle-api-endpoints/eth-get-filter-changes)   |
| [`eth_getFilterLogs`](/docs/chains/mantle/mantle-api-endpoints/eth-get-filter-logs)             | [`eth_getLogs`](/docs/chains/mantle/mantle-api-endpoints/eth-get-logs)                      |
| [`eth_getProof`](/docs/chains/mantle/mantle-api-endpoints/eth-get-proof)                        | [`eth_getRawTransactionByHash`](/docs/chains/mantle/mantle-api-endpoints/eth-get-raw-transaction-by-hash) |
| [`eth_getStorageAt`](/docs/chains/mantle/mantle-api-endpoints/eth-get-storage-at)               | [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/mantle/mantle-api-endpoints/eth-get-transaction-by-block-hash-and-index) |
| [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/mantle/mantle-api-endpoints/eth-get-transaction-by-block-number-and-index) | [`eth_getTransactionByHash`](/docs/chains/mantle/mantle-api-endpoints/eth-get-transaction-by-hash) |
| [`eth_getTransactionCount`](/docs/chains/mantle/mantle-api-endpoints/eth-get-transaction-count) | [`eth_getTransactionReceipt`](/docs/chains/mantle/mantle-api-endpoints/eth-get-transaction-receipt) |
| [`eth_getUncleByBlockHashAndIndex`](/docs/chains/mantle/mantle-api-endpoints/eth-get-uncle-by-block-hash-and-index) | [`eth_getUncleByBlockNumberAndIndex`](/docs/chains/mantle/mantle-api-endpoints/eth-get-uncle-by-block-number-and-index) |
| [`eth_getUncleCountByBlockHash`](/docs/chains/mantle/mantle-api-endpoints/eth-get-uncle-count-by-block-hash) | [`eth_getUncleCountByBlockNumber`](/docs/chains/mantle/mantle-api-endpoints/eth-get-uncle-count-by-block-number) |
| [`eth_maxPriorityFeePerGas`](/docs/chains/mantle/mantle-api-endpoints/eth-max-priority-fee-per-gas) | [`eth_newBlockFilter`](/docs/chains/mantle/mantle-api-endpoints/eth-new-block-filter)       |
| [`eth_newFilter`](/docs/chains/mantle/mantle-api-endpoints/eth-new-filter)                      | [`eth_newPendingTransactionFilter`](/docs/chains/mantle/mantle-api-endpoints/eth-new-pending-transaction-filter) |
| [`eth_protocolVersion`](/docs/chains/mantle/mantle-api-endpoints/eth-protocol-version)          | [`eth_sendRawTransaction`](/docs/chains/mantle/mantle-api-endpoints/eth-send-raw-transaction) |
| [`eth_simulateV1`](/docs/chains/mantle/mantle-api-endpoints/eth-simulate-v-1)                   | [`eth_submitWork`](/docs/chains/mantle/mantle-api-endpoints/eth-submit-work)                |
| [`eth_subscribe`](/docs/chains/mantle/mantle-api-endpoints/eth-subscribe)                       | [`eth_syncing`](/docs/chains/mantle/mantle-api-endpoints/eth-syncing)                       |
| [`eth_uninstallFilter`](/docs/chains/mantle/mantle-api-endpoints/eth-uninstall-filter)          | [`eth_unsubscribe`](/docs/chains/mantle/mantle-api-endpoints/eth-unsubscribe)               |
| [`net_listening`](/docs/chains/mantle/mantle-api-endpoints/net-listening)                       | [`net_peerCount`](/docs/chains/mantle/mantle-api-endpoints/net-peer-count)                  |
| [`net_version`](/docs/chains/mantle/mantle-api-endpoints/net-version)                           | [`web3_clientVersion`](/docs/chains/mantle/mantle-api-endpoints/web-3-client-version)       |
| [`web3_sha3`](/docs/chains/mantle/mantle-api-endpoints/web-3-sha-3)                             |                                                                                             |

## Related APIs

The following Alchemy APIs are also supported on Mantle:

* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blobBaseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns the base fee per blob gas in wei for the current block.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-blob-base-fee

## Result

**Blob Base Fee** (string): The base fee per blob gas, in wei, as a hexadecimal encoded unsigned integer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blobBaseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_callMany

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Executes a list of transaction bundles without creating transactions on the blockchain. This method is particularly useful for simulating transactions to understand their potential outcomes. It supports simulating transactions at an intermediate state of a block, simulating multiple transactions with sequential dependencies, and overwriting block headers.


Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-call-many

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Bundles | object[] | Yes | A list of bundles where each bundle contains transactions and optional block overrides.  |
| Simulation context | object | Yes | The context for the simulation, specifying the blockNumber or Tag and transactionIndex.  |
| State overrides | object | No | An optional mapping for state overrides, following the eth_call standard.  |
| Timeout | integer | No | The maximum running time for the simulations in milliseconds, defaulting to 5000 milliseconds.  |

## Result

**Call results** (object[][]): A list of lists containing either the return value of the executed contract call or the reverted error code. Each bundle returns an array with one result per transaction. 

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "from": "0x1985ea6e9c68e1c272d8209f3b478ac2fdb25c87",
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gas": "0x0f4240",
            "gasPrice": "0x7896e72a",
            "data": "0xa9059cbb000000000000000000000000bc0e63965946815d105e7591407704e6e1964e590000000000000000000000000000000000000000000000000000000005f5e100"
          },
          {
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gasPrice": "0x7896e72a",
            "data": "0x70a08231000000000000000000000000bc0e63965946815d105e7591407704e6e1964e59"
          }
        ],
        "blockOverride": {
          "blockNumber": "0xbb5fe9"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    [
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000000000001"
      },
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000005f5e100"
      }
    ]
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "type": "string",
            "nonce": "string",
            "to": null,
            "from": "string",
            "gas": "string",
            "value": "string",
            "input": "string",
            "gasPrice": "string",
            "maxPriorityFeePerGas": "string",
            "maxFeePerGas": "string",
            "maxFeePerBlobGas": "string",
            "accessList": [
              {
                "address": "string",
                "storageKeys": [
                  "string"
                ]
              }
            ],
            "blobVersionedHashes": [
              "string"
            ],
            "blobs": [
              "string"
            ],
            "chainId": "string"
          }
        ],
        "blockOverride": {
          "blockNumber": "string",
          "blockHash": "string",
          "coinbase": "string",
          "timestamp": "string",
          "difficulty": "string",
          "gasLimit": "string",
          "baseFee": "string"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_newPendingTransactionFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new pending transactions arrive.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-new-pending-transaction-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newPendingTransactionFilter"
}'
```



------

# eth_protocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current protocol version used by the client.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-protocol-version

## Result

**Protocol Version** (string): The protocol version as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3f",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_protocolVersion"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_simulateV1

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Enables simulation of complex transactions and state changes without modifying the blockchain.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-simulate-v-1

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Simulation object | object | Yes | The object containing all simulation details such as calls, overrides, etc. |

## Result

**Simulation result** (object[]): The result of the simulation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "baseFeePerGas": "0x9",
      "blobGasUsed": "0x0",
      "calls": [
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000001"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
              "transactionIndex": "0x0",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x0",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        },
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000002"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd",
              "transactionIndex": "0x1",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x1",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        }
      ],
      "difficulty": "0x0",
      "excessBlobGas": "0x3b80000",
      "extraData": "0x",
      "gasLimit": "0x22550dd",
      "gasUsed": "0xa410",
      "hash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "miner": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
      "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "nonce": "0x0000000000000000",
      "number": "0x1530a5e",
      "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "parentHash": "0x513a0aa73024f294cdbcb0312af0c920850035f0552d7349ebb30717de30b1cc",
      "receiptsRoot": "0x75308898d571eafb5cd8cde8278bf5b3d13c5f6ec074926de3bb895b519264e1",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "size": "0x29c",
      "stateRoot": "0x65ea44c8bd5f9edbf269b6446b460b3e7378abb25c78fd5d70f0e2ef59296b25",
      "timestamp": "0x67f43327",
      "transactions": [
        "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
        "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd"
      ],
      "transactionsRoot": "0xd6902f31ae9d2169b77cd88611c6afd691ea5a7e604e44c71f663fda0c5d1c28",
      "uncles": [],
      "withdrawals": [],
      "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    }
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_peerCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of peers currently connected to the client.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/net-peer-count

## Result

**peerCount** (string): The number of connected peers as a hex string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_peerCount"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mantle-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/mantle/mantle-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mantle-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Mantle Chain API FAQ

> Frequently asked questions about the Mantle Chain API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Mantle Chain?

Mantle Chain is a high-performance blockchain platform designed to provide scalable and efficient solutions for decentralized applications (dApps). It focuses on delivering fast transaction speeds, low costs, and robust security, making it an ideal choice for developers seeking to build innovative blockchain solutions.

## What is the Mantle Chain API?

The Mantle Chain API facilitates interaction with the Mantle Chain network through a collection of JSON-RPC methods. It provides developers with tools to interact with the blockchain, enabling functionalities such as transactions, smart contract deployment, and data retrieval.

## How can I get started using the Mantle Chain API?

Explained in [Mantle Chain API Quickstart](/docs/reference/mantle-chain-api-quickstart).

## Is Mantle Chain EVM compatible?

Yes, Mantle Chain is fully compatible with the Ethereum Virtual Machine (EVM). This compatibility allows Ethereum developers to port their projects to Mantle Chain with minimal changes, benefiting from the chain's high throughput and low transaction fees.

## What API does Mantle Chain use?

Mantle Chain uses the JSON-RPC API standard for blockchain interactions. This is the same standard used by Ethereum.

## What is a Mantle Chain API key?

When you access the Mantle Chain network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network.

For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!

## Which libraries support Mantle Chain?

Because Mantle Chain is EVM-compatible, popular Ethereum libraries like ethers.js and web3.js work with Mantle Chain. If you're familiar with Ethereum's development ecosystem, you can integrate with minimal changes.

## What programming languages work with Mantle Chain?

Like Ethereum, Mantle Chain supports a range of programming languages for blockchain interaction and smart contract development, including Solidity for smart contracts, as well as JavaScript and TypeScript for dApp development and offchain interactions.

## What does Mantle Chain use for gas?

Mantle Chain uses MNTL, its native cryptocurrency, for transaction fees, gas, and other network activities.

## What methods does Alchemy support for the Mantle Chain API?

You can find the list of all the methods Alchemy supports for the Mantle Chain API on the [Mantle API Endpoints](/docs/chains#mantle-apis) page.

## My question isn't here, where can I get help?

If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# MegaETH API Quickstart

> How to get started building on MegaETH using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

MegaETH is a high-performance Ethereum Layer 2 blockchain designed to achieve real-time transaction processing with sub-millisecond latency and extremely high throughput.

The MegaETH API lets you interact with the MegaETH network through a set of JSON-RPC methods. If you've worked with Ethereum's JSON-RPC APIs, the design will feel familiar.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a MegaETH client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http, defineChain } from "viem";

const megaeth = defineChain({
  id: 6342,
  name: "MegaETH",
  nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 },
  rpcUrls: {
    default: { http: ["https://megaeth-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
  },
});

const client = createPublicClient({
  chain: megaeth,
  transport: http("https://megaeth-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (ETH):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# MegaETH APIs

For the full list of MegaETH APIs, see the [MegaETH API Endpoints](/docs/chains#megaeth-apis).

------

# MegaETH API Overview

> Overview of available MegaETH API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## MegaETH APIs

📙 Get started with our [MegaETH API Quickstart Guide](/docs/reference/megaeth-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_blockNumber`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-block-number)               | [`eth_call`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-call)                          |
| [`eth_callMany`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-call-many)                     | [`eth_chainId`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-chain-id)                   |
| [`eth_estimateGas`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-estimate-gas)               | [`eth_feeHistory`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-fee-history)             |
| [`eth_gasPrice`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-gas-price)                     | [`eth_getAccount`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-account)             |
| [`eth_getAccountInfo`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-account-info)        | [`eth_getBalance`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-balance)             |
| [`eth_getBlockByHash`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-block-by-hash)       | [`eth_getBlockByNumber`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-block-by-number) |
| [`eth_getBlockReceipts`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-block-receipts)    | [`eth_getBlockTransactionCountByHash`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-code)                   |
| [`eth_getFilterChanges`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-filter-changes)    | [`eth_getFilterLogs`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-filter-logs)      |
| [`eth_getLogs`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-logs)                       | [`eth_getRawTransactionByHash`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-raw-transaction-by-hash) |
| [`eth_getStorageAt`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-storage-at)            | [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-transaction-by-block-hash-and-index) |
| [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-transaction-by-block-number-and-index) | [`eth_getTransactionByHash`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-transaction-by-hash) |
| [`eth_getTransactionCount`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-transaction-count) | [`eth_getTransactionReceipt`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-transaction-receipt) |
| [`eth_getWithdrawalProof`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-withdrawal-proof) | [`eth_maxPriorityFeePerGas`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-max-priority-fee-per-gas) |
| [`eth_newBlockFilter`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-new-block-filter)        | [`eth_newFilter`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-new-filter)               |
| [`eth_sendRawTransaction`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-send-raw-transaction) | [`eth_simulateV1`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-simulate-v-1)            |
| [`eth_submitWork`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-submit-work)                 | [`eth_subscribe`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-subscribe)                |
| [`eth_uninstallFilter`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-uninstall-filter)       | [`eth_unsubscribe`](/docs/chains/megaeth/mega-eth-api-endpoints/eth-unsubscribe)            |
| [`net_version`](/docs/chains/megaeth/mega-eth-api-endpoints/net-version)                        | [`realtime_sendRawTransaction`](/docs/chains/megaeth/mega-eth-api-endpoints/realtime-send-raw-transaction) |
| [`web3_clientVersion`](/docs/chains/megaeth/mega-eth-api-endpoints/web-3-client-version)        | [`web3_sha3`](/docs/chains/megaeth/mega-eth-api-endpoints/web-3-sha-3)                      |

## Related APIs

The following Alchemy APIs are also supported on MegaETH:

* [Bundler API](/docs/wallets/transactions/low-level-infra/bundler/overview)
* [Gas Manager API](/docs/wallets/api-reference/gas-manager-admin-api/gas-abstraction-api-endpoints/alchemy-request-gas-and-paymaster-and-data)
* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)

------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_callMany

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Executes a list of transaction bundles without creating transactions on the blockchain. This method is particularly useful for simulating transactions to understand their potential outcomes. It supports simulating transactions at an intermediate state of a block, simulating multiple transactions with sequential dependencies, and overwriting block headers.


Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-call-many

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Bundles | object[] | Yes | A list of bundles where each bundle contains transactions and optional block overrides.  |
| Simulation context | object | Yes | The context for the simulation, specifying the blockNumber or Tag and transactionIndex.  |
| State overrides | object | No | An optional mapping for state overrides, following the eth_call standard.  |
| Timeout | integer | No | The maximum running time for the simulations in milliseconds, defaulting to 5000 milliseconds.  |

## Result

**Call results** (object[][]): A list of lists containing either the return value of the executed contract call or the reverted error code. Each bundle returns an array with one result per transaction. 

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "from": "0x1985ea6e9c68e1c272d8209f3b478ac2fdb25c87",
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gas": "0x0f4240",
            "gasPrice": "0x7896e72a",
            "data": "0xa9059cbb000000000000000000000000bc0e63965946815d105e7591407704e6e1964e590000000000000000000000000000000000000000000000000000000005f5e100"
          },
          {
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gasPrice": "0x7896e72a",
            "data": "0x70a08231000000000000000000000000bc0e63965946815d105e7591407704e6e1964e59"
          }
        ],
        "blockOverride": {
          "blockNumber": "0xbb5fe9"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    [
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000000000001"
      },
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000005f5e100"
      }
    ]
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "type": "string",
            "nonce": "string",
            "to": null,
            "from": "string",
            "gas": "string",
            "value": "string",
            "input": "string",
            "gasPrice": "string",
            "maxPriorityFeePerGas": "string",
            "maxFeePerGas": "string",
            "maxFeePerBlobGas": "string",
            "accessList": [
              {
                "address": "string",
                "storageKeys": [
                  "string"
                ]
              }
            ],
            "blobVersionedHashes": [
              "string"
            ],
            "blobs": [
              "string"
            ],
            "chainId": "string"
          }
        ],
        "blockOverride": {
          "blockNumber": "string",
          "blockHash": "string",
          "coinbase": "string",
          "timestamp": "string",
          "difficulty": "string",
          "gasLimit": "string",
          "baseFee": "string"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves account information including balance, code, and nonce for a given address at a specified block.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the account information. |

## Result

**Account information** (object): An object containing the account's balance, code, and nonce.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "balance": "0x1cfe56f3795885980000",
    "code": "0x",
    "nonce": "0x5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getWithdrawalProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account (and optionally some storage keys) against the withdrawal state root used by MegaETH's L2→L1 withdrawal flow. MegaETH is an OP Stack chain, and withdrawals are initiated by writing to the predeployed `L2ToL1MessagePasser` at `0x4200000000000000000000000000000000000016`; this method returns the account/storage proof needed to prove and finalize a withdrawal on L1. The parameter and result shape match `eth_getProof`.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-get-withdrawal-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. For withdrawal proofs, this is typically the `L2ToL1MessagePasser` predeploy at `0x4200000000000000000000000000000000000016`. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. For a withdrawal, this is the message slot in the `L2ToL1MessagePasser` `sentMessages` mapping corresponding to the withdrawal being proven. May be empty to fetch only the account proof. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. Callers proving a withdrawal on L1 typically use the L2 block that corresponds to the latest output root posted to the `L2OutputOracle` / `DisputeGameFactory` on L1. |

## Result

**Withdrawal proof** (object): An object containing the account proof and storage proofs for the requested address and storage keys against the withdrawal state trie.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getWithdrawalProof",
  "params": [
    "0x4200000000000000000000000000000000000016",
    [
      "0x0000000000000000000000000000000000000000000000000000000000000000"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "address": "0x4200000000000000000000000000000000000016",
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0xc14bc35540a7e2e36d07ab3404faa5d595fc003be1dd581f3ec8b6794b228741",
    "accountProof": [],
    "storageProof": [
      {
        "key": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "value": "0x0",
        "proof": [
          "0xf90211a085022a3c75f381ae55fc1dea9b8428575a61c6af2cba4e7cda56611b51160964a019aa374163ee898334c55b71ea66862d8a1f2182d9cb628d36bbecbda47bc0ada05bd02c6955c5a0c7b3c51f920e7cf87acaa0eee9cd35658d29d3de32fe7f8beba0ab150e8bbfb33c2c11d6a249b289b4c70838ce791727a3aacde0fffdb3289013a09bd1dba3a75bcd4ec2fea91a1038726bc6461bf6da64f66313d8154fc227102da06afe6053ef8192a8a3dcc328f6b763a4a414238851109a0484da30ac8bf03266a0a854e99f71cb91635aa1cb1e624f716857bf030e6a4fbe9478d44c239b53086aa08e39356a1be08b8f216f03d9353d50613c75a98e9d857335672ffb83f50e976fa0fae826709a4b7cf1bacbcdbdc15dc8ffe62e92f024d0e790bf6d191f8f9b97fea0c951b4adcc2e21290940908d8642c9dc338295cd6193c805c033b4dfead6c698a0e31d80cbb6a3f3755e1d5a7afca4709b338e5c8d3d2a3012b4d6f4637a4f8b55a03ba018a8eb9e89e549397239f4a260fa84774078e5b6f6039de435b40ada4659a04b808d306505c575bc173d31a5f5af0e2488e3f15c19fda23c73f4f4a15cd5e4a0d95caaaa3aa842505b212f73fa6466c8af4628af6a9649441349ff73a0c94beea0695c94a790ef02a58b755249ef4c2f4f7267bd0ba902ae7ee1c9f75fd00ec6daa05c85ad78c50797646583f10ce8d69d34d8f9075133caff79adc5cad88735ce1680",
          "0xf8d180a0ebb27f659515f870028e776b7cae4008653d3775ab0687114a5d668971334962a0b1a4a8c685fd7f40b9823cbf07cf54c70671131db2b0bed7d5f56baa133397eba00ad98feec470de1686a7773d1ee5c4d11082af4008aa038a43b61c9af6c8b1b780808080a02374b1b01f575eb984ae09a087116b5b707264d2e54f28b4e5527d83fe1396ac80a064c59d8430486480a56ba254614900823e5ecf140b0d78aa9443511c3ea7025180a016561199ee9871dc834080947f7445a2306ddead9e9c725ea039af1e781157cb80808080"
        ]
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getWithdrawalProof",
  "params": [
    "0x4200000000000000000000000000000000000016",
    [
      "0x0000000000000000000000000000000000000000000000000000000000000000"
    ],
    "latest"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_simulateV1

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Enables simulation of complex transactions and state changes without modifying the blockchain.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-simulate-v-1

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Simulation object | object | Yes | The object containing all simulation details such as calls, overrides, etc. |

## Result

**Simulation result** (object[]): The result of the simulation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "baseFeePerGas": "0x9",
      "blobGasUsed": "0x0",
      "calls": [
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000001"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
              "transactionIndex": "0x0",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x0",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        },
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000002"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd",
              "transactionIndex": "0x1",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x1",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        }
      ],
      "difficulty": "0x0",
      "excessBlobGas": "0x3b80000",
      "extraData": "0x",
      "gasLimit": "0x22550dd",
      "gasUsed": "0xa410",
      "hash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "miner": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
      "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "nonce": "0x0000000000000000",
      "number": "0x1530a5e",
      "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "parentHash": "0x513a0aa73024f294cdbcb0312af0c920850035f0552d7349ebb30717de30b1cc",
      "receiptsRoot": "0x75308898d571eafb5cd8cde8278bf5b3d13c5f6ec074926de3bb895b519264e1",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "size": "0x29c",
      "stateRoot": "0x65ea44c8bd5f9edbf269b6446b460b3e7378abb25c78fd5d70f0e2ef59296b25",
      "timestamp": "0x67f43327",
      "transactions": [
        "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
        "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd"
      ],
      "transactionsRoot": "0xd6902f31ae9d2169b77cd88611c6afd691ea5a7e604e44c71f663fda0c5d1c28",
      "uncles": [],
      "withdrawals": [],
      "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    }
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# realtime_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Submits a signed transaction and returns the transaction receipt without polling. This method combines submission and receipt retrieval into one call, returning the receipt as soon as the transaction is executed in a mini block.

If the transaction is not executed within 10 seconds, the method returns a `realtime transaction expired` error.


Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/realtime-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The signed transaction data, encoded as a hexadecimal string. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "realtime_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "transactionHash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
    "blockHash": "0xabcd1234...",
    "blockNumber": "0x10d4f",
    "cumulativeGasUsed": "0x5208",
    "gasUsed": "0x5208",
    "contractAddress": null,
    "logs": [],
    "status": "0x1"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "realtime_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://megaeth-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/megaeth/mega-eth-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://megaeth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# MegaETH API FAQ

> Frequently asked questions about the MegaETH API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is MegaETH?
MegaETH is a high-performance Ethereum Layer 2 blockchain designed to achieve real-time transaction processing with sub-millisecond latency and extremely high throughput.

## How do I get started with MegaETH?
Check out our [MegaETH API Quickstart guide](/docs/reference/megaeth-api-quickstart) to get started building on MegaETH.

## What is the MegaETH API?
The MegaETH API lets you interface with the MegaETH mainnet. You can execute transactions, query onchain data, and interact with the MegaETH network using the JSON-RPC standard.

## Is MegaETH EVM compatible?
Yes, MegaETH is EVM compatible.

## What API does MegaETH use?
MegaETH uses the JSON-RPC API standard. This API handles all blockchain interaction on the MegaETH network, letting you read block/transaction data, query chain information, execute smart contracts, and store data onchain.

## What methods are supported on MegaETH?
MegaETH supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [MegaETH API Endpoints](/docs/chains#megaeth-apis) for a complete list.

## What is a MegaETH API key?
When you access the MegaETH network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!

## Which libraries support MegaETH?
Common Ethereum libraries like [ethers.js](https://docs.ethers.org/v5/) should be compatible with MegaETH, given its EVM nature.

## My question isn’t here, where can I get help?
If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Metis Chain API Quickstart

> How to get started building on Metis using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Metis is an EVM-compatible blockchain designed to provide high performance, scalability, and security for decentralized applications (dApps). Known for its fast and low-cost transactions, Metis offers a robust environment for deploying Ethereum-based applications with enhanced scalability and performance.

The Metis API lets you interact with the Metis network through a collection of JSON-RPC methods. If you're familiar with Ethereum's JSON-RPC APIs, working with Metis will feel natural.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Metis client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { metis } from "viem/chains";

const client = createPublicClient({
  chain: metis,
  transport: http("https://metis-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (METIS):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Metis APIs

For the full list of Metis APIs, see the [Metis API Endpoints](/docs/chains#metis-apis).

------

# Metis API Overview

> Overview of available Metis API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Metis APIs

📙 Get started with our [Metis API Quickstart Guide](/docs/reference/metis-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/metis/metis-api-endpoints/eth-accounts)                           | [`eth_blockNumber`](/docs/chains/metis/metis-api-endpoints/eth-block-number)                |
| [`eth_call`](/docs/chains/metis/metis-api-endpoints/eth-call)                                   | [`eth_chainId`](/docs/chains/metis/metis-api-endpoints/eth-chain-id)                        |
| [`eth_createAccessList`](/docs/chains/metis/metis-api-endpoints/eth-create-access-list)         | [`eth_estimateGas`](/docs/chains/metis/metis-api-endpoints/eth-estimate-gas)                |
| [`eth_gasPrice`](/docs/chains/metis/metis-api-endpoints/eth-gas-price)                          | [`eth_getAccount`](/docs/chains/metis/metis-api-endpoints/eth-get-account)                  |
| [`eth_getBalance`](/docs/chains/metis/metis-api-endpoints/eth-get-balance)                      | [`eth_getBlockByHash`](/docs/chains/metis/metis-api-endpoints/eth-get-block-by-hash)        |
| [`eth_getBlockByNumber`](/docs/chains/metis/metis-api-endpoints/eth-get-block-by-number)        | [`eth_getBlockTransactionCountByHash`](/docs/chains/metis/metis-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/metis/metis-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/metis/metis-api-endpoints/eth-get-code)                        |
| [`eth_getFilterChanges`](/docs/chains/metis/metis-api-endpoints/eth-get-filter-changes)         | [`eth_getFilterLogs`](/docs/chains/metis/metis-api-endpoints/eth-get-filter-logs)           |
| [`eth_getLogs`](/docs/chains/metis/metis-api-endpoints/eth-get-logs)                            | [`eth_getProof`](/docs/chains/metis/metis-api-endpoints/eth-get-proof)                      |
| [`eth_getRawTransactionByHash`](/docs/chains/metis/metis-api-endpoints/eth-get-raw-transaction-by-hash) | [`eth_getStorageAt`](/docs/chains/metis/metis-api-endpoints/eth-get-storage-at)             |
| [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/metis/metis-api-endpoints/eth-get-transaction-by-block-hash-and-index) | [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/metis/metis-api-endpoints/eth-get-transaction-by-block-number-and-index) |
| [`eth_getTransactionByHash`](/docs/chains/metis/metis-api-endpoints/eth-get-transaction-by-hash) | [`eth_getTransactionCount`](/docs/chains/metis/metis-api-endpoints/eth-get-transaction-count) |
| [`eth_getTransactionReceipt`](/docs/chains/metis/metis-api-endpoints/eth-get-transaction-receipt) | [`eth_getUncleByBlockHashAndIndex`](/docs/chains/metis/metis-api-endpoints/eth-get-uncle-by-block-hash-and-index) |
| [`eth_getUncleByBlockNumberAndIndex`](/docs/chains/metis/metis-api-endpoints/eth-get-uncle-by-block-number-and-index) | [`eth_getUncleCountByBlockHash`](/docs/chains/metis/metis-api-endpoints/eth-get-uncle-count-by-block-hash) |
| [`eth_getUncleCountByBlockNumber`](/docs/chains/metis/metis-api-endpoints/eth-get-uncle-count-by-block-number) | [`eth_newBlockFilter`](/docs/chains/metis/metis-api-endpoints/eth-new-block-filter)         |
| [`eth_newFilter`](/docs/chains/metis/metis-api-endpoints/eth-new-filter)                        | [`eth_protocolVersion`](/docs/chains/metis/metis-api-endpoints/eth-protocol-version)        |
| [`eth_sendRawTransaction`](/docs/chains/metis/metis-api-endpoints/eth-send-raw-transaction)     | [`eth_submitWork`](/docs/chains/metis/metis-api-endpoints/eth-submit-work)                  |
| [`eth_subscribe`](/docs/chains/metis/metis-api-endpoints/eth-subscribe)                         | [`eth_syncing`](/docs/chains/metis/metis-api-endpoints/eth-syncing)                         |
| [`eth_uninstallFilter`](/docs/chains/metis/metis-api-endpoints/eth-uninstall-filter)            | [`eth_unsubscribe`](/docs/chains/metis/metis-api-endpoints/eth-unsubscribe)                 |
| [`net_listening`](/docs/chains/metis/metis-api-endpoints/net-listening)                         | [`net_version`](/docs/chains/metis/metis-api-endpoints/net-version)                         |
| [`web3_clientVersion`](/docs/chains/metis/metis-api-endpoints/web-3-client-version)             | [`web3_sha3`](/docs/chains/metis/metis-api-endpoints/web-3-sha-3)                           |

## Related APIs

The following Alchemy APIs are also supported on Metis:

* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_protocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current protocol version used by the client.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-protocol-version

## Result

**Protocol Version** (string): The protocol version as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3f",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_protocolVersion"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://metis-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/metis/metis-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://metis-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Metis Chain API FAQ

> Frequently asked questions about the Metis Chain API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Metis Chain?

Metis Chain is a high-performance layer 2 scaling solution built on Ethereum. It aims to provide a scalable, low-cost, and user-friendly environment for decentralized applications (dApps) by leveraging optimistic rollups to enhance transaction throughput and reduce fees.

## What is the Metis Chain API?

The Metis Chain API facilitates interaction with the Metis Chain network through a collection of JSON-RPC methods. It provides developers with tools to interact with the blockchain, enabling functionalities such as transactions, smart contract deployment, and data retrieval.

## What networks are supported for Metis Chain?

Currently, we only support Metis Mainnet.

## How can I get started using the Metis Chain API?

Explained in [Metis Chain API Quickstart](/docs/reference/metis-chain-api-quickstart).

## Is Metis Chain EVM compatible?

Yes, Metis Chain is fully compatible with the Ethereum Virtual Machine (EVM). This compatibility allows Ethereum developers to port their projects to Metis Chain with minimal changes, benefiting from the network's scalability and low transaction fees.

## What API does Metis Chain use?

Metis Chain uses the JSON-RPC API standard for blockchain interactions. This is the same standard used by Ethereum.

## What is a Metis Chain API key?

When you access the Metis Chain network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network.

For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!

## Which libraries support Metis Chain?

Because Metis Chain is EVM-compatible, popular Ethereum libraries like ethers.js and web3.js work with Metis Chain. If you're familiar with Ethereum's development ecosystem, you can integrate with minimal changes.

## What programming languages work with Metis Chain?

Like Ethereum, Metis Chain supports a range of programming languages for blockchain interaction and smart contract development, including Solidity for smart contracts, as well as JavaScript and TypeScript for dApp development and offchain interactions.

## What does Metis Chain use for gas?

Metis Chain uses METIS, its native cryptocurrency, for transaction fees, gas, and other network activities.

## What methods does Alchemy support for the Metis Chain API?

You can find the list of all the methods Alchemy supports for the Metis Chain API on the [Metis API Endpoints](/docs/chains#metis-apis) page.

## My question isn't here, where can I get help?

If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Mode API Quickstart

> How to get started building on Mode using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Mode is an OP Stack–based, EVM-equivalent Ethereum Layer-2 that's growth-focused—sharing sequencer fees with developers (SFS) and rewarding users to power DeFi/AiFi apps.

The Mode API lets you interact with the Mode network through a set of JSON-RPC methods. If you've worked with Ethereum's JSON-RPC APIs, the design will feel familiar.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Mode client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { mode } from "viem/chains";

const client = createPublicClient({
  chain: mode,
  transport: http("https://mode-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (ETH):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Mode APIs

For the full list of Mode APIs, see the [Mode API Endpoints](/docs/chains#mode-apis).

------

# Mode API Overview

> Overview of available Mode API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Mode APIs

📙 Get started with our [Mode API Quickstart Guide](/docs/reference/mode-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_blobBaseFee`](/docs/chains/mode/mode-api-endpoints/eth-blob-base-fee)                     | [`eth_blockNumber`](/docs/chains/mode/mode-api-endpoints/eth-block-number)                  |
| [`eth_call`](/docs/chains/mode/mode-api-endpoints/eth-call)                                     | [`eth_chainId`](/docs/chains/mode/mode-api-endpoints/eth-chain-id)                          |
| [`eth_estimateGas`](/docs/chains/mode/mode-api-endpoints/eth-estimate-gas)                      | [`eth_feeHistory`](/docs/chains/mode/mode-api-endpoints/eth-fee-history)                    |
| [`eth_gasPrice`](/docs/chains/mode/mode-api-endpoints/eth-gas-price)                            | [`eth_getAccount`](/docs/chains/mode/mode-api-endpoints/eth-get-account)                    |
| [`eth_getAccountInfo`](/docs/chains/mode/mode-api-endpoints/eth-get-account-info)               | [`eth_getBalance`](/docs/chains/mode/mode-api-endpoints/eth-get-balance)                    |
| [`eth_getBlockByHash`](/docs/chains/mode/mode-api-endpoints/eth-get-block-by-hash)              | [`eth_getBlockByNumber`](/docs/chains/mode/mode-api-endpoints/eth-get-block-by-number)      |
| [`eth_getBlockReceipts`](/docs/chains/mode/mode-api-endpoints/eth-get-block-receipts)           | [`eth_getBlockTransactionCountByHash`](/docs/chains/mode/mode-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/mode/mode-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/mode/mode-api-endpoints/eth-get-code)                          |
| [`eth_getFilterChanges`](/docs/chains/mode/mode-api-endpoints/eth-get-filter-changes)           | [`eth_getFilterLogs`](/docs/chains/mode/mode-api-endpoints/eth-get-filter-logs)             |
| [`eth_getLogs`](/docs/chains/mode/mode-api-endpoints/eth-get-logs)                              | [`eth_getProof`](/docs/chains/mode/mode-api-endpoints/eth-get-proof)                        |
| [`eth_getRawTransactionByHash`](/docs/chains/mode/mode-api-endpoints/eth-get-raw-transaction-by-hash) | [`eth_getStorageAt`](/docs/chains/mode/mode-api-endpoints/eth-get-storage-at)               |
| [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/mode/mode-api-endpoints/eth-get-transaction-by-block-hash-and-index) | [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/mode/mode-api-endpoints/eth-get-transaction-by-block-number-and-index) |
| [`eth_getTransactionByHash`](/docs/chains/mode/mode-api-endpoints/eth-get-transaction-by-hash)  | [`eth_getTransactionCount`](/docs/chains/mode/mode-api-endpoints/eth-get-transaction-count) |
| [`eth_getTransactionReceipt`](/docs/chains/mode/mode-api-endpoints/eth-get-transaction-receipt) | [`eth_getUncleCountByBlockHash`](/docs/chains/mode/mode-api-endpoints/eth-get-uncle-count-by-block-hash) |
| [`eth_getUncleCountByBlockNumber`](/docs/chains/mode/mode-api-endpoints/eth-get-uncle-count-by-block-number) | [`eth_maxPriorityFeePerGas`](/docs/chains/mode/mode-api-endpoints/eth-max-priority-fee-per-gas) |
| [`eth_newBlockFilter`](/docs/chains/mode/mode-api-endpoints/eth-new-block-filter)               | [`eth_newFilter`](/docs/chains/mode/mode-api-endpoints/eth-new-filter)                      |
| [`eth_sendRawTransaction`](/docs/chains/mode/mode-api-endpoints/eth-send-raw-transaction)       | [`eth_simulateV1`](/docs/chains/mode/mode-api-endpoints/eth-simulate-v-1)                   |
| [`eth_submitWork`](/docs/chains/mode/mode-api-endpoints/eth-submit-work)                        | [`eth_subscribe`](/docs/chains/mode/mode-api-endpoints/eth-subscribe)                       |
| [`eth_syncing`](/docs/chains/mode/mode-api-endpoints/eth-syncing)                               | [`eth_uninstallFilter`](/docs/chains/mode/mode-api-endpoints/eth-uninstall-filter)          |
| [`eth_unsubscribe`](/docs/chains/mode/mode-api-endpoints/eth-unsubscribe)                       | [`net_listening`](/docs/chains/mode/mode-api-endpoints/net-listening)                       |
| [`net_version`](/docs/chains/mode/mode-api-endpoints/net-version)                               | [`web3_clientVersion`](/docs/chains/mode/mode-api-endpoints/web-3-client-version)           |
| [`web3_sha3`](/docs/chains/mode/mode-api-endpoints/web-3-sha-3)                                 |                                                                                             |

## Related APIs

The following Alchemy APIs are also supported on Mode:

* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)

------

# eth_blobBaseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns the base fee per blob gas in wei for the current block.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-blob-base-fee

## Result

**Blob Base Fee** (string): The base fee per blob gas, in wei, as a hexadecimal encoded unsigned integer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blobBaseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves account information including balance, code, and nonce for a given address at a specified block.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the account information. |

## Result

**Account information** (object): An object containing the account's balance, code, and nonce.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "balance": "0x1cfe56f3795885980000",
    "code": "0x",
    "nonce": "0x5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-sepolia.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-sepolia.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-sepolia.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-sepolia.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_simulateV1

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Enables simulation of complex transactions and state changes without modifying the blockchain.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-simulate-v-1

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Simulation object | object | Yes | The object containing all simulation details such as calls, overrides, etc. |

## Result

**Simulation result** (object[]): The result of the simulation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "baseFeePerGas": "0x9",
      "blobGasUsed": "0x0",
      "calls": [
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000001"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
              "transactionIndex": "0x0",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x0",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        },
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000002"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd",
              "transactionIndex": "0x1",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x1",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        }
      ],
      "difficulty": "0x0",
      "excessBlobGas": "0x3b80000",
      "extraData": "0x",
      "gasLimit": "0x22550dd",
      "gasUsed": "0xa410",
      "hash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "miner": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
      "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "nonce": "0x0000000000000000",
      "number": "0x1530a5e",
      "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "parentHash": "0x513a0aa73024f294cdbcb0312af0c920850035f0552d7349ebb30717de30b1cc",
      "receiptsRoot": "0x75308898d571eafb5cd8cde8278bf5b3d13c5f6ec074926de3bb895b519264e1",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "size": "0x29c",
      "stateRoot": "0x65ea44c8bd5f9edbf269b6446b460b3e7378abb25c78fd5d70f0e2ef59296b25",
      "timestamp": "0x67f43327",
      "transactions": [
        "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
        "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd"
      ],
      "transactionsRoot": "0xd6902f31ae9d2169b77cd88611c6afd691ea5a7e604e44c71f663fda0c5d1c28",
      "uncles": [],
      "withdrawals": [],
      "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    }
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mode-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/mode/mode-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mode-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Mode API FAQ

> Frequently asked questions about the Mode API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Mode?
Mode is an OP Stack–based, EVM-equivalent Ethereum Layer-2 that’s growth-focused—sharing sequencer fees with developers (SFS) and rewarding users to power DeFi/AiFi apps.

## How do I get started with Mode?
Check out our [Mode API Quickstart guide](/docs/reference/mode-api-quickstart) to get started building on Mode.

## What is the Mode API?
The Mode API lets you interface with the Mode mainnet. You can execute transactions, query onchain data, and interact with the Mode network using the JSON-RPC standard.

## Is Mode EVM compatible?
Yes, Mode is EVM compatible.

## What API does Mode use?
Mode uses the JSON-RPC API standard. This API handles all blockchain interaction on the Mode network, letting you read block/transaction data, query chain information, execute smart contracts, and store data onchain.

## What methods are supported on Mode?
Mode supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Mode API Endpoints](/docs/chains#mode-apis) for a complete list.

## What is a Mode API key?
When you access the Mode network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!

## Which libraries support Mode?
Common Ethereum libraries like [ethers.js](https://docs.ethers.org/v5/) should be compatible with Mode, given its EVM nature.

## My question isn’t here, where can I get help?
If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Monad API Quickstart

> How to get started building on Monad using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Monad is a high-performance Ethereum-compatible L1. Monad materially advances the efficient frontier in the balance between decentralization and scalability.

<Info>
  We currently only support the Monad testnet.
</Info>

The Monad API lets you interact with the Monad network through a set of JSON-RPC methods. If you've worked with Ethereum's JSON-RPC APIs, the design will feel familiar.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Monad client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http, defineChain } from "viem";

const monadTestnet = defineChain({
  id: 10143,
  name: "Monad Testnet",
  nativeCurrency: { name: "MON", symbol: "MON", decimals: 18 },
  rpcUrls: {
    default: { http: ["https://monad-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
  },
});

const client = createPublicClient({
  chain: monadTestnet,
  transport: http("https://monad-testnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (MON):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Monad APIs

For the full list of Monad APIs, see the [Monad API Endpoints](/docs/chains#monad-apis).

------

# Monad API Overview

> Overview of available Monad API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Monad APIs

📙 Get started with our [Monad API Quickstart Guide](/docs/reference/monad-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/monad/monad-api-endpoints/eth-accounts)                           | [`eth_blobBaseFee`](/docs/chains/monad/monad-api-endpoints/eth-blob-base-fee)               |
| [`eth_blockNumber`](/docs/chains/monad/monad-api-endpoints/eth-block-number)                    | [`eth_call`](/docs/chains/monad/monad-api-endpoints/eth-call)                               |
| [`eth_callMany`](/docs/chains/monad/monad-api-endpoints/eth-call-many)                          | [`eth_chainId`](/docs/chains/monad/monad-api-endpoints/eth-chain-id)                        |
| [`eth_createAccessList`](/docs/chains/monad/monad-api-endpoints/eth-create-access-list)         | [`eth_estimateGas`](/docs/chains/monad/monad-api-endpoints/eth-estimate-gas)                |
| [`eth_feeHistory`](/docs/chains/monad/monad-api-endpoints/eth-fee-history)                      | [`eth_fillTransaction`](/docs/chains/monad/monad-api-endpoints/eth-fill-transaction)        |
| [`eth_gasPrice`](/docs/chains/monad/monad-api-endpoints/eth-gas-price)                          | [`eth_getAccount`](/docs/chains/monad/monad-api-endpoints/eth-get-account)                  |
| [`eth_getAccountInfo`](/docs/chains/monad/monad-api-endpoints/eth-get-account-info)             | [`eth_getBalance`](/docs/chains/monad/monad-api-endpoints/eth-get-balance)                  |
| [`eth_getBlockByHash`](/docs/chains/monad/monad-api-endpoints/eth-get-block-by-hash)            | [`eth_getBlockByNumber`](/docs/chains/monad/monad-api-endpoints/eth-get-block-by-number)    |
| [`eth_getBlockReceipts`](/docs/chains/monad/monad-api-endpoints/eth-get-block-receipts)         | [`eth_getBlockTransactionCountByHash`](/docs/chains/monad/monad-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/monad/monad-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/monad/monad-api-endpoints/eth-get-code)                        |
| [`eth_getFilterChanges`](/docs/chains/monad/monad-api-endpoints/eth-get-filter-changes)         | [`eth_getFilterLogs`](/docs/chains/monad/monad-api-endpoints/eth-get-filter-logs)           |
| [`eth_getLogs`](/docs/chains/monad/monad-api-endpoints/eth-get-logs)                            | [`eth_getRawTransactionByHash`](/docs/chains/monad/monad-api-endpoints/eth-get-raw-transaction-by-hash) |
| [`eth_getStorageAt`](/docs/chains/monad/monad-api-endpoints/eth-get-storage-at)                 | [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/monad/monad-api-endpoints/eth-get-transaction-by-block-hash-and-index) |
| [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/monad/monad-api-endpoints/eth-get-transaction-by-block-number-and-index) | [`eth_getTransactionByHash`](/docs/chains/monad/monad-api-endpoints/eth-get-transaction-by-hash) |
| [`eth_getTransactionCount`](/docs/chains/monad/monad-api-endpoints/eth-get-transaction-count)   | [`eth_getTransactionReceipt`](/docs/chains/monad/monad-api-endpoints/eth-get-transaction-receipt) |
| [`eth_getUncleByBlockHashAndIndex`](/docs/chains/monad/monad-api-endpoints/eth-get-uncle-by-block-hash-and-index) | [`eth_getUncleByBlockNumberAndIndex`](/docs/chains/monad/monad-api-endpoints/eth-get-uncle-by-block-number-and-index) |
| [`eth_getUncleCountByBlockHash`](/docs/chains/monad/monad-api-endpoints/eth-get-uncle-count-by-block-hash) | [`eth_getUncleCountByBlockNumber`](/docs/chains/monad/monad-api-endpoints/eth-get-uncle-count-by-block-number) |
| [`eth_maxPriorityFeePerGas`](/docs/chains/monad/monad-api-endpoints/eth-max-priority-fee-per-gas) | [`eth_newBlockFilter`](/docs/chains/monad/monad-api-endpoints/eth-new-block-filter)         |
| [`eth_newFilter`](/docs/chains/monad/monad-api-endpoints/eth-new-filter)                        | [`eth_newPendingTransactionFilter`](/docs/chains/monad/monad-api-endpoints/eth-new-pending-transaction-filter) |
| [`eth_protocolVersion`](/docs/chains/monad/monad-api-endpoints/eth-protocol-version)            | [`eth_sendRawTransaction`](/docs/chains/monad/monad-api-endpoints/eth-send-raw-transaction) |
| [`eth_sendRawTransactionSync`](/docs/chains/monad/monad-api-endpoints/eth-send-raw-transaction-sync) | [`eth_submitWork`](/docs/chains/monad/monad-api-endpoints/eth-submit-work)                  |
| [`eth_subscribe`](/docs/chains/monad/monad-api-endpoints/eth-subscribe)                         | [`eth_syncing`](/docs/chains/monad/monad-api-endpoints/eth-syncing)                         |
| [`eth_uninstallFilter`](/docs/chains/monad/monad-api-endpoints/eth-uninstall-filter)            | [`eth_unsubscribe`](/docs/chains/monad/monad-api-endpoints/eth-unsubscribe)                 |
| [`net_listening`](/docs/chains/monad/monad-api-endpoints/net-listening)                         | [`net_version`](/docs/chains/monad/monad-api-endpoints/net-version)                         |
| [`txpool_content`](/docs/chains/monad/monad-api-endpoints/txpool-content)                       | [`web3_clientVersion`](/docs/chains/monad/monad-api-endpoints/web-3-client-version)         |
| [`web3_sha3`](/docs/chains/monad/monad-api-endpoints/web-3-sha-3)                               |                                                                                             |

## Related APIs

The following Alchemy APIs are also supported on Monad:

* [Bundler API](/docs/wallets/transactions/low-level-infra/bundler/overview)
* [Gas Manager API](/docs/wallets/api-reference/gas-manager-admin-api/gas-abstraction-api-endpoints/alchemy-request-gas-and-paymaster-and-data)
* [Token API](/docs/reference/token-api-overview)
* [Transfers API](/docs/reference/transfers-api-quickstart)
* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)
* [NFT API](/docs/reference/nft-api-overview)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-testnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blobBaseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns the base fee per blob gas in wei for the current block.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-blob-base-fee

## Result

**Blob Base Fee** (string): The base fee per blob gas, in wei, as a hexadecimal encoded unsigned integer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blobBaseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_callMany

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Executes a list of transaction bundles without creating transactions on the blockchain. This method is particularly useful for simulating transactions to understand their potential outcomes. It supports simulating transactions at an intermediate state of a block, simulating multiple transactions with sequential dependencies, and overwriting block headers.


Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-call-many

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Bundles | object[] | Yes | A list of bundles where each bundle contains transactions and optional block overrides.  |
| Simulation context | object | Yes | The context for the simulation, specifying the blockNumber or Tag and transactionIndex.  |
| State overrides | object | No | An optional mapping for state overrides, following the eth_call standard.  |
| Timeout | integer | No | The maximum running time for the simulations in milliseconds, defaulting to 5000 milliseconds.  |

## Result

**Call results** (object[][]): A list of lists containing either the return value of the executed contract call or the reverted error code. Each bundle returns an array with one result per transaction. 

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "from": "0x1985ea6e9c68e1c272d8209f3b478ac2fdb25c87",
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gas": "0x0f4240",
            "gasPrice": "0x7896e72a",
            "data": "0xa9059cbb000000000000000000000000bc0e63965946815d105e7591407704e6e1964e590000000000000000000000000000000000000000000000000000000005f5e100"
          },
          {
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gasPrice": "0x7896e72a",
            "data": "0x70a08231000000000000000000000000bc0e63965946815d105e7591407704e6e1964e59"
          }
        ],
        "blockOverride": {
          "blockNumber": "0xbb5fe9"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    [
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000000000001"
      },
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000005f5e100"
      }
    ]
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "type": "string",
            "nonce": "string",
            "to": null,
            "from": "string",
            "gas": "string",
            "value": "string",
            "input": "string",
            "gasPrice": "string",
            "maxPriorityFeePerGas": "string",
            "maxFeePerGas": "string",
            "maxFeePerBlobGas": "string",
            "accessList": [
              {
                "address": "string",
                "storageKeys": [
                  "string"
                ]
              }
            ],
            "blobVersionedHashes": [
              "string"
            ],
            "blobs": [
              "string"
            ],
            "chainId": "string"
          }
        ],
        "blockOverride": {
          "blockNumber": "string",
          "blockHash": "string",
          "coinbase": "string",
          "timestamp": "string",
          "difficulty": "string",
          "gasLimit": "string",
          "baseFee": "string"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-testnet.g.alchemy.com/v2/{apiKey}

Retrieves account information including balance, code, and nonce for a given address at a specified block.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the account information. |

## Result

**Account information** (object): An object containing the account's balance, code, and nonce.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "balance": "0x1cfe56f3795885980000",
    "code": "0x",
    "nonce": "0x5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_newPendingTransactionFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new pending transactions arrive.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-new-pending-transaction-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newPendingTransactionFilter"
}'
```



------

# eth_protocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current protocol version used by the client.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-protocol-version

## Result

**Protocol Version** (string): The protocol version as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3f",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_protocolVersion"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_sendRawTransactionSync

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Sends a raw transaction to the network and waits for the transaction to be mined.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-send-raw-transaction-sync

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction data | string | Yes | The signed transaction data, RLP-encoded and hex-encoded. |
| Timeout | integer | No | Maximum wait time in milliseconds. Must be a positive integer between 1 and the node-configured maximum timeout. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "transactionHash": "0x1234abcd...",
    "blockHash": "0xabcd1234...",
    "blockNumber": "0x10d4f",
    "cumulativeGasUsed": "0x5208",
    "gasUsed": "0x5208",
    "contractAddress": null,
    "logs": [],
    "status": "0x1"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# txpool_content

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of the exact details of all transactions currently pending for inclusion in the next blocks, as well as ones that are being scheduled for future execution.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/txpool-content

## Result

**content** (object): Object with pending and queued transactions grouped by sender address and nonce.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "txpool_content"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://monad-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/monad/monad-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://monad-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Monad API FAQ

> Frequently asked questions about the Monad API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Monad Chain?

Monad Chain is a high-performance, Layer 1 blockchain that fully supports the Ethereum Virtual Machine (EVM). It uses parallel execution and the MonadBFT consensus to achieve 10,000 TPS, 500 ms block times, and 1-second finality—all while keeping node hardware requirements low for greater decentralization.

## What is the Monad Chain API?

The Monad Chain API facilitates interaction with the Monad Chain network through a collection of JSON-RPC methods. It provides developers with tools to interact with the blockchain, enabling functionalities such as transactions, smart contract deployment, and data retrieval.

## How can I get started using the Monad Chain API?

Explained in [Monad Chain API Quickstart](/docs/reference/monad-api-quickstart).

## Is Monad Chain EVM compatible?

Yes. Monad Chain is 100% EVM-compatible at the bytecode level, enabling existing Ethereum smart contracts to run without modifications and work seamlessly with Ethereum’s tooling ecosystem.

## What API does Monad Chain use?

Monad Chain uses the JSON-RPC API standard for blockchain interactions. This is the same standard used by Ethereum.

## What is a Monad Chain API key?

When you access the Monad Chain network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network.

For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!

## Which libraries support Monad Chain?

Common Ethereum libraries such as ethers.js, web3.js, and viem are supported, enabling smart contract interaction and wallet management.

## What programming languages work with Monad Chain?

It supports Solidity and Vyper for smart contracts, along with JavaScript and TypeScript for offchain development, ensuring compatibility with projects that compile to EVM bytecode.

## What does Monad Chain use for gas?

The native token, MONAD, is used for transaction fees. The network implements an EIP-1559-like fee mechanism that adjusts base fees dynamically while allowing users to tip for priority.

## What methods does Alchemy support for the Monad Chain API?

You can find the list of all the methods Alchemy supports for the Monad Chain API on the [Monad API Endpoints](/docs/chains#monad-apis) page.

## My question isn't here, where can I get help?

If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Moonbeam API Quickstart

> How to get started building on Moonbeam using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Moonbeam is an Ethereum-compatible smart-contract parachain on Polkadot that pairs full EVM tooling with native cross-chain interoperability (XCM/XC-20) for building connected dApps.

The Moonbeam API lets you interact with the Moonbeam network through a set of JSON-RPC methods. If you've worked with Ethereum's JSON-RPC APIs, the design will feel familiar.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Moonbeam client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { moonbeam } from "viem/chains";

const client = createPublicClient({
  chain: moonbeam,
  transport: http("https://moonbeam-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (GLMR):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Moonbeam APIs

For the full list of Moonbeam APIs, see the [Moonbeam API Endpoints](/docs/chains#moonbeam-apis).

------

# Moonbeam API Overview

> Overview of available Moonbeam API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Moonbeam APIs

📙 Get started with our [Moonbeam API Quickstart Guide](/docs/reference/moonbeam-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-accounts)                     | [`eth_blockNumber`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-block-number)          |
| [`eth_call`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-call)                             | [`eth_chainId`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-chain-id)                  |
| [`eth_estimateGas`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-estimate-gas)              | [`eth_feeHistory`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-fee-history)            |
| [`eth_fillTransaction`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-fill-transaction)      | [`eth_gasPrice`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-gas-price)                |
| [`eth_getAccount`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-account)                | [`eth_getAccountInfo`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-account-info)   |
| [`eth_getBalance`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-balance)                | [`eth_getBlockByHash`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-block-by-hash)  |
| [`eth_getBlockByNumber`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-block-by-number)  | [`eth_getBlockReceipts`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-block-receipts) |
| [`eth_getBlockTransactionCountByHash`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-block-transaction-count-by-hash) | [`eth_getBlockTransactionCountByNumber`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-block-transaction-count-by-number) |
| [`eth_getCode`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-code)                      | [`eth_getFilterChanges`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-filter-changes) |
| [`eth_getFilterLogs`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-filter-logs)         | [`eth_getLogs`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-logs)                  |
| [`eth_getRawTransactionByHash`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-raw-transaction-by-hash) | [`eth_getStorageAt`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-storage-at)       |
| [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-transaction-by-block-hash-and-index) | [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-transaction-by-block-number-and-index) |
| [`eth_getTransactionByHash`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-transaction-by-hash) | [`eth_getTransactionCount`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-transaction-count) |
| [`eth_getTransactionReceipt`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-transaction-receipt) | [`eth_getUncleCountByBlockHash`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-uncle-count-by-block-hash) |
| [`eth_getUncleCountByBlockNumber`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-uncle-count-by-block-number) | [`eth_maxPriorityFeePerGas`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-max-priority-fee-per-gas) |
| [`eth_newBlockFilter`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-new-block-filter)       | [`eth_newFilter`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-new-filter)              |
| [`eth_protocolVersion`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-protocol-version)      | [`eth_sendRawTransaction`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-send-raw-transaction) |
| [`eth_submitWork`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-submit-work)                | [`eth_subscribe`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-subscribe)               |
| [`eth_syncing`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-syncing)                       | [`eth_uninstallFilter`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-uninstall-filter)  |
| [`eth_unsubscribe`](/docs/chains/moonbeam/moonbeam-api-endpoints/eth-unsubscribe)               | [`net_listening`](/docs/chains/moonbeam/moonbeam-api-endpoints/net-listening)               |
| [`net_version`](/docs/chains/moonbeam/moonbeam-api-endpoints/net-version)                       | [`web3_clientVersion`](/docs/chains/moonbeam/moonbeam-api-endpoints/web-3-client-version)   |
| [`web3_sha3`](/docs/chains/moonbeam/moonbeam-api-endpoints/web-3-sha-3)                         |                                                                                             |

## Related APIs

The following Alchemy APIs are also supported on Moonbeam:

* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves account information including balance, code, and nonce for a given address at a specified block.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the account information. |

## Result

**Account information** (object): An object containing the account's balance, code, and nonce.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "balance": "0x1cfe56f3795885980000",
    "code": "0x",
    "nonce": "0x5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_protocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current protocol version used by the client.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-protocol-version

## Result

**Protocol Version** (string): The protocol version as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3f",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_protocolVersion"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://moonbeam-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/moonbeam/moonbeam-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://moonbeam-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Moonbeam API FAQ

> Frequently asked questions about the Moonbeam API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Moonbeam?
Moonbeam is an Ethereum-compatible smart-contract parachain on Polkadot that pairs full EVM tooling with native cross-chain interoperability (XCM/XC-20) for building connected dApps.

## How do I get started with Moonbeam?
Check out our [Moonbeam API Quickstart guide](/docs/reference/moonbeam-api-quickstart) to get started building on Moonbeam.

## What is the Moonbeam API?
The Moonbeam API lets you interface with the Moonbeam mainnet. You can execute transactions, query onchain data, and interact with the Moonbeam network using the JSON-RPC standard.

## Is Moonbeam EVM compatible?
Yes, Moonbeam is EVM compatible.

## What API does Moonbeam use?
Moonbeam uses the JSON-RPC API standard. This API handles all blockchain interaction on the Moonbeam network, letting you read block/transaction data, query chain information, execute smart contracts, and store data onchain.

## What methods are supported on Moonbeam?
Moonbeam supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Moonbeam API Endpoints](/docs/chains#moonbeam-apis) for a complete list.

## What is a Moonbeam API key?
When you access the Moonbeam network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!

## Which libraries support Moonbeam?
Common Ethereum libraries like [ethers.js](https://docs.ethers.org/v5/) should be compatible with Moonbeam, given its EVM nature.

## My question isn’t here, where can I get help?
If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Mythos API Quickstart

> How to get started building on Mythos and using the JSON-RPC API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

*To use the Mythos API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*

## What is Mythos Chain?

Mythos Chain is an EVM-compatible blockchain built for gaming, powering decentralized game economies, unified NFT marketplaces, and multi-token ecosystems through the MYTH token.

## What is the Mythos API?

The Mythos API lets you interact with the Mythos network through a set of JSON-RPC methods. If you've worked with Ethereum's JSON-RPC APIs, the design will feel familiar.

## Getting started

### 1. Choose a package manager (npm or yarn)

Select a package manager to manage your project's dependencies. Choose between `npm` and `yarn` based on your preference or project requirements.

<CodeGroup>
  ```shell npm
  # Begin with npm by following the npm documentation
  # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
  ```

  ```shell yarn
  # For yarn, refer to yarn's installation guide
  # https://classic.yarnpkg.com/lang/en/docs/install
  ```
</CodeGroup>

### 2. Set up your project

Open your terminal and execute the following commands to create and initialize your project:

<CodeGroup>
  ```shell npm
  mkdir mythos-api-quickstart
  cd mythos-api-quickstart
  npm init --yes
  ```

  ```shell yarn
  mkdir mythos-api-quickstart
  cd mythos-api-quickstart
  yarn init --yes
  ```
</CodeGroup>

This creates a new directory named `mythos-api-quickstart` and initializes a Node.js project within it.

### 3. Make your first request

Install Axios, a popular HTTP client, to make API requests:

<CodeGroup>
  ```shell npm
  npm install axios
  ```

  ```shell yarn
  yarn add axios
  ```
</CodeGroup>

Create an `index.js` file in your project directory and paste the following code:

<CodeGroup>
  ```javascript index.js
  const axios = require('axios');

  const url = 'https://mythos-mainnet.g.alchemy.com/v2/your-api-key';

  const payload = {
    jsonrpc: '2.0',
    id: 1,
    method: 'eth_blockNumber',
    params: []
  };

  axios.post(url, payload)
    .then(response => {
      console.log('Latest Block:', response.data.result);
    })
    .catch(error => {
      console.error(error);
    });
  ```
</CodeGroup>

Remember to replace `your-api-key` with your actual Alchemy API key that you can get from the [Alchemy Dashboard](https://dashboard.alchemy.com/signup).

### 4. Run your script

Execute your script to make a request to the Mythos network:

<CodeGroup>
  ```shell shell
  node index.js
  ```
</CodeGroup>

You should see the latest block information from Mythos's network outputted to your console:

<CodeGroup>
  ```shell shell
  Latest Block: 0x...
  ```
</CodeGroup>

## Next steps

You've made your first request to the Mythos network. You can now explore the various JSON-RPC methods available on Mythos and start building your dApps on this platform.

------

# Mythos API Overview

> Overview of available Mythos API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Mythos APIs

📙 Get started with our [Mythos API Quickstart Guide](/docs/reference/mythos-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/mythos/mythos-api-endpoints/eth-accounts)                         | [`eth_blobBaseFee`](/docs/chains/mythos/mythos-api-endpoints/eth-blob-base-fee)             |
| [`eth_blockNumber`](/docs/chains/mythos/mythos-api-endpoints/eth-block-number)                  | [`eth_call`](/docs/chains/mythos/mythos-api-endpoints/eth-call)                             |
| [`eth_chainId`](/docs/chains/mythos/mythos-api-endpoints/eth-chain-id)                          | [`eth_createAccessList`](/docs/chains/mythos/mythos-api-endpoints/eth-create-access-list)   |
| [`eth_estimateGas`](/docs/chains/mythos/mythos-api-endpoints/eth-estimate-gas)                  | [`eth_feeHistory`](/docs/chains/mythos/mythos-api-endpoints/eth-fee-history)                |
| [`eth_gasPrice`](/docs/chains/mythos/mythos-api-endpoints/eth-gas-price)                        | [`eth_getAccount`](/docs/chains/mythos/mythos-api-endpoints/eth-get-account)                |
| [`eth_getBalance`](/docs/chains/mythos/mythos-api-endpoints/eth-get-balance)                    | [`eth_getBlockByHash`](/docs/chains/mythos/mythos-api-endpoints/eth-get-block-by-hash)      |
| [`eth_getBlockByNumber`](/docs/chains/mythos/mythos-api-endpoints/eth-get-block-by-number)      | [`eth_getBlockReceipts`](/docs/chains/mythos/mythos-api-endpoints/eth-get-block-receipts)   |
| [`eth_getBlockTransactionCountByHash`](/docs/chains/mythos/mythos-api-endpoints/eth-get-block-transaction-count-by-hash) | [`eth_getBlockTransactionCountByNumber`](/docs/chains/mythos/mythos-api-endpoints/eth-get-block-transaction-count-by-number) |
| [`eth_getCode`](/docs/chains/mythos/mythos-api-endpoints/eth-get-code)                          | [`eth_getFilterChanges`](/docs/chains/mythos/mythos-api-endpoints/eth-get-filter-changes)   |
| [`eth_getFilterLogs`](/docs/chains/mythos/mythos-api-endpoints/eth-get-filter-logs)             | [`eth_getLogs`](/docs/chains/mythos/mythos-api-endpoints/eth-get-logs)                      |
| [`eth_getProof`](/docs/chains/mythos/mythos-api-endpoints/eth-get-proof)                        | [`eth_getRawTransactionByHash`](/docs/chains/mythos/mythos-api-endpoints/eth-get-raw-transaction-by-hash) |
| [`eth_getStorageAt`](/docs/chains/mythos/mythos-api-endpoints/eth-get-storage-at)               | [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/mythos/mythos-api-endpoints/eth-get-transaction-by-block-hash-and-index) |
| [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/mythos/mythos-api-endpoints/eth-get-transaction-by-block-number-and-index) | [`eth_getTransactionByHash`](/docs/chains/mythos/mythos-api-endpoints/eth-get-transaction-by-hash) |
| [`eth_getTransactionCount`](/docs/chains/mythos/mythos-api-endpoints/eth-get-transaction-count) | [`eth_getTransactionReceipt`](/docs/chains/mythos/mythos-api-endpoints/eth-get-transaction-receipt) |
| [`eth_getUncleByBlockHashAndIndex`](/docs/chains/mythos/mythos-api-endpoints/eth-get-uncle-by-block-hash-and-index) | [`eth_getUncleByBlockNumberAndIndex`](/docs/chains/mythos/mythos-api-endpoints/eth-get-uncle-by-block-number-and-index) |
| [`eth_getUncleCountByBlockHash`](/docs/chains/mythos/mythos-api-endpoints/eth-get-uncle-count-by-block-hash) | [`eth_getUncleCountByBlockNumber`](/docs/chains/mythos/mythos-api-endpoints/eth-get-uncle-count-by-block-number) |
| [`eth_maxPriorityFeePerGas`](/docs/chains/mythos/mythos-api-endpoints/eth-max-priority-fee-per-gas) | [`eth_newBlockFilter`](/docs/chains/mythos/mythos-api-endpoints/eth-new-block-filter)       |
| [`eth_newFilter`](/docs/chains/mythos/mythos-api-endpoints/eth-new-filter)                      | [`eth_newPendingTransactionFilter`](/docs/chains/mythos/mythos-api-endpoints/eth-new-pending-transaction-filter) |
| [`eth_sendRawTransaction`](/docs/chains/mythos/mythos-api-endpoints/eth-send-raw-transaction)   | [`eth_simulateV1`](/docs/chains/mythos/mythos-api-endpoints/eth-simulate-v-1)               |
| [`eth_submitWork`](/docs/chains/mythos/mythos-api-endpoints/eth-submit-work)                    | [`eth_subscribe`](/docs/chains/mythos/mythos-api-endpoints/eth-subscribe)                   |
| [`eth_uninstallFilter`](/docs/chains/mythos/mythos-api-endpoints/eth-uninstall-filter)          | [`eth_unsubscribe`](/docs/chains/mythos/mythos-api-endpoints/eth-unsubscribe)               |
| [`net_version`](/docs/chains/mythos/mythos-api-endpoints/net-version)                           | [`web3_clientVersion`](/docs/chains/mythos/mythos-api-endpoints/web-3-client-version)       |
| [`web3_sha3`](/docs/chains/mythos/mythos-api-endpoints/web-3-sha-3)                             |                                                                                             |

## Related APIs

The following Alchemy APIs are also supported on Mythos:

* [Bundler API](/docs/wallets/transactions/low-level-infra/bundler/overview)
* [Gas Manager API](/docs/wallets/api-reference/gas-manager-admin-api/gas-abstraction-api-endpoints/alchemy-request-gas-and-paymaster-and-data)
* [Token API](/docs/reference/token-api-overview)
* [Transfers API](/docs/reference/transfers-api-quickstart)
* [Debug API](/docs/reference/debug-api-quickstart)
* [NFT API](/docs/reference/nft-api-overview)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blobBaseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the base fee per blob gas in wei for the current block.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-blob-base-fee

## Result

**Blob Base Fee** (string): The base fee per blob gas, in wei, as a hexadecimal encoded unsigned integer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blobBaseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_newPendingTransactionFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new pending transactions arrive.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-new-pending-transaction-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newPendingTransactionFilter"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_simulateV1

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Enables simulation of complex transactions and state changes without modifying the blockchain.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-simulate-v-1

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Simulation object | object | Yes | The object containing all simulation details such as calls, overrides, etc. |

## Result

**Simulation result** (object[]): The result of the simulation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "baseFeePerGas": "0x9",
      "blobGasUsed": "0x0",
      "calls": [
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000001"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
              "transactionIndex": "0x0",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x0",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        },
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000002"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd",
              "transactionIndex": "0x1",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x1",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        }
      ],
      "difficulty": "0x0",
      "excessBlobGas": "0x3b80000",
      "extraData": "0x",
      "gasLimit": "0x22550dd",
      "gasUsed": "0xa410",
      "hash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "miner": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
      "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "nonce": "0x0000000000000000",
      "number": "0x1530a5e",
      "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "parentHash": "0x513a0aa73024f294cdbcb0312af0c920850035f0552d7349ebb30717de30b1cc",
      "receiptsRoot": "0x75308898d571eafb5cd8cde8278bf5b3d13c5f6ec074926de3bb895b519264e1",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "size": "0x29c",
      "stateRoot": "0x65ea44c8bd5f9edbf269b6446b460b3e7378abb25c78fd5d70f0e2ef59296b25",
      "timestamp": "0x67f43327",
      "transactions": [
        "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
        "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd"
      ],
      "transactionsRoot": "0xd6902f31ae9d2169b77cd88611c6afd691ea5a7e604e44c71f663fda0c5d1c28",
      "uncles": [],
      "withdrawals": [],
      "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    }
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://mythos-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/mythos/mythos-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://mythos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Mythos API FAQ

> Frequently asked questions about the Mythos API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Mythos?
Mythos Chain is an EVM-compatible blockchain built for gaming, powering decentralized game economies, unified NFT marketplaces, and multi-token ecosystems through the MYTH token.

## How do I get started with Mythos?
Check out our [Mythos API Quickstart guide](/docs/reference/mythos-api-quickstart) to get started building on Mythos.

## What is the Mythos API?
The Mythos API lets you interface with the Mythos network. You can execute transactions, query onchain data, and interact with the Mythos network using the JSON-RPC standard.

## Is Mythos EVM compatible?
Yes, Mythos is EVM compatible.

## What API does Mythos use?
Mythos uses the JSON-RPC API standard. This API handles all blockchain interaction on the Mythos network, letting you read block/transaction data, query chain information, execute smart contracts, and store data onchain.

## What methods are supported on Mythos?
Mythos supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the Mythos API endpoints documentation for a complete list.

## What is a Mythos API key?
When you access the Mythos network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!

## Which libraries support Mythos?
Common Ethereum libraries like [ethers.js](https://docs.ethers.org/v5/) should be compatible with Mythos, given its EVM nature.

## My question isn’t here, where can I get help?
If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# OP Mainnet API Quickstart

> How to get started building on OP Mainnet using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

OP Mainnet (Optimism) is a Layer 2 scaling solution for Ethereum that leverages optimistic rollups to provide fast and low-cost transactions. As the foundation of the Optimism Superchain, OP Mainnet offers a secure and scalable environment for deploying Ethereum-based applications.

The OP Mainnet API lets you interact with the OP Mainnet network through a collection of JSON-RPC methods. If you're familiar with Ethereum's JSON-RPC APIs, working with OP Mainnet will feel natural.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an OP Mainnet client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { optimism } from "viem/chains";

const client = createPublicClient({
  chain: optimism,
  transport: http("https://opt-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (ETH):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# OP Mainnet APIs

For the full list of OP Mainnet APIs, see the [OP Mainnet API Endpoints](/docs/chains#op-mainnet-apis).

------

# OP Mainnet API Overview

> Overview of available OP Mainnet API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## OP Mainnet APIs

📙 Get started with our [OP Mainnet API Quickstart Guide](/docs/reference/op-mainnet-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-accounts)                 | [`eth_blockNumber`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-block-number)      |
| [`eth_call`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-call)                         | [`eth_callMany`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-call-many)            |
| [`eth_chainId`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-chain-id)                  | [`eth_createAccessList`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-create-access-list) |
| [`eth_estimateGas`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-estimate-gas)          | [`eth_feeHistory`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-fee-history)        |
| [`eth_fillTransaction`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-fill-transaction)  | [`eth_gasPrice`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-gas-price)            |
| [`eth_getAccount`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-account)            | [`eth_getAccountInfo`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-account-info) |
| [`eth_getBalance`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-balance)            | [`eth_getBlockByHash`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-block-by-hash) |
| [`eth_getBlockByNumber`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-block-by-number) | [`eth_getBlockReceipts`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-block-receipts) |
| [`eth_getBlockTransactionCountByHash`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-block-transaction-count-by-hash) | [`eth_getBlockTransactionCountByNumber`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-block-transaction-count-by-number) |
| [`eth_getCode`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-code)                  | [`eth_getFilterChanges`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-filter-changes) |
| [`eth_getFilterLogs`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-filter-logs)     | [`eth_getLogs`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-logs)              |
| [`eth_getProof`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-proof)                | [`eth_getRawTransactionByHash`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-raw-transaction-by-hash) |
| [`eth_getStorageAt`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-storage-at)       | [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-transaction-by-block-hash-and-index) |
| [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-transaction-by-block-number-and-index) | [`eth_getTransactionByHash`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-transaction-by-hash) |
| [`eth_getTransactionCount`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-transaction-count) | [`eth_getTransactionReceipt`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-transaction-receipt) |
| [`eth_getUncleByBlockHashAndIndex`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-uncle-by-block-hash-and-index) | [`eth_getUncleByBlockNumberAndIndex`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-uncle-by-block-number-and-index) |
| [`eth_getUncleCountByBlockHash`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-uncle-count-by-block-hash) | [`eth_getUncleCountByBlockNumber`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-uncle-count-by-block-number) |
| [`eth_maxPriorityFeePerGas`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-max-priority-fee-per-gas) | [`eth_newBlockFilter`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-new-block-filter) |
| [`eth_newFilter`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-new-filter)              | [`eth_protocolVersion`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-protocol-version) |
| [`eth_sendRawTransaction`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-send-raw-transaction) | [`eth_sendRawTransactionSync`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-send-raw-transaction-sync) |
| [`eth_simulateV1`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-simulate-v-1)           | [`eth_submitWork`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-submit-work)        |
| [`eth_subscribe`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-subscribe)               | [`eth_syncing`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-syncing)               |
| [`eth_uninstallFilter`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-uninstall-filter)  | [`eth_unsubscribe`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-unsubscribe)       |
| [`net_listening`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/net-listening)               | [`net_version`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/net-version)               |
| [`web3_clientVersion`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/web-3-client-version)   | [`web3_sha3`](/docs/chains/op-mainnet/op-mainnet-api-endpoints/web-3-sha-3)                 |

## Related APIs

The following Alchemy APIs are also supported on OP Mainnet:

* [Bundler API](/docs/wallets/transactions/low-level-infra/bundler/overview)
* [Gas Manager API](/docs/wallets/api-reference/gas-manager-admin-api/gas-abstraction-api-endpoints/alchemy-request-gas-and-paymaster-and-data)
* [Token API](/docs/reference/token-api-overview)
* [Transfers API](/docs/reference/transfers-api-quickstart)
* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)
* [NFT API](/docs/reference/nft-api-overview)
* [UserOp Simulation API](/docs/wallets/api-reference/bundler-api/useroperation-simulation-endpoints/alchemy-simulate-user-operation-asset-changes)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_callMany

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Executes a list of transaction bundles without creating transactions on the blockchain. This method is particularly useful for simulating transactions to understand their potential outcomes. It supports simulating transactions at an intermediate state of a block, simulating multiple transactions with sequential dependencies, and overwriting block headers.


Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-call-many

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Bundles | object[] | Yes | A list of bundles where each bundle contains transactions and optional block overrides.  |
| Simulation context | object | Yes | The context for the simulation, specifying the blockNumber or Tag and transactionIndex.  |
| State overrides | object | No | An optional mapping for state overrides, following the eth_call standard.  |
| Timeout | integer | No | The maximum running time for the simulations in milliseconds, defaulting to 5000 milliseconds.  |

## Result

**Call results** (object[][]): A list of lists containing either the return value of the executed contract call or the reverted error code. Each bundle returns an array with one result per transaction. 

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "from": "0x1985ea6e9c68e1c272d8209f3b478ac2fdb25c87",
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gas": "0x0f4240",
            "gasPrice": "0x7896e72a",
            "data": "0xa9059cbb000000000000000000000000bc0e63965946815d105e7591407704e6e1964e590000000000000000000000000000000000000000000000000000000005f5e100"
          },
          {
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gasPrice": "0x7896e72a",
            "data": "0x70a08231000000000000000000000000bc0e63965946815d105e7591407704e6e1964e59"
          }
        ],
        "blockOverride": {
          "blockNumber": "0xbb5fe9"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    [
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000000000001"
      },
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000005f5e100"
      }
    ]
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "type": "string",
            "nonce": "string",
            "to": null,
            "from": "string",
            "gas": "string",
            "value": "string",
            "input": "string",
            "gasPrice": "string",
            "maxPriorityFeePerGas": "string",
            "maxFeePerGas": "string",
            "maxFeePerBlobGas": "string",
            "accessList": [
              {
                "address": "string",
                "storageKeys": [
                  "string"
                ]
              }
            ],
            "blobVersionedHashes": [
              "string"
            ],
            "blobs": [
              "string"
            ],
            "chainId": "string"
          }
        ],
        "blockOverride": {
          "blockNumber": "string",
          "blockHash": "string",
          "coinbase": "string",
          "timestamp": "string",
          "difficulty": "string",
          "gasLimit": "string",
          "baseFee": "string"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves account information including balance, code, and nonce for a given address at a specified block.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the account information. |

## Result

**Account information** (object): An object containing the account's balance, code, and nonce.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "balance": "0x1cfe56f3795885980000",
    "code": "0x",
    "nonce": "0x5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_protocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current protocol version used by the client.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-protocol-version

## Result

**Protocol Version** (string): The protocol version as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3f",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_protocolVersion"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_sendRawTransactionSync

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Sends a raw transaction to the network and waits for the transaction to be mined.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-send-raw-transaction-sync

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction data | string | Yes | The signed transaction data, RLP-encoded and hex-encoded. |
| Timeout | integer | No | Maximum wait time in milliseconds. Must be a positive integer between 1 and the node-configured maximum timeout. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "transactionHash": "0x1234abcd...",
    "blockHash": "0xabcd1234...",
    "blockNumber": "0x10d4f",
    "cumulativeGasUsed": "0x5208",
    "gasUsed": "0x5208",
    "contractAddress": null,
    "logs": [],
    "status": "0x1"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransactionSync",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
    5000
  ]
}'
```



------

# eth_simulateV1

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Enables simulation of complex transactions and state changes without modifying the blockchain.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-simulate-v-1

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Simulation object | object | Yes | The object containing all simulation details such as calls, overrides, etc. |

## Result

**Simulation result** (object[]): The result of the simulation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "baseFeePerGas": "0x9",
      "blobGasUsed": "0x0",
      "calls": [
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000001"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
              "transactionIndex": "0x0",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x0",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        },
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000002"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd",
              "transactionIndex": "0x1",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x1",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        }
      ],
      "difficulty": "0x0",
      "excessBlobGas": "0x3b80000",
      "extraData": "0x",
      "gasLimit": "0x22550dd",
      "gasUsed": "0xa410",
      "hash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "miner": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
      "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "nonce": "0x0000000000000000",
      "number": "0x1530a5e",
      "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "parentHash": "0x513a0aa73024f294cdbcb0312af0c920850035f0552d7349ebb30717de30b1cc",
      "receiptsRoot": "0x75308898d571eafb5cd8cde8278bf5b3d13c5f6ec074926de3bb895b519264e1",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "size": "0x29c",
      "stateRoot": "0x65ea44c8bd5f9edbf269b6446b460b3e7378abb25c78fd5d70f0e2ef59296b25",
      "timestamp": "0x67f43327",
      "transactions": [
        "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
        "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd"
      ],
      "transactionsRoot": "0xd6902f31ae9d2169b77cd88611c6afd691ea5a7e604e44c71f663fda0c5d1c28",
      "uncles": [],
      "withdrawals": [],
      "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    }
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opt-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opt-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# OP Mainnet Flashblocks API quickstart

> Get started building on Optimism using Flashblocks

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What are Flashblocks?

Flashblocks on Optimism are a transaction preconfirmation feature that provides near-instant transaction feedback by streaming partial block updates every 200 milliseconds. This significantly reduces the effective block time from Optimism's standard 2 seconds to 200 milliseconds, a 10x improvement.

Flashblocks is great for developers who demand instant UX such as decentralized exchanges, onchain gaming, and other high-frequency applications.

## Getting started

Flashblocks is currently supported on both Optimism Sepolia testnet and mainnet and can be accessed using your existing **Alchemy Optimism** RPC.

| Network       | Flashblocks Availability |
|---------------|---------------------------|
| Optimism Sepolia  | ✅                        |
| Optimism Mainnet  | ✅                        |

## Flashblocks-enabled API endpoints

### [eth\_getBlockByNumber](https://www.alchemy.com/docs/node/op-mainnet/op-mainnet-api-endpoints/eth-get-block-by-number)

Use the `pending` tag to retrieve the latest Flashblock:

```bash
curl https://opt-sepolia.g.alchemy.com/v2/<YOUR_API_KEY> -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["pending",true],"id":1}'
```

#### Example Response

```bash
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "number": "0x1234",
    "hash": "0x...",
    "transactions": [...]
  }
}
```

### [eth\_getTransactionReceipt](https://www.alchemy.com/docs/node/op-mainnet/op-mainnet-api-endpoints/eth-get-transaction-receipt)

Use the existing receipt RPC to get preconfirmed receipts:

```bash
curl https://opt-sepolia.g.alchemy.com/v2/<YOUR_API_KEY> -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0x..."],"id":1}'
```

#### Example Response

```bash
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "transactionHash": "0x...",
    "blockNumber": "0x1234",
    "status": "0x1"
  }
}
```

### [eth\_getBalance](https://www.alchemy.com/docs/node/op-mainnet/op-mainnet-api-endpoints/eth-get-balance)

Use the `pending` tag to get the address balance in the latest Flashblock:

```bash
curl https://opt-sepolia.g.alchemy.com/v2/<YOUR_API_KEY> -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x...","pending"],"id":1}'
```

#### Example Response

```bash
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x0234"
}
```

### [eth\_getTransactionCount](https://www.alchemy.com/docs/node/op-mainnet/op-mainnet-api-endpoints/eth-get-transaction-count)

Use the `pending` tag to get the address nonce in the latest Flashblock:

```bash
curl https://opt-sepolia.g.alchemy.com/v2/<YOUR_API_KEY> -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params":["0x...","pending"],"id":1}'
```
#### Example Response

```bash
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x1b" // 27 transactions
}
```

### [eth\_getTransactionByHash](https://www.alchemy.com/docs/node/op-mainnet/op-mainnet-api-endpoints/eth-get-transaction-by-hash)

Use the existing get transaction by hash RPC to get preconfirmed transactions:

```bash
curl https://opt-sepolia.g.alchemy.com/v2/<YOUR_API_KEY> -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0x..."],"id":1}'
```

#### Example Response

```bash
{
  "type": "0x2",
  "chainId": "...",
  "nonce": "...",
  ...
}
```

### [eth\_call](https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-call)

Use the `pending` tag to execute a smart contract call against the latest Flashblock:

```bash
curl https://opt-sepolia.g.alchemy.com/v2/<YOUR_API_KEY> -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x...","data":"0x..."},"pending"],"id":1}'
```

#### Example Response

```bash
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x0000000000000000000000000000000000000000000000000000000000000001"
}
```

### [eth\_simulateV1](https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-simulate-v-1)

Use the `pending` tag to simulate transactions against the latest Flashblock:

```bash
curl https://opt-sepolia.g.alchemy.com/v2/<YOUR_API_KEY> -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_simulateV1","params":[{"blockStateCalls":[{"calls":[{"to":"0x...","data":"0x..."}],"stateOverrides":{}}],"traceTransfers":true,"validation":true},"pending"],"id":1}'
```

#### Example Response

```bash
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "calls": [
        {
          "status": "0x1",
          "gasUsed": "0x5208",
          "returnData": "0x"
        }
      ]
    }
  ]
}
```

### [eth\_estimateGas](https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-estimate-gas)

Use the `pending` tag to estimate gas against the latest Flashblock:

```bash
curl https://opt-sepolia.g.alchemy.com/v2/<YOUR_API_KEY> -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_estimateGas","params":[{"to":"0x...","data":"0x..."},"pending"],"id":1}'
```

#### Example Response

```bash
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x5208"
}
```

### [eth\_getLogs](https://www.alchemy.com/docs/chains/op-mainnet/op-mainnet-api-endpoints/eth-get-logs)

Use the `pending` tag for toBlock to retrieve logs from the latest Flashblock:

```bash
curl https://opt-sepolia.g.alchemy.com/v2/<YOUR_API_KEY> -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"fromBlock":"latest","toBlock":"pending","address":"0x...","topics":["0x..."]}],"id":1}'
```

#### Example Response

```bash
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "address": "0x...",
      "topics": ["0x..."],
      "data": "0x...",
      "blockNumber": "0x1234",
      "transactionHash": "0x...",
      "transactionIndex": "0x0",
      "blockHash": "0x...",
      "logIndex": "0x0",
      "removed": false
    }
  ]
}
```

------

# OP Mainnet API FAQ

> Frequently asked questions about the Optimism API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Optimism?

Optimism is a layer 2 [(L2) scaling solution for Ethereum](https://www.alchemy.com/overviews/ethereum-scaling-solutions). As an L2 solution, Optimism operates on top of Ethereum’s mainnet and can use Ethereum’s strong security while supporting Ethereum dApps. All transactions that occur on Optimism are eventually posted and validated on the Ethereum mainnet using Optimistic Rollups.

Founded by Jinglan Wang, Karl Floersch, and Kevin Ho in 2019, Optimism continues to grow as an L2 solution that offers higher throughput and reduced expenses compared to Ethereum.

## What is the Optimism API?

The Optimism API lets applications connect to an Optimism node that is part of the Optimism network. You can interact with onchain data and send different types of transactions to the network using the endpoints provided by the API. The API follows the JSON-RPC standard, a stateless, lightweight, remote procedure call (RPC) protocol encoded in JSON.

## How can I get started using the Optimism API?

Explained in the [Optimism API Quickstart Guide](/docs/reference/op-mainnet-api-quickstart##getting-started-instructions)

## What type of Layer 2 solution is Optimism?

As a Layer 2 solution, Optimism is an [Optimistic Rollup](https://www.alchemy.com/overviews/optimistic-rollups) network. Optimistic rollups (ORUs) run parallel to the Ethereum Mainnet. ORUs bundle multiple transactions into one transaction and send them back to the Ethereum Chain. Optimistic rollups assume all transactions are valid unless challenged by a fraud-proof, which makes the chain extremely scalable.

## Is Optimism EVM-compatible?

Yes! Optimism is fully compatible with all Solidity smart contracts and Ethereum libraries. As Optimism acts as a second layer operating on top of the main Ethereum network, it can utilize the [Ethereum Virtual Machine](https://www.alchemy.com/overviews/what-is-the-ethereum-virtual-machine-evm) just like Ethereum.

## What is the Optimistic Virtual Machine (OVM)?

The [Optimistic Virtual Machine (OVM)](https://www.alchemy.com/overviews/optimistic-virtual-machine) is an EVM-compatible virtual machine that executes transactions “optimistically,” which means it relies on the L1 chain to arbitrate disputes concerning the correctness of state transitions using fraud proofs.

## How do I add Optimism to MetaMask Mainnet?

Adding Optimism to Metamask takes four steps:

1. [Create a free Alchemy account](https://dashboard.alchemy.com/signup)
2. Create an API key
3. Choose custom RPC in Metamask
4. Fill in the Optimism network details

## What testnet should I use for Optimism?

Developers should use the Optimism Sepolia testnet and [a Sepolia faucet to get test ETH](https://www.alchemy.com/faucets/ethereum-sepolia) when testing Optimism applications.

If you sign in to your Alchemy account, you'll get additional test ETH allowances. Use testnet ETH to make sure your applications are working properly before putting them on the Optimism mainnet.

## How do I build an app on Optimism?

To start building a dApp on Optimism, [sign up for Alchemy](https://www.alchemy.com/layer2/optimism) and log in. Then select the “Apps” tab and “Create App”, and you’re ready to build your new app on the Optimism mainnet!

## How do you bridge Optimism to Ethereum?

You can find a number of [bridges to use on the Optimism site](https://www.optimism.io/apps/bridges). To use one of these bridges, connect your Metamask wallet to send and receive tokens between Optimism and Ethereum. [Cross-chain bridges ](https://alchemy.com/overviews/cross-chain-bridges)are instrumental components of the multi-chain future of blockchain.

## What wallets can be used on Optimism?

Many [Web3 wallets](https://www.alchemy.com/web3-wallets-overview) can be used on Optimism. As Optimism continues to grow, it supports many of the most popular wallets. Some wallets that people choose to use on Optimism include Metamask, Ledger Nano X, and SafePal S1.

## What does Optimism use for gas?

Optimism uses ETH tokens for gas, and because Optimism transactions are bundled using Optimistic Rollups, the gas costs to complete the transaction on the Optimism network are usually cheaper than native transactions on Ethereum.

## What projects are on Optimism?

Some of the most popular dApps on Optimism include Perpetual, Lyra, Synthetix, and Synapse.

Perpetual is a DeFi dApp that allows users to exchange perpetual contracts. Lyra, one of the first Dapps built natively on Optimism, is a crypto options exchange. Synthetix is a DeFi protocol built for trading derivatives trading, and Synapse is a cross-chain protocol for swapping assets between blockchains.

## How do you withdraw ETH from Optimism?

Withdrawing ETH from Optimism takes three steps: go to the [Optimism Gateway](https://gateway.optimism.io/), enter the amount you would like to remove from the network, and select “Withdraw”. Because Optimism uses fraud proofs, it takes 7 days for withdrawals to Ethereum to be completed.

## What API does Optimism use?

Optimism uses the JSON-RPC API standard. The Optimism JSON-RPC API serves as the backbone for the Optimism network and powers any blockchain interaction.

This API suite lets you read block/transaction data, query chain information, execute smart contracts, and store data onchain. You interact with Optimism’s base JSON-RPC APIs to communicate with its decentralized network of nodes.

## What is an Optimism API key?

When you access the Optimism network via a node provider, API providers like Alchemy require an API key to query the blockchain.

For the best development experience, we recommend that you [sign up for a free API key](https://www.alchemy.com/layer2/optimism)! With a dedicated API key, you can:

* access higher request throughput and increased concurrent requests
* query enhanced APIs, gaining access to free archive data, logs, and API abstractions
* leverage individualized usage metrics

## What programming languages work with Optimism?

Many programming languages work with Optimism including Go, JavaScript, Solidity, TypeScript, and Shell. JavaScript and Solidity are some of the best languages to use -- Solidity for smart contracts and JavaScript for offchain requests.

Before you get started, update your Optimism RPC URL to Alchemy.

## What methods does Alchemy support for the Optimism API?

You can find the list of all the methods Alchemy supports for the OP Mainnet API on the [OP Mainnet API Endpoints](/docs/chains#op-mainnet-apis) page.

## What is the transaction throughput on Optimism?

The Optimism sequencer has an additional limit on write requests or sending transactions. Here is the breakdown of throughput per tier:

| Tier       | Throughput               |
| ---------- | ------------------------ |
| Free       | 5 Transactions / Second  |
| Growth     | 15 Transactions / Second |
| Enterprise | 60 Transactions / Second |

## My question isn't here, where can I get help?

If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

***

# Optimism Bedrock Upgrade FAQ

## What is Optimism Bedrock Upgrade?

The Optimism Bedrock Upgrade is a significant update to the OP Stack, a set of free and open-source components that power Optimism. This upgrade enhances Ethereum equivalence, reduces transaction fees, shortens deposit times, improves proof modularity, and boosts node performance.

***

## What is the date for the upgrade?

The OP Mainnet upgrade to the Bedrock release will take place on **June 6, 2023 at 16:00 UTC.**

***

## How long will the upgrade take?

The expected time for the upgrade to take place is between 2-4 hours.

***

## Accessing data during an upgrade

You won't be able to send new transactions to the network during the upgrade. However, read access to the blockchain data through Alchemy will be available throughout the upgrade.

***

## What are the advantages of this upgrade?

1. **Lower Fees**: Through optimized data compression and the elimination of L1 execution gas, transaction fees are significantly reduced.
2. **Shorter Deposit Times**: With support for Layer-1 reorganizations, the waiting time for deposits is reduced. Deposits are expected to confirm within 3 minutes.
3. **Greater Ethereum Equivalence**: Bedrock is designed to mimic Ethereum as closely as possible, removing several deviations from Ethereum in the previous protocol and adding support for key Ethereum features.
4. **Improved Proof Modularity**: Bedrock separates the proof system from the OP Stack, enabling different proof systems to be used, enhancing the flexibility of the protocol.
5. **Enhanced Node Performance**: The upgrade enables multiple transactions in a single rollup block and removes the need for a separate "data transport layer" node to index L1, enhancing efficiency and performance.

------

# Optimism Error Codes

> Breakdown of error codes on Optimism and how to handle them

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## `429` Errors

| Error Code | Error Message                                                                                                                                                                                                                                                                                  | Solution                                                                                                                                                                                                                                                                                                                                                   |
| ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `429`      | `Your app has exceeded its compute units per second capacity. If you have retries enabled, you can safely ignore this message. If not, check out <https://alchemy.com/docs/reference/throughput>`                                                                                              | We recommend [implementing retries](/docs/how-to-implement-retries) if you have not already. If you still experience issues you can increase your throughput limit by [upgrading your account](https://dashboard.alchemy.com/settings/billing).                                                                                                            |
| `429`      | `Your app has exceeded its concurrent requests capacity. If you have retries enabled, you can safely ignore this message. If not, check out <https://alchemy.com/docs/reference/throughput>. Reach out to us if you'd like to increase your limits: <https://alchemy.com/support>` | We recommend [implementing retries](/docs/how-to-implement-retries) if you have not already. If you still experience issues you can increase your throughput limit by [upgrading your account](https://dashboard.alchemy.com/settings/billing).                                                                                                            |
| `429`      | `Optimism sequencer sender global transaction limit exceeded. This limit is set at the chain level. To ensure your request goes through, we recommend implementing retries <https://alchemy.com/docs/how-to-implement-retries>`                                                           | This limit is set by Optimism at the sequencer level, see [Optimism API FAQ](/docs/reference/optimism-api-faq). We recommend [implementing retries](/docs/how-to-implement-retries) if you have not already. If you still experience issues you can increase your throughput limit by [upgrading your account](https://dashboard.alchemy.com/settings/billing). |
| `429`      | `Optimism sequencer global transaction limit exceeded This limit is set at the chain level. To ensure your request goes through, we recommend implementing retries <https://alchemy.com/docs/how-to-implement-retries>`                                                                   | This limit is set by Optimism at the sequencer level, see [Optimism API FAQ](/docs/reference/optimism-api-faq). We recommend [implementing retries](/docs/how-to-implement-retries) if you have not already. If you still experience issues you can increase your throughput limit by [upgrading your account](https://dashboard.alchemy.com/settings/billing). |
| `429`      | `eth_sendRawTransaction is a method with custom rate limits that you have exceeded. If you have retries enabled, you can safely ignore this message. If not, check out <https://alchemy.com/docs/reference/throughput>`                                                                        | We recommend [implementing retries](/docs/how-to-implement-retries) if you have not already. If you still experience issues you can increase your throughput limit by [upgrading your account](https://dashboard.alchemy.com/settings/billing).                                                                                                            |

------

# opBNB Chain API Quickstart

> How to get started building on opBNB using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

opBNB is an EVM-compatible blockchain designed to provide high performance, scalability, and security for decentralized applications (dApps). Known for its efficient transaction processing and low costs, opBNB offers a robust environment for deploying Ethereum-based applications.

The opBNB API lets you interact with the opBNB network through a collection of JSON-RPC methods. If you're familiar with Ethereum's JSON-RPC APIs, working with opBNB will feel natural.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an opBNB client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http } from "viem"; 
import { opBNB } from "viem/chains";

const client = createPublicClient({
  chain: opBNB,
  transport: http("https://opbnb-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (BNB):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# opBNB APIs

For the full list of opBNB APIs, see the [opBNB API Endpoints](/docs/chains#opbnb-apis).

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_newPendingTransactionFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-testnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new pending transactions arrive.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-new-pending-transaction-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newPendingTransactionFilter"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_peerCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-testnet.g.alchemy.com/v2/{apiKey}

Returns the number of peers currently connected to the client.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/net-peer-count

## Result

**peerCount** (string): The number of connected peers as a hex string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_peerCount"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# txpool_content

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-testnet.g.alchemy.com/v2/{apiKey}

Returns a list of the exact details of all transactions currently pending for inclusion in the next blocks, as well as ones that are being scheduled for future execution.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/txpool-content

## Result

**content** (object): Object with pending and queued transactions grouped by sender address and nonce.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-testnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "txpool_content"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://opbnb-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/opbnb/op-bnb-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://opbnb-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# opBNB Chain API FAQ

> Frequently asked questions about the opBNB chain API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is opBNB?

opBNB is a layer 2 scaling solution for the Binance Smart Chain (BSC) designed to provide faster transaction speeds and lower costs. By leveraging optimistic rollups, opBNB aims to enhance the performance and scalability of BSC, making it an attractive platform for developers building decentralized applications (dApps).

## What is the opBNB API?

The opBNB API facilitates interaction with the opBNB network through a collection of JSON-RPC methods. It provides developers with tools to interact with the blockchain, enabling functionalities such as transactions, smart contract deployment, and data retrieval.

## Can I use opBNB on free tier?

No, opBNB is only available on paid tiers (pay as you go, enterprise). If you're on free tier [upgrade](https://dashboard.alchemy.com/settings/billing) your account to use opBNB. If you want Alchemy to support opBNB on free tier, please [request here](https://alchemyapi.typeform.com/to/F0SJX6RU).

## How can I get started using the opBNB API?

Explained in [opBNB API Quickstart](/docs/reference/opbnb-api-quickstart).

## Is opBNB EVM compatible?

Yes, opBNB is fully compatible with the Ethereum Virtual Machine (EVM). This compatibility allows Ethereum developers to port their projects to opBNB with minimal changes, benefiting from the network's scalability and low transaction fees.

## What API does opBNB use?

opBNB uses the JSON-RPC API standard for blockchain interactions. This is the same standard used by Ethereum.

## What is an opBNB API key?

When you access the opBNB network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network.

For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!

## Which libraries support opBNB?

Because opBNB is EVM-compatible, popular Ethereum libraries like ethers.js and web3.js work with opBNB. If you're familiar with Ethereum's development ecosystem, you can integrate with minimal changes.

## What programming languages work with opBNB?

Like Ethereum, opBNB supports a range of programming languages for blockchain interaction and smart contract development, including Solidity for smart contracts, as well as JavaScript and TypeScript for dApp development and offchain interactions.

## What does opBNB use for gas?

opBNB uses BNB, Binance Smart Chain's native cryptocurrency, for transaction fees, gas, and other network activities.

## What methods does Alchemy support for the opBNB API?

You can find the list of all the methods Alchemy supports for the opBNB API on the [opBNB API Endpoints](/docs/chains#opbnb-apis) page.

## My question isn't here, where can I get help?

If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Pharos API Quickstart

> How to get started building on Pharos and using the JSON-RPC API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

*To use the Pharos API you'll need to [create a free Alchemy account](https://dashboard.alchemy.com/signup) first!*

## What is Pharos?

Pharos is a high-performance, EVM-compatible Layer 1 blockchain that combines modular architecture and deep-parallel execution to deliver sub-second finality and high throughput, designed to unify Web2 and Web3 assets and liquidity.

## What is the Pharos API?

The Pharos API lets you interact with the Pharos network through a set of JSON-RPC methods. If you've worked with Ethereum's JSON-RPC APIs, the design will feel familiar.

## Getting started

### 1. Choose a package manager (npm or yarn)

Choose between `npm` and `yarn` based on your preference or project requirements.

<CodeGroup>
  ```shell npm
  # Begin with npm by following the npm documentation
  # https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
  ```

  ```shell yarn
  # For yarn, refer to yarn's installation guide
  # https://classic.yarnpkg.com/lang/en/docs/install
  ```
</CodeGroup>

### 2. Set up your project

Run the following commands to create and initialize your project:

<CodeGroup>
  ```shell npm
  mkdir pharos-api-quickstart
  cd pharos-api-quickstart
  npm init --yes
  ```

  ```shell yarn
  mkdir pharos-api-quickstart
  cd pharos-api-quickstart
  yarn init --yes
  ```
</CodeGroup>

This creates a new directory named `pharos-api-quickstart` and initializes a Node.js project within it.

### 3. Make your first request

Install Axios, a popular HTTP client, to make API requests:

<CodeGroup>
  ```shell npm
  npm install axios
  ```

  ```shell yarn
  yarn add axios
  ```
</CodeGroup>

Create an `index.js` file in your project directory and paste the following code:

<CodeGroup>
  ```javascript index.js
  const axios = require('axios');

  const url = 'https://pharos-mainnet.g.alchemy.com/v2/your-api-key';

  const payload = {
    jsonrpc: '2.0',
    id: 1,
    method: 'eth_blockNumber',
    params: []
  };

  axios.post(url, payload)
    .then(response => {
      console.log('Latest Block:', response.data.result);
    })
    .catch(error => {
      console.error(error);
    });
  ```
</CodeGroup>

Replace `your-api-key` with your actual Alchemy API key from the [Alchemy Dashboard](https://dashboard.alchemy.com/signup).

### 4. Run your script

Run your script to make a request to the Pharos network:

<CodeGroup>
  ```shell shell
  node index.js
  ```
</CodeGroup>

You should see the latest block information from Pharos's network outputted to your console:

<CodeGroup>
  ```shell shell
  Latest Block: 0x...
  ```
</CodeGroup>

## Next steps

You've made your first request to the Pharos network. You can now explore the various JSON-RPC methods available on Pharos and start building your dApps.

------

# Pharos API Overview

> Overview of available Pharos API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Pharos APIs

📙 Get started with our [Pharos API Quickstart Guide](/docs/reference/pharos-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/pharos/pharos-api-endpoints/eth-accounts)                         | [`eth_blockNumber`](/docs/chains/pharos/pharos-api-endpoints/eth-block-number)              |
| [`eth_call`](/docs/chains/pharos/pharos-api-endpoints/eth-call)                                 | [`eth_chainId`](/docs/chains/pharos/pharos-api-endpoints/eth-chain-id)                      |
| [`eth_createAccessList`](/docs/chains/pharos/pharos-api-endpoints/eth-create-access-list)       | [`eth_estimateGas`](/docs/chains/pharos/pharos-api-endpoints/eth-estimate-gas)              |
| [`eth_feeHistory`](/docs/chains/pharos/pharos-api-endpoints/eth-fee-history)                    | [`eth_gasPrice`](/docs/chains/pharos/pharos-api-endpoints/eth-gas-price)                    |
| [`eth_getAccount`](/docs/chains/pharos/pharos-api-endpoints/eth-get-account)                    | [`eth_getBalance`](/docs/chains/pharos/pharos-api-endpoints/eth-get-balance)                |
| [`eth_getBlockByHash`](/docs/chains/pharos/pharos-api-endpoints/eth-get-block-by-hash)          | [`eth_getBlockByNumber`](/docs/chains/pharos/pharos-api-endpoints/eth-get-block-by-number)  |
| [`eth_getBlockReceipts`](/docs/chains/pharos/pharos-api-endpoints/eth-get-block-receipts)       | [`eth_getBlockTransactionCountByHash`](/docs/chains/pharos/pharos-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/pharos/pharos-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/pharos/pharos-api-endpoints/eth-get-code)                      |
| [`eth_getFilterChanges`](/docs/chains/pharos/pharos-api-endpoints/eth-get-filter-changes)       | [`eth_getFilterLogs`](/docs/chains/pharos/pharos-api-endpoints/eth-get-filter-logs)         |
| [`eth_getLogs`](/docs/chains/pharos/pharos-api-endpoints/eth-get-logs)                          | [`eth_getProof`](/docs/chains/pharos/pharos-api-endpoints/eth-get-proof)                    |
| [`eth_getRawTransactionByHash`](/docs/chains/pharos/pharos-api-endpoints/eth-get-raw-transaction-by-hash) | [`eth_getStorageAt`](/docs/chains/pharos/pharos-api-endpoints/eth-get-storage-at)           |
| [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/pharos/pharos-api-endpoints/eth-get-transaction-by-block-hash-and-index) | [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/pharos/pharos-api-endpoints/eth-get-transaction-by-block-number-and-index) |
| [`eth_getTransactionByHash`](/docs/chains/pharos/pharos-api-endpoints/eth-get-transaction-by-hash) | [`eth_getTransactionCount`](/docs/chains/pharos/pharos-api-endpoints/eth-get-transaction-count) |
| [`eth_getTransactionReceipt`](/docs/chains/pharos/pharos-api-endpoints/eth-get-transaction-receipt) | [`eth_getUncleByBlockHashAndIndex`](/docs/chains/pharos/pharos-api-endpoints/eth-get-uncle-by-block-hash-and-index) |
| [`eth_getUncleByBlockNumberAndIndex`](/docs/chains/pharos/pharos-api-endpoints/eth-get-uncle-by-block-number-and-index) | [`eth_getUncleCountByBlockHash`](/docs/chains/pharos/pharos-api-endpoints/eth-get-uncle-count-by-block-hash) |
| [`eth_getUncleCountByBlockNumber`](/docs/chains/pharos/pharos-api-endpoints/eth-get-uncle-count-by-block-number) | [`eth_maxPriorityFeePerGas`](/docs/chains/pharos/pharos-api-endpoints/eth-max-priority-fee-per-gas) |
| [`eth_newBlockFilter`](/docs/chains/pharos/pharos-api-endpoints/eth-new-block-filter)           | [`eth_newFilter`](/docs/chains/pharos/pharos-api-endpoints/eth-new-filter)                  |
| [`eth_protocolVersion`](/docs/chains/pharos/pharos-api-endpoints/eth-protocol-version)          | [`eth_sendRawTransaction`](/docs/chains/pharos/pharos-api-endpoints/eth-send-raw-transaction) |
| [`eth_submitWork`](/docs/chains/pharos/pharos-api-endpoints/eth-submit-work)                    | [`eth_subscribe`](/docs/chains/pharos/pharos-api-endpoints/eth-subscribe)                   |
| [`eth_uninstallFilter`](/docs/chains/pharos/pharos-api-endpoints/eth-uninstall-filter)          | [`eth_unsubscribe`](/docs/chains/pharos/pharos-api-endpoints/eth-unsubscribe)               |
| [`net_peerCount`](/docs/chains/pharos/pharos-api-endpoints/net-peer-count)                      | [`net_version`](/docs/chains/pharos/pharos-api-endpoints/net-version)                       |
| [`web3_clientVersion`](/docs/chains/pharos/pharos-api-endpoints/web-3-client-version)           | [`web3_sha3`](/docs/chains/pharos/pharos-api-endpoints/web-3-sha-3)                         |

## Related APIs

The following Alchemy APIs are also supported on Pharos:

* [Debug API](/docs/reference/debug-api-quickstart)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_protocolVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current protocol version used by the client.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-protocol-version

## Result

**Protocol Version** (string): The protocol version as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3f",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_protocolVersion"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_peerCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of peers currently connected to the client.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/net-peer-count

## Result

**peerCount** (string): The number of connected peers as a hex string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_peerCount"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://pharos-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/pharos/pharos-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://pharos-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Pharos API FAQ

> Frequently asked questions about the Pharos API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Pharos?
Pharos is a high-performance, EVM-compatible Layer 1 blockchain that combines modular architecture and deep-parallel execution to deliver sub-second finality and high throughput, designed to unify Web2 and Web3 assets and liquidity.

## How do I get started with Pharos?
Check out our [Pharos API Quickstart guide](/docs/reference/pharos-api-quickstart) to get started building on Pharos.

## What is the Pharos API?
The Pharos API lets you interface with the Pharos network. You can execute transactions, query onchain data, and interact with the Pharos network using the JSON-RPC standard.

## Is Pharos EVM compatible?
Yes, Pharos is EVM compatible.

## What API does Pharos use?
Pharos uses the JSON-RPC API standard. This API handles all blockchain interaction on the Pharos network, letting you read block/transaction data, query chain information, execute smart contracts, and store data onchain.

## What methods are supported on Pharos?
Pharos supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the Pharos API endpoints documentation for a complete list.

## What is a Pharos API key?
When you access the Pharos network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend that you [sign up for a free API key](https://dashboard.alchemy.com/signup)!

## Which libraries support Pharos?
Common Ethereum libraries like [ethers.js](https://docs.ethers.org/v5/) should be compatible with Pharos, given its EVM nature.

## My question isn’t here, where can I get help?
If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Plasma API Quickstart

> How to get started building on Plasma using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

Plasma is an EVM-compatible Layer-1 purpose-built for stablecoins, using PlasmaBFT (Fast HotStuff) and a native Bitcoin bridge to enable near-instant, zero-fee USD₮ transfers and confidential payments.

The Plasma API lets you interact with the Plasma network through a set of JSON-RPC methods. If you've worked with Ethereum's JSON-RPC APIs, the design will feel familiar.

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create a Plasma client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js
import { createPublicClient, http, defineChain } from "viem";

const plasma = defineChain({
  id: 3338,
  name: "Plasma",
  nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 },
  rpcUrls: {
    default: { http: ["https://plasma-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"] },
  },
});

const client = createPublicClient({
  chain: plasma,
  transport: http("https://plasma-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (ETH):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Plasma APIs

For the full list of Plasma APIs, see the [Plasma API Endpoints](/docs/chains#plasma-apis).

------

# Plasma API Overview

> Overview of available Plasma API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Plasma APIs

📙 Get started with our [Plasma API Quickstart Guide](/docs/reference/plasma-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`eth_accounts`](/docs/chains/plasma/plasma-api-endpoints/eth-accounts)                         | [`eth_blobBaseFee`](/docs/chains/plasma/plasma-api-endpoints/eth-blob-base-fee)             |
| [`eth_blockNumber`](/docs/chains/plasma/plasma-api-endpoints/eth-block-number)                  | [`eth_call`](/docs/chains/plasma/plasma-api-endpoints/eth-call)                             |
| [`eth_chainId`](/docs/chains/plasma/plasma-api-endpoints/eth-chain-id)                          | [`eth_createAccessList`](/docs/chains/plasma/plasma-api-endpoints/eth-create-access-list)   |
| [`eth_estimateGas`](/docs/chains/plasma/plasma-api-endpoints/eth-estimate-gas)                  | [`eth_feeHistory`](/docs/chains/plasma/plasma-api-endpoints/eth-fee-history)                |
| [`eth_gasPrice`](/docs/chains/plasma/plasma-api-endpoints/eth-gas-price)                        | [`eth_getAccount`](/docs/chains/plasma/plasma-api-endpoints/eth-get-account)                |
| [`eth_getAccountInfo`](/docs/chains/plasma/plasma-api-endpoints/eth-get-account-info)           | [`eth_getBalance`](/docs/chains/plasma/plasma-api-endpoints/eth-get-balance)                |
| [`eth_getBlockByHash`](/docs/chains/plasma/plasma-api-endpoints/eth-get-block-by-hash)          | [`eth_getBlockByNumber`](/docs/chains/plasma/plasma-api-endpoints/eth-get-block-by-number)  |
| [`eth_getBlockReceipts`](/docs/chains/plasma/plasma-api-endpoints/eth-get-block-receipts)       | [`eth_getBlockTransactionCountByHash`](/docs/chains/plasma/plasma-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/plasma/plasma-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/plasma/plasma-api-endpoints/eth-get-code)                      |
| [`eth_getFilterChanges`](/docs/chains/plasma/plasma-api-endpoints/eth-get-filter-changes)       | [`eth_getFilterLogs`](/docs/chains/plasma/plasma-api-endpoints/eth-get-filter-logs)         |
| [`eth_getLogs`](/docs/chains/plasma/plasma-api-endpoints/eth-get-logs)                          | [`eth_getProof`](/docs/chains/plasma/plasma-api-endpoints/eth-get-proof)                    |
| [`eth_getRawTransactionByHash`](/docs/chains/plasma/plasma-api-endpoints/eth-get-raw-transaction-by-hash) | [`eth_getStorageAt`](/docs/chains/plasma/plasma-api-endpoints/eth-get-storage-at)           |
| [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/plasma/plasma-api-endpoints/eth-get-transaction-by-block-hash-and-index) | [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/plasma/plasma-api-endpoints/eth-get-transaction-by-block-number-and-index) |
| [`eth_getTransactionByHash`](/docs/chains/plasma/plasma-api-endpoints/eth-get-transaction-by-hash) | [`eth_getTransactionCount`](/docs/chains/plasma/plasma-api-endpoints/eth-get-transaction-count) |
| [`eth_getTransactionReceipt`](/docs/chains/plasma/plasma-api-endpoints/eth-get-transaction-receipt) | [`eth_getUncleByBlockHashAndIndex`](/docs/chains/plasma/plasma-api-endpoints/eth-get-uncle-by-block-hash-and-index) |
| [`eth_getUncleByBlockNumberAndIndex`](/docs/chains/plasma/plasma-api-endpoints/eth-get-uncle-by-block-number-and-index) | [`eth_getUncleCountByBlockHash`](/docs/chains/plasma/plasma-api-endpoints/eth-get-uncle-count-by-block-hash) |
| [`eth_getUncleCountByBlockNumber`](/docs/chains/plasma/plasma-api-endpoints/eth-get-uncle-count-by-block-number) | [`eth_maxPriorityFeePerGas`](/docs/chains/plasma/plasma-api-endpoints/eth-max-priority-fee-per-gas) |
| [`eth_newBlockFilter`](/docs/chains/plasma/plasma-api-endpoints/eth-new-block-filter)           | [`eth_newFilter`](/docs/chains/plasma/plasma-api-endpoints/eth-new-filter)                  |
| [`eth_newPendingTransactionFilter`](/docs/chains/plasma/plasma-api-endpoints/eth-new-pending-transaction-filter) | [`eth_sendRawTransaction`](/docs/chains/plasma/plasma-api-endpoints/eth-send-raw-transaction) |
| [`eth_simulateV1`](/docs/chains/plasma/plasma-api-endpoints/eth-simulate-v-1)                   | [`eth_submitWork`](/docs/chains/plasma/plasma-api-endpoints/eth-submit-work)                |
| [`eth_subscribe`](/docs/chains/plasma/plasma-api-endpoints/eth-subscribe)                       | [`eth_syncing`](/docs/chains/plasma/plasma-api-endpoints/eth-syncing)                       |
| [`eth_uninstallFilter`](/docs/chains/plasma/plasma-api-endpoints/eth-uninstall-filter)          | [`eth_unsubscribe`](/docs/chains/plasma/plasma-api-endpoints/eth-unsubscribe)               |
| [`net_listening`](/docs/chains/plasma/plasma-api-endpoints/net-listening)                       | [`net_version`](/docs/chains/plasma/plasma-api-endpoints/net-version)                       |
| [`web3_clientVersion`](/docs/chains/plasma/plasma-api-endpoints/web-3-client-version)           | [`web3_sha3`](/docs/chains/plasma/plasma-api-endpoints/web-3-sha-3)                         |

## Related APIs

The following Alchemy APIs are also supported on Plasma:

* [Bundler API](/docs/wallets/transactions/low-level-infra/bundler/overview)
* [Gas Manager API](/docs/wallets/api-reference/gas-manager-admin-api/gas-abstraction-api-endpoints/alchemy-request-gas-and-paymaster-and-data)
* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)

------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_blobBaseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns the base fee per blob gas in wei for the current block.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-blob-base-fee

## Result

**Blob Base Fee** (string): The base fee per blob gas, in wei, as a hexadecimal encoded unsigned integer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blobBaseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getAccountInfo

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Retrieves account information including balance, code, and nonce for a given address at a specified block.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-account-info

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the account information. |

## Result

**Account information** (object): An object containing the account's balance, code, and nonce.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "balance": "0x1cfe56f3795885980000",
    "code": "0x",
    "nonce": "0x5"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccountInfo",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and storage proofs.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280"
        ],
        "value": "0x1"
      }
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getProof",
  "params": [
    "0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
    [
      "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"
    ],
    "latest"
  ]
}'
```



------

# eth_getRawTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns the raw transaction data (RLP-encoded) for a transaction by its hash.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-raw-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Raw transaction data** (null or string): The raw RLP-encoded transaction data as a hexadecimal string, or null if the transaction is not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xf86c0185012a05f200825208940599d52c37544c07605f470e5e20c1b266de858889021dfc23e5c290008025a084ce48a415a40d664f87a6a05e8ec8e2fd2f07a68b06d3f20d999d7e8c7b12dfa0464c6e93bfa8e779ecd48284cf47d2d797dc611bbc6dbd7ab8f57ccba039acec",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getRawTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getStorageAt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns the value from a storage position at a given address.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-storage-at

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to read storage from. |
| Storage slot | string | Yes | The index position of the storage slot to retrieve, as a hexadecimal string. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the storage value. |

## Result

**Value** (string): The value stored at the given storage slot, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getStorageAt",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "0x0",
    "latest"
  ]
}'
```



------

# eth_getTransactionByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block hash and transaction index position.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-transaction-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": [
    "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction by block number and transaction index position.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-transaction-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block | string or enum | Yes | The block number or tag ('latest', 'earliest', 'pending') containing the transaction. |
| Transaction index | string | Yes | The index position of the transaction in the block's transaction list, as a hexadecimal string. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x1442e",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x2",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "0x1442e",
    "0x2"
  ]
}'
```



------

# eth_getTransactionByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a transaction requested by transaction hash.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-transaction-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction to retrieve. |

## Result

**Transaction information** (null or object): The transaction object containing various properties of the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
    "blockNumber": "0x422",
    "chainId": "0x7e2",
    "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "gas": "0x5208",
    "gasPrice": "0x3b9aca00",
    "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
    "input": "0x",
    "nonce": "0x1",
    "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "transactionIndex": "0x0",
    "value": "0x4e1003b28d9280000",
    "v": "0x1c",
    "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
    "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionByHash",
  "params": [
    "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"
  ]
}'
```



------

# eth_getTransactionCount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions sent from an address.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-transaction-count

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to get the transaction count for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the transaction count. |

## Result

**Transaction count** (string): The number of transactions sent from the address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
    "latest"
  ]
}'
```



------

# eth_getTransactionReceipt

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipt of a transaction by transaction hash.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-transaction-receipt

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction hash | string | Yes | The hash of the transaction for which to get the receipt. |

## Result

**Receipt information** (null or object): The transaction receipt object containing various properties of the transaction receipt.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",
    "blockNumber": "0x50",
    "contractAddress": null,
    "cumulativeGasUsed": "0x5208",
    "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
    "gasUsed": "0x5208",
    "effectiveGasPrice": "0x1",
    "logs": [],
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "status": "0x1",
    "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",
    "transactionHash": "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f",
    "transactionIndex": "0x0",
    "type": "0x0"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"
  ]
}'
```



------

# eth_getUncleByBlockHashAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by hash and uncle index.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-uncle-by-block-hash-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block containing the uncle. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",
    "0x0"
  ]
}'
```



------

# eth_getUncleByBlockNumberAndIndex

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about an uncle of a block by number and uncle index.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-uncle-by-block-number-and-index

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Uncle index | string | Yes | The index position of the uncle in the block's uncles array. |

## Result

**Uncle block information** (null or object): The uncle block object, or null if not found.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0x5e7b81b43b5f84edbb2c3ebd92e9b1b7b6db0c6420c1a0e59b1eb542f1fdd3b2",
    "parentHash": "0x9fc6f13f4be42b93e9f7243d2e72607fbea6edb5e2f8a66e2b5b4c6f5e8c50c6",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00...0",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd7f8974fb5ac78d7c5fc5e38a69b1a65b6cdefbf207f53ca3ed49f0610f2342f",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x27f07",
    "totalDifficulty": "0x27f07",
    "extraData": "0x",
    "size": "0x1f8",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x0",
    "timestamp": "0x55ba467c",
    "transactions": [],
    "uncles": []
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": [
    "0x1b4",
    "0x0"
  ]
}'
```



------

# eth_getUncleCountByBlockHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-uncle-count-by-block-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockHash",
  "params": [
    "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
  ]
}'
```



------

# eth_getUncleCountByBlockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of uncles in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-get-uncle-count-by-block-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Uncle count** (null or string): The number of uncle blocks as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_maxPriorityFeePerGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current maximum priority fee per gas in wei.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-max-priority-fee-per-gas

## Result

**Max priority fee per gas** (string): The current maximum priority fee per gas in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x773c23ba",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_maxPriorityFeePerGas"
}'
```



------

# eth_newBlockFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new blocks arrive.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-new-block-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newBlockFilter"
}'
```



------

# eth_newFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter object based on filter options to notify when state changes (logs).

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-new-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the filter criteria for logs. |

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_newPendingTransactionFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Creates a filter in the node to notify when new pending transactions arrive.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-new-pending-transaction-filter

## Result

**Filter identifier** (string): A hexadecimal string representing the ID of the created filter.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x01",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_newPendingTransactionFilter"
}'
```



------

# eth_sendRawTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Submits a raw transaction (serialized and signed) for broadcasting to the network. The transaction data should be encoded as a hexadecimal string starting with `0x`. You can create and sign a transaction externally using libraries like [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). 

**Note:** For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be in the network format, which includes blobs, KZG commitments, and KZG proofs.


Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-send-raw-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | string | Yes | The raw transaction data to submit, encoded as a hexadecimal string. |

## Result

**Transaction hash** (string): The hash of the submitted transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": [
    "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
  ]
}'
```



------

# eth_simulateV1

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Enables simulation of complex transactions and state changes without modifying the blockchain.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-simulate-v-1

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Simulation object | object | Yes | The object containing all simulation details such as calls, overrides, etc. |

## Result

**Simulation result** (object[]): The result of the simulation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "baseFeePerGas": "0x9",
      "blobGasUsed": "0x0",
      "calls": [
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000001"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
              "transactionIndex": "0x0",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x0",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        },
        {
          "returnData": "0x",
          "logs": [
            {
              "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
              "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                "0x000000000000000000000000c000000000000000000000000000000000000000",
                "0x000000000000000000000000c000000000000000000000000000000000000002"
              ],
              "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "blockNumber": "0x1530a5e",
              "transactionHash": "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd",
              "transactionIndex": "0x1",
              "blockHash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
              "logIndex": "0x1",
              "removed": false
            }
          ],
          "gasUsed": "0x5208",
          "status": "0x1"
        }
      ],
      "difficulty": "0x0",
      "excessBlobGas": "0x3b80000",
      "extraData": "0x",
      "gasLimit": "0x22550dd",
      "gasUsed": "0xa410",
      "hash": "0x105b451ea332730fe2d316d983b9a406b6d4a022ee6e83e02bcae17a94f8c87b",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "miner": "0x1f9090aae28b8a3dceadf281b0f12828e676c326",
      "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "nonce": "0x0000000000000000",
      "number": "0x1530a5e",
      "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "parentHash": "0x513a0aa73024f294cdbcb0312af0c920850035f0552d7349ebb30717de30b1cc",
      "receiptsRoot": "0x75308898d571eafb5cd8cde8278bf5b3d13c5f6ec074926de3bb895b519264e1",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "size": "0x29c",
      "stateRoot": "0x65ea44c8bd5f9edbf269b6446b460b3e7378abb25c78fd5d70f0e2ef59296b25",
      "timestamp": "0x67f43327",
      "transactions": [
        "0x40e61ffc135d1d280646e8951141828e0fad81fd330b1c1a75454163f8c8ca34",
        "0x204d575c2f68b43a32423bc05491e8dafa71913e3e6d223aa5128cbd23562ecd"
      ],
      "transactionsRoot": "0xd6902f31ae9d2169b77cd88611c6afd691ea5a7e604e44c71f663fda0c5d1c28",
      "uncles": [],
      "withdrawals": [],
      "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_simulateV1",
  "params": [
    {
      "blockStateCalls": [
        {
          "blockOverrides": {
            "baseFeePerGas": "0x9"
          },
          "stateOverrides": {
            "0xc000000000000000000000000000000000000000": {
              "balance": "0x4a817c800"
            }
          },
          "calls": [
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000001",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            },
            {
              "from": "0xc000000000000000000000000000000000000000",
              "to": "0xc000000000000000000000000000000000000002",
              "maxFeePerGas": "0xf",
              "value": "0x1"
            }
          ]
        }
      ],
      "validation": true,
      "traceTransfers": true
    }
  ]
}'
```



------

# eth_submitWork

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Submit a proof-of-work solution (Ethash) consisting of a nonce, the header PoW hash, and the mix digest. **Not supported on post-Merge Ethereum clients**; many nodes will return JSON-RPC error -32601 (method not found).


Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-submit-work

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| nonce | string | Yes | The 8-byte nonce found by the miner. |
| hash | string | Yes | The block header's PoW hash (32-byte). |
| digest | string | Yes | The mix digest (32-byte). |

## Result

**Submission accepted** (boolean): Returns `true` if the provided solution is valid, otherwise `false`.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xd1fe5700000000000000000000000000d1fe5700000000000000000000000000"
  ]
}'
```



------

# eth_subscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Subscribes to specific event types and returns a subscription ID to receive asynchronous notifications via the `eth_subscription` method.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-subscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription Type | string | No | The type of event to subscribe to (e.g., "newHeads", "logs", "newPendingTransactions", "syncing"). |
| Options | object | No | Optional subscription parameters, such as filtering topics for `logs`. |

## Result

**Subscription ID** (string): A unique identifier for the subscription, returned as a 32-byte hex string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "newHeads"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b",
  "id": 1
}
```


------

# eth_syncing

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns an object with data about the sync status or `false` if not syncing.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-syncing

## Result

**Syncing status** (boolean or object or boolean): An object with synchronization status data when syncing, or `false` when not syncing.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "startingBlock": "0x0",
    "currentBlock": "0x1518",
    "highestBlock": "0x9567a3"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_syncing"
}'
```



------

# eth_uninstallFilter

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Uninstalls a filter with the given ID.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-uninstall-filter

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to uninstall. |

## Result

**Success** (boolean): true if the filter was successfully uninstalled, `false` otherwise.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_uninstallFilter",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_unsubscribe

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Cancels an active subscription given its subscription ID.

⚠️ **WARNING: WebSocket-Only Method** ⚠️

> This method REQUIRES a WebSocket connection using `wss://` protocol. It will NOT work with standard HTTP/HTTPS requests or `curl`.
> See the [WebSocket documentation](https://alchemy.com/docs/reference/subscription-api) for examples.


Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/eth-unsubscribe

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Subscription ID | string | No | The identifier of the subscription to cancel. |

## Result

**Unsubscribe Result** (boolean): A boolean indicating whether the subscription was successfully canceled.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": [
    "0x9c7c3f3c3c63b1b89ac0c1e0b0d3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8090a1b"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```


------

# net_listening

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns `true` if the client is actively listening for network connections.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/net-listening

## Result

**Listening** (boolean): Boolean value indicating if the client is listening for network connections.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": true,
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_listening"
}'
```



------

# net_version

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns the network ID that the client is connected to.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/net-version

## Result

**Network ID** (string): The network ID as a string. Common IDs are `"1"` for mainnet, `"3"` for Ropsten, etc.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version"
}'
```



------

# web3_clientVersion

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current client version.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/web-3-client-version

## Result

**Client Version** (string): A string identifying the client software name, version, and platform.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "Geth/v1.10.8-stable-26675454/linux-amd64/go1.16.6",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_clientVersion"
}'
```



------

# web3_sha3

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://plasma-mainnet.g.alchemy.com/v2/{apiKey}

Returns Keccak-256 (not the standardized SHA3-256) hash of the given data.

Reference: https://www.alchemy.com/docs/chains/plasma/plasma-api-endpoints/web-3-sha-3

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Data | string | Yes | The data to hash, encoded as a hexadecimal string. |

## Result

**Hash** (string): The Keccak-256 hash of the input data, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x47173285a8d734ad4162d1b2ca3c6f0d0fabc60b8d702d31fd8e5c98569c36f9",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://plasma-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "web3_sha3",
  "params": [
    "0x68656c6c6f20776f726c64"
  ]
}'
```



------

# Plasma API FAQ

> Frequently asked questions about the Plasma API

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## What is Plasma?
Plasma is an EVM-compatible Layer-1 purpose-built for stablecoins, using PlasmaBFT (Fast HotStuff) and a native Bitcoin bridge to enable near-instant, zero-fee USD₮ transfers and confidential payments.

## How do I get started with Plasma?
Check out our [Plasma API Quickstart guide](/docs/reference/plasma-api-quickstart) to get started building on Plasma.

## What is the Plasma API?
The Plasma API lets you interact with the Plasma mainnet. You can execute transactions, query onchain data, and interact with the Plasma network using a JSON-RPC standard.

## Is Plasma EVM compatible?
Yes, Plasma is EVM compatible.

## What API does Plasma use?
Plasma uses the JSON-RPC API standard. This API handles all blockchain interactions on the Plasma network, letting you read block/transaction data, query chain information, execute smart contracts, and store data onchain.

## What methods are supported on Plasma?
Plasma supports standard Ethereum JSON-RPC methods. Some chain-specific methods may vary. Please check the [Plasma API Endpoints](/docs/chains#plasma-apis) for a complete list.

## What is a Plasma API key?
When accessing the Plasma network via a node provider like Alchemy, you use an API key to send transactions and retrieve data from the network. For the best development experience, we recommend you [sign up for a free API key](https://dashboard.alchemy.com/signup).

## Which libraries support Plasma?
Common Ethereum libraries like [ethers.js](https://docs.ethers.org/v5/) should be compatible with Plasma, given its EVM nature.

## My question isn’t here, where can I get help?
If you have any questions or feedback, contact us at support@alchemy.com or open a ticket in the Alchemy Dashboard.

------

# Polygon PoS API Quickstart

> How to get started building on Polygon PoS using Alchemy

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Tip title="Don't have an API key?" icon="star">
  Build faster with production-ready APIs, smart wallets and rollup infrastructure across 70+ chains. Create your free Alchemy API key and{" "}
  <a href="https://dashboard.alchemy.com/signup">get started today</a>.
</Tip>

## Send your first request on Alchemy

Let's use the [`viem`](https://www.npmjs.com/package/viem) package to create an Ethereum client connected to Alchemy and fetch the latest block number!

<CodeGroup>
  ```text npm
  npm install --save viem
  ```

  ```text yarn
  yarn add viem
  ```
</CodeGroup>

## Create a client connected to Alchemy

<CodeGroup>
```js 
import { createPublicClient, http } from "viem"; 
import { mainnet } from "viem/chains";

const client = createPublicClient({
  chain: mainnet,
  transport: http("https://polygon-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY"),
});
```
</CodeGroup>

Now that you've created a client connected to Alchemy, you can continue with some basics:

## Get the latest block number

<CodeGroup>
```js
const blockNumber = await client.getBlockNumber();
console.log("Current block number:", blockNumber);
```
</CodeGroup>

## Get an address balance

<CodeGroup>
```js 
const balance = await client.getBalance({ address: "0xab5801a7d398351b8be11c439e05c5b3259aec9b" });
console.log("Balance (ETH):", Number(balance) / 1e18);
```
</CodeGroup>

## Read block data

<CodeGroup>
```js
const block = await client.getBlock({
  blockNumber: blockNumber, // from previous example
});
console.log(block);
```
</CodeGroup>

## Fetch a transaction by hash

<CodeGroup> 
```js 
const tx = await client.getTransaction({ hash: "0xYOUR_TX_HASH" });
console.log(tx);
```
</CodeGroup>

## Fetch a transaction receipt

<CodeGroup>
```js
const receipt = await client.getTransactionReceipt({
  hash: "0xYOUR_TX_HASH"
});
console.log(receipt);
```
</CodeGroup>

# Polygon Tutorials

Want to build your first dApp on Polygon and use Polygon APIs?

Check out the following tutorials to learn how to build on Polygon:

* [Polygon API FAQ](/docs/reference/polygon-pos-api-faq)

For full documentation on Web3 libraries, check out the official documentation:

* [Viem Documentation](https://viem.sh) - Modern TypeScript interface for Ethereum
* [Ethers.js Documentation](https://docs.ethers.org) - Complete Ethereum wallet implementation

------

# Polygon PoS API Overview

> Overview of available Polygon PoS API methods

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Polygon PoS APIs

📙 Get started with our [Polygon PoS API Quickstart Guide](/docs/reference/polygon-pos-api-quickstart).

|                                                                                                 |                                                                                             |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`bor_getAuthor`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/bor-get-author)           | [`bor_getCurrentProposer`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/bor-get-current-proposer) |
| [`bor_getCurrentValidators`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/bor-get-current-validators) | [`bor_getRootHash`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/bor-get-root-hash)  |
| [`bor_getSignersAtHash`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/bor-get-signers-at-hash) | [`debug_executionWitness`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/debug-execution-witness) |
| [`debug_executionWitnessByHash`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/debug-execution-witness-by-hash) | [`erigon_forks`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/erigon-forks)          |
| [`erigon_getHeaderByHash`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/erigon-get-header-by-hash) | [`erigon_getHeaderByNumber`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/erigon-get-header-by-number) |
| [`erigon_getLogsByHash`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/erigon-get-logs-by-hash) | [`eth_accounts`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-accounts)          |
| [`eth_baseFee`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-base-fee)               | [`eth_blobBaseFee`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-blob-base-fee)  |
| [`eth_blockNumber`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-block-number)       | [`eth_call`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-call)                  |
| [`eth_callBundle`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-call-bundle)         | [`eth_callMany`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-call-many)         |
| [`eth_chainId`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-chain-id)               | [`eth_createAccessList`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-create-access-list) |
| [`eth_estimateGas`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-estimate-gas)       | [`eth_feeHistory`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-fee-history)     |
| [`eth_fillTransaction`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-fill-transaction) | [`eth_gasPrice`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-gas-price)         |
| [`eth_getAccount`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-account)         | [`eth_getBalance`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-balance)     |
| [`eth_getBlockByHash`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-block-by-hash) | [`eth_getBlockByNumber`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-block-by-number) |
| [`eth_getBlockReceipts`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-block-receipts) | [`eth_getBlockTransactionCountByHash`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-block-transaction-count-by-hash) |
| [`eth_getBlockTransactionCountByNumber`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-block-transaction-count-by-number) | [`eth_getCode`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-code)           |
| [`eth_getFilterChanges`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-filter-changes) | [`eth_getFilterLogs`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-filter-logs) |
| [`eth_getLogs`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-logs)               | [`eth_getProof`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-proof)         |
| [`eth_getRawTransactionByHash`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-raw-transaction-by-hash) | [`eth_getRootHash`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-root-hash)  |
| [`eth_getStorageAt`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-storage-at)    | [`eth_getTdByNumber`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-td-by-number) |
| [`eth_getTransactionByBlockHashAndIndex`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-transaction-by-block-hash-and-index) | [`eth_getTransactionByBlockNumberAndIndex`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-transaction-by-block-number-and-index) |
| [`eth_getTransactionByHash`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-transaction-by-hash) | [`eth_getTransactionCount`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-transaction-count) |
| [`eth_getTransactionReceipt`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-transaction-receipt) | [`eth_getTransactionReceiptsByBlock`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-transaction-receipts-by-block) |
| [`eth_getUncleByBlockHashAndIndex`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-uncle-by-block-hash-and-index) | [`eth_getUncleByBlockNumberAndIndex`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-uncle-by-block-number-and-index) |
| [`eth_getUncleCountByBlockHash`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-uncle-count-by-block-hash) | [`eth_getUncleCountByBlockNumber`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-uncle-count-by-block-number) |
| [`eth_maxPriorityFeePerGas`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-max-priority-fee-per-gas) | [`eth_newBlockFilter`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-new-block-filter) |
| [`eth_newFilter`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-new-filter)           | [`eth_newPendingTransactionFilter`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-new-pending-transaction-filter) |
| [`eth_protocolVersion`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-protocol-version) | [`eth_sendRawTransaction`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-send-raw-transaction) |
| [`eth_sendRawTransactionSync`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-send-raw-transaction-sync) | [`eth_simulateV1`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-simulate-v-1)    |
| [`eth_submitWork`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-submit-work)         | [`eth_subscribe`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-subscribe)        |
| [`eth_syncing`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-syncing)                | [`eth_uninstallFilter`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-uninstall-filter) |
| [`eth_unsubscribe`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-unsubscribe)        | [`net_listening`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/net-listening)        |
| [`net_peerCount`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/net-peer-count)           | [`net_version`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/net-version)            |
| [`txpool_content`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/txpool-content)          | [`web3_clientVersion`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/web-3-client-version) |
| [`web3_sha3`](/docs/chains/polygon-pos/polygon-po-s-api-endpoints/web-3-sha-3)                  |                                                                                             |

## Related APIs

The following Alchemy APIs are also supported on Polygon PoS:

* [Bundler API](/docs/wallets/transactions/low-level-infra/bundler/overview)
* [Gas Manager API](/docs/wallets/api-reference/gas-manager-admin-api/gas-abstraction-api-endpoints/alchemy-request-gas-and-paymaster-and-data)
* [Token API](/docs/reference/token-api-overview)
* [Transfers API](/docs/reference/transfers-api-quickstart)
* [Debug API](/docs/reference/debug-api-quickstart)
* [Trace API](/docs/reference/trace-api-quickstart)
* [NFT API](/docs/reference/nft-api-overview)
* [UserOp Simulation API](/docs/wallets/api-reference/bundler-api/useroperation-simulation-endpoints/alchemy-simulate-user-operation-asset-changes)

------

# bor_getAuthor

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the author address of a given block.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/bor-get-author

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending', encoded in hexadecimal format. |

## Result

**Author address** (string): The address of the author of the specified block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "bor_getAuthor",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xabc1234567890abcdef1234567890abcdef1234",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "bor_getAuthor",
  "params": [
    "string"
  ]
}'
```



------

# bor_getCurrentProposer

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the address of the current proposer.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/bor-get-current-proposer

## Result

**ProposerAddress** (string): The address of the current proposer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1234567890abcdef1234567890abcdef12345678",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "bor_getCurrentProposer"
}'
```



------

# bor_getCurrentValidators

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current list of validators.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/bor-get-current-validators

## Result

**Validators** (object[]): A list of current validators with their details.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "ID": 1,
      "accum": 100,
      "power": 1000,
      "signer": "0xabcdef1234567890abcdef1234567890abcdef12"
    },
    {
      "ID": 2,
      "accum": 200,
      "power": 2000,
      "signer": "0x1234567890abcdef1234567890abcdef12345678"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "bor_getCurrentValidators"
}'
```



------

# bor_getRootHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the root hash for a specified block range.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/bor-get-root-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| fromBlock | string | Yes | The block number from which the range starts. |
| toBlock | string | Yes | The block number where the range ends. |

## Result

**RootHash** (string): The root hash of the specified block range.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "bor_getRootHash",
  "params": [
    "1000000",
    "1000010"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0xdef456...abc123",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "bor_getRootHash",
  "params": [
    "1000000",
    "1000010"
  ]
}'
```



------

# bor_getSignersAtHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Returns all the signers of the block which match the specified block hash.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/bor-get-signers-at-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hash | string | Yes | The hash of the block. |

## Result

**Signers** (string[]): Array of signers for the specified block hash

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "bor_getSignersAtHash",
  "params": [
    "0x29fa73e3da83ddac98f527254fe37002e052725a88904bac14f03e919e1e2876"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0x0375b2fc7140977c9c76d45421564e354ed42277",
    "0x42eefcda06ead475cde3731b8eb138e88cd0bac3",
    "0x5973918275c01f50555d44e92c9d9b353cadad54",
    "0x7fcd58c2d53d980b247f1612fdba93e9a76193e6",
    "0xb702f1c9154ac9c08da247a8e30ee6f2f3373f41",
    "0xb8bb158b93c94ed35c1970d610d1e2b34e26652c",
    "0xf84c74dea96df0ec22e11e7c33996c73fcc2d822"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "bor_getSignersAtHash",
  "params": [
    "0x29fa73e3da83ddac98f527254fe37002e052725a88904bac14f03e919e1e2876"
  ]
}'
```



------

# debug_executionWitness

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the execution witness for the given block number.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/debug-execution-witness

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockNumber | string or enum | Yes | The block number or tag. |

## Result

**executionWitness** (object): The execution witness data.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "debug_executionWitness",
  "params": [
    "string"
  ]
}'
```



------

# debug_executionWitnessByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the execution witness for the given block hash.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/debug-execution-witness-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockHash | string | Yes | The block hash. |

## Result

**executionWitness** (object): The execution witness data.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "debug_executionWitnessByHash",
  "params": [
    "string"
  ]
}'
```



------

# erigon_forks

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-amoy.g.alchemy.com/v2/{apiKey}

Returns the genesis hash and lists of all height-based and time-based forks that the node is aware of.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/erigon-forks

## Result

**forks** (object): Object containing genesis hash and fork activation points.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-amoy.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "erigon_forks"
}'
```



------

# erigon_getHeaderByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-amoy.g.alchemy.com/v2/{apiKey}

Returns the block header for the given block hash.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/erigon-get-header-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hash | string | Yes | The block hash. |

## Result

**header** (object): The block header object.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-amoy.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "erigon_getHeaderByHash",
  "params": [
    "string"
  ]
}'
```



------

# erigon_getHeaderByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-amoy.g.alchemy.com/v2/{apiKey}

Returns the block header for the given block number.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/erigon-get-header-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockNumber | string or enum | Yes | The block number or tag. |

## Result

**header** (object): The block header object.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-amoy.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "erigon_getHeaderByNumber",
  "params": [
    "string"
  ]
}'
```



------

# erigon_getLogsByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-amoy.g.alchemy.com/v2/{apiKey}

Returns all logs generated by transactions in the block with the given hash, grouped by transaction.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/erigon-get-logs-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| hash | string | Yes | The block hash. |

## Result

**logs** (object[][]): Array of arrays of log objects, grouped by transaction.

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-amoy.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "erigon_getLogsByHash",
  "params": [
    "string"
  ]
}'
```



------

# eth_accounts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Returns a list of addresses owned by the client.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-accounts

## Result

**Accounts** (string[]): An array of account addresses owned by the client. Can be empty if no accounts are available.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    "0xd1f5279be4b4dd94133a23dee1b23f5bfc0db1d0"
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_accounts"
}'
```



------

# eth_baseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-amoy.g.alchemy.com/v2/{apiKey}

Returns the base fee for the next block.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-base-fee

## Result

**Base fee** (string): The hex value of the base fee for the next block.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x34630b8a00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-amoy.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_baseFee"
}'
```



------

# eth_blobBaseFee

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the base fee per blob gas in wei for the current block.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-blob-base-fee

## Result

**Blob Base Fee** (string): The base fee per blob gas, in wei, as a hexadecimal encoded unsigned integer.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3b9aca00",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blobBaseFee"
}'
```



------

# eth_blockNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of the most recent block.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-block-number

## Result

**Block number** (string): The block number of the most recently mined block as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x2377",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber"
}'
```



------

# eth_call

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Executes a new message call immediately without creating a transaction on the blockchain.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-call

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction call object containing the details of the message call. |
| Block | string or enum | No | The block number, tag, or hash at which to execute the call. Defaults to `'latest'` if not provided. |

## Result

**Return data** (string): The return value of the executed contract function, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_call",
  "params": [
    {
      "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13",
      "value": "0x1"
    },
    "latest"
  ]
}'
```



------

# eth_callBundle

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-amoy.g.alchemy.com/v2/{apiKey}

Simulates a bundle of signed transactions against a specific block number, including simulating a bundle at the top of the next block. This method allows you to test transaction bundles before submitting them to the network.


Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-call-bundle

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Bundle parameters | object | Yes | The bundle simulation parameters containing the transactions to simulate and the block context for the simulation.  |

## Result

**Bundle simulation result** (object): The result of the bundle simulation containing gas usage, fees, and individual transaction results. 

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_callBundle",
  "params": [
    {
      "txs": [
        "0x123abc...",
        "0x456def..."
      ],
      "blockNumber": "0xb63dcd",
      "stateBlockNumber": "latest",
      "timestamp": 1615920932
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "bundleGasPrice": "476190476193",
    "bundleHash": "0x73b1e258c7a42fd0230b2fd05529c5d4b6fcb66c227783f8bece8aeacdd1db2e",
    "coinbaseDiff": "20000000000126000",
    "ethSentToCoinbase": "20000000000000000",
    "gasFees": "126000",
    "results": [
      {
        "coinbaseDiff": "10000000000063000",
        "ethSentToCoinbase": "10000000000000000",
        "fromAddress": "0x02A727155aeF8609c9f7F2179b2a1f560B39F5A0",
        "gasFees": "63000",
        "gasPrice": "476190476193",
        "gasUsed": 21000,
        "toAddress": "0x73625f59CAdc5009Cb458B751b3E7b6b48C06f2C",
        "txHash": "0x669b4704a7d993a946cdd6e2f95233f308ce0c4649d2e04944e8299efcaa098a",
        "value": "0x"
      },
      {
        "coinbaseDiff": "10000000000063000",
        "ethSentToCoinbase": "10000000000000000",
        "fromAddress": "0x02A727155aeF8609c9f7F2179b2a1f560B39F5A0",
        "gasFees": "63000",
        "gasPrice": "476190476193",
        "gasUsed": 21000,
        "toAddress": "0x73625f59CAdc5009Cb458B751b3E7b6b48C06f2C",
        "txHash": "0xa839ee83465657cac01adc1d50d96c1b586ed498120a84a64749c0034b4f19fa",
        "value": "0x"
      }
    ],
    "stateBlockNumber": 5221585,
    "totalGasUsed": 42000
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-amoy.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_callBundle",
  "params": [
    {
      "txs": [
        "0x123abc...",
        "0x456def..."
      ],
      "blockNumber": "0xb63dcd",
      "stateBlockNumber": "latest",
      "timestamp": 1615920932
    }
  ]
}'
```



------

# eth_callMany

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Executes a list of transaction bundles without creating transactions on the blockchain. This method is particularly useful for simulating transactions to understand their potential outcomes. It supports simulating transactions at an intermediate state of a block, simulating multiple transactions with sequential dependencies, and overwriting block headers.


Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-call-many

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Bundles | object[] | Yes | A list of bundles where each bundle contains transactions and optional block overrides.  |
| Simulation context | object | Yes | The context for the simulation, specifying the blockNumber or Tag and transactionIndex.  |
| State overrides | object | No | An optional mapping for state overrides, following the eth_call standard.  |
| Timeout | integer | No | The maximum running time for the simulations in milliseconds, defaulting to 5000 milliseconds.  |

## Result

**Call results** (object[][]): A list of lists containing either the return value of the executed contract call or the reverted error code. Each bundle returns an array with one result per transaction. 

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "from": "0x1985ea6e9c68e1c272d8209f3b478ac2fdb25c87",
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gas": "0x0f4240",
            "gasPrice": "0x7896e72a",
            "data": "0xa9059cbb000000000000000000000000bc0e63965946815d105e7591407704e6e1964e590000000000000000000000000000000000000000000000000000000005f5e100"
          },
          {
            "to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
            "gasPrice": "0x7896e72a",
            "data": "0x70a08231000000000000000000000000bc0e63965946815d105e7591407704e6e1964e59"
          }
        ],
        "blockOverride": {
          "blockNumber": "0xbb5fe9"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    [
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000000000001"
      },
      {
        "value": "0x0000000000000000000000000000000000000000000000000000000005f5e100"
      }
    ]
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_callMany",
  "params": [
    [
      {
        "transactions": [
          {
            "type": "string",
            "nonce": "string",
            "to": null,
            "from": "string",
            "gas": "string",
            "value": "string",
            "input": "string",
            "gasPrice": "string",
            "maxPriorityFeePerGas": "string",
            "maxFeePerGas": "string",
            "maxFeePerBlobGas": "string",
            "accessList": [
              {
                "address": "string",
                "storageKeys": [
                  "string"
                ]
              }
            ],
            "blobVersionedHashes": [
              "string"
            ],
            "blobs": [
              "string"
            ],
            "chainId": "string"
          }
        ],
        "blockOverride": {
          "blockNumber": "string",
          "blockHash": "string",
          "coinbase": "string",
          "timestamp": "string",
          "difficulty": "string",
          "gasLimit": "string",
          "baseFee": "string"
        }
      }
    ],
    {
      "blockNumber": "0xbb5fe9",
      "transactionIndex": 1
    },
    {},
    5000
  ]
}'
```



------

# eth_chainId

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the chain ID of the current network as a hexadecimal string.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-chain-id

## Result

**Chain ID** (string): The chain ID of the current network in hexadecimal format.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId"
}'
```



------

# eth_createAccessList

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Generates an access list for a transaction.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-create-access-list

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to generate an access list. |
| Block | string or enum | No | The block number or tag at which to create the access list. Defaults to `'latest'` if not provided. |

## Result

**Access list result** (object): An object containing the access list and gas used for the transaction.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xaea8f8f781326bfe6a7683c2bd48dd6aa4d3ba63",
      "data": "0x608060806080608155"
    },
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "accessList": [
      {
        "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",
        "storageKeys": [
          "0x0000000000000000000000000000000000000000000000000000000000000081"
        ]
      }
    ],
    "gasUsed": "0x125f8"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_createAccessList",
  "params": [
    {
      "type": "string",
      "nonce": "string",
      "to": null,
      "from": "string",
      "gas": "string",
      "value": "string",
      "input": "string",
      "gasPrice": "string",
      "maxPriorityFeePerGas": "string",
      "maxFeePerGas": "string",
      "maxFeePerBlobGas": "string",
      "accessList": [
        {
          "address": "string",
          "storageKeys": [
            "string"
          ]
        }
      ],
      "blobVersionedHashes": [
        "string"
      ],
      "blobs": [
        "string"
      ],
      "chainId": "string"
    },
    "string"
  ]
}'
```



------

# eth_estimateGas

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-estimate-gas

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object for which to estimate gas usage. |
| Block | string or enum | No | The block number or tag at which to estimate gas usage. Defaults to `'latest'` if not provided. |

## Result

**Gas used** (string): The estimated amount of gas required for the transaction, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x5208",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "to": "0x44aa93095d6749a706051658b970b941c72c1d53",
      "value": "0x1"
    },
    "string"
  ]
}'
```



------

# eth_feeHistory

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Returns transaction base fee per gas and effective priority fee per gas for the requested block range.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-fee-history

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| blockCount | string | Yes | The number of blocks in the requested range. Must be greater than zero. Clients may return fewer blocks if not all blocks are available. |
| newestBlock | string or enum | Yes | The highest block number of the requested range, or 'latest' for the most recent block. |
| rewardPercentiles | number[] | No | An optional array of percentile values (between 0 and 100) in ascending order. For each block in the requested range, the transactions are sorted by effective priority fee per gas, and the corresponding effective priority fee per gas at each percentile is returned. |

## Result

**Fee history result** (object): Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "latest",
    [
      20,
      30
    ]
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": "0x10b52f",
    "baseFeePerGas": [
      "0x3fa63a3f",
      "0x37f999ee",
      "0x3e36f20a",
      "0x4099f79a",
      "0x430d532d",
      "0x46fcd4a4"
    ],
    "gasUsedRatio": [
      0.017712333333333333,
      0.9458865666666667,
      0.6534561,
      0.6517375666666667,
      0.7347769666666667
    ],
    "reward": [
      [
        "0x3b9aca00",
        "0x59682f00"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0x3a13012",
        "0x3a13012"
      ],
      [
        "0xf4240",
        "0xf4240"
      ],
      [
        "0xf4240",
        "0xf4240"
      ]
    ],
    "baseFeePerBlobGas": [
      "0x7b7609c19",
      "0x6dbe41789",
      "0x7223341d4",
      "0x6574a002c",
      "0x7223341d4",
      "0x6574a002c"
    ],
    "blobGasUsedRatio": [
      0,
      0.6666666666666666,
      0,
      1,
      0
    ]
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_feeHistory",
  "params": [
    "0x5",
    "string",
    [
      20,
      30
    ]
  ]
}'
```



------

# eth_fillTransaction

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Fills in default values for a transaction object. This method populates missing fields such as `gas`, `gasPrice`, `nonce`, and `chainId` based on the current network state and transaction parameters. It returns both the filled transaction object and the RLP-encoded raw transaction data.

This is useful for preparing transactions before signing, as it ensures all required fields are present with appropriate values.


Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-fill-transaction

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Transaction | object | Yes | The transaction object with optional fields to be filled. Fields like `gas`, `gasPrice`, `nonce`, and `chainId` will be populated if not provided. |

## Result

**Filled transaction** (object): An object containing the filled transaction and its RLP-encoded form.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "raw": "0xf86c808504a817c80082520894627306090abab3a6e1400e9345bc60c78a8bef570180808080",
    "tx": {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1",
      "gas": "0x5208",
      "gasPrice": "0x4a817c800",
      "nonce": "0x0",
      "chainId": "0x1",
      "input": "0x"
    }
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_fillTransaction",
  "params": [
    {
      "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
      "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
      "value": "0x1"
    }
  ]
}'
```



------

# eth_gasPrice

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the current price per gas in wei.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-gas-price

## Result

**Gas price** (string): The current gas price in wei, as a hexadecimal string.

## Example

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x3e8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_gasPrice"
}'
```



------

# eth_getAccount

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Retrieve account details (code hash, storage root, balance, nonce) for a given address at a specified block number or tag.


Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-account

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| address | string | Yes | The account address for which the information is to be retrieved. |
| blockReference | string or enum | Yes | The block number (hex quantity) or a tag: "latest", "pending", "safe", or "finalized".  |

## Result

**Account information** (object): Account fields at the requested block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "storageRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "balance": "0xba862b54effa",
    "nonce": "0x23"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getAccount",
  "params": [
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "latest"
  ]
}'
```



------

# eth_getBalance

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the balance of the account of a given address.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-balance

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to query the balance for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the balance. Can be a block number, 'latest', 'earliest', 'pending', or a block hash. |

## Result

**Balance** (string): The balance of the account in wei, encoded as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x1cfe56f3795885980000",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "latest"
  ]
}'
```



------

# eth_getBlockByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its hash.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-block-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block to retrieve. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": [
    "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    false
  ]
}'
```



------

# eth_getBlockByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Returns information about a block by its number.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-block-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |
| Hydrated transactions | boolean | Yes | If true, returns full transaction objects; if false, returns only transaction hashes. |

## Result

**Block information** (null or object): The block object containing various properties of the block.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "number": "0x68b3",
    "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
    "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
    "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
    "nonce": "0x378da40ff335b070",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
    "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
    "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
    "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
    "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
    "difficulty": "0x66e619a",
    "totalDifficulty": "0x1e875d746ae",
    "extraData": "0xd583010502846765746885676f312e37856c696e7578",
    "size": "0x334",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x37993",
    "timestamp": "0x5835c54d",
    "uncles": [],
    "transactions": [
      "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",
      "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"
    ],
    "baseFeePerGas": "0x7",
    "withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f",
    "withdrawals": [
      {
        "index": "0x0",
        "validatorIndex": "0x9d8c0",
        "address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
        "amount": "0x11a33e3760"
      }
    ],
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByNumber",
  "params": [
    "0x68b3",
    false
  ]
}'
```



------

# eth_getBlockReceipts

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the receipts of a block by number or hash.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-block-receipts

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag or hash | string or enum | Yes | The block number, tag, or hash to retrieve receipts from. |

## Result

**Receipts information** (null or object[]): An array of transaction receipt objects.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x18c36",
      "from": "0x22896bfc68814bfd855b1a167255ee497006e730",
      "gasUsed": "0x18c36",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [
        {
          "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
          "topics": [
            "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
            "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",
            "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",
            "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"
          ],
          "data": "0x",
          "blockNumber": "0x6f55",
          "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
          "transactionIndex": "0x0",
          "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
          "logIndex": "0x0",
          "removed": false
        }
      ],
      "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",
      "status": "0x1",
      "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",
      "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",
      "transactionIndex": "0x0",
      "type": "0x0"
    },
    {
      "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",
      "blockNumber": "0x6f55",
      "contractAddress": null,
      "cumulativeGasUsed": "0x1de3e",
      "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",
      "gasUsed": "0x5208",
      "blobGasUsed": "0x20000",
      "effectiveGasPrice": "0x9502f907",
      "blobGasPrice": "0x32",
      "logs": [],
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "status": "0x1",
      "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",
      "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",
      "transactionIndex": "0x1",
      "type": "0x2"
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockReceipts",
  "params": [
    "latest"
  ]
}'
```



------

# eth_getBlockTransactionCountByHash

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block from a block matching the given block hash.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-block-transaction-count-by-hash

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block hash | string | Yes | The hash of the block. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"
  ]
}'
```



------

# eth_getBlockTransactionCountByNumber

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the number of transactions in a block matching the given block number.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-block-transaction-count-by-number

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Block number or tag | string or enum | Yes | The block number or special tags like 'latest', 'earliest', or 'pending'. |

## Result

**Transaction count** (null or string): The number of transactions in the block as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x8",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ]
}'
```



------

# eth_getCode

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the code at a given address.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-code

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the contract to get code from. |
| Block | string or enum | Yes | The block number, tag, or hash at which to retrieve the code. |

## Result

**Bytecode** (string): The code from the specified address, as a hexadecimal string.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029",
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getCode",
  "params": [
    "0xa50a51c09a5c451c52bb714527e1974b686d8e77",
    "latest"
  ]
}'
```



------

# eth_getFilterChanges

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Polls for changes in the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since the last poll.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-filter-changes

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to poll for changes. |

## Result

**Log objects** (string[] or object[]): An array of log objects that have occurred since the last poll.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterChanges",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getFilterLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-filter-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter identifier | string | Yes | The ID of the filter to retrieve logs for. |

## Result

**Log objects** (string[] or object[]): An array of all log objects matching the filter since its creation.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x01"
  ]
}'
```



------

# eth_getLogs

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Returns an array of all logs matching the specified filter.
### Supported Block Ranges
Here are the block ranges you're able to submit in a single query, depending on your plan tier:

> ⚠️ Note: All responses will be capped at 150MB.

| Chain | Free | Pay As You Go | Enterprise |
|-------|------|---------------|------------|
| Ethereum, Base, Optimism, Arbitrum, Polygon, Worldchain, BNB, HyperEVM Mainnet, Monad Mainnet, Tempo Mainnet, Sei Mainnet | 10 | unlimited | unlimited |
| Monad Testnet | 10 | 1000 | 1000 |
| Berachain | 10 | 1,000 | 10,000*** |
| All Other Chains | 10 | 10,000 | 10,000*** |

*** Note: Querying block ranges wider than 10k for these chains is possible but less likely to succeed. Try splitting large queries into smaller parts to boost performance and reduce the likelihood of failure.


Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-logs

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Filter | object | Yes | The filter options object to specify the criteria for logs retrieval. |

## Result

**Log objects** (string[] or object[]): An array of log objects matching the filter criteria.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x233",
      "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
      "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    },
    {
      "logIndex": "0x0",
      "removed": false,
      "blockNumber": "0x238",
      "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
      "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
      "transactionIndex": "0x0",
      "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
      "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
      "topics": [
        "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
      ]
    }
  ],
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://polygon-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x137d3c2",
      "toBlock": "0x137d3c3",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }
  ]
}'
```



------

# eth_getProof

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://polygon-mainnet.g.alchemy.com/v2/{apiKey}

Returns the Merkle proof for a given account and optionally some storage keys.

Reference: https://www.alchemy.com/docs/chains/polygon-pos/polygon-po-s-api-endpoints/eth-get-proof

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Address | string | Yes | The address of the account to generate the proof for. |
| StorageKeys | string[] | Yes | An array of storage keys (slots) to generate proofs for. |
| Block | string or enum | Yes | The block number, tag, or hash at which to generate the proof. |

## Result

**Account proof** (object): An object containing the account proof and