alpaca
Trade stocks and crypto via Alpaca API. Use for market data (quotes, bars, news), placing orders (market, limit, stop), checking positions, portfolio management, and account info. Supports both paper and live trading. Use when user asks about stock prices, wants to buy/sell securities, check portfolio, or manage trades.
Why use this skill?
Integrate the Alpaca API with OpenClaw to automate stock and crypto trading. Access market data, manage portfolios, and execute orders with built-in safety guardrails.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/vamzi/alpacaWhat This Skill Does
The Alpaca Trading Skill is a robust integration designed for OpenClaw that connects directly to the Alpaca API, enabling seamless programmatic trading of stocks and cryptocurrencies. It serves as a comprehensive bridge between your AI agent and the financial markets, offering functionalities that range from real-time market data retrieval to complex portfolio management. Whether you are looking for current price quotes, historical bar data, or need to manage active orders, this skill provides a unified command-line interface to execute your financial strategies with precision. It is built to support both paper trading, perfect for backtesting and strategy refinement, and live trading for real-world execution. The tool handles the complexities of order placement, including market, limit, stop, and stop-limit orders, while ensuring safety through a series of built-in guardrails.
Installation
To integrate this skill into your environment, follow these steps:
- Execute the installation command:
clawhub install openclaw/skills/skills/vamzi/alpaca. - Ensure you have your Alpaca API Key and Secret Key ready.
- Configure your credentials by either exporting environment variables (
ALPACA_API_KEY,ALPACA_SECRET_KEY,ALPACA_PAPER) or by creating a JSON file at~/.openclaw/credentials/alpaca.json. Verify your paper trading settings to ensure you are operating in the desired environment before executing any live trades.
Use Cases
- Market Research: Quickly fetch live price quotes and historical charts for tickers to analyze trends.
- Algorithmic Trading: Execute automated buy or sell orders based on external triggers or strategy logic.
- Portfolio Monitoring: Maintain oversight of your account balance, equity, and current open positions.
- News Analysis: Aggregate market news for specific tickers to gauge sentiment before making trade decisions.
- Risk Management: Utilize stop-loss and stop-limit orders to protect your capital in volatile market conditions.
Example Prompts
- "Check the current market price for NVDA and let me know if I have any open positions for it."
- "Place a market buy order for 5 shares of AAPL and verify that I have enough buying power in my account."
- "Get the latest news for TSLA and list all my current pending limit orders."
Tips & Limitations
- Safety Guardrails: The skill includes built-in price validation, buying power checks, and market hours detection to prevent accidental errors. Always review cost confirmation prompts unless you are using the
--forceflag, which should be reserved for advanced users. - Order Management: Take advantage of the
cancel allcommand to quickly clear your order book during sudden market shifts. - Session Awareness: Be mindful of pre-market and after-hours limitations, as trades placed outside of standard hours may remain queued until market open.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-vamzi-alpaca": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: external-api, code-execution, file-read