enso-api-0.1.0 has been yanked.
Overview
Enso Finance is a DeFi infrastructure platform that provides:
- Multi-action Bundling - Combine swap, deposit, stake in one transaction
- Cross-protocol Routing - Access to 100+ DeFi protocols
- Position Management - Enter/exit complex DeFi strategies
- Gas Efficiency - Batched transactions for lower costs
Features
- Route API - Get optimal routes for token swaps
- Bundle API - Combine multiple DeFi actions into one transaction
- Price API - Query token prices
- Balance API - Get token balances for addresses
- Multi-chain - Supports Ethereum, Polygon, Arbitrum, Optimism, and more
Quick Start
use ;
async
Action Bundling
Enso's killer feature is bundling multiple DeFi actions:
use ;
let client = with_api_key?;
// Bundle: Swap ETH -> USDC, then deposit USDC to Aave
let actions = vec!;
let request = new;
let bundle = client.bundle.await?;
println!;
Token Prices
use Client;
let client = with_api_key?;
let price = client.get_token_price.await?;
println!;
Token Balances
use Client;
let client = with_api_key?;
let balances = client.get_balances.await?;
for balance in balances
Supported Chains
| Chain | Chain ID |
|---|---|
| Ethereum | 1 |
| Polygon | 137 |
| Arbitrum | 42161 |
| Optimism | 10 |
| Base | 8453 |
| BSC | 56 |
Configuration
use ;
use Duration;
// API key is required
let client = with_api_key?;
// With custom configuration
let config = new
.api_key
.timeout;
let client = with_config?;
API Reference
License
MIT