Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add alpacahq/alpaca-trade-api-js --skill alpaca-trade-api-sdkgit clone --depth 1 https://github.com/alpacahq/alpaca-trade-api-jsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/alpacahq/alpaca-trade-api-js/alpaca-trade-api-sdk)<a href="https://agentmods.dev/skills/alpacahq/alpaca-trade-api-js/alpaca-trade-api-sdk"><img src="https://agentmods.dev/badge/skills/alpacahq/alpaca-trade-api-js/alpaca-trade-api-sdk/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/alpacahq/alpaca-trade-api-js/alpaca-trade-api-sdk"><img src="https://agentmods.dev/badge/skills/alpacahq/alpaca-trade-api-js/alpaca-trade-api-sdk.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00123 | $0.04121 |
| Opus 5.5 | $0.00049 | $0.01648 |
| Sonnet 5.5 | $0.00025 | $0.00824 |
| Haiku 4.5 | $0.00012 | $0.00412 |
Grade A, and why
alpaca-trade-api-sdk scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 299 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Building on @alpacahq/alpaca-trade-api
Guidance for LLMs and coding agents writing applications with
@alpacahq/alpaca-trade-api. Packaged LLMS.md and the installable Agent Skill
share this exact guidance body; use whichever integration your agent supports:
npx skills add alpacahq/alpaca-trade-api-js
For changes to the SDK repository itself, read the repo-only AGENTS.md instead.
This is a map, not the territory. It gives you the mental model, the idioms
agents most often get wrong, and where to look. It deliberately omits the full
API surface. Whenever you need specifics, use the hosted guides and curated API
reference for discovery, then confirm exact signatures and response models in
the installed package's TypeScript declarations (dist/*.d.ts), your editor's
type information, or the installed src/ source. Do not guess method signatures
from this file alone.
Where to look
Paths are relative to the package root—the repository root when developing
here, or node_modules/@alpacahq/alpaca-trade-api/ when installed. The
published tarball includes src/.
| You need… | Read / search |
|---|---|
| Workflows, conventions, and safety guidance | Hosted guides: Getting started, Trading, Market data, Streaming & events, Authentication, Resilience & configuration, Pagination, Values & types, Testing, Runtime compatibility, Examples, the migration overview, the primary migration from 3.x, and the separate 4.x to 5.0 migration. |
| Curated per-method discovery and examples | Hosted API Reference: Trading, Market data, Streaming, and Ergonomic helpers. |
| Exact installed-version signatures and model fields | Installed dist/*.d.ts, your editor's type information, or installed src/. |
| Runnable end-to-end examples | Hosted Examples or the repository examples. |
| The unified client / facade wiring | src/client.ts |
| Order builders | src/orders.ts |
| Normalized bar/trade/quote shapes + chart helpers | src/marketDataShapes.ts |
| Curated, representative discovery maps | src/capabilities.ts |
| Shared REST/SSE transport (retry/timeout/rate-limit/errors) | src/core/runtime.ts, src/core/sse.ts |
| WebSocket clients | src/streaming/ |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago Changed · +4 lines e3655ed0174e
- 25d ago Changed · +41 lines d62bcec0c5bd
- 1mo ago Changed · +2 lines 3cc280f2f24d
- 1mo ago Changed · +26 lines 4d77f4b5c8b1
- 1mo ago First seen · 226 lines · 123 tokens per session scan A 5f5ea5462a50
alpaca-trade-api-sdk is a skill published in the GitHub repository alpacahq/alpaca-trade-api-js (601 stars, last pushed 4d ago), licensed Apache-2.0. It adds 123 tokens to every session and 4,121 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
graphql-api-development
Comprehensive guide for building GraphQL APIs including schema design, queries, mutations, subscriptions, resolvers, type system, error handling, authentication, authorization, caching strategies, and production best practices.
psl-ast-layers
How to use the PSL syntax tree layers (green tree, red tree, strongly-typed AST classes) correctly. Use for any PSL-related work: PSL interpreters (contract-psl), helpers inside the psl-parser package, the language server, formatters, or anything else that consumes parse() output from @internal/psl-parser.
ast-visitor-pattern
Use the frozen-class/visitor pattern for discriminated unions that have multiple dispatch sites. Use when creating a new set of variants (commands, IR nodes, factory calls) that will be switched over in 2+ places, or when refactoring an existing union type that has grown multiple switch sites.
no-bare-casts
Writing as in TypeScript or TSX production code, modifying a file that contains a bare as cast, silencing a type error with a cast, encountering as unknown as, or reviewing a cast site.
client-setup
Create a vanilla tRPC client with createTRPCClient (), configure link chain with httpBatchLink/httpLink, dynamic headers for auth, transformer on links (not client constructor). Infer types with inferRouterInputs and inferRouterOutputs. AbortController signal support. TRPCClientError typing.
vnpy-export
Export a Vibe-Trading backtest strategy to a runnable vnpy CtaTemplate Python class — supports A-share equities, futures, and crypto via BarGenerator + ArrayManager.