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 page.
You can access the Fixed-Rate Lending Subgraph through these endpoints:
Ethereum Mainnet:
Ethereum Sepolia:
Arbitrum One:
Arbitrum Sepolia:
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.
type TransactionCandleStick @entity {
id: ID! # A composite ID, e.g., "currency-maturity-interval-epochTime"
interval: BigInt! # interval in seconds
currency: Bytes!
maturity: BigInt!
timestamp: BigInt! # The start time of the interval
open: BigInt!
close: BigInt!
high: BigInt!
low: BigInt!
average: BigDecimal!
volume: BigInt!
volumeInFV: BigInt!
lendingMarket: LendingMarket!
}
TakerVolumeByIntervalAndCurrency
Records taker volume by interval and currency.
type TakerVolumeByIntervalAndCurrency @entity {
id: ID! # Composite ID, e.g., "user-currency-interval-createdAt"
takerVolumesByCurrency: TakerVolumeByCurrency!
currency: Bytes!
interval: BigInt!
createdAt: BigInt! # The start time of the interval
volume: BigInt! # Total transaction volume for the interval
updatedAt: BigInt! # Timestamp when the record was last updated
}
Examples
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.
FAQ
How do I query all active orders for a specific market?
Use the orders entity with filters:
{
orders(
where: {
lendingMarket: "0x123...",
status_in: [Open, PartiallyFilled]
}
) {
id
user { id }
side
inputAmount
inputUnitPrice
status
}
}