CS2 props in JavaScript — one call, eight books
Published · by KashRock
CS2 is the deepest esports props market: map-scoped kills and headshots, priced by eight DFS books at once. Here's the whole integration.
1. Install and fetch the board
npm install kashrock
import { KashRock } from "kashrock"
const kr = new KashRock("kr_demo_swagger_public_readonly") // read-only demo key
const { props } = await kr.props("cs2")
console.log(props[0])
// { player, stat_type, line, direction, odds, book, propId, match … }2. Find the best line on a player
One propId per player market, shared by every book — filter on it and the over/under pair sits in the same row:
const target = props[0].propId
const offers = props.filter((p) => p.propId === target)
for (const o of offers) {
console.log(o.book, o.direction, o.line, o.odds)
}
// prizepicks over 19.5 -119
// underdog over 18.5 -105 ← softer line
// betr over 19.5 -1103. Everything else is the same client
await kr.lines("cs2") // consensus lines (Hobby+)
await kr.matches("cs2") // schedule + results
await kr.liveGames("cs2") // live map scores
await kr.researchBoard() // graded research surface
await kr.historyTape() // tape for backtestsNext steps
Free Sandbox key in the console, the CS2 API page for coverage depth, and CS2 props API for the market reference.