Markets in a terminal.
The clapper package is a command and an SDK. It is not on the npm registry yet. Install the npm pack tarball from this server. Every block below is output captured on 2026-12-01 02:30 UTC.
npm install https://www.clappermarkets.com/download/clapper-0.1.0.tgz
List what is open
Largest pools first. Add --json for scripts. First eight lines shown.
$ clapper markets --open #31 NVDA above 151.00 #####======= 43.5% YES 540 USDG locks in 17h 29m #35 BTC above 59,000.00 #####======= 45.2% YES 365 USDG locks in 20h 29m #17 NVDA up 2% ######====== 49.2% YES 256 USDG locks in 2d 18h #32 TSLA above 413.00 ##########== 81.6% YES 245 USDG locks in 17h 29m #37 BTC in 57,700.00 to 60,200.00 ######====== 54.0% YES 185 USDG locks in 20h 29m #44 PLTR above 171.50 ########==== 70.6% YES 170 USDG locks in 17h 29m #27 QQQ above 661.00 #######===== 54.8% YES 155 USDG locks in 17h 29m #34 META above 632.00 #####======= 38.1% YES 105 USDG locks in 17h 29m
Read one market
The emblem is drawn from the market id and its live pool. # is the YES share, = is the NO share.
$ clapper market 31 ### # # # NVDA above 151.00 # # # # ##======= market #31, open ###########== = = = ### # # # # = = ======= YES 235.00 USDG # # ####======== = = NO 305.00 USDG ##### # = = = = = === ##########============== # # # ============= 43.5% YES #====== = = = = locks in 17h 29m = = = = = = rule YES if the first Chainlink round at or after 2026-12-01 21:00 UTC reads >= 151.00 settles 2026-12-01 21:00 UTC pays YES 2.25x, NO 1.74x
Quote before you stake
The same integer arithmetic as the contract, with your stake added to the pool.
$ clapper quote 31 yes 10
market #31 NVDA above 151.00
stake 10.00 USDG on YES
returns 22.00 USDG if YES wins, 0 if it loses
pool after 44.5% YES, fee 11.00 taken offStake and claim
Both are dry runs until you add --yes. The key comes from CLAPPER_PRIVATE_KEY in the environment and nowhere else. Use a throwaway key.
$ clapper stake 31 no 25
market #31 NVDA above 151.00
stake 25.00 USDG on NO
returns 41.95 USDG if NO wins, 0 if it loses
pool after 41.6% YES, fee 11.30 taken off
Dry run, nothing sent. Add --yes to send.After it settles
The Chainlink round that decided it is part of the record.
$ clapper market 4 ## ## BTC in 59,200.00 to 60,500.00 ################ market #4, settled ## ## ## ## ## ## # ###### ## ## ## #= YES 340.00 USDG ##############==== NO 175.00 USDG ## ## ## ## #= ====== ################======== # ## ## #= == == == 66.0% YES #####========== YES won #= == == rule YES if 59,200.00 <= settle price < 60,500.00 settles 2026-11-30 00:00 UTC pays YES 1.48x, NO 2.88x round 18446744073709554183, 2026-11-30 00:58 UTC
Check the stack
Blocks, pools, feeds and the keeper. clapper watch follows one market and prints a line per event. clapper portfolio lists an account.
$ clapper status
___
___| | CLAPPER
| | | pool markets, settled by Chainlink
|___| |
|___|
server http://127.0.0.1:5360, up 39 min
fork block 126,853,132, 2026-12-01 02:30 UTC
mainnet block 127,004,600
markets 27 open, 4 settled, 19 void
pools 2,096.00 test USDG live
feeds 20 of 20 live
keeper no errorUse it from code
Node 18 or newer. One dependency, viem. Amounts are strings like "12.5" or 6-decimal bigint units.
import { createClapper, formatUsdg } from "clapper";
const clapper = createClapper({ url: "http://127.0.0.1:5360" });
for (const m of await clapper.markets({ open: true })) {
const q = await clapper.quote(m.id, true, "10");
console.log(m.title, formatUsdg(q.payout));
}
for await (const e of clapper.events()) {
console.log(e.type, e.args);
}