Alpaca Introduces CLI for Trading API, Furthering Agentic AI Capabilities
Blog post from Alpaca
Alpaca has launched a command-line interface (CLI) for its Trading API, offering users access to 108 trading functions for stocks, options, cryptocurrencies, market data, and account management directly from the terminal. This new tool simplifies onboarding by turning the Trading API into a straightforward terminal interface, eliminating the need for manual HTTP requests, with authentication for paper trading and market data using OAuth. Designed for seamless automation and composability, the CLI outputs structured JSON by default, with options to filter and reshape outputs, making it ideal for use in shell scripts, cron jobs, and continuous integration pipelines. The interface is spec-driven, generated from Alpaca’s OpenAPI specifications, ensuring consistency and automatic updates as the API evolves. The CLI is particularly suited for AI agents, enabling them to place trades and manage accounts with concise commands. While the tool is currently in active development and focused on paper trading, it emphasizes security and risk management, with users encouraged to conduct due diligence before engaging in trading activities.