@azuro-org/sdk
Version:
One-stop solution for building betting dApps on the Azuro Protocol.
23 lines (22 loc) • 931 B
TypeScript
import { type UseQueryResult } from '@tanstack/react-query';
import { type ChainId, type ConditionDetailedData, type GameMarkets } from '@azuro-org/toolkit';
import { type QueryParameter } from '../../global';
export type UseActiveMarketsProps = {
gameId: string;
chainId?: ChainId;
extended?: boolean;
query?: QueryParameter<ConditionDetailedData[]>;
};
export type UseActiveMarkets = (props: UseActiveMarketsProps) => UseQueryResult<GameMarkets | undefined>;
/**
* Get active markets grouped by market type for a specific game.
* Wraps `useActiveConditions` and groups conditions by market using `groupConditionsByMarket`.
*
* - Docs: https://gem.azuro.org/hub/apps/sdk/data-hooks/useActiveMarkets
*
* @example
* import { useActiveMarkets } from '@azuro-org/sdk'
*
* const { data: markets, isFetching } = useActiveMarkets({ gameId: '123' })
* */
export declare const useActiveMarkets: UseActiveMarkets;