Project Info
NerTzh Metrics Control Plane NerTzh is an evidence-first local developer control plane for inspecting Bybit spot market metrics, reconciliation state, Context Bridge evidence, and optional protected GPT-5.6/Codex-assisted analysis. What it solves Trading systems expose several independent states: market data, generated signals, database rows, exchange orders, and project-agent context. NerTzh makes those states inspectable from one judge-facing surface without pretending that saved evidence is a live trade or an AI decision. How it works FastAPI control plane and responsive local viewer on port 8081. Optional attended Bybit demo engine isolated on port 8082. PostgreSQL for engine state and reconciliation. DuckDB plus Markdown for the local Context Bridge. Read-only health, metrics, validation, order-status and context routes. Protected chat boundary requiring an explicit local control token. Virtual local TP/SL monitoring; native exchange TP/SL orders are disabled in the judge path. Demo-safe configuration with live trading disabled by default. The viewer does not start the trading engine, call a remote model, or spend API credits when opened. The optional analysis route is explicit and protected. Bybit execution remains outside the judge-facing read-only surface. Codex and GPT-5.6 Codex was used to audit the architecture, reconcile WebSocket/PostgreSQL/Bybit state, simplify the delivery path, harden the demo boundary, prepare documentation, and verify the captured walkthrough. GPT-5.6/Codex-assisted analysis is integrated as an optional protected capability, not as an automatic trading dependency. The submitted video and repository describe those boundaries explicitly. Evidence and delivery Repository: https://github.com/NerTzhuLz/NerTzh Demo release and video assets: https://github.com/NerTzhuLz/NerTzh/releases/tag/v0.1.0-build-week The release includes a verified 1080p H.264/AAC render with English narration and burned-in subtitles, plus a 4K upscale. Safety The repository defaults to demo mode and excludes secrets. The engine is attended and separated from the judge surface. No live/mainnet execution, autonomous profit claim, or native TP/SL claim is made by this submission. Built during OpenAI Build Week The project demonstrates how Codex and GPT-5.6-assisted engineering can turn a trading prototype into a reproducible, auditable developer tool.
NerTzh Metrics Control Plane
NerTzh is a local control plane for inspecting Bybit spot market metrics, a Context Bridge snapshot, and optional GPT-5.6/Codex-assisted analysis. It is built for the Developer Tools track of OpenAI Build Week.
The project keeps the judge-facing API separate from the optional trading engine. The default configuration is Bybit demo. No LLM request or trade is made simply by opening the UI.
Developer profile
AngeL / NerTzhuLz builds evidence-first developer tools at the intersection of real-time systems, automation and community operations. The public work visible across the project history covers:
- FastAPI and Python services with PostgreSQL state and operational runbooks.
- Bybit market-data, order-reconciliation and metrics research in demo mode.
- Discord and community automation projects dating back to 2020.
- Local agent tooling, Context Bridge workflows and protected GPT-5.6/Codex-assisted development.
- Leadership and operations in Latin gaming communities, documented publicly only at an aggregate level and without member or financial data.
The current portfolio is intentionally curated: this repository is the flagship control-plane project; older experiments and backups remain separate until their licenses, dependencies, secrets and reproducibility are reviewed.
What judges can run
git clone https://github.com/NerTzhuLz/NerTzh.git
cd NerTzh
uv sync
cp .env.example .env
make demo
Open http://127.0.0.1:8081/web/.
The demo surface provides:
GET /health— local API status and environment.GET /agent/context— local Context Bridge and the last persisted snapshot.GET /metrics— Prometheus metrics.GET /agent/bybit/tools— discoverable read-only Bybit tools.POST /agent/chat— optional GPT-5.6/Codex-assisted analysis, protected byCONTROL_API_TOKEN.
The demo API does not start the trading engine. To use the protected chat form, set a random CONTROL_API_TOKEN in .env, then paste it into the browser session when prompted. The token is never written by the UI.
Running the optional engine
The engine is intentionally separate from the judge demo:
# Docker Desktop is disabled at login on this workstation: start it deliberately.
systemctl --user start docker-desktop.service
docker ps -a --format '{{.Names}}\\t{{.Status}}\\t{{.Ports}}'
docker compose up -d --wait postgres
make run
make run starts src/nertzh.py and its bot loop in the attended terminal; it
is not a boot-time service. It runs only on localhost at ENGINE_API_PORT
(default 8082) and uses ENV=demo by default. When
LIVE_TRADING_ENABLED=true, it can send orders to the Bybit demo
environment. Do not set ENV=mainnet unless you explicitly intend to use live
funds.
Verification
PYTHONPATH=src .venv/bin/python -m unittest discover -s tests -v
# Start Docker Desktop manually first when it is disabled at login.
docker compose up -d --wait postgres
make check
The unit suite and judge-facing UI do not need PostgreSQL. make check validates the optional engine prerequisites, so run make db-up before it.
Architecture
Bybit REST / WebSocket ──> optional engine (src/nertzh.py, :8082)
│
├── PostgreSQL metrics snapshots
└── metrics and execution logic
Context Bridge (Markdown + DuckDB) ──> demo API (src/api_app.py, :8081)
├── local UI (/web/)
├── read-only tools and metrics
└── GPTClient (optional, protected)
The project uses one GPT implementation: src/gpt_integration.py. It can use an authenticated Codex session or the OpenAI API only when explicitly configured. The trading loop does not require an LLM.
OpenAI Build Week evidence
This project was extended with Codex and GPT-5.6 during the submission period. Before submission, complete the evidence items in docs/DEVPOST_SUBMISSION.md:
- Verify the candidate Codex
/feedbackSession ID recorded indocs/DEVPOST_SUBMISSION.md. - Explain the concrete GPT-5.6 and Codex contribution in the Devpost description and video.
- Upload the final 150-second video with English narration to a public or unlisted YouTube URL, then test it in a private window.
- Confirm the public repository has the committed MIT license.
The rendered Build Week video is published with the release artifacts at
v0.1.0-build-week.
Documentation
Security and scope
.envis local and ignored by Git. Never commit API keys or a control token.- POST, PUT, PATCH and DELETE routes require
X-Control-Token. - The UI makes only local GET requests until a user submits the protected chat form.
- The project has no non-OpenAI LLM runtime dependency.
metrics-pgusesrestart: unless-stopped: if Docker Desktop is started later, inspectdocker ps -abecause the database container may resume. It never starts the engine by itself.
Analysis
View
Metric
- 23
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- FastAPIIn code
- HTMLIn code
- OpenAIIn code
- PythonIn code
- PostgreSQLClaimed
4 of 5 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
- CodexConfig
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
555 KB
Source files
105
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
NerTzhuLz/NerTzh
132 files · 1.0 MB · @ bf68526
Structure
Interface
1 file · 1%Screens, components and styles rendered to the user.
Application logic
40 files · 30%Domain rules, services and shared utilities.
+7 more
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- Python69%
- Markdown20%
- HTML7%
- Shell4%
- YAML0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
pyproject.toml
pypi · 17- aiohttp
- asyncpg
- duckdb
- fastapi
- langfuse
- mcp
- numpy
- openai
- prometheus-client
- psycopg2-binary
- pydantic
- python-dotenv
- scikit-learn
- sqlalchemy[asyncio]
- uvicorn
- websockets
- xgboost
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.