Overview
The Provider API makes it easy to aggregate positions across multiple providers and verticals. This recipe shows how to build a portfolio dashboard that tracks your positions on Hyperliquid, Aster, and Polymarket in one view.Architecture
Step 1: Fetch Positions from All Providers
Step 2: Aggregate PnL
Step 3: Poll on Interval
Enhancements
Historical PnL Tracking
Historical PnL Tracking
Store snapshots of your portfolio value over time using the fills endpoint. Calculate realized PnL from fill history.
Alerts
Alerts
Set up alerts when unrealized PnL exceeds a threshold or when a position’s liquidation price is within a certain percentage of the mark price.
Web Dashboard
Web Dashboard
Build a React/Next.js dashboard that visualizes your portfolio with charts. Use WebSocket feeds for real-time price updates instead of REST polling.