Interface UseSpotPriceReturn<TTokens>

The return type of the useSpotPrice hook. spotPrices - An object mapping each token symbol to its spot price.

interface UseSpotPriceReturn {
    dataUpdatedAt: number;
    error: null | ConnectError;
    errorUpdateCount: number;
    errorUpdatedAt: number;
    failureCount: number;
    failureReason: null | ConnectError;
    fetchStatus: FetchStatus;
    isError: boolean;
    isFetched: boolean;
    isFetchedAfterMount: boolean;
    isFetching: boolean;
    isInitialLoading: boolean;
    isLoading: boolean;
    isLoadingError: boolean;
    isPaused: boolean;
    isPlaceholderData: boolean;
    isPreviousData: boolean;
    isRefetchError: boolean;
    isRefetching: boolean;
    isStale: boolean;
    isSuccess: boolean;
    refetch: (<TPageData>(options?) => Promise<QueryObserverResult<Record<string, Price>, ConnectError>>);
    remove: (() => void);
    spotPrices?: Record<InferSymbols<TTokens>, Price>;
    status: "error" | "success" | "loading";
}

Type Parameters

Hierarchy

Properties

dataUpdatedAt: number
error: null | ConnectError
errorUpdateCount: number
errorUpdatedAt: number
failureCount: number
failureReason: null | ConnectError
fetchStatus: FetchStatus
isError: boolean
isFetched: boolean
isFetchedAfterMount: boolean
isFetching: boolean
isInitialLoading: boolean
isLoading: boolean
isLoadingError: boolean
isPaused: boolean
isPlaceholderData: boolean
isPreviousData: boolean
isRefetchError: boolean
isRefetching: boolean
isStale: boolean
isSuccess: boolean
refetch: (<TPageData>(options?) => Promise<QueryObserverResult<Record<string, Price>, ConnectError>>)

Type declaration

remove: (() => void)

Type declaration

    • (): void
    • Returns void

spotPrices?: Record<InferSymbols<TTokens>, Price>
status: "error" | "success" | "loading"

Generated using TypeDoc