This repository is the home for Polymarket's official TypeScript SDK packages.
The TypeScript SDK is currently in beta. We are working toward a stable public API and will use feedback during the beta period to refine the developer experience.
We welcome bug reports, feature requests, and general feedback through GitHub Issues. Please use the provided issue templates so we can triage reports consistently.
This repository is organized as a pnpm workspace with packages for the SDK itself and apps for runnable examples.
| Package | Description |
|---|---|
packages/client |
Official TypeScript client for building on Polymarket |
packages/types |
Shared TypeScript types for SDK packages |
packages/bindings |
Internal generated API bindings; not intended for direct usage |
examples/react |
React + Ladle example app for exploring the SDK |
For installation and usage, see packages/client.
- Node.js
>=24 - pnpm
>=10
Install dependencies:
nvm use
corepack install
pnpm installSet up local environment variables:
cp .env.example .envThen open .env and fill in the fields.
Start the React examples:
pnpm dev:reactBuild all workspace packages:
pnpm buildThe root scripts are:
pnpm dev:react- start the Ladle examples inexamples/reactpnpm build- build all workspace packages that expose a build scriptpnpm clean- remove package build output frompackages/*/dist
- Root
tsconfig.jsonand package-leveltsconfig.jsonfiles are for editor tooling and source navigation. tsconfig.build.jsonfiles are the configs used by package build and typecheck commands.- When changing build behavior, prefer updating
tsconfig.build.json.
Publishing is managed by the Changesets GitHub Action. Packages are published to npm through trusted publishing.
This project is licensed under the MIT License.