Skip to content

Add momentum command: BTC 5m/15m Chainlink-market signal trader - #86

Draft
OdinSlayer429 wants to merge 1 commit into
Polymarket:mainfrom
OdinSlayer429:momentum-btc-chainlink-signal
Draft

Add momentum command: BTC 5m/15m Chainlink-market signal trader#86
OdinSlayer429 wants to merge 1 commit into
Polymarket:mainfrom
OdinSlayer429:momentum-btc-chainlink-signal

Conversation

@OdinSlayer429

@OdinSlayer429 OdinSlayer429 commented Sep 3, 2026

Copy link
Copy Markdown

Summary

  • Polymarket's btc-updown-5m-* / btc-updown-15m-* markets resolve "Up"/"Down" against Chainlink's BTC/USD TWAP data stream. This adds polymarket momentum run, which watches Coinbase's free BTC-USD WebSocket feed as a fast, no-auth proxy for that signal (real Chainlink Data Streams access requires a paid subscription) and buys the side it currently favors before Polymarket's own order book has fully repriced.
  • The command deterministically computes the currently-open window from wallclock time (btc-updown-{5m,15m}-<unix slot start>), sits out the first partial window on startup so the reference price is always anchored to a window's true open (never guessed/backfilled), and places at most one market (FOK) buy per window, gated by a configurable minimum deviation, a settle-in delay, a minimum-time-remaining cutoff, and a max entry price so it won't chase an already-priced-in outcome.
  • Trades live by default per the repo owner's explicit choice; --dry-run prints signals only and skips wallet auth entirely so it can be tried with no funded wallet.
  • Also fixes a startup panic: two rustls crypto backends (ring, aws-lc-rs) are both present transitively (alloy's HTTP client vs. tokio-tungstenite's TLS), so rustls couldn't auto-select one. Now explicitly installs ring as the process-wide default in main().

Why live-by-default

The stake and risk controls (--stake required with no default, --max-entry-price, --min-seconds-remaining, --max-windows) are there so a bad run has bounded downside, but this is deliberately unproven-strategy tooling — see the README caveat. --dry-run is available for anyone who wants to validate signal quality before risking funds.

Test plan

  • cargo check / cargo clippy clean, cargo build --release succeeds
  • Live smoke test in --dry-run against the real, currently-open 5m market: correctly sat out a partial window, caught the next window boundary, fetched the market, captured a reference price, and fired one correctly-gated signal (Down favored (-2.6 bps vs ref $77712.97), ask 0.77) with no crash over a multi-minute run
  • Live order placement (--dry-run omitted) has not been exercised against a funded wallet — recommend a reviewer test with a small --stake before merging

🤖 Generated with Claude Code

Polymarket's btc-updown-5m-*/btc-updown-15m-* markets resolve against
Chainlink's BTC/USD TWAP stream. `polymarket momentum run` watches Coinbase's
free BTC-USD WebSocket feed as a fast proxy for that signal, deterministically
tracks the currently open window, and buys the favored side via a market (FOK)
order once the deviation clears a configurable threshold and the order book
hasn't already priced it in. Defaults to live trading per user request, with
--dry-run to test without a funded wallet.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@OdinSlayer429 OdinSlayer429 changed the title test Add momentum command: BTC 5m/15m Chainlink-market signal trader Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant