UNPKG

@azuro-org/sdk

Version:

One-stop solution for building betting dApps on the Azuro Protocol.

26 lines (25 loc) 800 B
import { type Selection } from '@azuro-org/toolkit'; export type UseSelectionOddsProps = { selection: Selection; initialOdds?: number; }; /** * Watch real-time odds updates for a single selection. * Subscribes to condition updates via websocket and tracks odds changes. * * Optionally accepts `initialOdds` to skip initial fetch if odds are already known. * * - Docs: https://gem.azuro.org/hub/apps/sdk/watch/useSelectionOdds * * @example * import { useSelectionOdds } from '@azuro-org/sdk' * * const { data: odds, isFetching } = useSelectionOdds({ * selection: { conditionId: '123', outcomeId: '1' }, * initialOdds: 1.5 * }) * */ export declare const useSelectionOdds: ({ selection, initialOdds }: UseSelectionOddsProps) => { data: number; isFetching: boolean; };