alpaca_bars

Pack: alpaca · Endpoint: https://gateway.pipeworx.io/alpaca/mcp

Historical US stock OHLCV bars with per-bar VWAP and trade count. Timeframes 1Min/5Min/15Min/1Hour/1Day; intraday bars include pre-market and after-hours sessions on the IEX feed. Each bar: {t, o, h, l, c, v, vwap, trades}. Use start/end ISO timestamps or a lookback shorthand like “2h”, “5d”. Multiple symbols comma-separated (max 20). BYOK Alpaca (free account). Example: alpaca_bars({ symbols: “AAPL”, timeframe: “5Min”, lookback: “1d”, _apiKey: “key_id:secret_key” })

Parameters

NameTypeRequiredDescription
symbolsstringyesComma-separated ticker symbols, e.g. “AAPL,MSFT” (max 20)
timeframestringnoBar size: “1Min”, “5Min”, “15Min”, “1Hour”, or “1Day” (default “5Min”)
startstringnoStart time, ISO/RFC-3339 (e.g. “2026-07-18T09:30:00-04:00”) or date “2026-07-18”
endstringnoEnd time, ISO/RFC-3339 or date (default: now)
lookbackstringnoShorthand window ending now, instead of start/end: e.g. “30m”, “2h”, “1d”, “5d”, “2w”
limitnumbernoMax bars per symbol to return, 1-1000 (default 100)
_apiKeystringyes

Example call

Arguments

{
  "symbols": "AAPL",
  "timeframe": "5Min",
  "lookback": "1d",
  "_apiKey": "your-alpaca-api-key"
}

curl

curl -X POST https://gateway.pipeworx.io/alpaca/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"alpaca_bars","arguments":{"symbols":"AAPL","timeframe":"5Min","lookback":"1d","_apiKey":"your-alpaca-api-key"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('alpaca_bars', {
  "symbols": "AAPL",
  "timeframe": "5Min",
  "lookback": "1d",
  "_apiKey": "your-alpaca-api-key"
});

More examples

{
  "symbols": "MSFT,TSLA",
  "timeframe": "1Hour",
  "start": "2026-07-18",
  "end": "2026-07-25",
  "_apiKey": "your-alpaca-api-key"
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "alpaca": {
      "url": "https://gateway.pipeworx.io/alpaca/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build September 4, 2026