v0.2.5
Highlights
Three releases worth of work since v0.2.2 — coverage parity with the REST API, full error-code registry, and Bearer auth.
feat: Bearer token auth
- New
auth_method: Literal['x-api-key', 'bearer'] = 'x-api-key'kwarg onSharpAPI+AsyncSharpAPI auth_method='bearer'sendsAuthorization: Bearer <key>instead ofX-API-Key- Useful for IAM/SSO setups and proxies that strip custom headers
- SSE intentionally unchanged (EventSource can't set headers)
feat: Endpoint coverage parity
Odds.closing(event_id, sportsbook=None)→GET /odds/closing(Pro+ closing-line snapshots for CLV)Events.markets(event_id)→GET /events/{event_id}/markets- New
Keysnamespace:list(),create(name),revoke(key_id),rotate(key_id)→/account/keys - Sync (
SharpAPI) and async (AsyncSharpAPI) parity throughout - New models:
ClosingSnapshot,ClosingOddsLine,Market,APIKey
fix: Honor SSE retry: hint
- SSE reconnect honours the server's
retry:hint (3s default) for the first 3 attempts - Falls back to exponential backoff (anchored on the hint, capped at 30s) after sustained failures
- Resets backoff after a graceful reconnect
feat: Full error code registry
- All 19 HTTP + 6 WebSocket-frame error codes from the canonical
pkg/errcodesGo package ERROR_CODE_DESCRIPTIONS,ERROR_CODE_TO_EXCEPTIONlookup mapscanonical_code()helper resolves deprecated aliases (bad_request,invalid_request→validation_error)
Compatibility
All additions; existing code keeps working unchanged. Default behaviour (no auth_method arg, etc.) is identical to v0.2.2.