This private workspace package contains runnable TypeScript scripts that demonstrate SDK workflows.
Run an example from the repository root:
pnpm --filter @polymarket/examples analytics:builders
pnpm --filter @polymarket/examples list:markets
pnpm --filter @polymarket/examples fetch:market
pnpm --filter @polymarket/examples pagination
pnpm --filter @polymarket/examples market:prices
pnpm --filter @polymarket/examples search
pnpm --filter @polymarket/examples stream:public
pnpm --filter @polymarket/examples stream:realtime
pnpm --filter @polymarket/examples order:create-limit
pnpm --filter @polymarket/examples order:create-market
pnpm --filter @polymarket/examples positions:listSecure client examples use the same environment variables as the integration tests. Copy the root .env.example to .env and set POLYMARKET_PRIVATE_KEY and POLYMARKET_DEPOSIT_WALLET before running them.
The realtime price example only requires POLYMARKET_PRIVATE_KEY. It authenticates with the signer’s own address and connects to the production price endpoint, wss://ws-live-v2.polymarket.com/ws. It prints snapshots and updates, then closes after 20 events.
Typecheck the examples:
pnpm --filter @polymarket/examples typecheck