Agent skill

Alpaca Data

by gauss314 in gauss314/skills

Market Data API de Alpaca: acciones, crypto, opciones. An agent skill from gauss314/skills.

MITAuto-check passedBusiness, Finance & HR

Install Alpaca Data

skills CLI
$ npx skills add gauss314/skills --skill alpaca-data -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install gauss314/skills alpaca-data --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/gauss314/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/alpaca-data .claude/skills/alpaca-data && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
alpaca-data
GitHub stars
246
Token cost
~1.8k tokens
SKILL.md length
314 words
Files
5 (incl. scripts, references)
Skills in repo
32
Repo updated
First seen
Licence
MIT

At a glance

Market Data API de Alpaca: acciones, crypto, opciones. An agent skill from gauss314/skills.

  • Works in 4 steps: Ir a app.alpaca.markets → Crear cuenta (paper trading es gratis) → Ir a "API Keys" → Generate New Keys → …
  • Tasks that involve Stock and market analysis
  • SKILL.md covers Autenticación, Rate Limits, Data Feeds and Historical Stock Data, plus 9 more sections
  • Runs Python scripts from its folder; calls python and pip; reaches data.alpaca.markets; needs API_KEY and SECRET_KEY

What it does

Alpaca Data is an agent skill from gauss314/skills. Market Data API de Alpaca: acciones, crypto, opciones. Historical y real-time data para 5000+ stocks.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts and reference files (for example `references/options_reference.md`, `scripts/download_crypto_bars.py` and `scripts/download_options.py`).

It sits in Business, Finance & HR, covering Stock and market analysis. The repository describes itself as: Financial market data consumption skills for claude code and AI agents. The licence is MIT.

When your agent uses it

  • Tasks that involve Stock and market analysis

Example prompts

  • “/alpaca-data”

Requirements

  • Python 3
  • A credential in API_KEY
  • A credential in SECRET_KEY

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Ir a app.alpaca.markets
  2. Crear cuenta (paper trading es gratis)
  3. Ir a "API Keys" → Generate New Keys
  4. Guardar API Key y Secret Key

What it can do on your machine

Read from SKILL.md and the folder at commit 5156f81. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 3 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • data.alpaca.markets

    Also links to:

    • docs.alpaca.markets

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • API_KEY
    • SECRET_KEY
    • APCA_API_KEY_ID
    • APCA_API_SECRET_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Alpaca Data loads about 1.8k tokens when it runs, and up to ~2.6k if it reads all its reference files. Until then it costs about 28 tokens; SKILL.md has 314 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~28
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from gauss314/skills at commit 5156f81, republished under its MIT licence (© gauss314). 314 words, ~1,822 tokens.

Download SKILL.mdSave it as .claude/skills/alpaca-data/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
alpaca-data
description
Market Data API de Alpaca: acciones, crypto, opciones. Historical y real-time data para 5000+ stocks.
license
MIT

Alpaca Data — Market Data API

API de datos de mercado con datos históricos y en tiempo real para acciones, crypto y opciones.

Base URL: https://data.alpaca.markets
SDK: pip install alpaca-py
Docs: docs.alpaca.markets


Autenticación

Obtener API Keys
  1. Ir a app.alpaca.markets
  2. Crear cuenta (paper trading es gratis)
  3. Ir a "API Keys" → Generate New Keys
  4. Guardar API Key y Secret Key
Configuración
python
import os
from alpaca.data.historical import StockHistoricalDataClient

# Keys (requerido para datos de acciones)
API_KEY = os.getenv("APCA_API_KEY_ID")
SECRET_KEY = os.getenv("APCA_API_SECRET_KEY")

client = StockHistoricalDataClient(API_KEY, SECRET_KEY)

# Crypto NO requiere keys
from alpaca.data.historical import CryptoHistoricalDataClient
crypto_client = CryptoHistoricalDataClient()

⚠️ NUNCA hardcodear keys en código que se comparte.


Rate Limits

PlanRequests/MinDatos
Free (IEX)200~5 años historia, 1 exchange
Paid (SIP)MayorTodas las bolsas US, ~7 años
Recomendaciones
  • Cachear datos — los datos históricos no cambian
  • Batch requests — pedir múltiples símbolos en una llamada
  • Usar limit=10000 — máximo por request
  • Paginar con next_page_token — para datos grandes

