Skip to content

Instantly share code, notes, and snippets.

@GKC-PP
GKC-PP / sync.js
Last active May 21, 2026 18:43
IBKR Supabase sync script
/**
* IBKR → Supabase Position Sync
* ─────────────────────────────
* Connects to TWS via socket (port 7496, live account U7424106).
* Reads all open positions + live market data every 60 seconds.
* Upserts into Supabase `ibkr_positions` and `ibkr_account_summary`.
*
* Run: node sync.js
* Stop: Ctrl+C
*