package polymarket

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Polymarket_common.ConstantsSource

Shared constants for Polymarket API clients.

This module centralizes magic numbers and configuration values used across the codebase, providing documentation and a single source of truth.

Polygon Network

Sourceval polygon_chain_id : int

Polygon (formerly Matic) mainnet chain ID (137).

Token Decimals

Sourceval token_scale : float

USDC and CTF tokens use 6 decimal places on Polygon. This scale factor (1_000_000.0) converts between human-readable amounts and on-chain representation.

Sourceval token_decimals : int

Number of decimal places for USDC/CTF tokens (6).

Contract Addresses

Sourceval zero_address : string

Zero address used for open orders (no specific taker).

Sourceval ctf_exchange_address : string

CTF Exchange contract address on Polygon mainnet.

Time Durations

Sourceval one_year_seconds : float

One year in seconds (31_536_000.0). Used as default order expiration.

WebSocket Configuration

Sourceval rtds_ping_interval : float

RTDS (Real-Time Data Socket) recommended ping interval (5.0 seconds).

Sourceval message_buffer_size : int

Default buffer size for WebSocket message streams (1000).

EIP-712 Domain Constants

Sourceval clob_domain_name : string

CLOB authentication domain name for EIP-712 signing ("ClobAuthDomain").

Sourceval clob_domain_version : string

CLOB authentication domain version ("1").

Sourceval auth_message_text : string

The attestation message signed for CLOB authentication.

Sourceval ctf_exchange_domain_name : string

CTF Exchange domain name for order signing ("Polymarket CTF Exchange").

Sourceval ctf_exchange_domain_version : string

CTF Exchange domain version ("1").