Skip to content

Latest commit

 

History

History
88 lines (71 loc) · 3.37 KB

File metadata and controls

88 lines (71 loc) · 3.37 KB

Alpaca Trading API Implementation Audit

✅ Implemented Endpoints

Account

  • ✅ GET /v2/account - account.get()
  • ✅ GET /account/configurations - account.get_configuration()
  • ✅ PATCH /account/configurations - account.update_configuration()
  • ✅ GET /account/activities - account.activities()
  • ✅ GET /account/activities/{type} - account.activities(activity_type=...)
  • ✅ GET /account/portfolio/history - account.portfolio_history()

Orders

  • ✅ POST /orders - Multiple methods:
    • orders.market()
    • orders.limit()
    • orders.stop()
    • orders.stop_limit()
    • orders.trailing_stop()
    • orders._submit_order() (internal)
  • ✅ GET /orders - orders.get_all_orders() (just implemented!)
  • ✅ DELETE /orders - orders.cancel_all()
  • ✅ GET /orders/by_client_order_id - orders.get_by_client_order_id()
  • ✅ GET /orders/{order_id} - orders.get_by_id()
  • ✅ PATCH /orders/{order_id} - orders.replace_order()
  • ✅ DELETE /orders/{order_id} - orders.cancel_by_id()

Positions

  • ✅ GET /positions - positions.get_all()
  • ✅ DELETE /positions - positions.close_all()
  • ✅ GET /positions/{symbol_or_asset_id} - positions.get()
  • ✅ DELETE /positions/{symbol_or_asset_id} - positions.close()
  • ✅ POST /positions/{symbol_or_asset_id}/exercise - positions.exercise() (implemented!)

Watchlists

  • ✅ GET /watchlists - watchlists.get_all()
  • ✅ POST /watchlists - watchlists.create()
  • ✅ GET /watchlists/{watchlist_id} - watchlists.get()
  • ✅ PUT /watchlists/{watchlist_id} - watchlists.update()
  • ✅ DELETE /watchlists/{watchlist_id} - watchlists.delete()
  • ✅ POST /watchlists/{watchlist_id}/assets - watchlists.add_asset()
  • ✅ DELETE /watchlists/{watchlist_id}/{symbol} - watchlists.remove_asset() (implemented)

Market/Calendar

  • ✅ GET /calendar - market.calendar()
  • ✅ GET /clock - market.clock()

Corporate Actions (Announcements)

  • ✅ GET /corporate_actions/announcements - corporate_actions.get_announcements()
  • ✅ GET /corporate_actions/announcements/{id} - corporate_actions.get_announcement_by_id()

Additional Features (Not in standard API)

  • ✅ News aggregation - news.get_news()
  • ✅ Stock recommendations/sentiment - recommendations.get_recommendations(), recommendations.get_sentiment()

✅ Complete Implementation

All Alpaca Trading API endpoints are now fully implemented!

📋 Summary

  • Total API Endpoints: 28
  • Implemented: 28 (100%)
  • Missing: 0 (0%)

🎉 Recent Additions

  1. GET /orders - orders.get_all_orders()

    • Retrieves a list of orders with filtering options
    • Supports status, symbols, limit, date range, and sorting parameters
  2. POST /positions/{symbol_or_asset_id}/exercise - positions.exercise()

    • Exercise options positions
    • Processes exercise requests immediately
    • Returns confirmation of exercise submission

✨ All Trading Features Available

The py-alpaca-api library now provides complete coverage of the Alpaca Trading API, including:

  • Account management and configuration
  • Order placement, retrieval, and management (all order types)
  • Position tracking and management (including options exercise)
  • Watchlist CRUD operations
  • Market calendar and clock information
  • Corporate actions/announcements
  • Portfolio history
  • Account activities
  • Additional features like news aggregation and sentiment analysis