π¦ ClawHub
Alpaca Markets CLI
by @oscraters
This skill provides integration with the Alpaca Markets API for trading stocks, options, and cryptocurrencies. Use it when you need to interact with Alpaca's...
TERMINAL
clawhub install alpaca-marketsπ About This Skill
name: alpaca description: This skill provides integration with the Alpaca Markets API for trading stocks, options, and cryptocurrencies. Use it when you need to interact with Alpaca's brokerage services programmatically, such as placing orders, fetching account data, managing positions, or retrieving market data for automated trading or portfolio management. homepage: https://clawhub.ai/oscraters/alpaca-markets metadata: openclaw: requires: env: - ALPACA_API_KEY - ALPACA_API_SECRET optionalEnv: - ALPACA_BASE_URL primaryEnv: - ALPACA_API_KEY - ALPACA_API_SECRET sourceRepository: https://github.com/oscraters/alpaca-markets-skill.git distributionPlatform: clawhub distributionUrl: https://clawhub.ai/oscraters/alpaca-markets
Alpaca
Overview
This skill enables programmatic access to Alpaca Markets for automated trading, portfolio management, and market data retrieval via their REST API. It supports both live and paper trading accounts for stocks, options, and crypto.
Quick Start
Authentication
To use the Alpaca API, you need an API key and secret. Obtain these from your Alpaca account dashboard.https://paper-api.alpaca.marketshttps://api.alpaca.marketsSet environment variables:
ALPACA_API_KEYALPACA_API_SECRETALPACA_BASE_URL (optional; defaults to paper trading URL)Security / Credential Use
ALPACA_BASE_URL unset unless you intentionally need a non-default environment.Example Usage
POST /v2/ordersGET /v2/accountGET /v2/positionsGET /v2/ordersAPI Operations
Trading API
GET /v2/accountPOST /v2/orders (stocks, options, crypto)GET /v2/ordersGET /v2/orders/{order_id}PATCH /v2/orders/{order_id}DELETE /v2/orders/{order_id}DELETE /v2/ordersGET /v2/positionsDELETE /v2/positions/{symbol}DELETE /v2/positionsGET /v2/assetsMarket Data
references/api_reference.md).Included Files
scripts/alpaca_api.py: command-line helper for calling Alpaca endpoints with robust error handling and exit codes.scripts/example.py: sample script showing account and order calls.agents/openai.yaml: Clawhub/OpenClaw interface manifest for display name and default prompt metadata.references/api_reference.md: concise endpoint reference and payload examples.π‘ Examples
Authentication
To use the Alpaca API, you need an API key and secret. Obtain these from your Alpaca account dashboard.https://paper-api.alpaca.marketshttps://api.alpaca.marketsSet environment variables:
ALPACA_API_KEYALPACA_API_SECRETALPACA_BASE_URL (optional; defaults to paper trading URL)Security / Credential Use
ALPACA_BASE_URL unset unless you intentionally need a non-default environment.Example Usage
POST /v2/ordersGET /v2/accountGET /v2/positionsGET /v2/orders