Commit 8719be8
Release v3.0.0 - Complete Alpaca API Coverage (#76)
* feat: Initialize v3.0.0 development with comprehensive plan
- 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 <[email protected]>
* Add claude GitHub actions 1757898251914 (#66)
* "Claude PR Assistant workflow"
* "Claude Code Review workflow"
* feat: Add comprehensive Corporate Actions API support (#67)
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 <[email protected]>
* Add comprehensive Trade Data API support (#68)
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 <[email protected]>
* feat: Add comprehensive Market Snapshots API support (#69)
- 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
* feat: Add Account Configuration API support (#70)
- 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)
* feat: Add Market Metadata API support (#71)
- 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)
* feat: Add Enhanced Order Management features (#72)
- 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 <[email protected]>
* feat: Add batch operations for multi-symbol data fetching (#73)
* 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 <[email protected]>
---------
Co-authored-by: Claude <[email protected]>
* feat: Add Feed Management System for automatic feed selection and fallback (#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 <[email protected]>
* feat: Add Caching System (Phase 3.3) (#75)
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
---------
Co-authored-by: Claude <[email protected]>
---------
Co-authored-by: Claude <[email protected]>1 parent e7c2643 commit 8719be8
File tree
44 files changed
+9152
-71
lines changed- .github
- ISSUE_TEMPLATE
- workflows
- src/py_alpaca_api
- cache
- http
- models
- stock
- trading
- tests
- test_cache
- test_http
- test_integration
- test_stock
- test_trading
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
44 files changed
+9152
-71
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
0 commit comments