Get Active Supplies
Query active liquidity supply positions in margin pools. This endpoint returns supply positions with their current amounts, shares, and associated supplier capabilities. Use it to monitor lending positions and track interest earned.
Endpoints
There are two endpoints for querying active supplies:
By Owner
GET /deepbook-margin/active-supplies/{owner}
Returns active supply positions for all supplier caps owned by a specific address.
General Query
GET /deepbook-margin/active-supplies
Returns active supply positions with optional filters.
Use Cases
- Lending Dashboard — Display all supply positions for a lender
- Interest Tracking — Calculate accrued interest on supplied assets
- Pool Analytics — Analyze total liquidity supplied to each pool
- Portfolio Management — Track lending positions across multiple pools
Parameters
Path Parameters (By Owner endpoint)
| Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | Owner wallet address |
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
page | number | No | 0 | Page number (starts from 0) |
perPage | number | No | 10 | Items per page (max 50) |
marginPoolId | string | No | — | Filter by margin pool ID |
supplierCapId | string | No | — | Filter by supplier capability ID |
assetType | string | No | — | Filter by asset type (e.g., 0x2::sui::SUI) |
api-key | string | Yes | — | Your Surflux API key |
Response
Returns a paginated response with active supply objects.
Pagination Fields
| Field | Type | Description |
|---|---|---|
items | array | Array of active supply objects |
isLastPage | boolean | Whether this is the last page |
currentPage | number | Current page number |
perPage | number | Items per page |
Active Supply Fields
| Field | Type | Description |
|---|---|---|
margin_pool_id | string | Margin pool where liquidity is supplied |
asset_type | string | Type of asset supplied |
supplier_cap_id | string | Supplier capability ID |
supply_amount | number | Original supplied amount |
supply_shares | number | Supply shares (for interest calculation) |
remaining_amount | number | Current supply amount (including accrued interest) |
remaining_shares | number | Current supply shares |
checkpoint | number | Checkpoint of last update |
timestamp | string | ISO timestamp |
checkpoint_timestamp_ms | number | Timestamp in milliseconds |
digest | string | Transaction digest |
supplier_cap | object | null | Associated supplier capability details |
Supplier Cap Fields
| Field | Type | Description |
|---|---|---|
supplier_cap_id | string | Supplier capability ID |
owner | string | Owner wallet address |
checkpoint_id | number | Checkpoint when created/updated |
created_at | string | ISO timestamp of creation |
updated_at | string | ISO timestamp of last update |
digest | string | Transaction digest |