Quickstart Guide

This quickstart guide will help you set up and make calls on the DFK network using the Liquify Gateway endpoints.

Prerequisites​

Ensure you have an API key with the DFK network enabled.

Make calls​

cURL​

Run the following command in your terminal. This command will retrieve the latest block number from the DFK network.

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​

Call the JSON-RPC methods using Postman.

INFO: Set the correct variables for your API key and network before running requests.

Node (JavaScript)​

In these examples, you'll use npm as your package manager.

Node Fetch​

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

  2. Create your Javascript file and copy the following code:

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

    index.js

  3. Run the code using the following command:

Axios​

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

  2. Create your Javascript file and copy the following code:

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

    index.js

  3. Run the code using the following command:

Ethers​

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

  2. Create your Javascript file and copy the following code:

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

    index.js

  3. Run the code using the following command:

Web3.js​

  1. Create your Javascript file and copy the following code:

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

    index.js

  2. Run the code using the following command:

Python​

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

  2. Create your Python file and copy the following code:

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

    index.py

  3. Run the code using the following command:

Last updated