Trade, lend, LP, and
manage positions
across DeFi.
Through one SDK.

Lending markets. DEXs. Perps. Liquidity pools. Every protocol has its own contracts, ABIs, and edge cases. This SDK abstracts all of it behind a single set of function calls — with full transaction execution, not just calldata.
$pip install defi-sdk
# Supply across lending markets — same call, any protocol
sdk.lend.supply(
protocol="aave_v3",
asset="USDC", amount=10_000.0
)
→ TxResult(tx_hash='0x3f2a…', status='confirmed')
# Same interface, different protocol
sdk.lend.supply(
protocol="morpho",
asset="USDC", amount=10_000.0
)
sdk.lend.get_health_factor(protocol="aave_v3")
→ Decimal('1.847')
How it connects
Trading DesksFundsDAppsWalletsAI Agents
defi-sdk
UNIFIED INTERFACE
Aavelend
Morpholend
Curvedex
Uniswapdex
Hyperliquidperp
GMXperp
Pendleyield
Every fund, every trading desk, every protocol team builds bespoke integrations to every DeFi protocol they touch. Aave works differently than Morpho. Curve works differently than Uniswap. Hyperliquid works differently than GMX. Each one requires weeks of engineering. Then the protocol upgrades and it breaks.
This SDK is one abstraction over all of it. Lend, borrow, swap, open perp positions, provide liquidity — through a consistent interface regardless of what's underneath. New protocols are added with AI-assisted generation. You focus on strategy. The SDK handles the plumbing.
Capabilities
Lending & Borrowing
Supply collateral, borrow assets, repay, withdraw. Health factor monitoring. Works across Aave, Morpho, Compound, and any lending market.
Spot DEX Trading
Quote and execute swaps with slippage protection. Curve, Uniswap, and any AMM — same interface, optimal routing.
Perpetual Futures
Open and close positions. Long, short, leverage. Funding rate queries. Across on-chain perp venues.
Liquidity Provision
Add and remove liquidity. Concentrated ranges, full-range, stable pools. Track positions, fees earned, impermanent loss.
Full Execution
Not calldata. The SDK constructs, approves, signs, submits, and confirms. You get back a transaction hash and a receipt.
Custom Connectors
New protocols added in hours. Submit a request, we generate the connector. The coverage grows with demand.
Protocols
Aave V3Lendinglive
Morpho BlueLendinglive
CurveDEX / AMMlive
Compound V3Lendingnext
Uniswap V3DEX / AMMnext
HyperliquidPerps / Spotnext
LidoLiquid Stakingplanned
GMX V2Perpsplanned
PendleYield Tradingplanned
Coverage expanding continuously. Request a protocol →
Pricing
Per call.
Nothing else.
x402 micropayments in USDC on Base. No API keys. No subscriptions. No invoicing. Your wallet pays automatically per SDK call.
read$0.001
quote$0.002
write$0.005
typical fund ≈ $1/day  ·  heavy usage ≈ $10/day
Request a connector