alpaca-broker-rate-limits-resilience
Skill by alpacahq
Adds rate-limit handling, HTTP 429 backoff, retries, bounded concurrency, pagination and timeouts to Alpaca API clients. Aimed at developers building bulk jobs, backfills or reconciliation sweeps in any language.
Install alpaca-broker-rate-limits-resilience
Built from the published package, never by AI.
git clone --depth 1 https://github.com/alpacahq/alpaca-skills /tmp/alpaca-skills && mkdir -p ~/.claude/skills && cp -r /tmp/alpaca-skills/skills/broker-api/rate-limits-resilience ~/.claude/skills/alpaca-broker-rate-limits-resilienceRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install alpaca-broker-rate-limits-resilience in Claude Code
git clone --depth 1 https://github.com/alpacahq/alpaca-skills /tmp/alpaca-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/alpaca-skills/skills/broker-api/rate-limits-resilience ~/.gemini/antigravity-cli/skills/alpaca-broker-rate-limits-resilienceAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install alpaca-broker-rate-limits-resilience in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill gives guidance for making Alpaca API clients resilient. It covers reading X-RateLimit headers on every response, waiting for X-RateLimit-Reset after a 429, and retrying network errors and 5xx responses with capped exponential backoff and jitter. It also covers bounded worker pools, pagination loops, HTTP timeouts and chunked database writes.
The patterns are transport-level and apply in any language. The skill notes that Alpaca broker limits apply at the correspondent level and are not published, so clients should react to the headers. It targets developers writing robust REST clients, bulk or cron jobs, and reconciliation sweeps against Alpaca. It says to read the alpaca-broker-integration skill first.
Written from the project's SKILL.md and checked against it.
What it can do
- Rate-limit header parsingReads X-RateLimit-Limit, Remaining and Reset on every response to slow down early.
- 429 handlingWaits until X-RateLimit-Reset plus a buffer before retrying a throttled request.
- Exponential retry with jitterRetries network errors and 5xx responses with capped backoff and random jitter.
- Bounded concurrencyUses a fixed worker pool sized from the rate limit, with per-run caching of repeated reads.
- Pagination loopsPages through activities and market-data bars until no further token is returned.
- Timeouts and connection reuseSets HTTP timeouts on every call and shares a connection pool across requests.
- Bulk write chunkingChunks reconciliation writes to your database and keeps them idempotent via upserts.
- Resilience checklistProvides a checklist for building a robust bulk or cron job against Alpaca.
What you need
- Read the alpaca-broker-integration skill first
Try asking
- Add 429 backoff using X-RateLimit-Reset to my Alpaca client
- Set up a bounded worker pool for my Alpaca backfill job
- Write a paginated Alpaca activities fetch using page_token
Good to know
- Broker rate limits are set per partner and are not published.
- Sandbox limits are much lower than production; do not load-test against sandbox.
- Alpaca publishes no warning threshold, so the low-water mark is your own choice.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/broker-api/rate-limits-resilience/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to alpaca-broker-rate-limits-resilience
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
alpaca-broker-rate-limits-resilience: common questions
Does this work with languages other than Python?
Yes. The source says these patterns are transport-level and apply in any language.
How should a client handle a 429 from Alpaca?
Wait until the X-RateLimit-Reset timestamp plus a buffer of about one second, then keep exponential backoff underneath. Reset shows when the window rolls, not whether other workers will re-saturate it.
Should I load-test against the Alpaca sandbox?
No. The source says Alpaca explicitly advises against load-testing sandbox and recommends mocking calls with latencies sampled from production.
How do I install alpaca-broker-rate-limits-resilience?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is alpaca-broker-rate-limits-resilience free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is alpaca-broker-rate-limits-resilience safe to use?
It scores 70 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to alpaca-broker-rate-limits-resilience?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
