Skip to main content

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_id field support (no longer accepted in requests)
  • ๐Ÿ’ฅ Breaking: Made wager_reference field required instead of optional
  • โœจ New: allowed_acceptor_ids field - array of user IDs allowed to accept the bet offer
  • โœจ New: allowed_acceptor_references field - 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_ids field to response structure to match GetOpenBetsResponseDto
  • ๐Ÿ”ง Enhanced: Better test coverage for get-open-bets endpoint functionality
  • ๐Ÿ› Fixed: 500 error handling for user_references parameter

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_reference field replaced with wager_references array
  • โœจ New: wager_references array support for canceling multiple offers
  • โœจ New: odds filtering capability for selective cancellation
  • ๐Ÿ“ Updated: Response examples with enhanced functionality

Exposure Calculationsโ€‹

  • โœจ New: Comprehensive guide at /docs/guides/exposure-calculations
  • ๐Ÿ“ Updated: BetService.calculateExposure algorithm 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_id field 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_id field support to accept bet offer endpoint for direct bet identification
  • ๐Ÿ”ง Enhanced: More flexible bet acceptance using either wager_reference or bet_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_ids vs allowed_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_ids field 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_reference and bet_id for 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.