FXInsightHub is a proof-of-concept application for real-time foreign exchange market data visualization and FX swap pricing. It streams live forex quotes from Finnhub, renders interactive candlestick charts, and exposes endpoints for pricing FX swaps, computing risk sensitivities (DV01, PV01, mark-to-market), and optimizing hedge ratios.
- Java 25, Spring Boot 3.4, WebFlux
- Finnhub REST and WebSocket APIs (Twelve Data fallback for candle chart if using free tier)
- Vite, React, Tailwind, Shadcn, Lightweight Charts
- Swagger
- Docker, Nginx
- Java 25
- Maven 3.9+
- Node.js 22+
- A free Finnhub API key (https://finnhub.io)
cd backend
export FINNHUB_API_KEY=your_key_here
mvn spring-boot:runThe API starts on http://localhost:8080. Swagger UI is available at http://localhost:8080/swagger-ui.html.
cd frontend
npm install
npm run devThe dev server starts on http://localhost:5173.
export FINNHUB_API_KEY=your_key_here
docker compose up --build- Backend: http://localhost:8080
- Frontend: http://localhost:3000
Interactive API docs are served at /swagger-ui.html when the backend is running. Key endpoint groups:
/api/forex-- market data, candles, symbols, rates, live SSE stream/api/swap-- swap pricing, hedge optimization, forward curve
See FX-SWAP-RISK.md for an explanation of FX swap mechanics, and how each concept maps to SwapPricingService methods.
ARCHITECTURE.md has a high-level explanation and reasons of the backend approach.
This is a proof-of-concept and it does not financial advice. See DISCLAIMER.md for the full details.
MIT
