# Polygon

The 4EVERLAND RPC request data format adheres to the Ethereum standard JSON-RPC and supports most methods specified in the [PolygonRPC API Reference](https://github.com/0xPolygon/polygon-edge/tree/develop/docs/docs/api) (including [Ethereum](https://wiki.polygon.technology/docs/edge/api/json-rpc-eth/),[Net](https://wiki.polygon.technology/docs/edge/api/json-rpc-net/),[Web3](https://wiki.polygon.technology/docs/edge/api/json-rpc-web3/),[Debug](https://wiki.polygon.technology/docs/edge/api/json-rpc-debug/),[TxPool](https://wiki.polygon.technology/docs/edge/api/json-rpc-txpool/)). This tutorial will provide an example of the request format for the [`eth_getBalance`](https://wiki.polygon.technology/docs/edge/api/json-rpc-eth/#eth_getbalance) method, which can be used as a reference for other methods.

## API Endpoints

The requested URL, combined with the API Key, is as follows:&#x20;

Endpoint (https): `https://polygon-mainnet.4everland.org/v1/{apikey}`&#x20;

Endpoint (wss): `wss://polygon-mainnet.4everland.org/ws/v1/{apikey}`

## Example

Task the [`eth_getBalance`](https://wiki.polygon.technology/docs/edge/api/json-rpc-eth/#eth_getbalance) method as an example

### **Parameters**

1. `DATA`, 20 Bytes - address to check for balance.
2. `QUANTITY|TAG` - integer block number, or the string `"latest"`, `"earliest"` or `"pending"`

```Shell
params: ["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"]
```

### **Request Example**

```Shell
curl --request POST \
     --url https://polygon-mainnet.4everland.org/v1/1659dfb40aa24bbb8153a677b98064d7 \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "params": [
    "0x145BD3C05D8d3117d133f577fa9af538ba353e8C",
    "latest"
  ],
  "method": "eth_getBalance"
}
'
```

### **Response Example**

```Shell
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x2eb9bcf4ec145"
}
```

## Networks

For Polygon, the supported chain is currently limited to Mainnet.

## Block range limitaion

When considering the block range, it is important to note that the response size for the `getFilterLogs` and `getLogs` methods varies accordingly. Specifically:

* Block range exceeding 50K: Unavailable for querying.
* Block range less than or equal to 100: Experiences no limitation on response size.
* Block range falling between 100 and 50K: At most, 50K records will be provided in the response.

{% hint style="info" %}
If you have any questions, please join our [Discord server](https://discord.com/invite/Cun2VpsdjF), or send us an email at <contact@4everland.org>.
{% endhint %}
