Repository navigation
v1.1.4
Release Notes
v1.1.4 - 2026-01-18
🎉 Major Updates
This release brings significant enhancements to the Bybit PHP SDK, including comprehensive REST API coverage, WebSocket support, and extensive documentation improvements.
✨ New Features
REST API Methods
-
Order Management
amendOrder()- Modify existing orders (price, quantity)cancelAllOrders()- Cancel all orders for a specific symbolgetHistoryOrders()- Retrieve closed/cancelled order history
-
Position Management
switchPositionMode()- Switch between One-Way Mode and Hedge ModesetTradingStop()- Set Take Profit and Stop Loss for existing positions
WebSocket Real-Time Streaming
-
New
BybitWebSocketClass - Complete WebSocket client implementation- Public streams: orderbook, trades, tickers, klines
- Private streams: positions, orders, executions, wallet updates
- Auto-reconnection handling
- Automatic ping/pong for connection maintenance
- Support for multiple topic subscriptions
- Regional endpoint support
- Testnet compatibility
-
Laravel Integration
BybitWebSocketfacade for easy access- Service provider registration
- Background processing support
Helper Methods
subscribeOrderbook($symbol, $depth)- Subscribe to orderbook updatessubscribeTrade($symbol)- Subscribe to public tradessubscribeTicker($symbol)- Subscribe to ticker updatessubscribeKline($symbol, $interval)- Subscribe to kline/candlestick datasubscribePosition()- Subscribe to position updates (private)subscribeOrder()- Subscribe to order updates (private)subscribeExecution()- Subscribe to execution updates (private)subscribeWallet()- Subscribe to wallet updates (private)
📚 Documentation Improvements
Modern README Design
-
Enhanced Visual Design
- Added badges (PHP version, Laravel compatibility, License, WebSocket support)
- Centered header with professional styling
- Interactive table of contents with anchor links
- Emoji icons for better readability
- Two-column feature tables
-
Comprehensive Table of Contents
- Quick navigation to all sections
- Organized by feature categories
- Easy-to-scan structure
-
Pure PHP Examples
- Complete standalone examples without Laravel
- WebSocket usage for pure PHP
- Full initialization examples
- Trading bot example
-
Enhanced Sections
- Regional endpoints table with country flags
- Configuration parameters table
- Advanced usage examples
- Complete trading bot example
- Contributing guidelines
- Professional footer with call-to-action
Bilingual Documentation
- English (
README.md) - Fully modernized with all new features - Russian (
README-ru.md) - Complete translation with identical structure
New Documentation Files
INSTALLATION.md- Comprehensive installation and setup guide- Prerequisites and requirements
- Step-by-step installation
- Configuration instructions
- API key setup
- Troubleshooting section
📁 Examples Directory
Added complete examples/ folder with 12+ practical examples:
Basic Examples
01-basic-client.php- Client initialization and connection testing02-market-data.php- Fetching tickers, orderbook, and klines03-account-info.php- Account balance and fee information
Order Management
04-place-order.php- Placing limit, market, and conditional orders05-manage-orders.php- Getting, amending, and canceling orders
Position Management
07-positions.php- Viewing and monitoring positions08-leverage.php- Setting leverage and position modes09-trading-stops.php- Managing Take Profit and Stop Loss
WebSocket Examples
10-websocket-public.php- Public stream subscriptions11-websocket-private.php- Private account updates12-websocket-advanced.php- Advanced multi-symbol monitoring
Laravel Examples
laravel/TradingController.php- Controller with DI and facadeslaravel/BybitWebSocketCommand.php- Artisan command for WebSocketlaravel/routes.example.php- API route examples
Configuration
config.example.php- Example configuration templateREADME.md- Examples documentation
🔧 Infrastructure
.gitignore- Added comprehensive gitignore file- Vendor directory exclusion
- IDE files (VSCode, PHPStorm)
- Environment files
- Build artifacts
- Logs and cache
- Example configuration files
📦 Dependencies
- Added:
textalk/websocket: ^1.6- WebSocket client library for real-time streaming
🔄 Updated Files
composer.json- Added WebSocket dependency and facade aliassrc/BybitServiceProvider.php- Registered WebSocket clientsrc/BybitClient.php- Added new REST API methodsCHANGELOG.md- Updated with v0.2.0 changes
📖 API Coverage
The SDK now covers the following Bybit V5 API endpoints:
Market Data:
- ✅ Server Time
- ✅ Tickers
- ✅ Orderbook
- ✅ Klines
- ✅ Risk Limit
Trading:
- ✅ Place Order
- ✅ Amend Order
- ✅ Cancel Order
- ✅ Cancel All Orders
- ✅ Get Open Orders
- ✅ Get Order History
Position:
- ✅ Get Positions
- ✅ Set Leverage
- ✅ Switch Position Mode
- ✅ Set Trading Stop
Account:
- ✅ Get Wallet Balance
- ✅ Get Fee Rate
WebSocket:
- ✅ Public: Orderbook, Trade, Ticker, Kline
- ✅ Private: Position, Order, Execution, Wallet
🎯 Usage Highlights
Quick Start with WebSocket
use Tigusigalpa\ByBit\BybitWebSocket;
$ws = new BybitWebSocket(
apiKey: null,
apiSecret: null,
testnet: false,
region: 'global',
isPrivate: false
);
$ws->subscribeOrderbook('BTCUSDT', 50);
$ws->subscribeTrade('BTCUSDT');
$ws->onMessage(function($data) {
print_r($data);
});
$ws->listen();Laravel WebSocket Command
php artisan bybit:listen BTCUSDT🔗 Links
- Documentation: README.md
- Installation Guide: INSTALLATION.md
- Examples: examples/
- Changelog: CHANGELOG.md
- Bybit API Docs: https://bybit-exchange.github.io/docs/v5/guide
🙏 Acknowledgments
Special thanks to the Bybit team for their comprehensive API documentation and to the crypto trading community for their feedback and support.
📝 Notes
- All WebSocket streams support both Testnet and Mainnet environments
- Regional endpoints are fully supported for both REST and WebSocket
- Examples include comprehensive error handling
- All code follows PSR-12 coding standards
⚠️ Breaking Changes
None. This release is fully backward compatible with v0.1.0.
🐛 Bug Fixes
- Improved error handling in WebSocket connections
- Fixed signature generation for edge cases
- Enhanced timestamp synchronization
🔜 Coming Soon
- Retry mechanisms for failed requests
- Rate limit handling
- Request logging and tracing
- Additional helper methods for common trading patterns
Full Changelog: v0.1.0...v1.1.4