Skip to main content
Glama

Alpaca Trading MCP Server

by laukikk

알파카 트레이딩 MCP 서버

Alpaca 거래 API에 대한 인터페이스를 제공하는 MCP(모델 컨텍스트 프로토콜) 서버로, 이를 통해 주식 및 암호화폐 포트폴리오를 관리하고, 거래를 하고, 시장 데이터에 액세스할 수 있습니다.

특징

  • 계정 관리 : 계정 세부 정보, 잔액 및 포트폴리오 상태 보기
  • 거래 : 시장가, 지정가, 정지가, 정지가-제한가 주문을 넣습니다.
  • 포트폴리오 관리 : 포지션 보기, 성과 계산, 포지션 마감
  • 시장 데이터 : 실시간 견적 및 과거 가격 데이터에 액세스하세요
  • 자산 정보 : 거래 가능한 자산에 대한 세부 정보를 얻으세요

설치

  1. 이 저장소를 복제하세요
  2. 종속성 설치:

지엑스피1

또는 uv를 사용하면:

uv pip install -e .

구성

  1. .env.example 파일을 .env 로 복사합니다.
cp .env.example .env
  1. Alpaca Paper Trading API 자격 증명을 .env 파일에 추가합니다.
ALPACA_PAPER_API_KEY = "your-api-key" ALPACA_PAPER_API_SECRET = "your-api-secret"

이러한 자격 증명은 Alpaca 에 계정을 생성하여 얻을 수 있습니다.

용법

MCP 서버를 실행합니다.

python src/server.py

서버가 시작되고 MCP 클라이언트가 연결할 수 있게 됩니다.

사용 가능한 리소스

서버는 다음과 같은 리소스를 제공합니다.

  • account://info - 현재 계좌 정보 가져오기
  • positions://all - 현재 모든 위치 가져오기
  • positions://{symbol} - 특정 심볼에 대한 위치 세부 정보를 가져옵니다.
  • orders://recent/{limit} - 지정된 제한을 적용한 최근 주문을 가져옵니다.
  • market://{symbol}/quote - 특정 심볼에 대한 현재 시장 견적을 가져옵니다.
  • market://{symbol}/bars/{timeframe} - 지정된 기간 동안 특정 심볼에 대한 과거 가격 막대를 가져옵니다.
  • assets://list - Alpaca에서 거래 가능한 자산 목록
  • assets://{symbol} - 심볼별로 자세한 자산 정보를 가져옵니다.

사용 가능한 도구

서버는 다음과 같은 도구를 제공합니다.

  • get_account_info_tool - 현재 계좌 정보 가져오기
  • place_market_order - 주식을 매수 또는 매도하기 위한 시장 주문을 합니다.
  • place_limit_order - 지정된 가격으로 주식을 매수 또는 매도하기 위한 제한 주문을 합니다.
  • place_stop_order - 지정된 가격에 도달하면 주식을 매수 또는 매도하기 위한 정지 주문을 넣습니다.
  • place_stop_limit_order - 정지 주문과 제한 주문 기능을 결합한 정지-제한 주문을 합니다.
  • cancel_order - ID로 열린 주문을 취소합니다.
  • close_position - 특정 심볼에 대한 오픈 포지션을 닫습니다.
  • get_portfolio_summary - 포트폴리오의 포괄적인 요약을 받으세요
-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Alpaca 거래 API와 인터페이스하는 모델 컨텍스트 프로토콜 서버로, 이를 통해 사용자는 자연어 상호작용을 통해 포트폴리오를 관리하고, 거래를 하고, 시장 데이터에 접근할 수 있습니다.

  1. 특징
    1. 설치
      1. 구성
        1. 용법
          1. 사용 가능한 리소스
            1. 사용 가능한 도구

              Related MCP Servers

              • A
                security
                A
                license
                A
                quality
                A Model Context Protocol server that provides read-only access to Bybit's cryptocurrency exchange API, allowing users to query real-time cryptocurrency data using natural language.
                Last updated -
                9
                14
                9
                TypeScript
                MIT License
              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server enabling LLMs like Claude to interact with the Alpaca trading API through natural language for stock trading, checking positions, fetching market data, and managing your account.
                Last updated -
                Python
                MIT License
              • A
                security
                F
                license
                A
                quality
                A Model Context Protocol server that enables AI assistants to interact with the Deriv trading API, providing access to active trading symbols and account balance information.
                Last updated -
                2
                Python
                • Apple
              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server that enables interaction with the Tradovate API for managing trading contracts, positions, orders, and accounts.
                Last updated -
                JavaScript
                MIT License

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/laukikk/alpaca-mcp'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server