> ## 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_chainId

> Call eth_chainId on Goldsky Edge RPC to return the EIP-155 chain ID of the current network as a hex string, with curl, JavaScript, and Python examples.

## Parameters

None

## Returns

**chainId** `string`

The current chain ID (hex encoded)

## Example

```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_chainId", "params": [], "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_chainId",
  "params": [],
  "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_chainId",
  "params": [],
  "id": 1
}
)
print(response.json()['result'])
```


## Related topics

- [Which chains a connected provider serves](https://docs.goldsky.com/api-reference/boost-providers/which-chains-a-connected-provider-serves.md)
- [Measure Boost traffic](https://docs.goldsky.com/boost/observability.md)
- [How Boost routes requests](https://docs.goldsky.com/boost/how-it-works.md)
- [Edge EVM Sources](https://docs.goldsky.com/turbo-pipelines/sources/edge-evm.md)
- [CLI Reference](https://docs.goldsky.com/reference/cli.md)
