Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

magnolia 🌸

Real-time BloFin portfolio dashboard. Displays your account balance, open positions, and trade history with live 5-second auto-refresh.

Dark Terminal Theme BloFin API React Express

Features

  • 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

Setup

1. Clone

git clone https://github.com/Overdusts/magnolia.git
cd magnolia

2. Install Dependencies

npm install
cd client && npm install && cd ..

3. Configure API Keys

Copy the example env file and fill in your BloFin API credentials:

cp .env.example .env
BLOFIN_API_KEY=your_api_key
BLOFIN_API_SECRET=your_api_secret
BLOFIN_PASSPHRASE=your_passphrase

Note: Only Read permission is required. The dashboard does not place trades.

4. Run

npm run dev

This starts both the Express backend (port 3001) and Vite dev server (port 5173).

Open http://localhost:5173 in your browser.

Production Build

npm run build
npm start

Serves the built frontend from Express on port 3001.

Project Structure

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

API Endpoints

Endpoint Description
GET /api/balance Account balance & equity
GET /api/positions Open positions
GET /api/trades Recent trade fills
GET /api/orders Order history

Tech Stack

  • Frontend: React 18 + Vite
  • Backend: Express.js + Axios
  • Auth: HMAC-SHA256 request signing
  • Exchange: BloFin OpenAPI v1

License

MIT

About

Real-time BloFin portfolio dashboard — live balances, positions & trade history.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages