
The onchain CLI
for agents
One API to automate earning, trading, and leverage with all your favorite models.
Get started in one minute.
Building financial agents is hard.
Without Legend
Hard mode
With Legend
Easy mode
Every action. Every asset.
One integration. Every action.
Trade
Buy any asset on major EVM chains + Solana. Best-price routing and deep multichain liquidity. Cross-chain swaps handled automatically.
Earn
Deploy into Aave, Compound, and Morpho. Rate optimization across +100 markets, crosschain.
Borrow
On-demand liquidity against collateral without selling. Configure custom strategies on top of DeFi's most trusted Lending Protocols: Aave, Compound, Morpho.
Transfer
Move value across chains and wallets with a single call. Legend handles bridging, routing, and gas automatically.
Spend
Coming soonConversion to cash via virtual card. Your agent pays real expenses from onchain balance.
New Markets
Coming soonPrediction markets and perpetuals. Hyperliquid and Polymarket integrations — your agent takes positions, manages risk, and settles automatically.
Transparent planning, streamlined execution.
Every operation can be reviewed before it's signed. Your agent sees exactly what will happen, signs it — then Legend executes it.
You request an operation. Legend API returns a human-readable plan — amounts, routes, fees, protocols — before anything moves. Your agent (or a dedicated signing agent) can verify the plan matches the original intent before approving.
Flexible signing — bring your own key provider. Supports Privy, Turnkey, Ledger, and EOA keys. Legend never holds signing keys. Nothing moves without your signer's approval.
Legend handles gas, bridging, token approvals, and retries — then executes atomically onchain. Only whitelisted, audited DeFi protocols. Your agent can't accidentally route funds into an unknown contract.
Built with the guardrails agents need.
Whitelisted DeFi only
Every action routes through audited, whitelisted protocols. Agents can't accidentally dump funds into unknown contracts. The blast radius of any mistake is constrained by design.
Agent-in-the-loop verification
The Plan → Sign → Execute model means every transaction is confirmed as correct and safe before it is signed. A planner agent constructs the intent. Then a separate signing agent verifies the plan against the original intent before signing.
Sub-accounts per strategy
Each strategy is its own sub-account, resulting in out of the box risk isolation. Run high-risk + low-risk strategies in parallel with peace of mind.
Full activity log — no block explorer required
Every executed action is recorded with amounts, routes, fees, and timestamps. Your agent gets a structured audit trail out of the box — no manually tracing transactions across chains on a block explorer.
Ready-to-run financial strategies.
Pre-built flows your agent can run continuously.
STRATEGIES
Standing Automations
ORDERS
Conditional triggers
What people are already building
Autonomous Trading Agents
Execute strategies — DCA, rebalancing, limit orders, cross-chain swaps — autonomously across any asset on any EVM chain + Solana (and soon Polymarket and Hyperliquid).
Self-Sustaining Agents
Earn yield on idle capital and pay their own operating costs from the yield — including paying via virtual card from onchain balance. No human tops them up. Run indefinitely.
Yield Aggregators
Deploy user funds into the best available yield across protocols. Rate optimization, auto-compounding, and migration all handled.
Microloans
Users borrow against holdings without selling. Agent manages collateral health, monitors LTV, and protects positions automatically.
We built this to power our own app.
Proven in production
The same engine running Legend's live consumer app. Real money. Real users. Not a prototype.
Built by DeFi Veterans
The team behind Compound. Deterministic execution, pre-signed plans, and a security model where Legend structurally cannot move funds without a signature.
Transparent Execution
Every plan is human-readable before signing. Chain-bound, replay-protected. Full audit trail — no block explorer spelunking.
Non-Custodial by Design
Legend never holds signing keys. Every transaction requires your signer's approval. Bring your own key provider — Privy, Turnkey, Ledger.
