← 返回
开发者工具 Key 中文

Alpaca Markets CLI

This skill provides integration with the Alpaca Markets API for trading stocks, options, and cryptocurrencies. Use it when you need to interact with Alpaca's...
提供与Alpaca Markets API的集成,支持股票、期权和加密货币交易。用于与Alpaca交互时使用。
oscraters
开发者工具 clawhub v1.0.1 1 版本 100000 Key: 需要
★ 0
Stars
📥 823
下载
💾 22
安装
1
版本
#latest

概述

Alpaca

Overview

This skill enables programmatic access to Alpaca Markets for automated trading, portfolio management, and market data retrieval via their REST API. It supports both live and paper trading accounts for stocks, options, and crypto.

Quick Start

Authentication

To use the Alpaca API, you need an API key and secret. Obtain these from your Alpaca account dashboard.

  • Paper trading: https://paper-api.alpaca.markets
  • Live trading: https://api.alpaca.markets

Set environment variables:

  • ALPACA_API_KEY
  • ALPACA_API_SECRET
  • ALPACA_BASE_URL (optional; defaults to paper trading URL)

Security / Credential Use

  • Use paper trading credentials by default.
  • Do not use live trading credentials until you have audited the code path you plan to run.
  • Keep ALPACA_BASE_URL unset unless you intentionally need a non-default environment.
  • Consider running the helper scripts in an isolated container or VM during evaluation.

Example Usage

  • Place a stock or crypto order: POST /v2/orders
  • Fetch account balance: GET /v2/account
  • Get positions (stocks/options/crypto): GET /v2/positions
  • List orders: GET /v2/orders

API Operations

Trading API

  • Get Account: GET /v2/account
  • Place Order: POST /v2/orders (stocks, options, crypto)
  • List Orders: GET /v2/orders
  • Get Order: GET /v2/orders/{order_id}
  • Replace Order: PATCH /v2/orders/{order_id}
  • Cancel Order: DELETE /v2/orders/{order_id}
  • Cancel All Orders: DELETE /v2/orders
  • Get Positions: GET /v2/positions
  • Close Position: DELETE /v2/positions/{symbol}
  • Close All Positions: DELETE /v2/positions
  • Get Assets: GET /v2/assets

Market Data

  • Use Alpaca Market Data API endpoints for crypto quotes and bars (see references/api_reference.md).

Included Files

  • scripts/alpaca_api.py: command-line helper for calling Alpaca endpoints with robust error handling and exit codes.
  • scripts/example.py: sample script showing account and order calls.
  • agents/openai.yaml: Clawhub/OpenClaw interface manifest for display name and default prompt metadata.
  • references/api_reference.md: concise endpoint reference and payload examples.

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-29 22:55 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

suspicious
查看报告

🔗 相关推荐

security-compliance

Weibo Microblogging CLI

oscraters
利用微博开放平台进行OAuth2认证、时间线获取、话题搜索及结构化舆情采集。当任务...时触发此技能。
★ 1 📥 1,228
developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,808
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 68 📥 180,239