AI-powered perpetual DEX aggregator — trade any perp, on any exchange, from one prompt.
| Trade Terminal | Trade Agent | Extended Features |
|---|---|---|
![]() |
![]() |
![]() |
| ▶ Watch | ▶ Watch | ▶ Watch |
- React 19 + TypeScript
- Vite
- Zustand + React Query
- Privy (embedded wallet)
- wagmi + viem (on-chain interactions)
- TradingView Advanced Charts (
src/charting) - Playwright + Storybook
- Node.js 20+
- npm 10+
npm install
cp .env.example .env
cp .env.local.example .env.local # optional local overridesTradingView Charting Library — proprietary license required. Apply at https://www.tradingview.com/charting-library/ and place files in:
src/charting/charting_library/public/charting_library/src/charting/commands/These folders are gitignored. Only
.gitkeepfiles are committed.
npm run devDefault local URL: http://localhost:5173
localhost is a secure context — Privy embedded wallet works in dev without HTTPS.
npm run dev # development server
npm run build # production build
npm run preview # preview production build
npm run lint # ESLint
npm run test:e2e # Playwright e2e tests
npm run storybook # Storybook component explorerCopy .env.example to .env. See .env.example for the full reference.
Key variables:
| Variable | Description |
|---|---|
VITE_API_URL |
Backend API URL |
VITE_PRIVY_APP_ID |
Privy app ID |
VITE_TRADING_EXCHANGE |
onchain or simulation |
VITE_CHAIN_ID |
84532 (Base Sepolia) |
VITE_CONTRACT_* |
Contract addresses — copy from osmo-contracts/.env |
For local API URL overrides, use .env.local (see .env.local.example).
src/
├── pages/ # Trade, Portfolio, Arena, Leaderboard, Usage, Faucet
├── components/ # UI modules (order form, chart, orderbook, positions)
├── api/ # API clients (markets, portfolio, agent, onchain)
├── charting/ # TradingView datafeeds, utils (charting_library + commands gitignored)
├── contracts/abis/ # ABI files
├── store/ # Zustand stores
└── hooks/ # useWallet, useNavigation, etc.
- User deposits USDC →
TradingVault - User creates session key →
SessionKeyManager(allows backend to sign on their behalf) - User places order → backend
/api/orders/place - Backend signs + submits tx →
OrderRouter OrderRouterroutes to exchange adapter (Ostium, Hyperliquid via LZ, etc.)- For Hyperliquid: LayerZero message Base Sepolia → Arb Sepolia receiver
- Requires backend API + websocket running. Set
VITE_API_URLin.env.localto point to your backend. - For symbol selector/orderbook consistency, ensure backend websocket connectors are healthy.
- TradingView assets must be placed manually in the gitignored folders (see Setup above).


