# Setup

* `POST` for all methods
* `JSON RPC 2.0`
* `id: "dontcare"`
* endpoint URL varies by network:
  * mainnet `https://rpc.mainnet.abogida.network`
  * testnet `https://rpc.testnet.abogida.network`
  * betanet `https://rpc.betanet.abogida.network` *(may be unstable)*
  * localnet `http://localhost:3030`

#### Limits[​](https://docs.near.org/api/rpc/setup#limits) <a href="#limits" id="limits"></a>

* Maximum number of requests per IP: 500 req/min

***

### Querying Historical Data[​](https://docs.near.org/api/rpc/setup#querying-historical-data) <a href="#querying-historical-data" id="querying-historical-data"></a>

Querying historical data (older than 5 [epochs](https://docs.near.org/concepts/basics/epoch) or \~2.5 days), you may get responses that the data is not available anymore. In that case, archival RPC nodes will come to your rescue:

* mainnet `https://archival-rpc.mainnet.abogida.network`
* testnet `https://archival-rpc.testnet.abogida.netwrok`

You can see this interface defined in abugida`core` here.

#### Limits[​](https://docs.near.org/api/rpc/setup#limits-1) <a href="#limits-1" id="limits-1"></a>

* Maximum number of requests per IP: 500 req/min

***

### Postman Setup[​](https://docs.near.org/api/rpc/setup#postman-setup) <a href="#postman-setup" id="postman-setup"></a>

An easy way to test the queries in this documentation page is to use an API request tool such as [Postman](https://www.postman.com/). You only need to configure two things:

1. Make sure you add a header with a key of `Content-Type` and value of `application/json`.&#x20;
2. Then select the `Body` tab and choose the `raw` radio button and ensure `JSON` is the selected format.&#x20;

After that is set up, just copy/paste the `JSON object` example snippets below into the `body` of your request, on Postman, and click `send`.

***

### JavaScript Setup[​](https://docs.near.org/api/rpc/setup#javascript-setup) <a href="#javascript-setup" id="javascript-setup"></a>

All of the queries listed in this documentation page can be called using ABOGIDA[`-api-js`](https://github.com/near/near-api-js).

* For Abogida`-api-js` installation and setup please refer to Abogida-`api-js` quick reference documentation.
* All JavaScript code snippets require a Abogida object. For examples of how to instantiate, **click here**.

***

### HTTPie Setup[​](https://docs.near.org/api/rpc/setup#httpie-setup) <a href="#httpie-setup" id="httpie-setup"></a>

If you prefer to use a command line interface, we have provided RPC examples you can use with [HTTPie](https://httpie.org/). Please note that params take either an object or array passed as a string.

```
http post https://rpc.testnet.abogida.network jsonrpc=2.0 id=dontcare method=network_info params:='[]'
```

***

### Using `block_id` param[​](https://docs.near.org/api/rpc/setup#using-block_id-param) <a href="#using-block_id-param" id="using-block_id-param"></a>

The `block_id` param can take either the block number (e.g. `27912554`) or the block hash (e.g. `'3Xz2wM9rigMXzA2c5vgCP8wTgFBaePucgUmVYPkMqhRL'` ) as an argument.

CAUTION

The block IDs of transactions shown in ABOGIDA  are not necessarily the block ID of the executed transaction. Transactions may execute a block or two after its recorded, and in some cases, can take place over several blocks. Due to this, it is important to to check subsequent blocks to be sure all results related to the queried transaction are discovered.

***

### Using `finality` param[​](https://docs.near.org/api/rpc/setup#using-finality-param) <a href="#using-finality-param" id="using-finality-param"></a>

The `finality` param has two options: `optimistic` and `final`.

1. `optimistic` uses the latest block recorded on the node that responded to your query *(< 1 second delay after the transaction is submitted)*
2. `final` is for a block that has been validated on at least 66% of the nodes in the network *(usually takes 2 blocks / approx. 2 second delay)*
