Skip to Content
Developer HubSDKData HooksusePredefinedCombo

usePredefinedCombo

The usePredefinedCombo hook fetches the curated set of predefined combo bets for the active chain — ready-made express selections with a precomputed totalOdds.

ℹ️

Hook represents a logic wrapper over TanStack Query’s useQuery hook. Explore TanStack Query docs  to understand what data the hook returns.

Usage

import { usePredefinedCombo } from '@azuro-org/sdk' const { data: combos, isFetching, error } = usePredefinedCombo()

Props

All props are optional — by default the hook reads the chain from the SDK’s chain context.

{ chainId?: ChainId query?: QueryParameterWithSelect<UsePredefinedComboQueryFnData, TData> // useQuery params }
type UsePredefinedComboQueryFnData = GetPredefinedComboResult
type ChainId = | 137 // Polygon | 80002 // Polygon Amoy | 8453 // Base | 84532 // Base Sepolia

Return Value

UseQueryResult<GetPredefinedComboResult>
import { type UseQueryResult } from '@tanstack/react-query' type GetPredefinedComboResult = PredefinedComboData[] type PredefinedComboData = { conditions: PredefinedComboConditionData[] totalOdds: string // calcMinOdds over the combo's outcomes } type PredefinedComboConditionData = { id: string conditionId: string state: ConditionState title: string // market title isPrematchEnabled: boolean isLiveEnabled: boolean hidden?: boolean outcome: OutcomeData // single picked outcome (see callout) game: GameData isExpressForbidden: boolean } type OutcomeData = { title: string // outcome title outcomeId: string odds: string sort: `${number}` /** Modern ("5...") conditions only: numeric handicap/line value, e.g. "-2.5" / "+2.5" */ point?: string | null }
ℹ️

outcomes (API) → outcome (result)

Each predefined-combo condition pins exactly one outcome — the pick that makes up the combo. The API returns it under the field outcomes, but the result exposes a singular outcome on PredefinedComboConditionData, since it is a single OutcomeData, not an array. Read condition.outcome, not condition.outcomes.

⚠️

odds and totalOdds are a snapshot.

The odds on each outcome and the combo’s totalOdds are captured at the moment of the request — they are not live and will drift from current market odds. To display actual odds, subscribe to real-time updates per selection with useSelectionOdds (pass the snapshot odds as initialOdds), or watch the whole set of conditions with useConditionsState, and recompute the combo total from the live outcome odds.

Query Options Helper

getUsePredefinedComboQueryOptions lets you build query options outside a component — useful for prefetching, SSR, or composing queries.

import { getUsePredefinedComboQueryOptions } from '@azuro-org/sdk' const options = getUsePredefinedComboQueryOptions({ ...props, chainId }) await queryClient.prefetchQuery(options)
type GetUsePredefinedComboQueryOptionsProps = UsePredefinedComboProps & { chainId: ChainId }

This hook wraps the toolkit’s getPredefinedCombo utility.

Last updated on