Skip to content

martin5211/FXInsightHub

Repository files navigation

FX Insight Hub

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.

dashboard-image

Tech Stack

  • 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

Prerequisites

Quick Start

Backend

cd backend
export FINNHUB_API_KEY=your_key_here
mvn spring-boot:run

The API starts on http://localhost:8080. Swagger UI is available at http://localhost:8080/swagger-ui.html.

Frontend

cd frontend
npm install
npm run dev

The dev server starts on http://localhost:5173.

Docker

export FINNHUB_API_KEY=your_key_here
docker compose up --build

API Documentation

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

Documentation

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.

Disclaimer

This is a proof-of-concept and it does not financial advice. See DISCLAIMER.md for the full details.

License

MIT

About

Real-time FX analytics and swap pricing tool.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors