Communitygithub.com

baneeishaque/ljt-520_openclaw-backup

SnapTrade SDK를 통해 사용자의 투자 계좌에 연결하고 포트폴리오 보고서(예: 일일 총 가치)를 생성합니다. 사용자가 SnapTrade 기반 중개 연결(Webull, E*TRADE 등), 연결 포털 링크, 계좌 등록 또는 자동화된 포트폴리오 요약을 원할 때 사용하세요.

ljt-520_openclaw-backup란 무엇인가요?

이 스킬은 SnapTrade Python SDK를 사용하여 사용자의 중개 계좌에 연결하고 포트폴리오 데이터를 검색합니다. 주요 기능으로는 계좌 등록, 연결 포털 링크 생성, 비활성화된 연결 재연결, 허용된 중개사 목록 조회, 모든 계좌의 총 포트폴리오 가치 계산, 통화 변환이 포함된 중개사별 합계, 그리고 매수/매도 주문 실행 및 모니터링이 포함됩니다. 이 스킬은 자동 서명 처리를 통해 SnapTrade API와의 안전한 통신을 보장합니다. Webull, E*TRADE 등 다양한 중개사를 지원하며, 일일 보고서를 자동화하여 사용자에게 WhatsApp 메시지로 총 가치를 전송할 수 있습니다. 또한 여러 통화를 처리하고 정확한 합계를 위해 잔액을 사용하며, 비밀 정보는 안전한 로컬 설정 파일에 저장합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/baneeishaque/ljt-520_openclaw-backup/tree/HEAD/skills/brendanwood/portfolio-trader

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

SnapTrade 포트폴리오

개요

중개 계좌를 SnapTrade에 연결하고 일일 총 가치 보고서를 생성합니다. 이 스킬은 공식 SnapTrade Python SDK(snaptrade_client)를 사용하며, 요청 서명이 자동으로 처리됩니다.

워크플로우

2d) 매수/매도 주문 실행 (주식/ETF)

실행:

python3 scripts/snaptrade_order.py buy|sell TICKER UNITS --account-id <ACCOUNT_ID> [--order-type market|limit] [--limit-price <PRICE>] [--tif Day|GTC|IOC|FOK]

기본값:

  • 주문 유형: market
  • 유효 시간: Day
  • 지정가: 지정가 주문에만 필요함

선택적 모니터링 (최근 주문 확인):

python3 scripts/snaptrade_order.py buy|sell TICKER UNITS --account-id <ACCOUNT_ID> --watch
  • 기본적으로 10초마다 최대 120초 동안 확인
  • --watch-interval 및 --watch-seconds로 조정 가능

기존 주문을 ID로 모니터링:

python3 scripts/snaptrade_watch_order.py --account-id <ACCOUNT_ID> --order-id <BROKERAGE_ORDER_ID>
  • 동일한 10초/120초 기본값, --watch-interval 및 --watch-seconds로 조정 가능

계좌 주문 엔드포인트를 사용하여 체결 여부를 확인하고 사용자에게 미체결 주문을 보고합니다.

0) SnapTrade 계정 + API 키 생성

중개사를 연결하려면 SnapTrade 계정이 필요합니다. **https://snaptrade.com**에서 무료 계정을 만들고 클라이언트 ID와 컨슈머 키를 생성한 후 스킬 설정에 추가하세요.

1) 종속성 설치

pip3 install -r requirements.txt

2) 자격 증명 구성 (일회성)

로컬 설정 파일에 자격 증명을 저장합니다(커밋되지 않음). user_id는 첫 실행 시 자동 생성됩니다.

/home/openclaw/.openclaw/workspace/secrets/snaptrade.json

예시:

{
  "client_id": "YOUR_CLIENT_ID",
  "consumer_key": "YOUR_CONSUMER_KEY",
  "user_id": "<auto-generated-uuid>"
}

2) 사용자 등록 + 연결 포털 링크 생성

실행:

python3 scripts/snaptrade_portal.py

이렇게 하면:

  • user_secret이 누락된 경우 사용자를 등록합니다.
  • user_secret을 설정 파일에 다시 저장합니다.
  • 사용자가 계좌를 연결하기 위해 열어야 하는 연결 포털 URL을 출력합니다.

2b) 비활성화된 연결 재연결

실행:

python3 scripts/snaptrade_reconnect.py [brokerage-name]

이렇게 하면:

  • 비활성화된 연결을 나열합니다.
  • 재연결 링크를 생성합니다(선택적으로 중개사 이름으로 일치).
  • 사용자가 연결을 다시 활성화할 수 있는 재연결 URL을 출력합니다.

2c) 사용 가능한 중개사 목록 (허용된 연결)

실행:

python3 scripts/snaptrade_brokers.py

이것은 /snaptrade/partners를 호출하고 allowed_brokerages 목록(표시 이름)을 반환합니다.

3) 총 포트폴리오 가치 조회

실행:

python3 scripts/snaptrade_total.py

출력은 다음과 같은 JSON입니다:

{"total_value": 123456.78, "currency": "CAD"}

3b) 중개사별 합계 (통화 변환)

실행:

python3 scripts/snaptrade_broker_totals.py --currency CAD

