package polymarket
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
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/CHANGELOG.html
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[0.2.0] - 2026-01-01
Added
- RTDS (Real-Time Data Socket) client for real-time crypto prices (Binance, Chainlink) and comments streaming
- RFQ (Request for Quote) API client with order builder for requesting and filling quotes
- Type-safe HTTP request builder with phantom types for compile-time auth enforcement
- Per-module
Logs.Srcstructured logging for fine-grained log filtering - PPX enum deriver (
ppx_polymarket_enum) for zero-boilerplate string enums - Extra field detection logging for API responses (forward compatibility warnings)
- WebSocket high-level client modules (
Market,User) with subscription management - Route-based rate limiter with GCRA algorithm and configurable behavior (delay/error)
with_l1_authandwith_l2_authhelpers to Builder for ergonomic authentication- Order builder modules for CLOB and RFQ with crypto signing
Changed
- Migrated logging from
Common.Loggerto per-moduleLogs.Srcfor better filtering - Reorganized lib into
generic/(reusable) andpolymarket/(API-specific) directories - Made
private_keyabstract withPrivatesubmodule pattern for type safety - Renamed WSS module to
wss_apifor consistency with other API modules - Simplified types and consolidated API client structure
Fixed
- Thread-safe hash table access in rate limiter state
- Regex patterns in odoc comments causing doc generation errors
[0.1.0] - 2024-12-15
Added
- CLOB API client with order book, pricing, and trading endpoints
- L1 authentication (EIP-712 wallet signing) for API key management
- L2 authentication (HMAC-SHA256) for authenticated trading endpoints
- Crypto module with keccak256, HMAC-SHA256, secp256k1 signing, and address derivation
- CLOB API demo (
examples/clob_api_demo.ml) - POST and DELETE methods with custom headers to Http_client
- Gamma API client with full endpoint coverage (teams, tags, events, markets, series, comments, profiles, sports, search)
- Structured logging via
Common.Loggerwith configurable log levels (debug, info, off) POLYMARKET_LOG_LEVELenvironment variable for controlling log output- File output support for logging via
POLYMARKET_LOG_FILEenvironment variable - Gamma API demo (
examples/gamma_api_demo.ml) - TLS support for secure API connections
- Testing framework for reliable development
- Live demo functionality
- Error handling and JSON helpers to Http_client
- Generic Http_client module for reuse across APIs
Changed
- Restructured lib directory for multi-API support
- Moved Http_client to its own module (
lib/http_client/) - Consolidated logging into
Common.Loggermodule - Refactored client to use pipe pattern for parameter building
Removed
- Redundant tests now covered by dependency libraries
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page