Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gold / USD tracker

Local, dark, minimal dashboard for gold priced in US dollars (COMEX GC=F front-month futures, the liquid proxy for XAU/USD).

run.bat            # or:  pip install -r requirements.txt && python server.py
http://localhost:8787

What it does

Panel Details
Live price Two numbers, clearly labelled: spot XAU/USD in real time (gold-api.com, polled every 10 s) and the GC=F futures price that the chart is built from (Yahoo Finance, which delays COMEX by ~10 minutes), with the futures–spot basis. Header also shows change vs previous close, day O/H/L, 52-week range, ATH and distance from it, YTD / 1Y.
Chart TradingView Lightweight Charts. Timeframes 1m · 5m · 15m · 1h · 4h · 1D · 1W · 1M, range presets 1D → ALL (daily history back to Aug 2000). Overlays: EMA 20/50/200, fair value gaps (with fill %), liquidity pools (equal highs/lows, swept or not), volume profile (POC / value area), ATH line, volume. Candles update live.
1-minute history Yahoo only serves 7 days of 1m bars. Every bar is persisted in cache/gold.sqlite, so the 1m archive keeps growing for as long as the app runs. 5m (60 d) and 1h (2 y) are stored the same way; 15m / 4h / 1W / 1M are resampled.
Macro DXY, 10Y / 3M / 30Y yields, VIX, silver, platinum, copper, WTI, S&P 500, Bitcoin, TIP, GLD (Yahoo); 10Y real yield + nominal curve (US Treasury); effective Fed funds and target range (NY Fed); CPI YoY/MoM (BLS); derived breakeven, 2s10s, real policy rate, gold/silver ratio.
News Google News, Investing.com metals, CNBC, MarketWatch, FXStreet — deduped, tagged (Fed/Rates, Inflation, USD, Geopolitics, Central banks, ETF flows, Technical, Jobs).
Congress House members' STOCK Act periodic transaction reports parsed straight from the Clerk of the House PDFs. Search any member, watchlist chips (Pelosi etc.), gold/silver/miner highlighting, plus a whole-House scan for gold-related trades.
AI analysis Claude (claude-opus-5 by default) reads a JSON context the app computes — live price, 1h/4h/1d/1w structure, liquidity, FVGs, volume profile, ATH, macro, headlines, Congress gold trades — and writes a structured read (structure, liquidity, macro, news, scenarios, key levels, bias). Streams to the page; you can also ask free-form questions.

Setup

  1. copy .env.example .env
  2. Put your ANTHROPIC_API_KEY in .env (only needed for the AI panel). Optional: CLAUDE_MODEL, CLAUDE_EFFORT, POLITICIAN_WATCHLIST, PORT.
  3. run.bat

First start downloads ~40k candles (a few seconds) and parses the watchlist's PTR PDFs in the background.

Known limits

  • Senate filings are not included — the Senate eFD site blocks automated clients.
  • Donald Trump does not file STOCK Act PTRs; presidential holdings appear only in annual OGE 278e reports, which are not transaction-level. The UI links to the OGE archive.
  • A handful of House PTRs are paper filings (scanned images) and cannot be parsed; they are counted as "unparsed".
  • Yahoo's COMEX data (candles and quote) is ~10 minutes delayed; the spot price is real-time. Futures trade at a premium to spot (the basis), so the two numbers are not supposed to match.
  • Futures volume is COMEX GC volume; the forming bar's volume is whatever Yahoo has reported so far.
  • None of this is financial advice.

Layout

server.py            FastAPI app, REST + WebSocket + SSE
data/market.py       Yahoo candles → SQLite, resampling, live poll/stream
data/macro.py        Yahoo / Treasury / NY Fed / BLS
data/news.py         RSS aggregation
data/politicians.py  House Clerk index + PTR PDF parser
analysis/ta.py       EMAs, RSI, ATR, swings, liquidity zones, FVGs, volume profile
analysis/ai.py       Claude context builder + streaming analysis
static/              index.html, app.js, style.css, vendored lightweight-charts
cache/               gold.sqlite + downloaded PTR PDFs (safe to delete)

About

Dark, local gold/USD tracker: real-time spot + futures candles (1m→1M, history to 2000), FVG/liquidity/volume-profile overlays, macro, news, House STOCK Act trades, Claude analysis

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages