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

# Polygon JSON-RPC

> GoldRush JSON-RPC for Polygon. Endpoint URLs, supported methods, and code examples.

GoldRush JSON-RPC supports **Polygon**.

## Endpoint

```
https://rpc.goldrushdata.com/v1/matic-mainnet
```

| Property             | Value                                                |
| -------------------- | ---------------------------------------------------- |
| **Chain slug**       | `matic-mainnet`                                      |
| **Native gas token** | MATIC                                                |
| **Block time**       | \~3s                                                 |
| **Block explorer**   | [https://polygonscan.com/](https://polygonscan.com/) |
| **Network type**     | Mainnet                                              |
| **Testnets**         | `polygon-amoy-testnet`                               |

## Quickstart

```bash theme={null}
curl https://rpc.goldrushdata.com/v1/matic-mainnet \
  -H "Authorization: Bearer $GOLDRUSH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_blockNumber",
    "params": []
  }'
```

## Supported methods

Each method below has a dedicated reference page tuned for Polygon, with chain-specific examples.

### Blocks info

* [`eth_blockNumber`](/api-reference/json-rpc/polygon/eth-blocknumber): Returns the latest block number on the chain.
* [`eth_getBlockByHash`](/api-reference/json-rpc/polygon/eth-getblockbyhash): Returns block information by block hash.
* [`eth_getBlockByNumber`](/api-reference/json-rpc/polygon/eth-getblockbynumber): Returns block information by block number.
* [`eth_getBlockTransactionCountByHash`](/api-reference/json-rpc/polygon/eth-getblocktransactioncountbyhash): Returns the number of transactions in a block, identified by hash.
* [`eth_getBlockTransactionCountByNumber`](/api-reference/json-rpc/polygon/eth-getblocktransactioncountbynumber): Returns the number of transactions in a block, identified by number.

### Transactions info

* [`eth_getTransactionCount`](/api-reference/json-rpc/polygon/eth-gettransactioncount): Returns the nonce (number of transactions sent) of an address.
* [`eth_getTransactionByHash`](/api-reference/json-rpc/polygon/eth-gettransactionbyhash): Returns transaction details by transaction hash.
* [`eth_getTransactionByBlockHashAndIndex`](/api-reference/json-rpc/polygon/eth-gettransactionbyblockhashandindex): Returns the transaction at a given index inside a block, identified by block hash.
* [`eth_getTransactionByBlockNumberAndIndex`](/api-reference/json-rpc/polygon/eth-gettransactionbyblocknumberandindex): Returns the transaction at a given index inside a block, identified by block number.
* [`eth_getTransactionReceipt`](/api-reference/json-rpc/polygon/eth-gettransactionreceipt): Returns the receipt for a mined transaction.

### Executing transactions

* [`eth_call`](/api-reference/json-rpc/polygon/eth-call): Executes a read-only contract call without creating a transaction.
* [`eth_estimateGas`](/api-reference/json-rpc/polygon/eth-estimategas): Estimates the gas required to execute a transaction.
* [`eth_sendRawTransaction`](/api-reference/json-rpc/polygon/eth-sendrawtransaction): Submits a signed raw transaction to the network.

### Accounts info

* [`eth_getBalance`](/api-reference/json-rpc/polygon/eth-getbalance): Returns the native token balance of an address at a given block.
* [`eth_getCode`](/api-reference/json-rpc/polygon/eth-getcode): Returns the contract bytecode at a given address.
* [`eth_getStorageAt`](/api-reference/json-rpc/polygon/eth-getstorageat): Returns the value of a storage slot for a given address.
* [`eth_accounts`](/api-reference/json-rpc/polygon/eth-accounts): Returns the addresses owned by the connected node.
* [`eth_getProof`](/api-reference/json-rpc/polygon/eth-getproof): Returns the Merkle proof for an account and storage slots.

### Logs and events

* [`eth_getLogs`](/api-reference/json-rpc/polygon/eth-getlogs): Returns event logs matching a filter.
* [`eth_newFilter`](/api-reference/json-rpc/polygon/eth-newfilter): Creates a log filter that can be polled for new matches.
* [`eth_newBlockFilter`](/api-reference/json-rpc/polygon/eth-newblockfilter): Creates a filter that fires on new blocks.
* [`eth_newPendingTransactionFilter`](/api-reference/json-rpc/polygon/eth-newpendingtransactionfilter): Creates a filter that fires on new pending transactions.
* [`eth_uninstallFilter`](/api-reference/json-rpc/polygon/eth-uninstallfilter): Removes a server-side filter.
* [`eth_getFilterChanges`](/api-reference/json-rpc/polygon/eth-getfilterchanges): Returns new entries for a filter since the last poll.
* [`eth_getFilterLogs`](/api-reference/json-rpc/polygon/eth-getfilterlogs): Returns all logs matching a log filter (one-shot).

### Gas data

* [`eth_gasPrice`](/api-reference/json-rpc/polygon/eth-gasprice): Returns the node's current suggested gas price.
* [`eth_maxPriorityFeePerGas`](/api-reference/json-rpc/polygon/eth-maxpriorityfeepergas): Returns the suggested priority fee per gas (EIP-1559).
* [`eth_feeHistory`](/api-reference/json-rpc/polygon/eth-feehistory): Returns historical fee market data over a range of blocks.
* [`eth_blobBaseFee`](/api-reference/json-rpc/polygon/eth-blobbasefee): Returns the current EIP-4844 blob base fee.

### Chain info

* [`eth_chainId`](/api-reference/json-rpc/polygon/eth-chainid): Returns the EIP-155 chain ID.
* [`eth_syncing`](/api-reference/json-rpc/polygon/eth-syncing): Returns the node's sync status.
* [`net_version`](/api-reference/json-rpc/polygon/net-version): Returns the network ID as a decimal string.
* [`net_listening`](/api-reference/json-rpc/polygon/net-listening): Returns whether the node is actively listening for peers.
* [`net_peerCount`](/api-reference/json-rpc/polygon/net-peercount): Returns the number of connected peers.

### Debug and trace

* [`debug_traceTransaction`](/api-reference/json-rpc/polygon/debug-tracetransaction): Returns an opcode-level execution trace for a mined transaction.
* [`debug_traceCall`](/api-reference/json-rpc/polygon/debug-tracecall): Traces a `eth_call` without producing a transaction.
* [`debug_traceBlockByHash`](/api-reference/json-rpc/polygon/debug-traceblockbyhash): Traces every transaction in a block, identified by hash.
* [`debug_traceBlockByNumber`](/api-reference/json-rpc/polygon/debug-traceblockbynumber): Traces every transaction in a block, identified by number.
* [`trace_transaction`](/api-reference/json-rpc/polygon/trace-transaction): Returns the Parity-style trace of a mined transaction.
* [`trace_block`](/api-reference/json-rpc/polygon/trace-block): Returns Parity-style traces for every transaction in a block.
* [`trace_filter`](/api-reference/json-rpc/polygon/trace-filter): Returns Parity-style traces matching a filter.
* [`trace_call`](/api-reference/json-rpc/polygon/trace-call): Returns the Parity-style trace of an `eth_call`.
* [`trace_callMany`](/api-reference/json-rpc/polygon/trace-callmany): Returns Parity-style traces for a sequence of calls executed on top of the same block.
* [`trace_rawTransaction`](/api-reference/json-rpc/polygon/trace-rawtransaction): Returns Parity-style traces for a raw, signed transaction without broadcasting it.
* [`trace_replayBlockTransactions`](/api-reference/json-rpc/polygon/trace-replayblocktransactions): Replays every transaction in a block and returns the requested Parity-style traces.
* [`trace_replayTransaction`](/api-reference/json-rpc/polygon/trace-replaytransaction): Replays a mined transaction and returns the requested Parity-style traces.
* [`trace_get`](/api-reference/json-rpc/polygon/trace-get): Returns a single Parity-style trace at a given position within a transaction.

### Client information

* [`web3_clientVersion`](/api-reference/json-rpc/polygon/web3-clientversion): Returns the underlying client software version.
* [`web3_sha3`](/api-reference/json-rpc/polygon/web3-sha3): Returns the keccak-256 hash of the supplied data.

## Related

<CardGroup cols={2}>
  <Card title="JSON-RPC Overview" href="/goldrush-json-rpc/overview" icon="circle-info">Product overview and architecture.</Card>
  <Card title="Authentication" href="/goldrush-json-rpc/authentication" icon="key">Header reference and per-library setup.</Card>
</CardGroup>
