with one click
context-build
Build prediction market frontends with the Context React SDK
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Build prediction market frontends with the Context React SDK
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Create, cancel, or manage multiple orders in a single batch
Place and manage prediction market orders on Context Markets
Build an embeddable single-market prediction widget with buy/sell buttons
Build a portfolio dashboard showing positions, P&L, balances, and claimable winnings
Scaffold a full prediction market trading UI with market list, orders, and portfolio
Find interesting prediction markets by volume, trend, liquidity, or topic
| name | context-build |
| description | Build prediction market frontends with the Context React SDK |
Build prediction market frontends using React hooks from context-markets-react.
context-markets-react and context-markets >= 0.6.0wagmi >= 2, viem >= 2, @tanstack/react-query >= 5ContextProvider. Trading hooks additionally require wallet connection.npm install context-markets-react context-markets wagmi viem @tanstack/react-query
Order matters. All three are required.
import { WagmiProvider } from "wagmi"
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
import { ContextProvider } from "context-markets-react"
const queryClient = new QueryClient()
function App({ children }: { children: React.ReactNode }) {
return (
<WagmiProvider config={wagmiConfig}>
<QueryClientProvider client={queryClient}>
<ContextProvider apiKey={process.env.NEXT_PUBLIC_CONTEXT_API_KEY!}>
{children}
</ContextProvider>
</QueryClientProvider>
</WagmiProvider>
)
}
Markets (query): useMarkets · useSearchMarkets · useMarket · useOrderbook · useQuotes · usePriceHistory · useMarketActivity · useSimulateTrade · useOracle · useLatestOracleQuote
Orders (query): useOrders · useOrder
Orders (mutation): useCreateOrder · useCreateMarketOrder · useCancelOrder · useCancelReplace
Portfolio (query): usePortfolio · usePositions · useBalance · useClaimable · usePortfolioStats
Account (mixed): useAccountStatus · useAccountSetup · useDeposit · useWithdraw · useApproveUsdc · useApproveOperator
Questions (mutation): useSubmitQuestion · useSubmitAndWait · useCreateMarket · useAgentSubmit · useAgentSubmitAndWait
Utilities: ContextProvider · useContextClient · contextKeys · ContextWalletError
Use contextKeys for cache invalidation after mutations:
import { contextKeys } from "context-markets-react"
contextKeys.markets.list(params)
contextKeys.markets.get(marketId)
contextKeys.markets.quotes(marketId)
contextKeys.markets.latestOracleQuote(marketId)
contextKeys.orders.list(address, params)
contextKeys.orders.get(address, id)
contextKeys.portfolio.get(address, params)
contextKeys.portfolio.positions(address, params)
contextKeys.portfolio.balance(address)
| Workflow | When to use |
|---|---|
| trading-app | Full trading UI with market list, orders, portfolio |
| market-widget | Embeddable single-market component |
| portfolio-dashboard | Position tracking and P&L display |
| account-setup-flow | Wallet connect → approve → deposit → ready |