• EXECUTION
  • STRATEGY
  • CONTROL
  • LOGS

How to execute stock and crypto trades with your AI

Connect Alpaca Trading to your AI client to move from analysis to execution. Once connected, your agent handles the order placement for you.

Ask AI about this page

Short answer

How can I trade stocks and crypto using my AI?

You use the create_order tool to send market, limit, or stop orders directly to Alpaca. Your agent translates your natural language instructions into specific trade executions. You'll see exactly how the agent handles these requests below.

Trading outcomes

What your trades accomplish

The agent turns your chat commands into active market orders.

EXECUTION

Orders go live

The AI uses create_order to send your request to the market. You get confirmation once the order is placed.

STRATEGY

Automated logic

Your agent interprets complex conditions like stop losses or limit prices. It converts these rules into valid order parameters.

CONTROL

Human oversight

The AI handles the technical submission, but you decide when to pull the trigger. You remain the final decision maker for every trade.

LOGS

Trade history

Every action taken by the agent is recorded. You can review what was executed and when through your trading account.

The workflow

What your AI does when a trade is requested.

The agent acts as the bridge between your intent and the Alpaca API.

  1. Interpret intent

    Your agent parses your message to identify the ticker, quantity, and order type. It extracts the specific price targets you mention.

    create_order
  2. Format the order

    The agent organizes the trade details into the exact structure required by the API. It ensures the order type matches your request.

    create_order
  3. Submit to market

    The agent sends the finalized order to Alpaca. This step moves the trade from a chat message to a live market instruction.

    create_order
  4. Confirm execution

    The agent receives the response from the trade request. It tells you whether the order was accepted or if it failed.

    create_order

Try it

Copy these to start.

Use these prompts to trigger your first trades.

Starting points

Swap out the tickers and amounts for the specific assets you want to trade.

Alpaca Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_3TFNLCGM5eDHtufjjD8buntnlcQ4hZIkcBxwA1HE/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Alpaca capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "alpaca-trading-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_3TFNLCGM5eDHtufjjD8buntnlcQ4hZIkcBxwA1HE/mcp"
    }
  }
}
Copy into chat04
  • Buy 10 shares of NVDA at the current market price.

  • Place a limit order for 5 units of BTC at $60,000.

  • Set a stop order for my AAPL position at $185.

  • Execute a market buy for 50 shares of TSLA.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Alpaca Trading once, then ask.

Follow the link to link your account. Your credentials stay encrypted and secure on our side.

Connect Alpaca Trading to your AI

FAQ

How the trading task behaves

  • 01

    Can the AI execute trades without my permission?

    No. The AI only executes trades when you explicitly give it a command in the chat.

  • 02

    Can the AI manage my account settings?

    No. The current tools only allow for order placement via create_order. It cannot change your password or account profile.

  • 03

    What kind of orders can it place?

    It can place market, limit, and stop orders.

  • 04

    Does the AI handle the actual money transfer?

    No. The AI interacts with your existing Alpaca account. The funds and the brokerage relationship stay entirely with Alpaca.

  • 05

    Can the AI cancel an order I already placed?

    No. The available tools are limited to creating orders.

  • More questions about Alpaca Trading? The Connector page answers them. See everything the Alpaca Trading Connector can do

Connect Alpaca to Claude, Cursor, ChatGPT & more