Release v3.0.0 - Complete Alpaca API Coverage#76
Conversation
- Create DEVELOPMENT_PLAN.md with detailed roadmap for v3.0.0 - Add CHANGELOG.md to track version history - Create GitHub issue templates for feature tracking - Establish 4-phase development plan: * Phase 1: Critical missing features (Corporate Actions, Trade Data, Snapshots) * Phase 2: Important enhancements (Account Config, Market Metadata) * Phase 3: Performance improvements (Batch Ops, Caching, Feed Management) * Phase 4: Advanced features (WebSocket, Async support) - Set up branching strategy with v3.0.0 as base branch This provides a clear roadmap for achieving 100% Alpaca Stock API coverage Co-Authored-By: Claude <noreply@anthropic.com>
* "Claude PR Assistant workflow" * "Claude Code Review workflow"
Implements Phase 1.1 of v3.0.0 development plan: - Create corporate_actions.py module with full API coverage - Add get_announcements() with date range and type filtering - Add get_announcement_by_id() for specific announcements - Support for dividends, splits, mergers, and spinoffs - Create specialized model classes for each action type - Add comprehensive unit tests (13 test cases) - Add live integration tests with real API calls - Update documentation with usage examples Key features: - Full type safety with dataclass models - Proper date validation (90-day limit) - Support for symbol and CUSIP filtering - Date type filtering (declaration, ex-date, record, payable) - Handles API response format (list or object) - Documents actual pagination behavior (returns all results) Tests: - All unit tests passing (13/13) - All integration tests passing (9/9) - Covers error handling, validation, and real API calls Co-authored-by: Claude <noreply@anthropic.com>
Implements Phase 1.2 of the v3.0.0 development plan with full trade-level market data functionality.
Features:
- Historical trades retrieval with time range filtering
- Latest trade data for single and multiple symbols
- Automatic pagination support with get_all_trades()
- Multi-symbol batch operations
- Data feed selection (IEX, SIP, OTC)
- As-of parameter for historical point-in-time data
- RFC-3339 date validation and error handling
Models:
- TradeModel: Individual trade data with exchange, price, size, conditions
- TradesResponse: Paginated response with next_page_token support
- Full type safety with proper validation
API Coverage:
- GET /v2/stocks/{symbol}/trades - Historical trades
- GET /v2/stocks/trades/latest - Latest trades
- GET /v2/stocks/trades - Multi-symbol trades
Tests:
- 12 comprehensive unit tests with mocking
- 10 integration tests for live API validation
- Error handling and edge case coverage
- Pagination and feed parameter validation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Claude <noreply@anthropic.com>
- Created snapshots.py module with get_snapshot() and get_snapshots() methods - Implemented SnapshotModel and BarModel dataclasses for snapshot data - Added support for latest trade, quote, minute bar, daily bar, and previous daily bar - Integrated snapshots into Stock module - Added comprehensive unit tests (15 test cases) - Added integration tests (10 test cases) - Supports multiple data feeds (iex, sip, otc) - Handles single and multiple symbol requests efficiently - Updated DEVELOPMENT_PLAN.md to mark feature as complete Completes Phase 1 (Critical Features) of v3.0.0 development
- Implemented get_configuration() and update_configuration() methods in Account class - Created AccountConfigModel dataclass with all configuration fields - Added support for all account settings: dtbp_check, fractional_trading, max_margin_multiplier, no_shorting, pdt_check, ptp_no_exception_entry, suspend_trade, trade_confirm_email - Comprehensive validation for configuration parameters - Added 14 unit tests and 8 integration tests - Full type safety with mypy strict mode - Updated DEVELOPMENT_PLAN.md This completes the first feature of Phase 2 (Important Enhancements)
- Created metadata.py module with exchange and condition code lookups - Implemented get_exchange_codes() for stock exchange mappings - Implemented get_condition_codes() with tape and ticktype support - Added get_all_condition_codes() for bulk retrieval - Added lookup methods for easy code-to-name resolution - Implemented intelligent caching with cache management - Added 16 unit tests and 11 integration tests - Full type safety with mypy strict mode - Updated DEVELOPMENT_PLAN.md Supports: - All stock exchange codes (NYSE, NASDAQ, IEX, etc.) - Trade condition codes for all tapes (A, B, C) - Quote condition codes for all tapes - Caching for improved performance - Cache clearing and management This completes the second feature of Phase 2 (Important Enhancements)
- Implement replace_order() method for updating existing orders - Add client_order_id support to all order methods - Add order_class parameter for OTO/OCO/bracket orders - Enhance order validation logic - Add comprehensive tests (13 unit, 10 integration) - Update DEVELOPMENT_PLAN.md Note: Client order ID operations use order list filtering as Alpaca API removed direct :by_client_order_id endpoints 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com>
* feat: Add batch operations for multi-symbol data fetching - Update history.py to support multi-symbol bars with automatic batching for 200+ symbols - Update latest_quote.py to support batch quotes with automatic batching - Implement concurrent request handling using ThreadPoolExecutor - Add comprehensive tests (20 test cases: 11 unit, 9 integration) - Update README with batch operation examples and features - Optimize DataFrame operations for better performance - Maintain backward compatibility for single-symbol requests - Update DEVELOPMENT_PLAN.md to mark batch operations as complete * fix: Correct order validation logic and OCO test parameters - Remove overly strict validation in orders.py that required both take_profit AND stop_loss - Different order classes have different requirements: - Bracket orders need both take_profit and stop_loss - OTO orders need EITHER take_profit OR stop_loss - OCO orders are exit-only and have specific validation rules - Update OCO test to handle expected behavior (exit-only orders) - All order enhancement integration tests now passing 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
…lback (#74) - Create comprehensive feed_manager.py module with smart feed handling - Implement automatic subscription level detection (Basic/Unlimited/Business) - Add intelligent feed fallback mechanism (SIP → IEX → OTC) - Support per-endpoint feed configuration - Track and cache failed feeds to avoid repeated failures - Add FeedConfig dataclass for customizable feed preferences - Implement 47 tests (36 unit, 11 integration) with 100% coverage - Fix timestamp comparison in trades test to handle different precision levels Features: - Auto-detects user's Alpaca subscription level - Automatically falls back to available feeds on permission errors - Configurable feed preferences with endpoint-specific overrides - Smart caching to avoid repeated failed requests - Clear logging for feed selection and fallback decisions This completes Phase 3.2 of the v3.0.0 development plan. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com>
* feat: Add comprehensive Caching System for performance optimization - Create cache/ module with LRU memory cache and optional Redis support - Implement CacheManager with configurable TTL per data type - Add cache invalidation by pattern and prefix clearing - Support for dataclass serialization and decorator-based caching - Implement cache statistics tracking (hit/miss rates) - Add 40 comprehensive tests (29 unit, 11 integration) - Configure sensible TTLs: 1 day for market hours, 1 hour for assets, etc. Features: - LRU in-memory cache with size limits - Optional Redis backend with automatic fallback - Per-data-type TTL configuration - Cache key generation with hash for long keys - Thread-safe concurrent access - Decorator for easy function result caching - Pattern-based cache invalidation - Detailed statistics tracking This completes Phase 3 of the v3.0.0 development plan. All Performance & Quality features are now implemented. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * docs: Update README.md with v3.0.0 features and bump version - Add comprehensive documentation for all v3.0.0 features - Document Market Snapshots API support - Document Account Configuration API support - Document Market Metadata API support - Document Enhanced Order Management features - Document Feed Management System - Document Caching System - Update project structure to reflect new modules - Update roadmap with completed v3.0.0 features - Defer Phase 4 features to v3.1.0 and v3.2.0 - Update version to 3.0.0 in pyproject.toml 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * docs: Clean up DEVELOPMENT_PLAN.md for future versions - Remove all completed v3.0.0 tasks - Reorganize for v3.1.0 (WebSocket) and v3.2.0 (Async) - Add summary of completed features - Update roadmap with future versions - Simplify structure for ongoing development 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
🔍 Code Review for PR #76: Release v3.0.0📊 Overall AssessmentThis PR adds valuable CI/CD infrastructure and documentation for the v3.0.0 release. The implementation is well-structured and follows best practices for GitHub Actions and project documentation. ✅ Strengths1. GitHub Actions Integration
2. Documentation Quality
3. Project Organization
🔧 Suggestions for Improvement1. Security Considerations
2. Workflow EnhancementsIn claude-code-review.yml, consider adding concurrency controls to prevent duplicate runs:
3. Documentation Updates
4. Testing Coverage
|
🎉 py-alpaca-api v3.0.0 Release
🚀 Overview
This major release brings complete coverage of Alpaca's stock trading API, significant performance improvements, and enhanced developer experience.
✨ New Features
Phase 1: Critical Missing Features
Phase 2: Important Enhancements
Phase 3: Performance & Quality
📊 Statistics
📝 Documentation
🔄 Backwards Compatibility
All existing v2.x functionality is preserved. New features are additive only.
🎯 Next Steps
🙏 Thank You
Thanks to all contributors and users for making this release possible!
🤖 Generated with Claude Code