alpaca-broker-account-onboarding-bl6z
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "alpaca-broker-account-onboarding-bl6z":https://skillpi.com/zh/skills/deepskill-7db96c91e8d1351d04ad23de81b2f03427aa6c92379427afa4c76d8f176c6da0。安装前核对上游来源和版本:https://skillhub.cn/skills/user_3c6cb52e/alpaca-broker-account-onboarding-bl6z。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
skillhub.cn
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
Alpaca券商开户流程专用技能,帮助AI Agent高效完成与Alpaca券商开户相关的任务与流程。
介绍来源: third_party · user_3c6cb52e · 1.0.0 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: Alpaca券商开户流程
slug: alpaca-broker-account-onboarding
version: 1.0.0
displayName: Alpaca券商开户流程
description: >
Alpaca券商开户流程专用技能,帮助AI Agent高效完成相关任务。
summary: "Open and manage brokerage accounts via the Alpaca Broker API — account creation, KYC/CIP, identity & disclosures, agreements, document upload (incl. W-8BEN), account status lifecycle, and account upda..."
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 — Account Onboarding & KYC
Create and manage end-user brokerage accounts under your firm. This is the first step of any Broker API integration: no funding, journaling, or trading can happen until an account reaches ACTIVE.
Read
alpaca-broker-integrationfirst for base URLs, auth, and conventions. This skill assumes Broker API + HTTP Basic auth.
Reference
- Guide:
https://docs.alpaca.markets/docs/getting-started-with-broker-api,https://docs.alpaca.markets/docs/accounts - API ref:
https://docs.alpaca.markets/reference/createaccount - Live schema:
alpaca-docsMCP →get-endpointtitle"Broker API"path/v1/accounts
1. Endpoints
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/accounts |
Create account (submit application) |
| GET | /v1/accounts |
List/query accounts (returns up to 1000) |
| GET | /v1/accounts/{account_id} |
Get one account (AccountExtended) |
| PATCH | /v1/accounts/{account_id} |
Update account |
| POST | /v1/accounts/{account_id}/actions/close |
Close account (returns 204) |
| POST | /v1/accounts/{account_id}/documents/upload |
Upload owner/KYC documents (array body) |
| GET | /v1/accounts/{account_id}/documents |
List uploaded documents |
| POST / GET | /v1/accounts/{account_id}/cip |
Submit / retrieve CIP results |
| GET | /v1/country-info |
Supported-country data |
| GET | /v1/events/accounts/status |
SSE stream of account-status changes → see alpaca-broker-sse-events |
2. Create-account request (POST /v1/accounts)
Four objects are required: contact, identity, disclosures, agreements. documents and trusted_contact are optional but usually needed for KYC.
{
"contact": {
"email_address": "jane@example.com",
"phone_number": "+15555555555",
"street_address": ["20 N San Mateo Dr"],
"city": "San Mateo",
"state": "CA", // required if country / country_of_tax_residence is USA
"postal_code": "94401",
"country": "USA" // ISO 3166-1 alpha-3
},
"identity": {
"given_name": "Jane",
"family_name": "Doe",
"date_of_birth": "1990-01-01",
"tax_id_type": "USA_SSN", // see enum below
"tax_id": "666-55-4321",
"country_of_tax_residence": "USA",
"funding_source": ["employment_income"]
},
"disclosures": {
"is_control_person": false,
"is_affiliated_exchange_or_finra": false,
"is_politically_exposed": false,
"immediate_family_exposed": false
},
"agreements": [
{ "agreement": "customer_agreement", "signed_at": "2026-01-02T18:09:33Z", "ip_address": "185.13.21.99" }
],
"documents": [ /* OwnerDocumentUploadRequest[] — see §4 */ ],
"trusted_contact": { "given_name": "Jim", "family_name": "Doe", "email_address": "jim@example.com" }
}
Key field rules:
contact.street_addressis an array (max 3 lines).contact.staterequired when country/tax-residence isUSA.identity.funding_sourceis an array; one+ ofemployment_income,investments,inheritance,business_income,savings,family.tax_id_typeenum is large and country-specific:USA_SSN,USA_ITIN,IND_PAN,MEX_RFC,GBR_NINO, … plus genericNATIONAL_ID,PASSPORT,DRIVER_LICENSE,OTHER_GOV_ID,NOT_SPECIFIED. Query the spec for the full list rather than hardcoding.- Optional top-level:
account_type(trading|custodial|donor_advised|ira),account_sub_type(IRA:traditional|roth),enabled_assets(us_equity|us_option|crypto|ipo, defaultus_equity). - Deprecated:
investment_objective/investment_time_horizon/liquidity_needs/risk_tolerancemoved fromidentityto top-level.
Responses: 200 → account object · 409 email already registered · 422 invalid value · 400 malformed body.
3. Agreements
Each entry: agreement (customer_agreement, account_agreement, margin_agreement, crypto_agreement, options_agreement), signed_at (RFC3339), ip_address (IPv4), optional revision. You must present the agreement text to the user and capture the real signing timestamp + IP — Alpaca treats these as the legal record. revision defaults to the currently-active revision if omitted.
4. Documents & W-8BEN
documents[] items: document_type + (content base64 or content_data).
{ "document_type": "identity_verification", "content": "<base64>", "mime_type": "image/jpeg", "document_sub_type": "passport" }
document_typeenum includesidentity_verification,address_verification,date_of_birth_verification,tax_id_verification,w8ben,w9,cip_result, and more.mime_type:application/pdf,image/png,image/jpeg— plusapplication/jsononly forw8ben.- W-8BEN shortcut (lesson): instead of generating a PDF, upload
content_dataas a structuredW8benDocumentJSON object (full_name, country_citizen, permanentaddress*, date_of_birth, ip_address, timestamp, signer_full_name, …) and Alpaca renders the official form for you. This is the clean way to satisfy the tax-form requirement for non-US persons programmatically. - Doc size cap: 10 MB per file when using Alpaca's KYC-as-a-service; no cap if you run your own KYC.
5. Account status lifecycle
status (and crypto_status) use the AccountStatus enum:
| Status | Meaning |
|---|---|
ONBOARDING |
Application expected, not yet submitted |
SUBMITTED |
Submitted, being processed |
SUBMISSION_FAILED |
Submission error |
ACTION_REQUIRED |
Needs manual action (e.g. a true disclosure routes here) |
APPROVAL_PENDING |
Approval in progress (documented "initial value") |
APPROVED |
Approved, waiting to go active |
ACTIVE |
Fully usable — funding & trading allowed |
REJECTED |
Application rejected |
ACCOUNT_UPDATED |
Modified by user |
ACCOUNT_CLOSED |
Closed |
INACTIVE |
Not enabled for the given asset |
Happy path: SUBMITTED → APPROVAL_PENDING → APPROVED → ACTIVE.
Lesson — gate every downstream op on ACTIVE. A 200 from POST /v1/accounts does not mean tradable. Subscribe to account-status SSE events (or poll GET /v1/accounts/{id}) and only enable funding/journals/trading once status == ACTIVE. Trying to journal or trade into a non-active account fails.
6. KYC results & CIP
kyc_resultson the account object carriesreject/accept/indeterminatecategories (KYCResultTypevalues likeIDENTITY_VERIFICATION,TAX_IDENTIFICATION,ADDRESS_VERIFICATION,WATCHLIST_HIT,COUNTRY_NOT_SUPPORTED,OTHER) plusadditional_information.summaryispass/fail(internal only).- If you run KYC yourself (or via Onfido/Trulioo/Veriff/etc.), submit results via
POST /v1/accounts/{id}/cipwith aCIPInfobody (provider_name, kyc, document, photo, identity, watchlist sub-results). Sub-check results areclear/consider. - Minimum to open an individual account: verify name, date of birth, address, and identification number.
WATCHLIST_HIT/COUNTRY_NOT_SUPPORTEDrequire no user action — Alpaca handles them manually.
7. Integration guidance & lessons learned
- Normalize inputs to canonical formats before sending. Country fields must be ISO 3166-1 alpha-3 (
USA,PHL, …) — strip any UI decoration (flags/emoji, display names) and validate againstGET /v1/country-info. Garbage incountry/country_of_tax_residenceis a common 422. - Capture real agreement metadata.
signed_atandip_addressmust reflect the actual user action, not server time / a placeholder. - Treat creation as async. Persist the returned
account_idimmediately, then drive UI off the status events, not the create response. - Guard against paper/test accounts in production code paths. If you run both sandbox and live, make sure live event handlers reject sandbox/paper account IDs rather than silently mutating real records.
- Idempotency on submit. A
409on duplicate email is your friend — look up the existing account rather than retrying creation. Store your local user↔account_idmapping before the network call so a timeout doesn't orphan an account. - Closing is your responsibility to sequence. Before
POST .../actions/close, you must liquidate all positions and withdraw all cash. The account record is not deleted — it goesACCOUNT_CLOSED.
Related skills: fund the account → alpaca-broker-funding-transfers; move cash in via the firm sweep → alpaca-broker-journals; trade → alpaca-broker-trading-orders; track status in real time → alpaca-broker-sse-events.
当前收录版本
1.0.0
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 解决券商开户这一量化交易核心前置流程的明确业务痛点
- 覆盖从账户创建到KYC验证的完整生命周期管理
- 提供W-8BEN等税务表单的自动化处理方案
待提升项
-
触发词可进一步细化 原报告严重程度:轻微
description中未明确提及KYC、CIP、W-8BEN等核心子流程触发词
改进建议:建议在description中补充关键子流程触发词,如'KYC验证'、'税务表单'、'身份认证'等
亮点
- 触发词精准覆盖开户全流程关键节点
- 明确区分了不同账户类型和资产类别的触发条件
待提升项
-
文档结构可进一步优化 原报告严重程度:轻微
缺少明确的When to Use章节,部分章节标题层级不够清晰
改进建议:建议增加When to Use章节,明确适用场景;优化章节标题层级结构
亮点
- Phase/步骤清晰,有完整的端到端示例
- frontmatter完整,包含版本、分类、框架等关键信息
- 提供了详细的API端点参考和状态机说明
亮点
- 工具来源明确,参数定义准确
- 覆盖主要异常情况(409重复、422无效值等)
- 对不可逆操作(账户关闭)有明确的先决条件说明
- 提供了完整的错误处理指导和最佳实践
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- docs.alpaca.markets
- github.com
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。