Skip to content
Back to skills

Alpaca Markets

ASecurity

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.

  • 21 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 7, 2026
ai-agentsgitapisecurity

Works with

  • api

Security analysis

A100/100

Pro scans all 10 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add modbender/skill-library-mcp --skill alpaca-markets --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Alpaca Markets?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Alpaca Markets
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-alpaca-markets/badge)](https://www.skillsdirectory.com/skills/modbender-alpaca-markets)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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.
- Paper trading: `https://paper-api.alpaca.markets`
- Live trading: `https://api.alpaca.markets`

Set environment variables:

- `ALPACA_API_KEY`
- `ALPACA_API_SECRET`
- `ALPACA_BASE_URL` (optional; defaults to paper trading URL)

### Security / Credential Use

- Use paper trading credentials by default.
- Do not use live trading credentials until you have audited the code path you plan to run.
- Keep `ALPACA_BASE_URL` unset unless you intentionally need a non-default environment.
- Consider running the helper scripts in an isolated container or VM during evaluation.

### Example Usage
- Place a stock or crypto order: `POST /v2/orders`
- Fetch account balance: `GET /v2/account`
- Get positions (stocks/options/crypto): `GET /v2/positions`
- List orders: `GET /v2/orders`

## API Operations

### Trading API
- **Get Account**: `GET /v2/account`
- **Place Order**: `POST /v2/orders` (stocks, options, crypto)
- **List Orders**: `GET /v2/orders`
- **Get Order**: `GET /v2/orders/{order_id}`
- **Replace Order**: `PATCH /v2/orders/{order_id}`
- **Cancel Order**: `DELETE /v2/orders/{order_id}`
- **Cancel All Orders**: `DELETE /v2/orders`
- **Get Positions**: `GET /v2/positions`
- **Close Position**: `DELETE /v2/positions/{symbol}`
- **Close All Positions**: `DELETE /v2/positions`
- **Get Assets**: `GET /v2/assets`

### Market Data
- Use Alpaca Market Data API endpoints for crypto quotes and bars (see `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.

Files in this skill

  • .github/workflows/validate-registry-metadata.yml441 B
  • README.md1.5 KB
  • SKILL.md3.1 KB
  • agents/openai.yaml332 B
  • references/api_reference.md2.1 KB
  • registry-metadata.json1.1 KB
  • requirements.txt18 B
  • scripts/alpaca_api.py3.9 KB
  • scripts/example.py445 B
  • scripts/validate_registry_metadata.py11.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.