Class TradingDashboard
java.lang.Object
com.quantfinlib.trading.TradingDashboard
- All Implemented Interfaces:
AutoCloseable
Zero-dependency live trading dashboard (JDK
com.sun.net.httpserver):
serves a self-refreshing HTML page and a JSON status endpoint with the
paper-trading account (cash, equity, realized Pinvalid input: '&L', positions, rejections)
and any attached latency histograms — the whole live loop, observable in a
browser.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionattachLatency(String name, LatencyRecorder recorder) Attaches a latency histogram to the status payload (call before or after start).voidclose()intport()voidstart()
-
Constructor Details
-
TradingDashboard
- Parameters:
port- 0 = pick an ephemeral port (seeport())- Throws:
IOException
-
-
Method Details
-
attachLatency
Attaches a latency histogram to the status payload (call before or after start). -
start
public void start() -
port
public int port() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-