execute
Run async JavaScript code with a pre-wired DefiLlama client to query protocols, DEX volumes, yields, prices, and more. Returns JSON output and console logs.
Instructions
Run async JavaScript against a pre-wired DefiLlama client. Define async function run(defillama) { ... }; the JSON-serializable return value is sent back plus console.log output. The defillama client mirrors the services: defillama.protocol, defillama.dex, defillama.fees, defillama.options, defillama.stablecoin, defillama.price, defillama.yield, defillama.blockchain, plus defillama.resolveChain / defillama.resolveProtocol / defillama.resolveStablecoin helpers. JavaScript only (no type annotations); variables don't persist between calls; no fs, no network outside the client.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| intent | No |