> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bison.markets/llms.txt
> Use this file to discover all available pages before exploring further.

# Market Tickers

> Stream live market data for all markets in an event

## Overview

Connect to receive real-time market data for all markets within a specific event, including bid/ask prices, volume, and open interest.

## Connection

```
wss://api.bison.markets/ws/kalshi/event/{eventTicker}
```

<ParamField path="eventTicker" type="string" required>
  The Kalshi event ticker (e.g., `KXBTC-100K`)
</ParamField>

## Example Connection

```javascript theme={null}
const eventTicker = "KXBTC-100K";
const ws = new WebSocket(
  `wss://api.bison.markets/ws/kalshi/event/${eventTicker}`
);

ws.onopen = () => {
  console.log(`Connected to ${eventTicker} market data`);
  
  // Send heartbeat every 30 seconds
  setInterval(() => {
    if (ws.readyState === WebSocket.OPEN) {
      ws.send(JSON.stringify({ type: "ping" }));
    }
  }, 30000);
};

ws.onmessage = (event) => {
  const data = JSON.parse(event.data);
  
  // Ignore ping/pong messages
  if (data.type === "ping" || data.type === "pong") {
    return;
  }
  
  console.log("Market update:", data);
  updateMarketDisplay(data);
};
```

## Ticker Update Format

Ticker updates contain the latest market data:

```json theme={null}
{
  "market_ticker": "KXBTC-100K-DEC31",
  "yes_bid_uusdc": "720000",
  "yes_ask_uusdc": "750000",
  "no_bid_uusdc": "250000",
  "no_ask_uusdc": "280000",
  "last_price_uusdc": "735000",
  "volume": 15000,
  "open_interest": 50000
}
```

## Response Fields

<ResponseField name="market_ticker" type="string">
  Market ticker being updated
</ResponseField>

<ResponseField name="yes_bid_uusdc" type="string" optional>
  Best bid price for YES in µUSDC (integer string)
</ResponseField>

<ResponseField name="yes_ask_uusdc" type="string" optional>
  Best ask price for YES in µUSDC (integer string)
</ResponseField>

<ResponseField name="no_bid_uusdc" type="string" optional>
  Best bid price for NO in µUSDC (integer string)
</ResponseField>

<ResponseField name="no_ask_uusdc" type="string" optional>
  Best ask price for NO in µUSDC (integer string)
</ResponseField>

<ResponseField name="last_price_uusdc" type="string" optional>
  Last traded price in µUSDC (integer string)
</ResponseField>

<ResponseField name="volume" type="number" optional>
  Total traded volume
</ResponseField>

<ResponseField name="open_interest" type="number" optional>
  Current open interest (outstanding contracts)
</ResponseField>

<Info>
  To avoid ambiguity, we denote the smallest possible multiple of USDC (0.000001 USDC) as one `uusdc`,
  which stands for µUSDC (micro-USDC), and denote the smallest possible multiple of a contract (0.01 contract)
  as one `ccontract` (centicontract).

  User-facing USDC balances are specified as fixed-point strings (e.g. `"1.2625"` for USDC). Contract quantities
  in the API and SDK are specified as integer `ccontracts` strings (e.g. `"1050"` for 10.50 contracts at precision 2).
</Info>

## Example: Building a Price Display

```javascript theme={null}
const eventTicker = "KXBTC-100K";
const ws = new WebSocket(
  `wss://api.bison.markets/ws/kalshi/event/${eventTicker}`
);

// Store market data
const markets = new Map();

ws.onmessage = (event) => {
  const data = JSON.parse(event.data);
  
  if (data.type === "ping" || data.type === "pong") {
    return;
  }
  
  // Update market data
  markets.set(data.market_ticker, {
    yesBid: data.yes_bid_uusdc ? Number(data.yes_bid_uusdc) / 1_000_000 : null,
    yesAsk: data.yes_ask_uusdc ? Number(data.yes_ask_uusdc) / 1_000_000 : null,
    noBid: data.no_bid_uusdc ? Number(data.no_bid_uusdc) / 1_000_000 : null,
    noAsk: data.no_ask_uusdc ? Number(data.no_ask_uusdc) / 1_000_000 : null,
    lastPrice: data.last_price_uusdc ? Number(data.last_price_uusdc) / 1_000_000 : null,
    volume: data.volume,
    openInterest: data.open_interest,
  });
  
  // Update your UI
  renderMarketData(data.market_ticker, markets.get(data.market_ticker));
};

function renderMarketData(ticker, data) {
  console.log(`${ticker}:`);
  console.log(`  YES: ${data.yesBid} bid / ${data.yesAsk} ask`);
  console.log(`  NO:  ${data.noBid} bid / ${data.noAsk} ask`);
  console.log(`  Last: ${data.lastPrice}, Volume: ${data.volume}`);
}
```

## Use Cases

<CardGroup cols={2}>
  <Card title="Live Price Feeds" icon="chart-line">
    Display real-time bid/ask spreads for markets in an event
  </Card>

  <Card title="Trading Dashboards" icon="table">
    Build comprehensive market overviews with live data
  </Card>

  <Card title="Price Alerts" icon="bell">
    Trigger notifications when prices reach certain thresholds
  </Card>

  <Card title="Market Analytics" icon="chart-bar">
    Track volume and liquidity changes in real-time
  </Card>
</CardGroup>