Data Feeds

FeedDescripciónCosto
iexInvestors Exchange (~2.5% del volumen)Gratis
sipTodas las bolsas US (consolidado)Paid
boatsBlue Ocean ATS (horas extendidas)Paid
otcOver-the-counterPaid

Free tier = solo IEX


Historical Stock Data

Bars (OHLCV)
python
from alpaca.data.requests import StockBarsRequest
from alpaca.data.timeframe import TimeFrame
from datetime import datetime

request = StockBarsRequest(
    symbol_or_symbols=["AAPL", "GOOGL"],
    timeframe=TimeFrame.Day,
    start=datetime(2023, 1, 1),
    end=datetime(2024, 12, 31),
    feed="iex"  # free tier
)

bars = client.get_stock_bars(request)
df = bars.df  # DataFrame

TimeFrames disponibles:

  • TimeFrame.Minute / TimeFrame(5, TimeFrame.Minute)
  • TimeFrame.Hour
  • TimeFrame.Day
  • TimeFrame.Week
  • TimeFrame.Month
Quotes (Bid/Ask)
python
from alpaca.data.requests import StockQuotesRequest

request = StockQuotesRequest(
    symbol_or_symbols=["AAPL"],
    start=datetime(2024, 1, 1),
    end=datetime(2024, 1, 31),
    feed="iex"
)

quotes = client.get_stock_quotes(request)
Trades
python
from alpaca.data.requests import StockTradesRequest

request = StockTradesRequest(
    symbol_or_symbols=["AAPL"],
    start=datetime(2024, 1, 1),
    feed="iex"
)

trades = client.get_stock_trades(request)
Latest Data
python
# Latest bar
bars = client.get_stock_latest_bar(["AAPL", "GOOGL"])

# Latest quote
quotes = client.get_stock_latest_quote(["AAPL"])

# Latest trade
trades = client.get_stock_latest_trade(["AAPL"])
Snapshots
python
from alpaca.data.requests import SnapshotRequest

request = SnapshotRequest(
    symbol_or_symbols=["AAPL", "GOOGL"]
)
snapshots = client.get_snapshot(request)

Historical Crypto Data

No requiere API keys

python
from alpaca.data.historical import CryptoHistoricalDataClient
from alpaca.data.requests import CryptoBarsRequest
from alpaca.data.timeframe import TimeFrame
from datetime import datetime

client = CryptoHistoricalDataClient()

request = CryptoBarsRequest(
    symbol_or_symbols=["BTC/USD", "ETH/USD"],
    timeframe=TimeFrame.Day,
    start=datetime(2023, 1, 1),
    end=datetime(2024, 12, 31)
)

bars = client.get_crypto_bars(request)
df = bars.df
Crypto Orderbook
python
from alpaca.data.requests import CryptoLatestQuoteRequest

request = CryptoLatestQuoteRequest(symbol_or_symbols=["BTC/USD"])
quotes = client.get_crypto_latest_quote(request)

Historical Options Data

Option Chains
python
# Obtener contratos disponibles
from alpaca.data.requests import OptionContractsRequest

request = OptionContractsRequest(
    underlying_symbols=["AAPL"],
    expiration_date_gte="2024-01-01",  # desde esta fecha
    expiration_date_lte="2024-12-31",  # hasta esta fecha
    strike_price_gte=100,  # strikes mínimo
    strike_price_lte=200   # strikes máximo
)

contracts = client.get_option_contracts(request)
Option Bars/Trades/Quotes
python
from alpaca.data.requests import OptionBarsRequest

# Buscar contract ID primero
contract_id = "6e58f870-fe73-4583-81e4-b9a37892c36f"

request = OptionBarsRequest(
    symbol_or_contract_ids=[contract_id],
    start=datetime(2024, 1, 1),
    end=datetime(2024, 1, 31)
)

bars = client.get_option_bars(request)

Options Tickers Reference

Ver ./references/options_reference.md para:

  • Símbolos de opciones (AAPL240119C00100000)
  • Parámetros de filtrado
  • Trading levels requeridos

News

python
from alpaca.data.requests import StockNewsRequest

request = StockNewsRequest(
    symbol_or_symbols=["AAPL", "GOOGL"],
    start=datetime(2024, 1, 1),
    end=datetime(2024, 1, 31)
)

