📈Fixed-Rate Lending Subgraph

Documentation for querying the Fixed-Rate Lending Subgraph

The Fixed-Rate Lending Subgraph indexes data from the Secured Finance Fixed-Rate Lending protocol, enabling developers to query historical and current data using GraphQL.

Overview

The Fixed-Rate Lending protocol provides a platform for fixed-rate lending and borrowing through an order book system. The subgraph allows you to query information about orders, lending markets, transactions, positions, and other protocol activities.

How It Works

The Fixed-Rate Lending Subgraph continuously indexes events emitted by the Fixed-Rate Lending smart contracts. This data is organized into entities that can be queried using GraphQL, providing real-time access to protocol data without requiring direct interaction with the blockchain.

Subgraph Endpoints

For the complete list of subgraph endpoints, please refer to the API Reference page.

You can access the Fixed-Rate Lending Subgraph through these endpoints:

Note: The Filecoin subgraph endpoints are currently under development. Please check back later for updated URLs.

Key Entities

The Fixed-Rate Lending Subgraph schema includes these primary entities:

Transaction

Represents a transaction on the Fixed-Rate Lending protocol.

User

Represents users who interact with the Fixed-Rate Lending protocol.

Order

Represents an order in the order book.

LendingMarket

Represents a lending market for a specific currency and maturity.

Liquidation

Records details of a liquidation event.

Transfer

Records details of a deposit or withdrawal.

Deposit

Records details of a user's deposit.

DailyVolume

Records daily trading volume for a lending market.

Protocol

Records protocol-wide statistics.

ProtocolVolumeByCurrency

Records total volume by currency for the protocol.

TakerVolumeByCurrency

Records taker volume by currency for a user.

TransactionCandleStick

Records price candles for transactions.

TakerVolumeByIntervalAndCurrency

Records taker volume by interval and currency.

Examples

See the Query Examples page for sample queries to get started.

Interactive Documentation

You can interact with the Fixed-Rate Lending Subgraph directly through GraphQL using The Graph's Playground by visiting the subgraph endpoints listed above.

For interactive API documentation embedded directly in this documentation, please refer to the API Reference page.

FAQ

How do I query all active orders for a specific market?

Use the orders entity with filters:

How can I monitor new lending markets?

Subscribe to lending market events:

How do I calculate APR from unit prices?

The unit price in the Fixed-Rate Lending protocol represents a percentage of par value. To convert to APR:

APR=(10000unitPrice1)×365daysToMaturity×100%APR = \left(\frac{10000}{unitPrice} - 1\right) \times \frac{365}{daysToMaturity} \times 100\%

Last updated

Was this helpful?