Best practices
Provider setup
TheContextProvider must be inside both WagmiProvider and QueryClientProvider. Configure QueryClient for live market data:
Query patterns
Dependent queries
Polling for live data
Parallel queries
Cache invalidation
Mutation hooks automatically invalidate related queries. For manual invalidation:Wallet connection
TheContextProvider automatically picks up the connected wallet from wagmi. Trading hooks throw ContextWalletError if no wallet is connected.