alpaca-broker-rate-limits-resilience

Installation
SKILL.md

Alpaca — Rate Limits & Resilience

Alpaca's APIs are rate-limited and occasionally flaky under load. Any client that does more than a handful of calls — especially bulk jobs, backfills, and reconciliation sweeps — needs disciplined retry, backoff, and concurrency control. These patterns are transport-level and apply in any language.

Read alpaca-broker-integration first.

1. Rate-limit headers — read them on every response

Alpaca returns standard headers:

Header Meaning
X-RateLimit-Limit requests allowed in the window
X-RateLimit-Remaining requests left in the current window
X-RateLimit-Reset unix timestamp (seconds) when the window resets

Parse them on every response, not just on errors. Two uses:

  • Proactive: slow down as Remaining falls toward zero, rather than waiting to be throttled. Any warning threshold you pick is your own starting point, derived from Limit — Alpaca publishes none.
  • Reactive: on 429, use Reset to wait exactly until the window opens.
Installs
123
GitHub Stars
157
First Seen
Jun 30, 2026