Download the PHP package wioex/php-sdk without Composer
On this page you can find all versions of the php package wioex/php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wioex/php-sdk
More information about wioex/php-sdk
Files in wioex/php-sdk
Package php-sdk
Short Description Official PHP SDK for WioEX Financial Data API - Professional client library for stocks, trading signals, news, currency, and financial market data
License MIT
Homepage https://github.com/wioex/php-sdk
Informations about the package php-sdk
WioEX PHP SDK
Official PHP SDK for WioEX Financial Data API - Enterprise-grade client library for accessing stocks, trading signals, news, currency, and financial market data.
What's New in v2.9.0
Enhanced Configuration Management & Enterprise-Grade Type Safety.
🔧 v2.9.0 - Configuration & Type Safety Release
- Enhanced Configuration Management: New dot notation support for complex configuration access (
config.cache.redis.host) - Advanced Type Safety: PHPStan Level 8 compliance with comprehensive null safety improvements
- Improved Cache Management: Enhanced cache drivers with proper type declarations and macro support
- Null Safety: Comprehensive null-safe operations throughout the SDK for enterprise reliability
- Method Signature Improvements: All public methods now have proper return type declarations
- Validation Enhancements: Improved validation with strict comparison operators and type checking
Continued Excellence from v2.8.x
- API Route Optimization: Improved endpoint routing and request handling
- Comprehensive Ticker Analysis: Complete stock analysis combining analyst ratings, earnings insights, insider activity, news sentiment, and options analysis
- Investment Research Grade: Institutional-quality data for professional portfolio management
- 15+ Helper Methods: Structured access to all analysis sections with type-safe methods
- Portfolio Support: Analyze multiple stocks efficiently for portfolio research
Built on v2.7.x Foundation
- Unified ResponseTemplate Support: Standardized response format across all WioEX API endpoints
- Enhanced Stock Data: Institutional-grade integration with pre/post market data, 52-week ranges, market cap, and company logos
- Advanced Type Safety: Complete PHPStan compliance with comprehensive array type specifications
- Enhanced Metadata Access: 20+ new helper methods for accessing response metadata and performance metrics
- Detailed Mode Support: Enhanced stocks endpoint with extended market data and institutional-grade accuracy
- Backward Compatibility: Full support for legacy response formats with automatic adaptation
- Validation Schemas: Comprehensive validation schemas for all endpoint types
- Professional Error Handling: Enhanced validation reporting and error management
Ideal for Professional Trading
- Portfolio management for 1000+ stocks
- Real-time market monitoring
- High-frequency trading applications
- Risk management systems
Requirements
- PHP 8.1+
- ext-json, ext-curl
- Composer
Installation
Quick Start
Advanced Configuration
Enhanced Configuration Management with Dot Notation
The SDK now supports advanced configuration management with dot notation for easy access to nested configuration values:
Type-Safe Configuration Access
All configuration methods now include proper type safety and null handling:
Enhanced Cache Management
Improved cache management with macro support and better type declarations:
Core Features
Stock Data
Enhanced Response Structure (Unified ResponseTemplate):
New Metadata Access Methods
The SDK now provides 20+ helper methods to easily access response metadata and performance metrics:
Backward Compatibility
The SDK automatically handles both new unified ResponseTemplate format and legacy formats:
Market Screens
Response Structure Examples:
Trading Signals
Response Structure Examples:
Real-time Streaming
javascript\n"; echo "class WioexStreamingClient {\n"; echo "constructor(token, url) {\n"; echo "this.token = token;\n"; echo "this.url = url;\n"; echo "this.ws = null;\n"; echo "this.subscriptions = new Set();\n"; echo "this.reconnectAttempts = 0;\n"; echo "this.maxReconnectAttempts = 5;\n"; echo "this.heartbeatInterval = null;\n"; echo "}\n\n";
echo "connect() {\n";
echo "this.ws = new WebSocket(\${this.url}?token=\${this.token});\n\n";
echo "this.ws.onopen = () => {\n"; echo "console.log(' Connected to WioEX streaming');\n"; echo "this.reconnectAttempts = 0;\n"; echo "this.startHeartbeat();\n"; echo "this.resubscribeAll();\n"; echo "};\n\n";
echo "this.ws.onmessage = (event) => {\n"; echo "const data = JSON.parse(event.data);\n"; echo "this.handleMessage(data);\n"; echo "};\n\n";
echo "this.ws.onclose = (event) => {\n"; echo "console.log(' Connection closed:', event.code);\n"; echo "this.stopHeartbeat();\n"; echo "this.handleReconnect();\n"; echo "};\n\n";
echo "this.ws.onerror = (error) => {\n"; echo "console.error(' WebSocket error:', error);\n"; echo "};\n"; echo "}\n\n";
echo "// Subscribe to real-time stock quotes\n";
echo "subscribeToQuotes(symbols) {\n";
echo "const message = {\n";
echo "action: 'subscribe',\n";
echo "channel: 'stocks.quotes',\n";
echo "symbols: symbols\n";
echo "};\n";
echo "this.send(message);\n";
echo "symbols.forEach(symbol => this.subscriptions.add(quotes:\${symbol}));\n";
echo "}\n\n";
echo "// Subscribe to trading signals\n"; echo "subscribeToSignals(options = {}) {\n"; echo "const message = {\n"; echo "action: 'subscribe',\n"; echo "channel: 'signals',\n"; echo "filter: {\n"; echo "min_confidence: options.minConfidence || 70,\n"; echo "symbols: options.symbols || [],\n"; echo "signal_types: options.signalTypes || ['buy', 'sell']\n"; echo "}\n"; echo "};\n"; echo "this.send(message);\n"; echo "this.subscriptions.add('signals');\n"; echo "}\n\n";
echo "// Handle incoming messages\n"; echo "handleMessage(data) {\n"; echo "switch(data.type) {\n"; echo "case 'quote_update':\n"; echo "this.onQuoteUpdate(data.payload);\n"; echo "break;\n"; echo "case 'signal_alert':\n"; echo "this.onSignalAlert(data.payload);\n"; echo "break;\n"; echo "case 'market_status':\n"; echo "this.onMarketStatus(data.payload);\n"; echo "break;\n"; echo "case 'heartbeat':\n"; echo "this.onHeartbeat(data.payload);\n"; echo "break;\n"; echo "}\n"; echo "}\n\n";
echo "// Real-time quote updates\n";
echo "onQuoteUpdate(quote) {\n";
echo "console.log(\${quote.symbol}: $\${quote.price} (\${quote.change > 0 ? '+' : ''}\${quote.change}%));\n";
echo "\n";
echo "// Update portfolio display\n";
echo "this.updatePortfolioDisplay(quote);\n";
echo "\n";
echo "// Check for significant moves\n";
echo "if (Math.abs(quote.change_percent) > 5) {\n";
echo "this.alertSignificantMove(quote);\n";
echo "}\n";
echo "}\n\n";
echo "// Trading signal alerts\n";
echo "onSignalAlert(signal) {\n";
echo "const emoji = signal.signal_type === 'buy' ? '' : '';\n";
echo "console.log(\${emoji} Signal: \${signal.symbol} \${signal.signal_type.toUpperCase()} (Confidence: \${signal.confidence}%));\n";
echo "\n";
echo "// Show desktop notification\n";
echo "if (Notification.permission === 'granted') {\n";
echo "new Notification(Trading Signal: \${signal.symbol}, {\n";
echo "body: \${signal.signal_type.toUpperCase()} signal with \${signal.confidence}% confidence,\n";
echo "icon: '/assets/wioex-icon.png'\n";
echo "});\n";
echo "}\n";
echo "}\n\n";
echo "// Market status updates\n";
echo "onMarketStatus(status) {\n";
echo "console.log(Market Status: \${status.nyse.status});\n";
echo "this.updateMarketStatusDisplay(status);\n";
echo "}\n";
echo "}\n\n";
echo "// Initialize streaming client\n"; echo "const streamingClient = new WioexStreamingClient('{$wsToken}', '{$wsUrl}');\n"; echo "streamingClient.connect();\n\n";
echo "// Subscribe to portfolio updates\n"; echo "streamingClient.subscribeToQuotes(['AAPL', 'GOOGL', 'MSFT', 'TSLA']);\n\n";
echo "// Subscribe to high-confidence signals\n"; echo "streamingClient.subscribeToSignals({\n"; echo "minConfidence: 80,\n"; echo "symbols: ['AAPL', 'GOOGL', 'MSFT', 'TSLA', 'NVDA'],\n"; echo "signalTypes: ['buy', 'sell']\n"; echo "});\n"; echo "
WebSocket Message Examples:
Market Status
News & Analysis
Response Structure Examples:
Trump Effect - Social Media Market Impact
Monitor Trump's social media posts and their impact on financial markets.
Currency Exchange
Account Management
Advanced Features
Bulk Operations & Portfolio Management
Caching & Performance Optimization
Async Operations & Promise Handling
Performance & Best Practices
New Export Utilities (v2.0.0)
Export data in multiple formats:
Configuration
Basic Setup
Advanced Configuration
Environment-Based Configuration (New)
Error Handling
Response Handling
Testing
The SDK includes comprehensive testing:
Test Coverage:
- 135+ unit tests
- Core classes: 100% coverage
- Resources: 95%+ coverage
- Error handling: 100% coverage
Migration from v1.x
Zero breaking changes! Your existing code works without modifications:
New optional features:
- Export utilities for data export
- Environment-based configuration
- Enhanced error reporting
🚀 Ticker Analysis (NEW in v2.4.0)
Comprehensive investment research with institutional-grade analysis.
Ticker Analysis Features:
- 📈 Analyst Ratings: Price targets, recommendations, consensus
- 💼 Earnings Insights: Quarterly results, guidance, call highlights
- 👥 Insider Activity: Executive transactions, sentiment analysis
- 📰 News Analysis: Market sentiment, themes, key events
- 📊 Options Analysis: Put/call ratios, market implications
- 📈 Price Movement: Technical analysis, sector comparison
- 💰 Financial Metrics: Valuation ratios, growth indicators
- 🔍 Market Overview: Comprehensive summary and insights
Perfect for:
- Investment research and due diligence
- Portfolio analysis and optimization
- Market sentiment tracking
- Risk assessment and beta analysis
- Options trading strategy development
Examples
See the /examples directory:
ticker-analysis-example.php- NEW: Comprehensive ticker analysisstocks-example.php- Stock data operationsstreaming-example.php- WebSocket streaming setupmarket-status-example.php- Market hours and statuserror-handling.php- Exception handling patternsexport-example.php- Data export examplescomplete_integration_example.php- Full feature demonstration
Version History
- v2.0.0 (2025-10-22) - Production ready release with critical fixes
- v1.4.0 - Enhanced timeline and caching features
- v1.3.0 - WebSocket streaming and API improvements
- v1.2.0 - Session filtering and timeline enhancements
- v1.1.0 - Trading signals and market status
- v1.0.0 - Initial release
Support
- Documentation: https://docs.wioex.com
- Email: [email protected]
- Issues: https://github.com/wioex/php-sdk/issues
- Changelog: CHANGELOG.md
Contributing
- Fork the repository
- Create your feature branch
- Run tests:
composer test - Commit changes
- Submit pull request
License
MIT License. See LICENSE for details.
Production Ready - All critical issues resolved in v2.0.0
Made by WioEX Team