Change Log - September 24, 2025
Summaryโ
This represents a major documentation update implementing comprehensive changes from PR #35. The update includes significant enhancements to betting functionality, complete user management capabilities, exposure calculation algorithms, and the establishment of a formal change log system.
Key Highlightsโ
- ๐ฏ 6 major commits implementing new features and enhancements
- ๐ Multiple API endpoints enhanced and documented across bet, user, and transaction systems
- ๐งฎ Advanced exposure calculations with aggregate portfolio-aware algorithms
- ๐๏ธ New documentation infrastructure with change logs system
- ๐ง Atomic batch operations (limited to 20 requests) with TypeScript definitions
- ๐๏ธ Enhanced filtering capabilities for both bets and users with meta field support
- ๐ Portfolio-aware operations across all betting and outcome management endpoints
- ๐ง Comprehensive bug fixes including transaction field cleanup and error handling improvements
- ๐งช Enhanced test coverage ensuring reliability across all new features
API Documentation Updatesโ
Bet Ledger APIโ
Make Bet Offer Endpointโ
- ๐ฅ Breaking: Removed
bet_idfield support (no longer accepted in requests) - ๐ฅ Breaking: Made
wager_referencefield required instead of optional - โจ New:
allowed_acceptor_idsfield - array of user IDs allowed to accept the bet offer - โจ New:
allowed_acceptor_referencesfield - array of user references allowed to accept the bet offer - ๐ Updated: Documentation notes to explain allowed acceptor restrictions
- ๐ Updated: All code examples (cURL, JavaScript, Python, Rust) to demonstrate both open and restricted bet offers
Open Bets Endpointโ
- โจ New:
allowed_acceptor_idsfield to response structure to matchGetOpenBetsResponseDto - ๐ง Enhanced: Better test coverage for get-open-bets endpoint functionality
- ๐ Fixed: 500 error handling for
user_referencesparameter
Batch Operationsโ
- ๐ง Enhanced: Comprehensive documentation for atomic batch operations
- โจ New: Complete TypeScript type definitions for all 5 operation types
- ๐ Updated: Examples showing atomic behavior (all-or-nothing execution)
- โก Performance: Batch requests now limited to maximum 20 requests per batch
Cancel Bet Offer Endpointโ
- ๐ฅ Breaking:
wager_referencefield replaced withwager_referencesarray - โจ New:
wager_referencesarray support for canceling multiple offers - โจ New:
oddsfiltering capability for selective cancellation - ๐ Updated: Response examples with enhanced functionality
Exposure Calculationsโ
- โจ New: Comprehensive guide at
/docs/guides/exposure-calculations - ๐ Updated:
BetService.calculateExposurealgorithm with two-scenario analysis - โจ New: Code examples in TypeScript, Python, and Rust
- ๐ Updated: Mathematical formulas for exposure calculation
- ๐ฅ Breaking: Aggregate exposure calculation considering multiple bet offers and acceptances (not backward compatible)
- ๐ง Enhanced: Aggregate exposure logic into bet offer, acceptance, and cancellation workflows
- ๐ง Enhanced: Portfolio-aware exposure calculations across all betting operations
Users APIโ
Get Paginated Users Endpointโ
- โจ New:
meta_*field filtering support in query parameters - ๐ Updated: Documentation to show how to filter users by metadata fields
- โจ New: Examples for meta field filtering using pattern matching
- ๐ง Enhanced: Filter by meta keys functionality for advanced user queries
User Management - New Endpoints Addedโ
-
โจ New: Update User By ID endpoint (
PATCH /account/user/:userId)- Full PATCH support for updating user information
- Support for updating name, preferences, and metadata
- Comprehensive validation and error handling
- Complete code examples in cURL, JavaScript, Python, and Rust
-
โจ New: Update User By Reference endpoint (
PATCH /account/user/:reference/reference)- Alternative update endpoint using user reference instead of ID
- Same functionality as ID-based update but with reference parameter
- Matching validation rules and response structure
- Full multi-language code examples
Enhanced Meta Field Supportโ
- ๐ง Enhanced: Meta field validation documentation (max 10 fields, string values only)
- โจ New: Detailed constraints documentation for meta fields
- ๐ Updated: Error response examples for meta field validation failures
- โจ New: Examples showing proper meta field key naming (letters, numbers, underscores only)
- โจ New: Meta field functionality to users for enhanced user categorization and management
Transactions APIโ
Transaction Improvementsโ
- ๐ Fixed: Removed
betTrail_idfield from transactions endpoint (deprecated) - ๐ Updated: Documentation updated to reflect betTrail_id removal
- ๐ง Enhanced: Transaction description accuracy and clarity
Accept Bet Offer APIโ
Enhanced Acceptance Flowโ
- โจ New:
bet_idfield support to accept bet offer endpoint for direct bet identification - ๐ง Enhanced: More flexible bet acceptance using either
wager_referenceorbet_id - ๐ง Enhanced: Streamlined acceptance process with multiple identification options
Portfolio-Aware Endpointsโ
Outcome Management Updatesโ
- ๐ง Enhanced: Set Bet Active endpoint to be portfolio-aware
- ๐ง Enhanced: Set Bet Inactive endpoint to be portfolio-aware
- ๐ง Enhanced: Force Update Bet Override Outcome with portfolio awareness
- ๐ง Enhanced: Force Update Wager Outcome with portfolio awareness
- ๐ง Enhanced: Wager outcome and bet override outcome calculations considering full portfolio context
- ๐งช Testing: Comprehensive test coverage for portfolio-aware functionality
General Improvementsโ
- ๐ Updated: All field references to use correct naming (
allowed_acceptor_idsvsallowed_accepting_user_ids) - ๐ง Enhanced: Error response documentation across all endpoints
- ๐ง Enhanced: Code examples with better error handling and realistic data
- โจ New: Proper authorization header documentation references
- ๐ Updated: Response format examples across all new endpoints
- ๐ง Enhanced: Multi-language code support (cURL, JavaScript, Python, Rust) for all new endpoints
Technical Notesโ
- All bet objects now include
allowed_acceptor_idsfield when applicable - Batch operations are truly atomic - all operations succeed or all fail (limited to 20 requests per batch)
- Meta field filtering uses pattern matching for flexible user queries (
meta_tier,meta_status, etc.) - Aggregate exposure calculations now consider multiple bet offers and acceptances across portfolios
- Portfolio-aware operations ensure consistent state management across all betting activities
- User update endpoints support partial updates (only provided fields are modified)
- All new endpoints include comprehensive error handling and validation
- Field naming has been standardized across all documentation
- Transaction descriptions have been improved for better clarity
- Enhanced test coverage ensures reliability of all new features
- Accept Bet Offer endpoint now supports both
wager_referenceandbet_idfor flexibility
Breaking Changesโ
โ ๏ธ Make Bet Offer Endpoint: No longer accepts bet_id field. Use wager_reference instead (now required).
โ ๏ธ Cancel Bet Offer Endpoint: The wager_reference field has been replaced with wager_references (array). Use the plural form to cancel single or multiple bet offers.
โ ๏ธ Exposure Calculations: The exposure calculation algorithm has been completely overhauled with aggregate portfolio-aware logic. This change is not backward compatible with previous versions. Applications relying on the previous exposure calculation behavior will need to be updated.
This change log documents all updates made to the accounting service API documentation as part of PR #35 implementation.