

## Tonight's best hit-candidates [#tonights-best-hit-candidates]

```bash title="stat_board.sh"
curl -H "X-API-Key: $STATSHAWK_KEY" \
  "https://api.statshawk.ai/v1/analysis/stat-board?competition=mlb&date=$(date +%F)&stat=batting.h" \
  | jq '.data.recommended[:5][]
        | "\(.person.bio.full_name) (\(.team.name) vs \(.opponent.name))  window \(.window_rate) · season \(.season_rate)  [\(.games_in_window) gp]"'
```

## Python [#python]

```python title="stat_board.py"
import os, requests, datetime
KEY = os.environ["STATSHAWK_KEY"]

board = requests.get(
    "https://api.statshawk.ai/v1/analysis/stat-board",
    headers={"X-API-Key": KEY},
    params={"competition": "mlb", "date": datetime.date.today().isoformat(), "stat": "batting.h"},
    timeout=15,
).json()["data"]

print(f"{board['stat']} over {board['line']} — {board['date']} ({board['games_with_lineups']} games with lineups)")
for e in board["recommended"][:5]:
    print(f"{e['person']['bio']['full_name']:<24} {e['window_rate']:.0%} last-{board['window']} · {e['season_rate']:.0%} season  vs {e['opponent']['name']}")
```

<Callout type="tier">
  `/v1/analysis/stat-board` is 10× weight, paid tier — but one call ranks the whole slate,
  which beats looping `player-prop` per player. `recommended` filters to entries with at
  least `min_games` (default 10) games in the window; `full_slate` includes everyone (up to
  `limit`, default 50). `date` is interpreted in the competition's scoreboard timezone —
  US Eastern for MLB.
</Callout>

<PlaygroundLink href="/docs/api">
  Open /analysis/stat-board in the playground →
</PlaygroundLink>
