Polymarket PHP v0.1.0
The first beta release of the Polymarket PHP SDK is now available! This SDK provides a type-safe interface for interacting with the Polymarket API.
Features
- Type-Safe: Built with PHP 8.4+ strict types and modern features
- PSR Standards: Follows PSR-12, PSR-18 HTTP client interface
- Markets API: List, search, and retrieve market data
- Orders API: Create, list, cancel, and manage orders
- Comprehensive Error Handling: Detailed exception hierarchy for all error scenarios
What's Included
Core Components:
- Client - Main SDK entry point
- Config - Flexible configuration management
- Markets - Market data and search functionality
- Orders - Order creation and management
- HTTP client abstraction (Guzzle + PSR-18)
Error Handling:
- AuthenticationException - 401/403 errors
- ValidationException - 400/422 errors
- RateLimitException - 429 error
- NotFoundException - 404 error
- ApiException - 5xx server errors
- JsonParseException - JSON parsing errors
Type Safety:
- Enums for OrderSide, OrderType, OrderStatus, SignatureType
- Strict type hints throughout
- PHPStan level 9 compliance
Requirements
- PHP 8.4 or higher
- Composer
License
This project is licensed under the MIT License.
💬 Feedback
Found a bug? Have a feature request? Please https://github.com/danielgnh/polymarket-php-sdk/issues!
Full Changelog: https://github.com/danielgnh/polymarket-php-sdk/commits/v0.1.0