Data API Overview
The Data API client provides read-only access to Polymarket’s user data, including positions, trades, activity history, and market analytics. No authentication is required for accessing public data.
Installation
Section titled “Installation”npm install @dicedhq/datayarn add @dicedhq/datapnpm add @dicedhq/databun add @dicedhq/dataClient Initialization
Section titled “Client Initialization”import { Data } from "@dicedhq/data";
// Initialize the client (no authentication required)const client = new Data();Configuration Options
Section titled “Configuration Options”interface DataConfig { debug?: boolean; // Enable debug logging retries?: number; // Number of automatic retries}Available Operations
Section titled “Available Operations”The Data client provides the following operation groups:
- Users - Query user positions, trades, activity, and closed positions
- Holders - Get top holders for markets
- Builders - Access builder leaderboard and volume data
Miscellaneous
Section titled “Miscellaneous”The client also provides additional utility methods:
// Get open interest for marketsconst openInterest = await client.misc.getOpenInterest("0x...");
// Get live volume for an eventconst liveVolume = await client.misc.getEventLiveVolume(12345);Features
Section titled “Features”- Type-Safe: Comprehensive TypeScript types for all API responses and requests
- Error Handling: Robust error handling with custom error types
- Automatic Retries: Built-in retry logic for failed requests
- Rate Limiting: Automatic handling of rate limit errors
- No Authentication: Public read-only access to user and market data
Requirements
Section titled “Requirements”- Node.js >= 22.x or Bun >= 1.3.x
- TypeScript >= 5.x (for development)