Auto-tradeBeta

KashRock watches the board and the venue, computes the edge, and streams a signed trade intent the moment one appears. Your executor runs on your machine, verifies the signature, and places the order with your own Polymarket US credentials. KashRock never holds venue keys and never places orders for you.

One command

pip install kashrock
export KASHROCK_API_KEY=kr_live_…
export POLYMARKET_KEY_ID=…        # stays on your machine
export POLYMARKET_SECRET_KEY=…    # stays on your machine
kashrock trade --venue polymarket_us

Paper mode is the default — every intent is verified and logged to your console ledger without touching money. Live mode is enabled per account after review. Parlay intents are paper-only and are never split into single orders.

Plans at a glance

In beta, auto-trade is Pro and Quant only. Both plans receive the same signed intents in real time.

ProQuant
Intent delayReal-timeReal-time
ModePaper (live after review)Paper (live after review)
VenuePolymarket USPolymarket US
Filter changesLive, under 1 secondLive, under 1 second

The channel

GETWS /v7/trade

Auth three ways — X-API-Key header, Authorization: Bearer <key>, or a single-use ?ticket= minted by POST /v7/ws-ticket with {"surface":"trade"}. An ?api_key= query param is rejected — never put your key in a URL.

ParamTypeRequiredDescription
venuequery—polymarket_us (default). Only your venue gets an execution block.

Every frame carries an op. The server pushes hello first (venues, heartbeat cadence), intent on every qualifying edge, alert on signal alerts, heartbeat every 15 seconds, halt when a board goes stale or an operator stops the channel, resume when the halt lifts, settings when your filters change (they apply within a second — no reconnect), subscribed to confirm your venue, plus pong and error. Send {"op":"subscribe","venue":"polymarket_us"} to pick a venue and {"op":"report",…} frames to report order outcomes back to your ledger.

Intent

{
  "type": "intent",
  "intent_id": "kr_int_9f2c1b",
  "kr_match_id": "kr_cs2_sashi-vs-color-14-09-2026",
  "kr_tm_home": "kr_tm_8812",
  "kr_tm_away": "kr_tm_4477",
  "sport": "cs2",
  "market": "match_winner",
  "team": "Sashi",
  "fair": 0.54,
  "limit_price": 0.51,
  "ev_pct": 5.9,
  "stake_usd": 1,
  "capacity_usd": 142,
  "starts_at": "2026-09-14T17:00:00Z",
  "expires_at": "2026-09-14T16:55:00Z",
  "execution": {
    "venue": "polymarket_us",
    "market_slug": "cs2-sashi-vs-color-2026-09-14",
    "side": "ORDER_INTENT_BUY_LONG"
  },
  "sig": "base64-ed25519-signature"
}
  • fair is KashRock's fair price for the selection; limit_price is the worst venue price that still clears your minimum edge.
  • execution names the exact venue market and side — place exactly what it says. It appears only for the venue you subscribed with.
  • sig is an Ed25519 signature over the intent. The SDK verifies it with the public key baked into the package — an unsigned or tampered intent is never placed.
  • expires_at bounds how stale an intent can get; expired intents are skipped, never chased.

Executor rules

  • IOC limit orders only, never marketable past limit_price.
  • Stops placing after 15 seconds without a heartbeat, and on any halt frame.
  • Enforces your daily loss limit, max open positions, and per-match exposure against the venue's own balance and positions.
  • Deduplicates on intent_id across restarts.
  • Reports every outcome — filled, skipped, refused — to your console ledger.

Console endpoints

Session-authenticated (same as the rest of the console backend), under /v1/dev/trade:

  • GET /v1/dev/trade/status — what your plan gets on the channel.
  • GET /v1/dev/trade/settings?key_id=… — current filters for a key.
  • PUT /v1/dev/trade/settings — update filters; live within a second.
  • GET /v1/dev/trade/ledger — every reported outcome with P&L totals.