alpaca-broker-funding-transfers-9azh
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "alpaca-broker-funding-transfers-9azh":https://skillpi.com/zh/skills/deepskill-5740cfe38f08d24245d5f230dd318249572de29812be882702b2d55538c8d354。安装前核对上游来源和版本:https://skillhub.cn/skills/user_3c6cb52e/alpaca-broker-funding-transfers-9azh。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
skillhub.cn
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
专为 Alpaca 券商资金划转相关任务设计的技能,用于帮助 AI Agent 高效完成资金划转相关工作。
介绍来源: third_party · user_3c6cb52e · 1.0.0 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 适合谁
- 来源文档未说明。
- 输入和输出
- 来源文档未说明。
- 软件、账号及付费要求
- 来源文档未说明。
- 限制与区别
- 来源文档未说明。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: Alpaca券商资金划转
slug: alpaca-broker-funding-transfers
version: 1.0.0
displayName: Alpaca券商资金划转
description: >
Alpaca券商资金划转专用技能,帮助AI Agent高效完成相关任务。
summary: "Move money between an Alpaca brokerage account and the EXTERNAL banking world via the Broker API — ACH relationships, wire recipient banks, classic transfers (deposits/withdrawals), the v1beta funding..."
license: MIT
category: 量化交易
framework:
- Claude Code
- Codex
- Hermes Agent
- OpenClaw
- QClaw
- WorkBuddy
platform: multi-platform
homepage: https://github.com/1991513ccie-png
repository: https://github.com/1991513ccie-pngAlpaca Broker API — Funding & Transfers
Getting cash into and out of end-user accounts. There are three rails, and the model splits cleanly into bank links (persistent) and transfers (the actual money movement).
Read
alpaca-broker-integrationfirst. Broker API + HTTP Basic auth. For moving cash between accounts in your omnibus (vs. to/from the outside world), seealpaca-broker-journals— that's a different mechanism.
Reference
- Guide:
https://docs.alpaca.markets/docs/funding-accounts - API ref:
https://docs.alpaca.markets/reference/createtransferforaccount - Live schema:
alpaca-docsMCP →get-endpointtitle"Broker API"path/v1/accounts/{account_id}/transfers
1. The funding model
External bank ──(relationship: a persistent link)──┐
├──> Transfer (the money movement) ──> Account cash
ACH relationship (rail A: ACH, US domestic) │
Bank relationship (rail B: wire, domestic + intl) │
Funding wallet (rail C: v1beta, multi-currency) ┘
- A relationship links an external bank. It moves no money and has its own status; for wires it must be
APPROVEDbefore a transfer can progress. - A transfer references a relationship by ID and moves the money. One relationship backs many transfers.
| Rail | transfer_type |
Directions | Relationship | Notes |
|---|---|---|---|---|
| ACH | ach |
INCOMING + OUTGOING |
ACH relationship (relationship_id) |
US domestic; set up via Plaid processor_token (recommended) |
| Wire | wire |
OUTGOING only |
Bank relationship (bank_id) |
Domestic + international (SWIFT). Incoming wires are pushed by the sending bank and booked automatically |
| Funding wallet | (separate /v1beta API) |
incoming / outgoing (lowercase) |
Funding-wallet recipient bank | Multi-currency, swift_wire/local_rails |
2. Endpoints
| Method | Path | Purpose |
|---|---|---|
| POST/GET/DELETE | /v1/accounts/{id}/ach_relationships[/{rel_id}] |
Manage ACH bank links |
| POST/GET/DELETE | /v1/accounts/{id}/recipient_banks[/{bank_id}] |
Manage wire recipient banks |
| POST | /v1/accounts/{id}/transfers |
Create transfer (ACH deposit/withdraw, or wire withdraw) |
| GET | /v1/accounts/{id}/transfers |
List transfers |
| DELETE | /v1/accounts/{id}/transfers/{transfer_id} |
Request cancel |
| POST/GET | /v1beta/accounts/{id}/funding_wallet |
Create / get funding wallet |
| POST/GET/DELETE | /v1beta/accounts/{id}/funding_wallet/recipient_bank |
Funding-wallet recipient bank |
| POST | /v1beta/accounts/{id}/funding_wallet/withdrawal |
Funding-wallet withdrawal |
| GET | /v1beta/accounts/{id}/funding_wallet/transfers[/{transfer_id}] |
List / get wallet transfers |
| GET | /v2/events/funding/status |
SSE — unified funding status stream (see §6) |
The current wire-bank endpoint is
/recipient_banks(schemaBank/CreateBankRequest). The older/banksname is a legacy alias.
3. Create-transfer request (POST /v1/accounts/{id}/transfers)
Required for all: transfer_type, amount (decimal string, > 0), direction.
// ACH deposit
{ "transfer_type": "ach", "relationship_id": "<uuid>", "amount": "100.00", "direction": "INCOMING" }
// Wire withdrawal
{ "transfer_type": "wire", "bank_id": "<uuid>", "amount": "500.00", "direction": "OUTGOING",
"fee_payment_method": "user", "additional_information": "..." }
relationship_idrequired iffach;bank_idrequired iffwire(and must be the other one's empty).fee_payment_method(wire):user(fee deducted fromamount; warn the user in UI) orinvoice(firm billed monthly). Only outgoing wire fees auto-process.additional_informationis wire-only — sending it on a non-wire request returns422.- The
Transferresponse addsid,status,fee,requested_amount(original ask),reason, timestamps.
4. Wire recipient bank (POST /v1/accounts/{id}/recipient_banks)
Required: name, bank_code, bank_code_type, account_number.
bank_code_type:ABA(9-digit routing, domestic) orBIC(SWIFT, international).- When
BIC:country,city,state_province,postal_code,street_addressbecome required. extra_fieldscarries intermediary/correspondent BICs (intermediary_bank1_bic…). Omitting them on international wires can cause auto-selection, delays, or extra fees — gather them up front for cross-border.- A new bank starts
QUEUED; it must reachAPPROVEDbefore a wire transfer against it progresses.
5. Transfer status state machines
Classic transfers (TransferStatus):
QUEUED → APPROVAL_PENDING → PENDING → SENT_TO_CLEARING → (APPROVED) → COMPLETE, with REJECTED / CANCELED / RETURNED as failure exits.
| Terminal | Meaning |
|---|---|
COMPLETE |
Settled |
REJECTED |
Rejected |
CANCELED |
Client-initiated cancel |
RETURNED |
Bank issued an ACH return |
(The SSE Transfer entity also reports EXPIRED, which is effectively terminal.)
Funding-wallet transfers (FundingWalletTransferStatus): PENDING, EXECUTED, COMPLETE, CANCELED, FAILED (last three terminal). Note lowercase incoming/outgoing directions here — different casing from classic transfers.
6. Events vs polling — the key reliability lesson
Classic transfers HAVE an SSE stream: GET /v2/events/funding/status. It is unified across four entity_type values — Transfer, BankRelationship, WireBank, FundingWallet — and is replayable via since/until (timestamps) or since_id/until_id (ULIDs). Use it instead of polling for classic ACH/wire status.
Funding-wallet per-transfer status appears NOT to be pushed — only wallet-level status (active/pending) is in the stream. Individual wallet transfer status (PENDING→EXECUTED→COMPLETE) must be polled via GET /v1beta/.../funding_wallet/transfers/{id}.
Lesson (hard-won): rails differ in event coverage. Decide per rail whether you consume SSE or poll, and build a status-reconciliation poller for anything not covered by events (and as a safety net even for those that are — SSE can drop). Map each Alpaca status to your own internal status with an explicit lookup table, and only poll transfers still in a non-terminal state. See alpaca-broker-reconciliation-idempotency.
Legacy caveat: the older
us/sse-events"Transfer Events" payload uses an integerevent_idand lowercase statuses; the modern/v2/events/funding/statususes ULIDs. Migrate to v2.
7. Documented gotchas
- Wire fees (since 2022-06-01): outgoing domestic + international wires are charged. Reflect
requested_amountvsamount+feein your UI. - Incoming wires need an FFC (For Further Credit) instruction to auto-book; otherwise they're handled manually.
- Travel Rule: Alpaca requires transmitter/originator info on all incoming deposits regardless of amount (below the usual FinCEN $3,000 threshold). Pass it at settlement creation; retained ≥5 years.
- ACH uses Plaid: pass the bank via
processor_token. There's aninstantflag on the relationship. Account types limited toCHECKING/SAVINGS. timing: immediateis deprecated and silently ignored (sunset 2026-08-26) — stop sending it.- Permission errors:
403if the account'sdepositable_status/withdrawable_statusisn't allowed;422for incoming-wire attempts, missing/mismatched relationship vs bank IDs, or amounts under the (undocumented) minimums. - Sandbox wire behavior: simulated end-to-end but asynchronous and auto-completes on weekdays only — weekend submissions don't progress until Monday. (ACH in sandbox settles instantly.)
8. The omnibus / sweep-account pattern (architecture lesson)
Many production brokers don't fund each user account by a separate external transfer. Instead:
- Users pay you through your payment processor (or you receive a bulk wire into a firm/sweep account held at Alpaca).
- You then journal cash from the firm account to the user's account instantly (
JNLC) — no external ACH/wire per user. Seealpaca-broker-journals. - Withdrawals reverse it: journal from user → firm account, then send one external transfer out.
This decouples your funding UX from Alpaca's transfer rails and enables "instant" deposits. It requires Alpaca review (and possibly a local money-transmitter license) — confirm with counsel. The classic transfer endpoints in this skill then handle only the firm-account-to-outside-world leg.
Related skills: internal cash movement → alpaca-broker-journals; missed-status recovery → alpaca-broker-reconciliation-idempotency; money formatting → alpaca-broker-money-precision; live status → alpaca-broker-sse-events.
当前收录版本
1.0.0
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 直接解决券商资金划转核心任务痛点,面向量化交易场景,功能闭环完整
- 涵盖ACH、Wire、Funding Wallet三大资金通道,满足多样化需求
- 提供端到端示例与状态机说明,显著提升日常高频场景效率
亮点
- 触发词精准完整,覆盖多种变体,边界清晰
- description明确指向Alpaca券商资金划转专用场景
亮点
- Phase/步骤清晰,有出口条件,含端到端示例
- frontmatter完整,单文件≤500行
- 结构规范,易于理解执行流程
亮点
- 工具来源明确,参数正确,覆盖主要异常
- 不可逆操作有确认机制
- 提供状态机与事件流说明,确保执行可靠性
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- docs.alpaca.markets
- github.com
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
来源文档未说明。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。