news = client.get_stock_news(request)

Screener

python
from alpaca.data.requests import MostActivesRequest

request = MostActivesRequest(
    by="volume",  # volume, share, number
    top=10,
    date="2024-01-15"
)

movers = client.get_most_actives(request)

WebSocket Real-Time (Opcional)

python
from alpaca.data.stream import StockDataStream

ws = StockDataStream(API_KEY, SECRET_KEY)

async def handle_bar(bar):
    print(bar)

ws.subscribe_bars(handle_bar, "AAPL", "GOOGL")
ws.run()

Scripts de Descarga

Usá los scripts en ./scripts/:

bash
# Descargar bars de acciones
python ./scripts/download_stock_bars.py --symbols AAPL,GOOGL --days 365 --output data/

# Descargar crypto
python ./scripts/download_crypto_bars.py --symbols BTC,ETH --days 90 --output data/

# Descargar option contracts
python ./scripts/download_options.py --symbol AAPL --output data/

Errores Comunes

ErrorCausaSolución
403 ForbiddenKeys inválidas o sin permisosVerificar API keys
429 Too Many RequestsRate limitEsperar, usar cache
Empty responseSin datos para el símboloVerificar símbolo
"options_enabled"Symbol sin opcionesUsar símbolo con opciones

Comparación con Otras APIs

FeatureAlpacaAlpha VantageData912
Free tier✅ IEX (1 exchange)✅ 25/day✅ Todo ARS
Stocks US✅✅❌
Crypto✅✅❌
Opciones✅❌❌
Historical depth~5 años IEXLimitadoLimitado
SDK Python✅ alpaca-py✅❌

Elegí Alpaca para: datos de EE.UU. (stocks, crypto, opciones), datos intraday.
Elegí Data912 para: datos del mercado argentino.
Elegí Alpha Vantage para: indicadores técnicos, forex.

© gauss314, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts, references) in skills/alpaca-data of gauss314/skills.

  • SKILL.md
  • references/options_reference.md
  • scripts/download_crypto_bars.py
  • scripts/download_options.py
  • scripts/download_stock_bars.py

Open the folder on GitHubat commit 5156f81

Compare with similar skills

Alpaca Data next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Alpaca Data compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Alpaca Data this skillgauss314/skills246—~1.8kAutomated safety check: PassMIT
Alpaca CLIalpacahq/cli177—~2.6kAutomated safety check: PassApache-2.0
Birdeye APIagiprolabs/claude-trading-skills410—~1.8kAutomated safety check: PassMIT
YfinanceSilvioBaratto/optimizer176—~4kAutomated safety check: NotesCustom licence
Coingecko APIagiprolabs/claude-trading-skills410—~1.6kAutomated safety check: PassMIT
Miniqmt CLIoopslink/trading-skills176—~8.2kAutomated safety check: PassMIT

Similar skills

  • Alpaca CLI

    alpacahq/cli

    Install, configure, and use the Alpaca CLI - a command-line tool for the Alpaca Trading API.

    177 GitHub stars~2.6k tokensUpdated 6 days ago
    Business, Finance & HRAuto-check passed
  • Birdeye API

    agiprolabs/claude-trading-skills

    Solana token market data via Birdeye — prices, OHLCV, trades, token metadata, security checks, and trader activity

    410 GitHub stars~1.8k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check passed
  • Yfinance

    SilvioBaratto/optimizer

    Load proactively whenever the user works with yfinance or Yahoo Finance data — pulling price history, fetching financials or analyst data, screening stocks / funds / ETFs, streaming real-time…

    176 GitHub stars~4k tokensUpdated yesterday
    Business, Finance & HRAuto-check: notes
  • Coingecko API

    agiprolabs/claude-trading-skills

    Broad crypto market data from CoinGecko covering 13,000+ tokens.

    410 GitHub stars~1.6k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check passed
  • Miniqmt CLI

    oopslink/trading-skills

    Operate miniQMT/xtquant via the miniqmt-cli tool -- market data queries, real-time streaming, account management, order placement with safety guards, daemon health checks, SSH tunnel management, and…

    176 GitHub stars~8.2k tokensUpdated 4 mo ago
    Business, Finance & HRAuto-check passed
  • Fintel Data

    himself65/finance-skills

    Query Fintel (fintel.io) institutional market data through its REST API or official MCP server.

    3.4k GitHub stars~2.2k tokensUpdated 3 days ago
    Business, Finance & HRAuto-check: notes

