Skip to main content

Quick start

This guide will help you get NanoARB running locally with synthetic market data in just a few minutes.

Prerequisites

Before you begin, make sure you have:
  • Rust 1.75+Install Rust
  • Node.js 18+ and pnpm — For the dashboard UI
  • Git — To clone the repository
Optional: Docker Desktop for Prometheus/Grafana monitoring

One-command setup

The fastest way to get started is using the provided startup script:
1

Clone the repository

2

Start everything

This single command will:
  • Build the Rust trading engine in release mode
  • Install UI dependencies (if needed)
  • Start the trading engine on port 9090
  • Launch the dashboard UI on port 3000
Expected output:
3

Access the dashboard

Open your browser to http://localhost:3000 to see the real-time trading dashboard.The dashboard shows:
  • Live order book with 15 levels
  • Real-time price chart with ML predictions
  • Trade history and P&L curve
  • Latency metrics and performance statistics
  • Risk monitoring and position tracking
4

Stop the services

Press Ctrl+C in the terminal, or run:

Manual setup

If you prefer more control, you can start services manually:
1

Build the Rust engine

This compiles the trading engine with maximum optimizations (LTO, single codegen unit).
2

Start the trading engine

Or run in the background:
The engine will start in simulation mode by default, generating synthetic market data.
3

Start the dashboard UI (optional)

In a new terminal:
The UI will be available at http://localhost:3000.

Running your first backtest

NanoARB includes a powerful backtesting engine that simulates realistic market conditions.

CLI backtest

Run a backtest using synthetic data:
Expected output:

API backtest

While the engine is running, you can trigger backtests via the REST API:

Custom configuration

Create a config.toml file to customize backtest parameters:
config.toml
Then run:

Available endpoints

Once the engine is running, the following HTTP endpoints are available:

Example: Get current state

Response includes:
  • Order book snapshot (15 levels)
  • Current position and P&L
  • Recent trades
  • Latency metrics
  • Risk alerts

Monitoring with Grafana

For advanced monitoring, you can launch Prometheus and Grafana:
Access Grafana at http://localhost:3000 (login: admin / nanoarb). The pre-configured dashboard shows:
  • Real-time P&L and Sharpe ratio
  • Latency histograms (p50, p95, p99)
  • Order flow and fill rates
  • Position and inventory tracking
To stop monitoring:

Running tests

Verify your installation by running the test suite:

Next steps

Installation

Detailed installation guide and troubleshooting

API Reference

Explore the full API documentation

Troubleshooting

If port 9090 or 3000 is already in use:
Or specify a custom port:
NanoARB requires Rust 1.75+. Update Rust:
Install pnpm:
On Linux, you may need to install additional dependencies: