Modelos de datos

Entidades principales y relación entre operaciones, playbooks y cuentas.

Core entities

  1. Trade groups — Container for related executions (entries and exits)
  2. Executions — Individual fills with price, quantity, and timestamp
  3. Trade writeups — Post-trade notes (not yet exposed in the public API)
  4. Report cards — Daily reviews (not yet exposed)
  5. Chart books — Saved charts (not yet exposed)
  6. Playbooks — Rules and setups
  7. Strategies — Approaches linked to playbooks
  8. Accounts — Prop firm or retail brokerage accounts

Relationships

  • One trade group has many executions
  • One trade group may have one trade writeup (in product; API coverage may evolve)
  • One playbook has many strategies
  • One playbook has many entry and exit criteria records
  • One account has many trades
  • All resources belong to a single user, enforced by RLS

IDs and ownership

All GET/PUT/DELETE operations are restricted to rows owned by the user tied to the API key. Cross-user access returns empty results or 404 depending on the route.