~/openarch/work/delta-// case study

An NSE F&O trading journal for Indian derivatives traders. Local-first capture, the full Indian cost stack applied to every trade, and pattern analysis over a trader's own history - never a recommendation.

OpenArch · in-house product·fintech · derivatives trading·2026·in development
openarch.in/work/delta
Delta interface
//the brief

What we built.

Most journals report gross P&L and quietly flatter the trader. Delta computes brokerage, STT, exchange transaction charge, SEBI fee, stamp duty and GST on every position, so the number on screen is what actually landed. It writes to SQLite first and syncs after, because a trader with bad signal still needs to log the trade.

// Net of costs. Always.

domainNSE F&O journalling
shapemobile, local-first
statusin development
instruments216 F&O stocks
stack
react native · expotypescriptsqlitesupabasegroq · llama-3.3-70b
//what we shipped
01

Trade journal

Entry and exit, lots, strike, expiry, notes and tags - a contract treated as an entity, not a string pasted into a field.

02

Indian cost stack

Brokerage, STT, exchange transaction charge, SEBI fee, stamp duty, and GST on the taxable slice. P&L is reported net, never gross.

03

Watchlists

All 216 NSE F&O stocks with correct lot sizes, versioned by contract month rather than hardcoded and left to rot.

04

Vault

Multi-book capital tracking, so separate pools stay separate and per-book performance is readable on its own terms.

05

AI Insights

Pattern analysis across the trader's own history - observational only. It will tell you Thursday expiries cost you; it will not tell you what to buy.

06

Offline by default

Every write hits local storage first and reconciles later. Full usability with no network is the baseline, not a degraded mode.

//data model
schema.sql5 tables
table fno_instruments
symbol, expiry, strike, option_type, lot_size, contract_month
table trades
contract_id, book_id, side, lots, entry_price, exit_price, opened_at
table charge_breakups
trade_id, brokerage, stt, txn_charge, sebi_fee, stamp_duty, gst
table books
user_id, name, capital, opened_at
table sync_log
entity, local_id, remote_id, op, synced_at
// local-first write path
  1. 01capture
  2. 02sqlite
  3. 03cost engine
  4. 04queue
  5. 05sync
  6. 06reconciled
//business logic
charges.tsCost stack
// All values in paise. Never floats for money.
function charges(t) {
const brokerage = brokerageFor(t)
const txn = exchangeTxnCharge(t)
const sebi = sebiFee(t)
const gst = pct(brokerage + txn + sebi, 18) // GST on fees only
return brokerage + stt(t) + txn + sebi + stampDuty(t) + gst
}
contract-key.tsContract identity
// Expiry + strike + type is a composite key, not a label.
type ContractKey = {
symbol: string
expiry: ContractMonth
strike: Decimal
optionType: 'CE' | 'PE' | 'FUT'
}
// lot size is looked up per contract month - never inlined
//on the roadmap

Honest edges.

  • →Broker statement import to reconcile against manually logged trades
  • →Per-book drawdown and exposure limits surfaced before entry
  • →Widening insight coverage without crossing into advisory territory
//result
216
NSE F&O stocks, correct lot sizes
6
charges in every P&L line
0
network calls required to log a trade

Delta reports P&L net of the full Indian cost stack - six separate charges applied per trade - and stays fully usable offline, syncing to Supabase once signal returns. Its AI layer is deliberately observational: pattern analysis over the trader's own history, with trade recommendations ruled out by design.