# Quickstart Guide

## Prerequisites[​](https://docs.infura.io/api/networks/ethereum/quickstart#prerequisites) <a href="#prerequisites" id="prerequisites"></a>

Ensure you [have an API key](https://liquify-2.gitbook.io/liquify/rpc-quickstart-guide/create-an-rpc-endpoint) with the Kaia network enabled.

## Make calls[​](https://docs.infura.io/api/networks/ethereum/quickstart#make-calls) <a href="#make-calls" id="make-calls"></a>

### cURL[​](https://docs.infura.io/api/networks/ethereum/quickstart#curl) <a href="#curl" id="curl"></a>

Run the following command in your terminal. This command will retrieve the latest block number from the Kaia network.&#x20;

Replace `YOUR-API-KEY` with your actual Liquify Gateway API key.

```
curl https://gateway.liquify.com/api=YOUR-API-KEY \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
```

## NOTE

In Windows Powershell, quotations in `curl` commands can behave differently than expected. We recommend using Postman on Windows systems.

## Postman[​](https://docs.infura.io/api/networks/ethereum/quickstart#postman) <a href="#postman" id="postman"></a>

Call the JSON-RPC methods using [Postman](https://learning.postman.com/docs/getting-started/introduction/).

**INFO:** Set the correct [variables](https://learning.postman.com/docs/sending-requests/variables/#understanding-variables) for your API key and network before running requests.

## Node (JavaScript)[​](https://docs.infura.io/api/networks/ethereum/quickstart#node-javascript) <a href="#node-javascript" id="node-javascript"></a>

In these examples, you'll use [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) as your package manager.

### **Node Fetch**[**​**](https://docs.infura.io/api/networks/ethereum/quickstart#node-fetch)

1. In your project folder, install the Node Fetch package using npm:

   ```
   npm i node-fetch
   ```
2. Create your Javascript file and copy the following code:

   Replace `YOUR-API-KEY` with your actual Liquify Gateway API key.

   index.js

   ```
   import fetch from 'node-fetch';

   fetch("https://gateway.liquify.com/api=YOUR-API-KEY", {
     method: "POST",
     headers: {
       "Content-Type": "application/json"
     },
     body: JSON.stringify({
       jsonrpc: "2.0",
       method: "eth_blockNumber",
       params: [],
       id: 1
     })
   })
   .then(response =>
     response.json()
   )
   .then(data => {
     console.log(data);
   })
   .catch(error => {
     console.error(error);
   });
   ```
3. Run the code using the following command:

   ```
   node index.js
   ```

### **Axios**[**​**](https://docs.infura.io/api/networks/ethereum/quickstart#axios)

1. In your project folder, install the Axios package using npm:

   ```
   npm i axios
   ```
2. Create your Javascript file and copy the following code:

   Replace `YOUR-API-KEY` with your actual Liquify Gateway API key.

   index.js

   ```
   const axios = require('axios');

   axios.post('https://gateway.liquify.com/api=YOUR-API-KEY', {
     jsonrpc: '2.0',
     method: 'eth_blockNumber',
     params: [],
     id: 1
   })
   .then(response => {
     console.log(response.data);
   })
   .catch(error => {
     console.error(error);
   });
   ```
3. Run the code using the following command:

   ```
   node index.js
   ```

### **Ethers**[**​**](https://docs.infura.io/api/networks/ethereum/quickstart#ethers)

1. In your project folder, install the ethers package using npm:

   ```
   npm install ethers
   ```
2. Create your Javascript file and copy the following code:

   Replace `YOUR-API-KEY` with your actual Liquify Gateway API key.

   index.js

   ```
   const ethers = require('ethers');

   const provider = new ethers.providers.JsonRpcProvider('https://gateway.liquify.com/api=YOUR-API-KEY');

   provider.getBlockNumber()
   .then(blockNumber => {
     console.log(blockNumber);
   })
   .catch(error => {
     console.error(error);
   });
   ```
3. Run the code using the following command:

   ```
   node index.js
   ```

### **Web3.js**[**​**](https://docs.infura.io/api/networks/ethereum/quickstart#web3js)

1. In your project folder, [install the latest version of the web3.js library](https://www.npmjs.com/package/web3?activeTab=versions)
2. Create your Javascript file and copy the following code:

   Replace `YOUR-API-KEY` with your actual Liquify Gateway API key.

   index.js

   ```
   var { Web3 } = require("web3");
   var provider = "https://gateway.liquify.com/api=YOUR-API-KEY";
   var web3Provider = new Web3.providers.HttpProvider(provider);
   var web3 = new Web3(web3Provider);

   web3.eth.getBlockNumber().then((result) => {
     console.log("Latest Ethereum Block is ", result);
   });
   ```
3. Run the code using the following command:

   ```
   node index.js
   ```

### Python[​](https://docs.infura.io/api/networks/ethereum/quickstart#python) <a href="#python" id="python"></a>

1. In your project folder, install the `requests` library:

   ```
   pip install requests
   ```
2. Create your Python file and copy the following code:

   Replace `YOUR-API-KEY` with your actual Liquify Gateway API key.

   index.py

   ```
   import requests
   import json

   url = 'https://gateway.liquify.com/api=YOUR-API-KEY'

   payload = {
       "jsonrpc": "2.0",
       "method": "eth_blockNumber",
       "params": [],
       "id": 1
   }

   headers = {'content-type': 'application/json'}

   response = requests.post(url, data=json.dumps(payload), headers=headers).json()

   print(response)
   ```
3. Run the code using the following command:

   ```
   python index.py
   ```
