All projects
Felt cover for Nöbetçi

Nöbetçi

A sentry layer between a trading strategy and the exchange, built for the Komünite × OKX TR Agentic Trading Hackathon. Every decision goes into a hash-chained ledger, and market orders don't exist in the code.

private code

My role: Solo: everything, from scratch.

Problem

A trading agent rarely loses money because its idea is wrong. It loses money through operations: an order left at the exchange with no owner, a crashed process still holding inventory, a fee charged in the wrong currency. Nöbetçi's real-money sessions found 26 such defects that 500 unit tests and paper runs had missed.

Approach

Nöbetçi stands between the strategy and OKX TR. A mandate written in plain Turkish and signed with Ed25519 becomes ten gates that every proposal must pass, and the only order type in the code is post-only. Every decision goes into a hash-chained ledger, and an independent auditor with a read-only key checks compliance from that ledger alone.

Result

Ten real-money sessions over about 20 hours cost 0.18 TL net. Three days of order-book recordings showed that the bundled strategy has negative expected value on TRY pairs. So the product became the safety layer: bring your own strategy, including an LLM, and Nöbetçi limits what it can do.

Highlights

  • 0 market orders in the code
  • 10 gates on every order
  • 507 tests
  • 26 defects caught in live sessions
  • 2.5M order-book snapshots

Stack

  • Python
  • SQLite
  • OKX Agent Trade Kit
  • Ed25519
  • WebSocket
  • pytest
  • Docker