Prerequisites
CoinListProviderwith workinggetAccessToken(session established on your backend)- User signed in: your
getAccessTokenreturns a non-null access token after OAuth (see the OAuth recipe)
Recommended: OffersGrid
OffersGrid uses useOffers internally and renders a responsive grid of offer cards with loading, error, and empty states.
maxColumns- upper bound for the grid when space allows (default3)loading,error,emptyState- replace default slots with your own React nodesonOfferClick- when set, cards become interactive; omit for read-only listsdata- pre-fetched offers fromCoinListServer.fetchOffers()for SSR. Pass them in to skip the client-side request on first render.
Lower-level APIs
Open these sections when you need custom layouts or non-React code.Hook: useOffers
Hook: useOffers
Use Pass
useOffers from @coinlist-co/react when you want full control over markup but still prefer reactive loading state.The hook exposes offersState:LOADING- provider not ready or request in flightERROR-reasonisnot-authenticatedorgeneric-errorCONTENT-offersis every page of offers merged (same data asfetchOffers)
data if you have server-fetched offers to hydrate from: useOffers({ data }).Client: fetchOffers and fetchOffersPage
Client: fetchOffers and fetchOffersPage
Inside React you usually reach these through For imperative, non-hook usage, create a
useCoinList():coinlist.fetchOffers()- iterates every paginated page and returns all offers (throwsNotAuthenticatedErrorif the user is not logged in)coinlist.fetchOffersPage(params)- one page of API results when you implement your own pagination UI
CoinListClient with createCoinListClient from @coinlist-co/react. Server code (Next.js Route Handlers, Server Components) should use the equivalent CoinListServer.fetchOffers() from @coinlist-co/react/server instead.REST: offers endpoints
REST: offers endpoints
The SDK calls the same API documented in the API reference. Use raw HTTP only if you are not using React, or you need fields or flows the SDK does not expose yet. You still need a valid Bearer access token from your OAuth session.
Next step
Display offer details
Load full offer details for an id from the grid or
fetchOffers.