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

# eth_getTransactionByBlockNumberAndIndex

> Call eth_getTransactionByBlockNumberAndIndex on Goldsky Edge RPC to fetch an EVM transaction by block number or tag and its index within that block.

## Parameters

<ParamField body="blockNumber" type="string" required>
  Block number (hex), or `latest`, `earliest`, `pending`
</ParamField>

<ParamField body="index" type="string" required>
  Transaction index position (hex)
</ParamField>

## Returns

<ParamField body="transaction" type="object">
  Transaction object or `null`
</ParamField>

## Example

<CodeGroup>
  ```bash cURL theme={"dark"}
  curl -X POST "https://edge.goldsky.com/standard/evm/1?key=demo" \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["latest", "0x0"], "id": 1}'
  ```

  ```javascript JavaScript theme={"dark"}
  const response = await fetch('https://edge.goldsky.com/standard/evm/1?key=demo', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
    "jsonrpc": "2.0",
    "method": "eth_getTransactionByBlockNumberAndIndex",
    "params": [
      "latest",
      "0x0"
    ],
    "id": 1
  })
  });
  const { result } = await response.json();
  console.log(result);
  ```

  ```python Python theme={"dark"}
  import requests

  response = requests.post(
      'https://edge.goldsky.com/standard/evm/1?key=demo',
      json={
    "jsonrpc": "2.0",
    "method": "eth_getTransactionByBlockNumberAndIndex",
    "params": [
      "latest",
      "0x0"
    ],
    "id": 1
  }
  )
  print(response.json()['result'])
  ```
</CodeGroup>


## Related topics

- [eth_getUncleByBlockNumberAndIndex](/edge-rpc/evm/methods/eth_getUncleByBlockNumberAndIndex.md)
- [eth_getTransactionByBlockHashAndIndex](/edge-rpc/evm/methods/eth_getTransactionByBlockHashAndIndex.md)
- [eth_getBlockTransactionCountByNumber](/edge-rpc/evm/methods/eth_getBlockTransactionCountByNumber.md)
- [eth_getBlockByNumber](/edge-rpc/evm/methods/eth_getBlockByNumber.md)
- [eth_getBlockTransactionCountByHash](/edge-rpc/evm/methods/eth_getBlockTransactionCountByHash.md)
