UNPKG

@pear-protocol/hyperliquid-sdk

Version:

React SDK for Pear Protocol Hyperliquid API integration

22 lines (21 loc) 659 B
import type { SyncFillsResponseDto } from '../types'; export interface AutoSyncFillsOptions { baseUrl: string; accessToken: string; address: string | null; intervalMs?: number; aggregateByTime?: boolean; enabled?: boolean; } export interface AutoSyncFillsState { lastRunAt: number | null; lastResult: SyncFillsResponseDto | null; error: string | null; isSyncing: boolean; triggerSync: () => Promise<void>; } /** * Listens to address changes and periodically syncs user fills * Defaults: aggregate=true, interval=60s */ export declare function useAutoSyncFills(options: AutoSyncFillsOptions): AutoSyncFillsState;