Gamma Overview
The Gamma API client provides read-only access to Polymarket’s market data, events, sports information, and tags. No authentication is required for accessing public market data.
Installation
Section titled “Installation”npm install @dicedhq/gammayarn add @dicedhq/gammapnpm add @dicedhq/gammabun add @dicedhq/gammaClient Initialization
Section titled “Client Initialization”import { Gamma } from "@dicedhq/gamma";
// Initialize the client (no authentication required)const client = new Gamma();Configuration Options
Section titled “Configuration Options”interface GammaConfig { debug?: boolean; // Enable debug logging retries?: number; // Number of automatic retries}Available Operations
Section titled “Available Operations”The Gamma client provides the following operation groups:
- Markets - Query market data and CLOB-tradable markets
- Events - Access events and event collections
- Sports - Query sports information
- Tags - Browse and filter by tags
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 market data
Requirements
Section titled “Requirements”- Node.js >= 22.x or Bun >= 1.3.x
- TypeScript >= 5.x (for development)
Examples
Section titled “Examples”Check out the gamma-markets example for complete working examples.