Complete API reference for integrating with Yield Delta's AI-powered yield optimization platform on SEI Network.
Production
https://www.yielddelta.xyz/apiDevelopment
http://localhost:3000/apiSome endpoints require API key authentication. Include your API key in the request headers:
javascriptconst headers = { 'X-API-Key': 'your-api-key-here', 'Content-Type': 'application/json' }; // Example usage: fetch('https://www.yielddelta.xyz/api/vaults', { method: 'GET', headers: headers });
Public endpoints (no authentication required):
/health/market/data/vaultsResponse Headers
X-RateLimit-LimitTotal request limitX-RateLimit-RemainingRemaining requestsX-RateLimit-ResetReset timestampCheck API and service health status.
json{ "status": "healthy", "timestamp": "2024-01-23T15:30:00Z", "version": "1.0.0", "chain": "SEI", "chainId": 1328, "services": { "api": "operational", "ai_engine": "operational", "blockchain": "operational" } }
List all vaults with optional filtering.
| Parameter | Type | Description |
|---|---|---|
strategy | string | Filter by strategy type |
active | boolean | Filter by active status |
page | number | Page number (default: 1) |
limit | number | Items per page (default: 50, max: 1000) |
json{ "success": true, "data": [ { "address": "0xf6A791e4773A60083AA29aaCCDc3bA5E900974fE", "name": "SEI-USDC Concentrated LP", "strategy": "concentrated_liquidity", "tokenA": "SEI", "tokenB": "USDC", "fee": 0.003, "tickSpacing": 60, "tvl": 1250000, "apy": 0.125, "chainId": 1328, "active": true, "performance": { "totalReturn": 0.087, "sharpeRatio": 1.45, "maxDrawdown": 0.023, "winRate": 0.68 } } ], "count": 1, "chainId": 1328 }
Create a new vault.
json{ "name": "SEI-USDC Concentrated LP", "strategy": "concentrated_liquidity", "tokenA": "SEI", "tokenB": "USDC", "fee": 0.003, "tickSpacing": 60, "chainId": 1328 }
concentrated_liquidityConcentrated liquidity positions
yield_farmingYield farming strategies
arbitrageCross-DEX arbitrage
hedgeHedging strategies
stable_maxStablecoin maximizer
sei_hypergrowthHigh-risk SEI growth strategy
blue_chipBlue-chip token strategy
delta_neutralDelta neutral market making
json{ "success": true, "data": { "address": "0x1234567890123456789012345678901234567890", "name": "SEI-USDC Concentrated LP", "strategy": "concentrated_liquidity", "tokenA": "SEI", "tokenB": "USDC", "fee": 0.003, "tickSpacing": 60, "tvl": 0, "apy": 0, "chainId": 1328, "active": true }, "message": "Vault created successfully", "chainId": 1328 }
Get detailed vault information.
address- SEI vault address (required)json{ "success": true, "data": { "address": "0xf6A791e4773A60083AA29aaCCDc3bA5E900974fE", "name": "SEI-USDC Concentrated LP", "strategy": "concentrated_liquidity", "tokenA": "SEI", "tokenB": "USDC", "fee": 0.003, "tvl": 1250000, "apy": 0.125, "position": { "lowerTick": -887220, "upperTick": 887220, "liquidity": "1000000000000000000", "tokensOwed0": "50000000", "tokensOwed1": "125000000" }, "risk": { "impermanentLoss": 0.023, "volatility": 0.18 } }, "chainId": 1328 }
Generate AI-powered liquidity range predictions.
json{ "vaultAddress": "0xf6A791e4773A60083AA29aaCCDc3bA5E900974fE", "marketData": { "currentPrice": 0.485, "volume24h": 15678234, "volatility": 0.25, "liquidity": 125000000 }, "timeframe": "1d", "chainId": 1328 }
1h4h1d7d30djson{ "success": true, "data": { "vaultAddress": "0xf6A791e4773A60083AA29aaCCDc3bA5E900974fE", "prediction": { "optimalRange": { "lowerPrice": 0.425, "upperPrice": 0.545, "lowerTick": -12000, "upperTick": 12000, "currentTick": 0, "tickSpacing": 60 }, "confidence": 0.87, "expectedReturn": { "daily": 0.0012, "weekly": 0.0084, "monthly": 0.036 }, "riskMetrics": { "impermanentLossRisk": 0.18, "rebalanceFrequency": "medium", "maxDrawdown": 0.12, "sharpeRatio": 1.45 }, "seiOptimizations": { "gasOptimized": true, "fastFinality": true, "parallelExecution": true, "estimatedGasCost": 0.001, "blockConfirmations": 1 } }, "metadata": { "modelVersion": "2.1.0", "features": [ "price_momentum", "volatility_clustering", "liquidity_depth", "sei_specific_metrics" ], "processingTime": "~500ms", "chainOptimized": "SEI" } }, "timestamp": "2024-01-23T15:30:00Z", "chainId": 1328 }
Trigger or schedule vault rebalancing.
json{ "vaultAddress": "0xf6A791e4773A60083AA29aaCCDc3bA5E900974fE", "strategy": "threshold_based", "parameters": { "newLowerTick": -15000, "newUpperTick": 15000, "slippageTolerance": 0.005, "maxGasPrice": 0.001, "deadline": 1706023800 }, "chainId": 1328 }
immediateExecute rebalance immediately
scheduledSchedule for future execution
threshold_basedExecute when thresholds are met
json{ "success": true, "data": { "transactionHash": "0xabc123...", "status": "pending", "gasUsed": "0.001", "executionTime": "450ms", "newPosition": { "lowerTick": -15000, "upperTick": 15000, "liquidity": "1050000000000000000" } }, "timestamp": "2024-01-23T15:30:00Z", "chainId": 1328 }
Get current market data for SEI ecosystem tokens.
| Parameter | Type | Description |
|---|---|---|
symbols | string | Comma-separated symbols (e.g., "SEI-USDC,ATOM-SEI") |
timeframe | string | Data timeframe (1m, 5m, 15m, 1h, 4h, 1d) |
json{ "success": true, "data": [ { "symbol": "SEI-USDC", "price": 0.485, "change24h": 0.023, "changePercent24h": 4.98, "volume24h": "14.2M", "volumeUSD24h": 14200000, "high24h": 0.492, "low24h": 0.467, "liquidity": { "totalLocked": 125000000, "sei": 257732474, "usdc": 125000000 }, "seiMetrics": { "blockTime": 0.4, "tps": 5000, "gasPrice": 0.000001, "validators": 100 }, "timestamp": "2024-01-23T15:30:00Z", "source": "SEI_DEX_AGGREGATOR" } ], "timestamp": "2024-01-23T15:30:00Z", "chainId": 1328 }
Scan for arbitrage opportunities across SEI DEXes.
json{ "success": true, "data": [ { "path": ["SEI", "USDC", "SEI"], "exchanges": ["DragonSwap", "SeiSwap"], "profit": 0.0125, "profitUSD": 156.25, "confidence": 0.92, "gasEstimate": 0.002, "netProfit": 0.0105, "execution": { "optimal": true, "urgency": "medium", "estimatedTime": "800ms" } } ], "scan": { "totalOpportunities": 1, "avgProfit": 0.0125, "timestamp": "2024-01-23T15:30:00Z" }, "chainId": 1328 }
javascriptconst response = await fetch('https://www.yielddelta.xyz/api/vaults', { method: 'GET', headers: { 'Content-Type': 'application/json', }, }); const { data } = await response.json(); console.log('Vaults:', data);
javascriptconst response = await fetch('https://www.yielddelta.xyz/api/vaults', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Key': 'your-api-key', }, body: JSON.stringify({ name: 'My SEI Vault', strategy: 'concentrated_liquidity', tokenA: 'SEI', tokenB: 'USDC', fee: 0.003, tickSpacing: 60, chainId: 1328, }), }); const { data } = await response.json(); console.log('Created vault:', data.address);
javascriptconst response = await fetch('https://www.yielddelta.xyz/api/ai/predict', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Key': 'your-api-key', }, body: JSON.stringify({ vaultAddress: '0xf6A791e4773A60083AA29aaCCDc3bA5E900974fE', marketData: { currentPrice: 0.485, volume24h: 15678234, volatility: 0.25, liquidity: 125000000, }, timeframe: '1d', chainId: 1328, }), }); const { data } = await response.json(); console.log('AI Prediction:', data.prediction);
javascriptimport { ethers } from 'ethers'; const provider = new ethers.JsonRpcProvider('https://evm-rpc-arctic-1.sei-apis.com'); const signer = new ethers.Wallet(privateKey, provider); const vaultABI = [...]; // Your vault ABI const vaultAddress = '0xf6A791e4773A60083AA29aaCCDc3bA5E900974fE'; const vault = new ethers.Contract(vaultAddress, vaultABI, signer); // Deposit into vault const amount0 = ethers.parseEther('10'); // 10 SEI const amount1 = ethers.parseUnits('5', 6); // 5 USDC const tx = await vault.deposit(amount0, amount1, signer.address); await tx.wait(); console.log('Deposited successfully!');
| Code | Description |
|---|---|
400 | Bad Request - Invalid request data |
401 | Unauthorized - Invalid or missing API key |
404 | Not Found - Resource not found |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error - Server error |
Need help? Join our Discord or check the documentation.