What is @polymarket/client?
PublicClient supplies public data; SecureClient adds account functions with supported Viem, Privy or Ethers signer adapters. Exported models and branded token, market, condition and address types distinguish identifiers and decimal strings deliberately.
A list paginator is created synchronously; firstPage() or asynchronous iteration performs fetching. Keep nextCursor unchanged and resume with from(cursor).firstPage(), omitting the cursor for a fresh scan. Older CLOB clients use different method and account conventions, so migration needs the current guide.
Who it is for
- TypeScript market and trading applications.
- Teams replacing legacy clients.
- Consumers combining several real-time feeds.
Features and coverage
- Public and secure clients
Separate public data from signed account actions.
- Typed models
Use exported Event, Market and OrderBook response types.
- Branded IDs
Distinguish domain identifiers at compile time.
- Pagination
Iterate pages and retain opaque cursors.
- Error guards
Handle action-specific rate-limit and input errors; rethrow unexpected failures.
- Wallet adapters
Supported signer paths include Viem, Privy and Ethers.
- Combined subscriptions
Receive several topics through one event stream.
- Resumable scans
Fetch using firstPage() or async iteration and resume through from(cursor).firstPage().
Workflows with @polymarket/client
Build a typed market view
Create PublicClient, read a small page and retain token IDs for books.
Add account actions
Adapt the wallet signer, create SecureClient and inspect account identity before enabling actions.
Consume topics
Subscribe to public topics, narrow each event by type and call stream.close() when disposed.
Resume an interrupted scan
Persist nextCursor after processing each page. Reuse intended filters, pace requests and handle RateLimitError or UserInputError with the action guard while rethrowing unexpected errors.
Pricing and total cost
The package needs no subscription. Venue trading charges and infrastructure costs are separate.
Getting started
Before you start: PublicClient does not supply private account streams.
- Install @polymarket/client from the official package.
- Create PublicClient and read active markets.
- Implement pagination and documented errors.
- Add a signer and SecureClient only for account functions.
- Use the current migration guide for legacy clients.
SDK cursors are opaque and must be stored unchanged.
Useful links
What to check
- PublicClient does not supply private account streams.
- Decimal strings and domain IDs have deliberately distinct types.
- Legacy CLOB clients have different methods and account conventions.
A closer look
Ratings & reviews
User reviews 0
The main score switches to user ratings after 5 published reviews.
A specific example helps the next person choose the right tool.
Related tools
Browse categoryFrequently asked questions about @polymarket/client
Which package is the unified SDK?
@polymarket/client.
Do public reads need a private key?
No. Start with createPublicClient.
Can several topics share a stream?
Yes. Subscriptions accept multiple topic specifications, including sports and markets.
How do I resume?
Store nextCursor unchanged and resume through the paginator.
How do I stop a stream?
Call stream.close() on disposal. Public subscriptions exist on public and secure clients; account actions still need suitable signers and permissions.


