@marketmaster/sdk
v0.1.1
Published
Official JavaScript SDK for the MarketMaster prediction-market data API (Kalshi, Polymarket, and more).
Maintainers
Readme
@marketmaster/sdk
Official JavaScript/TypeScript SDK for the MarketMaster prediction-market data API — live edges, arbitrage spreads, market snapshots, and the whale feed across Kalshi and Polymarket.
Install
npm install @marketmaster/sdkQuickstart
import { MarketMaster } from "@marketmaster/sdk";
const mm = new MarketMaster({ apiKey: process.env.MM_API_KEY }); // mmk_live_...
const { edges } = await mm.edges({ platform: "kalshi", min_edge: 5, limit: 10 });
const { opportunities } = await mm.arbitrage({ min_spread: 2 });
const { trades } = await mm.whales({ min: 10000 });
const one = await mm.market("kalshi", "PRES-2028-DEM");
const me = await mm.status();Methods
| Method | Endpoint | Options |
|---|---|---|
| edges(opts) | GET /v1/edges | platform, category, min_edge, limit, offset |
| markets(opts) | GET /v1/markets | source, category, limit, offset |
| market(source, id) | GET /v1/market | — |
| arbitrage(opts) | GET /v1/arbitrage | min_spread, limit, offset |
| whales(opts) | GET /v1/whales | source, min, limit, offset |
| status() | GET /v1/status | — |
Auto-pagination
for await (const edge of mm.paginate("edges", { platform: "polymarket" }, "edges")) {
console.log(edge.market_title, edge.edge_pct);
}Errors
Failed requests throw MarketMasterError with .status, .code, and .retryAfter (on 429s).
Get a key at https://marketmaster.live/dashboard · Full docs: https://marketmaster.live/developers