출력 JSON에는 선택한 통화로 표시된 중개사별 합계와 사용된 환율이 포함됩니다.

구현 참고: 가능하면 get_user_holdings를 피하세요. 보유/포지션 데이터에는 get_user_account_positions(포지션 엔드포인트)를 선호하세요. 사용자가 명시적으로 요구하는 경우에만 보유 항목의 잔액/현금을 사용하고, 그렇지 않으면 보유 항목을 호출하지 마세요.

4) 일일 보고서 예약

cron을 사용하여 snaptrade_total.py를 호출하고, 간결한 WhatsApp 메시지로 형식을 지정한 후 사용자에게 전송합니다. 총 가치만 필요합니다.

스크립트

  • scripts/snaptrade_common.py — 설정 로드/저장 + 클라이언트 생성
  • scripts/snaptrade_portal.py — 사용자 등록 + 연결 포털 링크 생성
  • scripts/snaptrade_reconnect.py — 비활성화된 연결을 위한 재연결 링크 생성
  • scripts/snaptrade_brokers.py — 이 클라이언트에 허용된 중개사 목록
  • scripts/snaptrade_order.py — 선택적 모니터링과 함께 매수/매도 주문 실행(시장가/지정가)
  • scripts/snaptrade_watch_order.py — 체결 여부를 위해 ID로 기존 주문 모니터링
  • scripts/snaptrade_total.py — 모든 계좌의 총 가치 계산
  • scripts/snaptrade_broker_totals.py — 환율 변환이 포함된 중개사별 합계

참고

  • 요청 서명은 consumer_key를 사용하는 request_after_hook을 통해 SDK에서 처리됩니다.
  • 총 가치는 보유 항목에서 각 계좌의 account.balance.total을 합산하여 계산됩니다. 이렇게 하면 계좌가 추가되거나 제거될 때 오류를 방지할 수 있습니다.
  • 여러 통화가 있는 경우 스크립트는 첫 번째로 발견된 통화를 사용합니다.
  • 비밀 정보는 chmod 600 권한으로 로컬 설정 파일에 보관하세요.

Individual skills in this repo

This repo contains 13 individual skills — each has its own dedicated page.

baneeishaque/ljt-520_openclaw-backup

Complete investment portfolio risk management system. Analyze positions, calculate risk metrics, stress test scenarios, optimize allocations, and generate institutional-grade risk reports — all without external APIs.

baneeishaque/ljt-520_openclaw-backup

Balance tracking, order overview, and market data across exchanges using OpenMM.

baneeishaque/ljt-520_openclaw-backup

Balance tracking, order overview, and market data across exchanges using OpenMM.

baneeishaque/ljt-520_openclaw-backup

An investment portfolio tracker that runs entirely locally. All data stays in ~/.portfolio-tracker/.

baneeishaque/ljt-520_openclaw-backup

Discover and register autonomous AI agents. Use when: browsing the agent registry, submitting an agent for verification, or embedding agent badges. NOT for: general web search or agent capability analysis.

baneeishaque/ljt-520_openclaw-backup

Query land ownership, leases, landlord info, and land payments. Write operations for payment management and lease renewals.

baneeishaque/ljt-520_openclaw-backup

Build high-converting landing pages and product sales pages using proven 10-section conversion frameworks. Includes Hero → Social Proof → Benefits → CTA flow for both lead capture and e-commerce pages.

baneeishaque/ljt-520_openclaw-backup

Generate complete, responsive HTML landing pages from a product name, tagline, and description. Clean CSS, mobile-ready, with hero, features, CTA, and footer sections.

baneeishaque/ljt-520_openclaw-backup

Optimize conversion pages for paid traffic from Meta (Facebook/Instagram), Google Ads, TikTok Ads, YouTube Ads, Amazon Ads, and Shopify Ads journeys.

baneeishaque/ljt-520_openclaw-backup

Perform a structured conversion rate optimization (CRO) audit of a landing page. Use when a user shares a landing page URL, pastes their page copy, describes their page content, or uploads a screenshot and asks for a conversion audit, CRO review, conversion analysis, landing page feedback, or wants to know why their page isn't converting. Produces a scored 8-factor audit (0–80 total), prioritized fix list with quick wins and strategic recommendations, and an executive summary. Covers: headline clarity, supporting copy, social proof, CTA effectiveness, visual hierarchy, trust signals, mobile/speed signals, and offer clarity.

baneeishaque/ljt-520_openclaw-backup

Generate landing page content from PRD — hero section, features, A/B headline variants, CTA, and SEO meta tags. Use when user says "create landing page", "write landing copy", "hero section", "A/B headlines", or "landing content". Can scaffold actual pages for astro-static. Do NOT use for SEO auditing (use /seo-audit).

baneeishaque/ljt-520_openclaw-backup

Build high-converting landing pages with proven structure, persuasive copy, and conversion optimization.

baneeishaque/ljt-520_openclaw-backup

Track a crypto portfolio across Binance, Hyperliquid, and Polymarket. Calculates NAV, unrealized P&L, daily drawdown, win rate, and equity curve. Use when you need portfolio tracking, NAV calculation, drawdown monitoring, or multi-venue position management.

관련 스킬