Mr. Doge
Mr. Doge SDKHooks

useMatches

A plain list of matches, not limited to today's most-viewed ones. One-shot, not a subscription.

Wraps matches.list(). Unlike useTrendingMatches, not limited to today's most-viewed matches, so it still returns results even when nothing matching your filters happens to be trending right now.

Installation

pnpm dlx shadcn@latest add https://mrdoge.co/r/use-matches.json

Also requires MRDOGE_ODDS_API_KEY. Set it in your own environment after installing.

Installing this pulls in two files: the hook itself (a thin re-export from @mrdoge/react, which does the real work) and a Next.js route at app/api/mrdoge/token/route.ts that mints short-lived tokens using @mrdoge/node and your own MRDOGE_ODDS_API_KEY. The browser client never sees the raw key.

Usage

import { useMatches } from "@/hooks/use-matches"

const matches = useMatches({ sports: ["soccer"], status: ["upcoming"], limit: 20 })

Takes a single options object, like every real SDK method it wraps (matches.list(params)), not positional arguments. Only resolves which matches; pair it with useMatch to actually fetch one.

status alone isn't enough

A match stuck on "upcoming" past its real kickoff (delayed, postponed, never updated) still matches that filter alone; pass startDate (and endDate for a range) to rule those out.

Parameters

Prop

Type

Returns

Match[] | null | undefined: undefined while the request is in flight, null if it failed (no fallback data), otherwise the list. One-shot: this doesn't push live updates the way useLiveMatch/useOdds do; call it again (or remount) to refresh.

On this page