Repository navigation
v1.3.4
Release Notes v1.3.4
Bug Fixes & Improvements
🔐 Authentication & Headers
- Added required headers:
User-Agent: bybit-php/1.0.0andX-Referer: bybit-phpnow included in all API requests per Bybit API requirements - Fixed query string signing: Removed unnecessary
ksort()frombuildQuery()— parameters are now signed in their original order, matching Bybit's signature calculation
⚡ Rate Limiting
- Built-in rate limit protection: Automatic throttling with 100ms minimum interval between GET requests and 300ms between POST requests to prevent
retCode=10006errors
🛡️ Error Handling
- New
throwOnErroroption: When enabled, throwsRuntimeExceptionon non-zeroretCoderesponses instead of returning error arrays - New
setThrowOnError()method: Fluent setter to toggle error throwing at runtime
📡 WebSocket Improvements
- Multi-category support: New
categoryparameter supportsspot,linear,inverse, andoptionpublic streams - Fixed authentication:
expiresparameter now correctly sent as string - Improved ping/pong handling: Response now includes
req_idwhen present in the ping message - New
setCategory()method: Change WebSocket category without reconnecting
📈 Trading Improvements
- Smart
triggerDirection: Automatically calculated based on current price vs trigger price, or can be explicitly set viaextra['triggerDirection'] - Spot market buy enhancement: Automatically adds
marketUnit=quoteCoinfor market buy orders (buy with USDT amount)
🔧 Laravel Integration
- Fixed Facade accessor:
BybitWebSocketfacade now correctly uses'bybit.websocket'alias - New config options:
throw_on_error(BYBIT_THROW_ON_ERROR)websocket_category(BYBIT_WEBSOCKET_CATEGORY)
Breaking Changes
None — all changes are backward compatible.
Upgrade Guide
composer update tigusigalpa/bybit-php
php artisan vendor:publish --tag=bybit-config --force # Optional: update config