Lend Data API

Welcome to the Bonzo Data API Service documentation. This guide provides comprehensive information about the API endpoints, data structures, and usage examples to help you integrate with the Bonzo Liquidity Pools. Whether you're building custom liquidation services or integrating market statistics into your application, this documentation will assist you every step of the way.

Introduction

Overview

The Bonzo Data API Service provides current lending pool market statistics and individual account supply and borrow information for the Bonzo.Finance protocol. The service is publicly accessible and can be queried by third parties wishing to interact with the Bonzo Liquidity Pools, such as custom liquidation services or analytical tools.

Key Features

  • Real-Time Market Data: Access up-to-date information on supply and borrow pools for supported Hedera tokens.

  • Account Insights: Retrieve detailed account information, including balances and solvency computations.

  • Public Endpoints: Open API for developers to build custom solutions and integrations.

  • OpenAPI Specification: Comprehensive API definitions for easy integration.

Base URL

All API requests are made to the following base URL:

https://data.bonzo.finance/

Common Response Structure

Balance Information Object

All token balances are returned in a standardized format:

Endpoints

1. Account Dashboard

Get detailed information about an account's lending and borrowing positions.

Parameters

Name
Type
Description

accountId

string

Hedera account ID in format shard.realm.num

Response

Example Request

2. List of Debtors

Get a list of all accounts with outstanding debt.

Response

Example Request

3. Market Information

Get current global state of all Bonzo liquidity pools.

Response

4. Pool Statistics

Get 24-hour usage statistics for the protocol.

Response

5. Protocol Information

Get server and protocol configuration information.

Response

6. BONZO Token Information

Get circulation information for the BONZO token.

Response

7. BONZO Circulation Supply

Get current circulating supply of BONZO token in decimal notation.

Response

Plain text number representing circulating supply.

Error Handling

The API uses standard HTTP status codes:

  • 200: Success

  • 404: Resource not found

  • 503: Service unavailable (upstream mirror node error)

Error responses include a text explanation of the issue.

Rate Limiting

  • Current rate limits: None

  • Please implement reasonable request throttling in your applications

Best Practices

  1. Cache responses when appropriate to minimize API calls

  2. Use the dashboard endpoint instead of market when you have an account ID

  3. Implement exponential backoff for retries

  4. Monitor the health factor of positions if building liquidation bots

Example Implementation

Here's a simple JavaScript example to fetch market data:

Support

Last updated