General Fund Infrastructure with most important features.
This project uses uv for dependency management. No other package manager is needed.
Install uv:
curl -LsSf https://astral.sh/uv/install.sh | shSet up the project:
uv venv # create virtual environment
uv sync # install dependenciesRun scripts:
To run python scripts, you can either use the following:
uv run script.pyor more conventionally:
source .venv/bin/activate
python script.pyAdd/remove dependencies:
uv add <package>
uv remove <package>Start each component in a separate terminal in the order listed below.
nats-serverDefault port: 4222. If already running, skip this step.
Streams live market data (bars, funding rates) to NATS.
python -m workers.datafeed_serverEnvironment variables:
NATS_URL(default:nats://localhost:4222)
Runs a single strategy and publishes TargetPosition signals to NATS.
STRATEGY_NAME=ExampleStrategy python -m workers.strategy_workerEnvironment variables:
STRATEGY_NAME(required) — class name of aBaseStrategysubclass in thestrategiespackageNATS_URL(default:nats://localhost:4222)
Spawn one process per strategy. Each instance selects its own strategy via
STRATEGY_NAME.
Nets signals across all strategies and routes orders to the broker.
python -m workers.consolidator_workerEnvironment variables:
NATS_URL(default:nats://localhost:4222)DEFAULT_EXCHANGE(default:bybit_paper) —bybit_paperorpaper
Serves the REST API and WebSocket feed.
uv run uvicorn workers.dashboard:app --reload --port 8000Environment variables:
NATS_URL(default:nats://localhost:4222)
API docs available at http://localhost:8000/docs.
cd dashboard/frontend
npm run devRuns the Vite dev server (default: http://localhost:5173).
For a production build:
npm run build