More from gauss314/skills

All 32 skills in this repo
  • Backtesting

    gauss314/skills

    Academic backtesting framework for quantitative research. An agent skill from gauss314/skills.

    246 GitHub stars~2.4k tokensUpdated 3 mo ago
    Auto-check passed
  • Google Finance

    gauss314/skills

    Datos de Google Finance via batchexecute (API RPC interna sin auth ni API key).

    246 GitHub stars~3.1k tokensUpdated 3 mo ago
    Auto-check passed
  • Historyofmarket

    gauss314/skills

    History of Market (historyofmarket.com) — API publica con 88 datasets historicos de indices US desde 1871.

    246 GitHub stars~1.6k tokensUpdated 3 mo ago
    Auto-check passed
  • Indec

    gauss314/skills

    Datos macro y sociales de Argentina via la API oficial Series de Tiempo del Estado (apis.datos.gob.ar/series).

    246 GitHub stars~3k tokensUpdated 3 mo ago
    Auto-check passed
  • Morningstar

    gauss314/skills

    Morningstar Screener via API JSON publica: descarga masiva de 53 universes (102K+ listings, 39 paises, NYSE/Nasdaq/BCBA/etc) con 33 campos (precio, market cap, ratios, retornos…

    246 GitHub stars~2.6k tokensUpdated 3 mo ago
    Auto-check passed
  • Option Pricing

    gauss314/skills

    Pricing completo de opciones europeas y americanas. An agent skill from gauss314/skills.

    246 GitHub stars~4.7k tokensUpdated 3 mo ago
    Auto-check passed

Questions about Alpaca Data

What does Alpaca Data do?

Market Data API de Alpaca: acciones, crypto, opciones. An agent skill from gauss314/skills. Alpaca Data is an agent skill from gauss314/skills. Market Data API de Alpaca: acciones, crypto, opciones.

When should I use Alpaca Data?

Alpaca Data fits situations like: tasks that involve Stock and market analysis.

How do I install Alpaca Data in Claude Code?

Run `npx skills add gauss314/skills --skill alpaca-data -a claude-code`. Or copy the skill folder (skills/alpaca-data in gauss314/skills) into .claude/skills/alpaca-data in your project. Claude Code loads it when a task matches its description.

How do I install Alpaca Data in Codex?

Run `npx skills add gauss314/skills --skill alpaca-data -a codex`. Or copy the skill folder (skills/alpaca-data in gauss314/skills) into .agents/skills/alpaca-data in your project. Codex loads it when a task matches its description.

Can I use Alpaca Data in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add gauss314/skills --skill alpaca-data -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/alpaca-data, .gemini/skills/alpaca-data, .github/skills/alpaca-data and .opencode/skills/alpaca-data in your project.

What does Alpaca Data need to run?

Going by SKILL.md and its folder, Alpaca Data needs Python for the scripts in its folder, the command-line tools its instructions call (python and pip) and credentials named API_KEY, SECRET_KEY, APCA_API_KEY_ID and APCA_API_SECRET_KEY. Our summary lists: Python 3; A credential in API_KEY; A credential in SECRET_KEY.

Does Alpaca Data access the network?

SKILL.md names 2 domains. In commands or code: data.alpaca.markets; the agent is likely to contact it when it follows the instructions. As links in the text: docs.alpaca.markets. This is read from the text; nothing was executed.

Is Alpaca Data safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Alpaca Data use?

Alpaca Data is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Alpaca Data use?

About 1.8k tokens (SKILL.md is roughly 7.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 814 tokens, read only when the agent opens those files.

What are the alternatives to Alpaca Data?

Skills that share tags, products or a category with Alpaca Data: Alpaca CLI (alpacahq/cli, 177 stars), Birdeye API (agiprolabs/claude-trading-skills, 410 stars), Yfinance (SilvioBaratto/optimizer, 176 stars) and Coingecko API (agiprolabs/claude-trading-skills, 410 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Alpaca Data?

gauss314 (a GitHub user) maintains it in gauss314/skills, which has 246 GitHub stars. The repository holds 32 skills in this directory. The repository was last updated on June 14, 2026.

Source: gauss314/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.