Get Supplier Caps
Query supplier capability objects. A supplier cap is an on-chain object that represents ownership of supply positions in margin pools. This endpoint allows you to look up supplier caps by ID or list all caps owned by an address.
Endpoints
By ID
GET /deepbook-margin/supplier-caps/{supplierCapId}
Returns a single supplier capability by its ID.
List by Owner
GET /deepbook-margin/supplier-caps
Returns supplier capabilities with optional owner filter.
Use Cases
- Ownership Verification — Verify who owns a specific supplier cap
- Portfolio Discovery — Find all supplier caps for a wallet
- Supply Position Linking — Associate supply positions with their owner caps
- NFT-like Display — Show supplier caps as owned assets
Parameters
Path Parameters (By ID endpoint)
| Parameter | Type | Required | Description |
|---|---|---|---|
supplierCapId | string | Yes | Supplier capability ID |
Query Parameters (List endpoint)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
owner | string | No | — | Filter by owner address |
page | number | No | 0 | Page number (starts from 0) |
perPage | number | No | 10 | Items per page (max 50) |
api-key | string | Yes | — | Your Surflux API key |
Response
Single Supplier Cap (By ID)
| Field | Type | Description |
|---|---|---|
supplier_cap_id | string | Unique supplier capability ID |
owner | string | Current owner address |
checkpoint_id | number | Checkpoint when last updated |
created_at | string | ISO timestamp of creation |
updated_at | string | ISO timestamp of last update |
digest | string | Transaction digest |
Example Response (By ID)
{
"supplier_cap_id": "0xdef456789abc123def456789abc123def456789abc123def456789abc123def4",
"owner": "0xb117b12facd947cabb3d17d68a67b3d8d6865280edb0644cb4d25a9d86646966",
"checkpoint_id": 192054000,
"created_at": "2025-01-15T10:30:00.000Z",
"updated_at": "2025-01-26T14:22:00.000Z",
"digest": "AbCdEfGhIjKlMnOpQrStUvWxYz1234567890abcdef"
}
Paginated Response (List)
{
"items": [
{
"supplier_cap_id": "0xdef456789abc123def456789abc123def456789abc123def456789abc123def4",
"owner": "0xb117b12facd947cabb3d17d68a67b3d8d6865280edb0644cb4d25a9d86646966",
"checkpoint_id": 192054000,
"created_at": "2025-01-15T10:30:00.000Z",
"updated_at": "2025-01-26T14:22:00.000Z",
"digest": "AbCdEfGhIjKlMnOpQrStUvWxYz1234567890abcdef"
}
],
"isLastPage": true,
"currentPage": 0,
"perPage": 10
}