package polymarket

  1. Overview
  2. Docs
OCaml client library for the Polymarket prediction market API

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.2.0.tar.gz
md5=4eb4c5d2f63ff081c9713d90be5a51b2
sha512=0e3de0c9b40683e09ab8f9f966a44784ef1b9b482c3eefef84104a7e8042c92f1d79893ee9588b24fa3d0decaed7f365509f4d1c23c66ce8328efb64e721f276

doc/polymarket.common/Polymarket_common/Constants/index.html

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").