> For the complete documentation index, see [llms.txt](https://docs.watchdata.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.watchdata.io/blockchain-apis/polygon-api/eth_getcode-polygon.md).

# eth\_getCode - Polygon

**Parameters**

* `DATA`, 20 Bytes - address.
* `QUANTITY|TAG` - integer block number, or the string "latest", "earliest" or "pending", see the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/).

```javascript
params: [
    '0xce5f94f814906fbe7cd151c6ceb9095325612245',
    'latest'
]
```

**Returns**

* `DATA` - the code from the given address.

**Request example**

{% tabs %}
{% tab title="Curl" %}

```bash
curl https://polygon.api.watchdata.io/node/jsonrpc?api_key=your_api_key
-X POST \
-d '{"jsonrpc":"2.0","method":"eth_getCode","params":["0xce5f94f814906fbe7cd151c6ceb9095325612245", "latest"],"id":0}'
```

{% endtab %}

{% tab title="Postman" %}

```json
URL: https://polygon.api.watchdata.io/node/jsonrpc?api_key=your_api_key
RequestType: POST
Body: 
{
    "jsonrpc":"2.0",
    "method":"eth_getCode",
    "params":["0xce5f94f814906fbe7cd151c6ceb9095325612245", "latest"],
    "id":0
}
```

{% endtab %}
{% endtabs %}

**Result**

```javascript
{
    "jsonrpc": "2.0",
    "id": 0,
    "result": "0x"
}
```
