Real-time BloFin portfolio dashboard. Displays your account balance, open positions, and trade history with live 5-second auto-refresh.
- Account Balance — Total equity, available balance, frozen margin, unrealized PnL
- Open Positions — Instrument, side, size, entry/mark/liquidation price, leverage, uPnL
- Trade History — Recent fills with price, size, fee, and maker/taker role
- Live Refresh — Auto-updates every 5 seconds
- Dark UI — Trading terminal aesthetic with green/red PnL coloring
git clone https://github.com/Overdusts/magnolia.git
cd magnolianpm install
cd client && npm install && cd ..Copy the example env file and fill in your BloFin API credentials:
cp .env.example .envBLOFIN_API_KEY=your_api_key
BLOFIN_API_SECRET=your_api_secret
BLOFIN_PASSPHRASE=your_passphraseNote: Only Read permission is required. The dashboard does not place trades.
npm run devThis starts both the Express backend (port 3001) and Vite dev server (port 5173).
Open http://localhost:5173 in your browser.
npm run build
npm startServes the built frontend from Express on port 3001.
magnolia/
├── server/
│ ├── index.js # Express server
│ ├── blofin.js # BloFin API client (HMAC-SHA256 auth)
│ └── routes/
│ └── api.js # REST endpoints
├── client/
│ ├── src/
│ │ ├── App.jsx # Main app with 5s polling
│ │ ├── components/
│ │ │ ├── Dashboard.jsx
│ │ │ ├── BalanceCard.jsx
│ │ │ ├── PositionsTable.jsx
│ │ │ └── TradesTable.jsx
│ │ └── styles/
│ │ └── app.css
│ └── vite.config.js
├── .env.example
└── package.json
| Endpoint | Description |
|---|---|
GET /api/balance |
Account balance & equity |
GET /api/positions |
Open positions |
GET /api/trades |
Recent trade fills |
GET /api/orders |
Order history |
- Frontend: React 18 + Vite
- Backend: Express.js + Axios
- Auth: HMAC-SHA256 request signing
- Exchange: BloFin OpenAPI v1
MIT