Skip to content

Conversation

@matheus1lva
Copy link
Collaborator

@matheus1lva matheus1lva commented Jan 12, 2026

Summary

Enhanced the vault list API to return comprehensive metadata (40+ fields) including asset info, TVL, APY, fees, classification flags, strategies count, and risk levels.

Previously only returned chainId, address, and name. Also added proper error handling and input validation to route handlers, and changed default sort order to TVL descending.

How to review

  1. Start with packages/web/app/api/rest/lists/db.ts: Review the expanded schema and SQL query to understand all new fields being returned
  2. Check route handlers (vaults/route.ts and vaults/[chainId]/route.ts): Verify error handling for JSON parsing and chainId validation
  3. Test the endpoints:
    • GET /api/rest/lists/vaults - should return all vaults across chains with full metadata
    • GET /api/rest/lists/vaults/1 - should return mainnet vaults with full metadata
    • GET /api/rest/lists/vaults/invalid - should return 400 with proper error message

Test plan

  1. start the web server by running cd packages/web && bun run dev.

  2. curl http://localhost:3001/api/rest/lists/vaults

  3. curl http://localhost:3001/api/rest/lists/vaults/1

closes #300

@vercel
Copy link

vercel bot commented Jan 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
kong Ready Ready Preview, Comment Jan 12, 2026 2:15pm

@matheus1lva matheus1lva changed the title feat: enhance vault list edge api DRAFT: feat: enhance vault list edge api Jan 12, 2026
@matheus1lva
Copy link
Collaborator Author

Made entirely with the new anti gravity. I'm gonna do a code review on this later today, so ignore for now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expand vault list API schema

2 participants