This repository is the home for Polymarket's official TypeScript SDK packages.
This repository is organized as a pnpm workspace with SDK packages and 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/scripts |
Runnable TypeScript scripts for common SDK workflows |
For installation and usage, see packages/client.
The SDK follows semantic versioning. Although minor releases on the 0.x line
may include breaking changes, we aim to avoid them and, whenever possible,
provide a deprecation path before removing or changing an API. Patch releases
remain backward compatible except for APIs marked @experimental, which may
change in any release. The Perps APIs are currently experimental.
- 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.
Build all workspace packages:
pnpm buildThe root scripts are:
pnpm 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.
We welcome bug reports, feature requests, and feedback through GitHub Issues. See CONTRIBUTING.md before proposing code changes.
Publishing is managed by the Changesets GitHub Action. Packages are published to npm through trusted publishing.
This project is licensed under the MIT License.