Skip to main content

📉 DeFi API

Interact with DeFi protocols via your agent wallet.

Endpoints

POST /defi/swap

Swap tokens via aggregators (e.g., Uniswap, 1inch).

  • Body: { "fromToken": "0x...", "toToken": "x...", "amount": "100" }

POST /defi/stake

Stake native/LSD tokens.

  • Body: { "protocol": "lido", "amount": "1.5" }

GET /defi/prices

Fetch real-time token prices for the agent's portfolio.

  • Query: ?tokens=ETH,USDC,DAI