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.
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)ALPACA_BASE_URL unset unless you intentionally need a non-default environment.POST /v2/ordersGET /v2/accountGET /v2/positionsGET /v2/ordersGET /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/assetsreferences/api_reference.md).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.共 1 个版本