Skip to content

feat(crypto): /crypto market data, alongside /ticker - #322

Merged
ralyodio merged 1 commit into
mainfrom
worktree-crypto-command
Aug 8, 2026
Merged

feat(crypto): /crypto market data, alongside /ticker#322
ralyodio merged 1 commit into
mainfrom
worktree-crypto-command

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

advis0r.com now serves crypto under /crypto/**, so the pit gets the sibling of ticker that surface implies: moshcode crypto (and /crypto in the pit), plus a crypto@moshcode plugin for Claude Code.

moshcode crypto BTC # price, technicals, score, supply, book
moshcode crypto lookup bitcoin # asset name → BTC/USD
moshcode crypto spark BTC ETH SOL # recent moves, ranked
moshcode crypto bars ETH --timeframe 1Hour
moshcode crypto book BTC-USD --depth 5

Pairs are accepted as BTC, BTC-USD, BTC/USD or BTCUSD. A bare asset resolves to that asset's USD pair.

Why a sibling, not a mode of ticker

They answer different questions from different data and share only a hostname. A ticker report is a stored snapshot built from transcripts, SEC fundamentals and extracted signals — its risk is a stale price read as a live one. A crypto report is a live venue read with no transcripts, no filings and no signals — its risk runs the other way. One code path would mean one set of labels lying about one of them.

The scores are not comparable either: the crypto technical score counts venue-local liquidity, so ranking a coin against an equity by score is meaningless. Both surfaces ship their own caveats, and both renderers print them.

Two things that would otherwise be quietly wrong

  • Precision. Prices render at the precision the pair trades at. A fixed two decimals renders half the index — SHIB near $0.000006 — as $0.00. Derived numbers are priced like the number beside them, so a $126.10 move on a $65,021.84 coin does not print as $126.0980.
  • --limit on bars. Upstream treats it as a page size over its own window, not a cap on what returns — --limit 5 came back with seventeen bars. The renderer honours the flag and states that it trimmed (5 × 1Hour · newest of 17) rather than breaking the promise silently or printing everything.

Surface

  • src/crypto.mjs — pure argument translation, injectable fetch, rendering as a function of decoded JSON (the same split as src/advisor.mjs).
  • Dispatch in bin/moshcode.mjs and src/tui.mjs; schema entries drive /help, completion and the pit command list.
  • plugins/crypto//crypto, /quote, /book, /bars, /spark, /pairs, /coin. No name collides with the ticker plugin's commands.
  • The plugin frontmatter test now iterates the marketplace manifest instead of hard-coding plugins/ticker, so a plugin added later cannot ship unchecked.

Verification

  • Full suite: 1385 tests, 0 fail (27 new in test/crypto.test.mjs).
  • Smoke-tested live against advis0r for every verb, plus the error paths (unsupported pair, asset name instead of a pair, bad flag values) and /crypto inside the pit.

🤖 Generated with Claude Code

advis0r.com now serves crypto under /crypto/**, so the pit gets the sibling
of `ticker` that surface implies: `moshcode crypto` (and `/crypto` in the pit),
plus a `crypto@moshcode` plugin for Claude Code.
A sibling rather than a mode of `ticker`, because the two answer different
questions from different data. A ticker report is a stored snapshot built from
transcripts, SEC fundamentals and extracted signals — its risk is a stale price
read as a live one. A crypto report is a live venue read with none of those —
its risk runs the other way. One code path would mean one set of labels lying
about one of them, so the technical score, which counts venue-local liquidity,
is never presented as comparable to an equity's.
moshcode crypto BTC # price, technicals, score, supply, book
moshcode crypto lookup bitcoin # asset name → BTC/USD
moshcode crypto spark BTC ETH SOL # recent moves, ranked
moshcode crypto bars ETH --timeframe 1Hour
moshcode crypto book BTC-USD --depth 5
Notes on two things that would otherwise be quietly wrong:
- Prices are formatted at the precision the pair trades at. A fixed two
decimals renders half the index — SHIB near $0.000006 — as "$0.00".
- Upstream treats `bars`' `limit` as a page size over its own window, not a cap
on what returns: `--limit 5` came back with seventeen bars. The renderer
honours the flag and says that it trimmed, rather than breaking the promise
silently or printing everything.
The plugin frontmatter test now iterates the marketplace manifest instead of
hard-coding plugins/ticker, so a plugin added later cannot ship unchecked.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

91 finding(s)

HIGH/CRITICAL: 2 | MEDIUM: 41 | LOW: 48

SeverityRuleLocation
HIGHmanifest-typosquatapps/pwa/package.json:19
HIGHjs-ssrf-outbound-requestapps/pwa/public/sw.js:45
MEDIUMtls-verification-disabledapps/pwa/src/lib/moshpit-gateway.mjs:299
MEDIUMsql-template-interpolationapps/pwa/src/moshpit.mjs:61
MEDIUMsql-template-interpolationapps/pwa/src/moshpit.mjs:75
MEDIUMsql-template-interpolationapps/pwa/src/moshpit.mjs:101
MEDIUMsql-template-interpolationapps/pwa/src/moshpit.mjs:265
MEDIUMsql-template-interpolationapps/pwa/src/moshpit.mjs:269
MEDIUMsql-template-interpolationapps/pwa/src/moshpit.mjs:314
MEDIUMsql-template-interpolationapps/pwa/src/moshpit.mjs:499
MEDIUMsql-template-interpolationapps/pwa/src/moshpit.mjs:675
MEDIUMsql-template-interpolationapps/pwa/src/moshpit.mjs:677
MEDIUMsql-template-interpolationapps/pwa/src/moshpit.mjs:736
MEDIUMsql-template-interpolationapps/pwa/src/moshpit.mjs:782
MEDIUMsql-template-interpolationapps/pwa/src/moshpit.mjs:852
MEDIUMsql-template-interpolationapps/pwa/src/moshpit.mjs:955
MEDIUMsql-template-interpolationapps/pwa/src/moshpit.mjs:1063
MEDIUMsql-template-interpolationapps/pwa/src/moshpit.mjs:1199
MEDIUMjs-unescaped-html-sinkapps/pwa/src/routes/moshpit.mjs:1419
MEDIUMjs-dynamic-code-executionapps/pwa/test/apikey-mask.test.mjs:129
MEDIUMsql-template-interpolationapps/pwa/test/credits-webhook-event-match.test.mjs:111
MEDIUMsql-template-interpolationapps/pwa/test/credits-webhook-event-match.test.mjs:131
MEDIUMsql-template-interpolationapps/pwa/test/moshpit-terms.test.mjs:192
MEDIUMsql-template-interpolationsrc/dns.mjs:2439
MEDIUMsql-template-interpolationsrc/selfupdate.mjs:166
MEDIUMsql-template-interpolationsrc/selfupdate.mjs:170
MEDIUMsql-template-interpolationsrc/selfupdate.mjs:208
MEDIUMsql-template-interpolationsrc/selfupdate.mjs:209
MEDIUMinsecure-temp-filetest/dns-disable-restore.test.mjs:93
MEDIUMinsecure-temp-filetest/dns-disable-restore.test.mjs:310
MEDIUMinsecure-temp-filetest/plugins.test.mjs:92
MEDIUMinsecure-temp-filetest/pty.test.mjs:28
MEDIUMinsecure-temp-filetest/pty.test.mjs:31
MEDIUMinsecure-temp-filetest/pty.test.mjs:40
MEDIUMinsecure-temp-filetest/pty.test.mjs:42
MEDIUMinsecure-temp-filetest/pty.test.mjs:47
MEDIUMinsecure-temp-filetest/pty.test.mjs:48
MEDIUMinsecure-temp-filetest/pty.test.mjs:49
MEDIUMinsecure-temp-filetest/tabs.test.mjs:8
MEDIUMinsecure-temp-filetest/tabs.test.mjs:13
MEDIUMinsecure-temp-filetest/tabs.test.mjs:14
MEDIUMinsecure-temp-filetest/tabs.test.mjs:22
MEDIUMinsecure-temp-filetest/trust.test.mjs:240
LOWsecret-generic-credentialapps/pwa/test/apikey-bearer-scheme.test.mjs:30
LOWsecret-generic-credentialapps/pwa/test/apikey-mask.test.mjs:38
LOWsecret-generic-credentialapps/pwa/test/apikey-reveal.test.mjs:35
LOWsecret-generic-credentialapps/pwa/test/approvals-context.test.mjs:28
LOWsecret-generic-credentialapps/pwa/test/approvals-credits.test.mjs:28
LOWsecret-generic-credentialapps/pwa/test/approvals-notify.test.mjs:26
LOWsecret-generic-credentialapps/pwa/test/approvals-resolve-race.test.mjs:20

…and 41 more. Full results in the Security tab.

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit 5ba3c77 into mainAug 8, 2026
4 checks passed
@ralyodioralyodio mentioned this pull request Aug 8, 2026
ralyodio added a commit that referenced this pull request Aug 8, 2026
Bump to v0.27.0, releasing `/crypto` — crypto market data from advis0r.com as
a CLI verb, a pit command, and a second Claude Code plugin (#322) — alongside
two commits that have been sitting on main unreleased: the compact() carry fix
for `ticker` (#321) and the move off the deprecated Node 20 runtime (#320).
Minor rather than patch: it adds a command and a plugin, and changes no
existing one.
As with v0.26.0 and `ticker`, the release is what makes the plugin's primary
path work. install.sh serves the latest release tarball, not main, so until a
release carries it every installed binary answers `unknown command "crypto"`
and the plugin's slash commands fall back to curl — which works, but skips the
rendering the verb exists to do.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ralyodio
ralyodio deleted the worktree-crypto-command branch August 8, 2026 16:42
Sign up for freeto 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

@ralyodio