Klarda Protocol API Quickstart

This guide provides new developers with a comprehensive introduction to using the Protocol API to access market capitalization, stablecoin, and staking/farming data. Learn how to query protocol data using popular HTTP clients such as fetch or axios.

Protocol API Definition

The Klarda Protocol API provides comprehensive endpoints designed to offer detailed information and analytics about various blockchain protocols. This API allows developers to access data such as protocol metadata, total value locked (TVL), staking and farming pool information, and stablecoin metrics. The Protocol API is essential for applications focusing on DeFi, yield farming, and blockchain analytics, enabling users to make informed decisions based on accurate and up-to-date protocol data.

Protocol API Endpoint

With the Protocol API, you can easily request information on various protocols, including metadata, total value locked (TVL), staking, and farming data. Klarda currently supports the following Protocol API Endpoints:

Marketcap API Endpoint

  • Get Protocol Metadata:
    Retrieves metadata information about a specific protocol.

    Endpoint: GET /api/v1/protocol/metadata

    Parameters:

    • protocol_id (string): The unique identifier of the protocol.
  • Get Protocol TVL by ID:
    Fetches the total value locked (TVL) for a specific protocol by its ID.

    Endpoint: GET /api/v1/protocol/tvl

    Parameters:

    • protocol_id (string): The unique identifier of the protocol.
  • Get Protocol TVL by Chain ID:
    Retrieves the TVL for a protocol filtered by a specific blockchain.

    Endpoint: GET /api/v1/protocol/tvl/chain

    Parameters:

    • chain_id (int): The unique identifier of the blockchain.
  • Get Protocol TVL History:
    Fetches the historical TVL data for a specific protocol.

    Endpoint: GET /api/v1/protocol/tvl/history

    Parameters:

    • protocol_id (string): The unique identifier of the protocol.
    • duration (int): The duration for which to fetch the historical data.

Stable API Endpoint

  • Endpoints for stablecoin data will be added in future updates. Stay tuned for more details.

Staking/Farming API Endpoint

  • Get Staking Pool by Token ID:
    Retrieves information about staking pools associated with a specific token.

    Endpoint: GET /api/v1/staking/pool

    Parameters:

    • token_id (string): The unique identifier of the token.
    • page (int, default: 1): The page number for pagination.
    • limit (int, default: 10): The number of staking pools to return per page.
  • Get Farming Pool by Token ID:
    Fetches information about farming pools associated with a specific token.

    Endpoint: GET /api/v1/farming/pool

    Parameters:

    • token_id (string): The unique identifier of the token.
    • page (int, default: 1): The page number for pagination.
    • limit (int, default: 10): The number of farming pools to return per page.

Example Use Cases

1. Accessing Protocol Metadata:
Use the "Get Protocol Metadata" endpoint to obtain detailed information about specific protocols. This can be beneficial for analytical platforms and research purposes.

2. Monitoring TVL:
With the TVL endpoints, you can monitor the total value locked in various protocols, either by protocol ID or by specific blockchains. This data is essential for DeFi analytics and market research.

3. Managing Staking and Farming Pools:
The staking and farming endpoints allow you to manage and display information about various pools associated with specific tokens. This is useful for platforms that offer staking and farming services to users.

We hope this quickstart guide helps you get started with the Klarda Protocol API. For more detailed information, please refer to the full API documentation.