Overview
Kamino provides three integration options:| Option | Description |
|---|---|
| REST API | HTTPS endpoints for data, analytics, and unsigned transactions. Language-agnostic. |
| TypeScript SDK | On-chain state reads and transaction building. TS/JS only. |
| Rust Interface Crate | Lightweight instruction builder for Rust clients, bots, and on-chain CPI. |
Core Differences
Comparison of API, SDK, and Rust crate capabilities.| Capability | REST API | TypeScript SDK | Rust Interface Crate |
|---|---|---|---|
| Data queries (vaults, reserves) | Ready-made endpoints | On-chain reads | On-chain reads (raw account parsing) |
| User position tracking | Rich endpoints | Real-time account lookup | Real-time account lookup |
| Historical metrics & charts | Built-in history endpoints | Not available | Not available |
| Transaction building (deposit, borrow) | Unsigned transaction endpoints | Instruction builders | Instruction builders |
| Vault creation | Not supported | Admin-level creation tools | Not supported |
| On-chain CPI | Not applicable | Not applicable | Direct CPI from Solana programs |
| Language/runtime | Any (via HTTP) | TypeScript/JavaScript only | Rust (client-side or on-chain) |
Data & Analytics
Retrieve vault, market, and historical performance data.Historical Performance
Historical Performance
REST APIFetch historical APY data for lending market reserves.TypeScript SDKNo history tracking. Developers must persist snapshots manually if needed.
On-Chain Transactions
Build and execute deposit, borrow, repay, and withdraw operations.Deposit Liquidity
Deposit Liquidity
REST API
Get unsigned Solana transactions to deposit liquidity into a Kamino Lend market reserve. Returns transaction that must be signed client-side.TypeScript SDK
Build and execute deposit transactions directly on-chain.Rust Interface Crate
Build deposit instructions from a Rust client. Ideal for bots and backend services.
Get unsigned Solana transactions to deposit liquidity into a Kamino Lend market reserve. Returns transaction that must be signed client-side.
Build and execute deposit transactions directly on-chain.
Build deposit instructions from a Rust client. Ideal for bots and backend services.
Borrow & Repay
Borrow & Repay
REST API
Get unsigned transactions for borrow and repay operations.TypeScript SDK
Build borrow and repay transactions directly.Rust Interface Crate
Build borrow instructions using
Get unsigned transactions for borrow and repay operations.
Build borrow and repay transactions directly.
Build borrow instructions using
ObligationContext which handles reserve refresh automatically.Vault Creation
Vault Creation
TypeScript SDK
Recommended Usage Patterns
Choose the right tool for your use case.| Use Case | Best Tool |
|---|---|
| Display vault list with APR & TVL | API |
| Chart vault APY over 30 days | API |
| Fetch a user’s historical rewards | API |
| Build transactions for client signing | API |
| Execute transactions with full customization | SDK |
| Create a new liquidity vault | SDK |
| Build in non-JS backend (e.g. Python) | API |
| Require zero rate limits | SDK with private RPC |
| Build a Rust bot | Rust Crate |
| CPI from an on-chain Solana program | Rust Crate |
Summary
Use the Kamino REST API for fast data integration, history tracking, and building unsigned transactions across any backend. Use the TypeScript SDK for advanced transaction composition, simulation, and vault creation with full on-chain control. Use the Rust interface crate for Rust-native clients, high-performance bots, and CPI from on-chain Solana programs.Relevant links
API Documentation
Explore REST API endpoints and response schemas
SDK Documentation
Learn how to integrate the TypeScript SDK
Rust Interface Crate
Lightweight Rust instruction builder for clients and CPI
Borrow Operations
Step-by-step guides for deposit, withdraw, borrow, and repay
SDK Examples
View code examples in the GitHub repository