Skip to main content
Glama
alpacahq

alpaca-mcp-server

Official
by alpacahq

Place Option Order

place_option_order
Destructive

Place options orders for single or multiple legs, specifying contract quantity, side, and limit or market price. Set position intent and idempotency key to manage openings, closings, and retries.

Instructions

Place an options order (single-leg or multi-leg).

For single-leg orders, provide symbol, side, and qty. For multi-leg orders, provide qty, legs, and optionally order_class="mleg" (auto-inferred). Symbol and side on the parent are not needed for multi-leg.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qtyYesNumber of contracts. Required for both single-leg and multi-leg orders. For multi-leg, this is the strategy multiplier — each leg's ratio_qty is scaled by this value (e.g., qty="10" with ratio_qty="2" = 20 contracts for that leg).
legsNoList of leg dicts for multi-leg orders (max 4). Each leg requires "symbol" and "ratio_qty" (string). Optional per-leg fields: "side" ("buy" or "sell") and "position_intent".
sideNo"buy" or "sell". Required for single-leg.
typeNo"market" or "limit".market
symbolNoOCC option symbol (e.g., "AAPL250321C00150000"). Required for single-leg.
limit_priceNoRequired for limit orders. For multi-leg, this is the net debit/credit (positive = debit/cost, negative = credit/proceeds).
order_classNoSet to "mleg" for multi-leg orders. Automatically inferred when legs are provided.
time_in_forceNo"day" only. Options do not support other values.day
client_order_idNoUnique idempotency key. If the request times out, you can safely retry with the same value — the API will reject duplicates. Recommended for every order.
position_intentNo"buy_to_open", "buy_to_close", "sell_to_open", or "sell_to_close". Clarifies whether the trade opens or closes a position. Optional but recommended.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv2.3.2
    • addedInput schema / properties / client_order_id / description
      Added value: +"Unique idempotency key. If the request times out,\n             you can safely retry with the same value — the API\n             will reject duplicates. Recommended for every order."
    • addedInput schema / properties / legs / description
      Added value: +"List of leg dicts for multi-leg orders (max 4). Each leg\n  requires \"symbol\" and \"ratio_qty\" (string). Optional\n  per-leg fields: \"side\" (\"buy\" or \"sell\") and\n  \"position_intent\"."
    • addedInput schema / properties / limit_price / description
      Added value: +"Required for limit orders. For multi-leg, this is\n         the net debit/credit (positive = debit/cost,\n         negative = credit/proceeds)."
    • addedInput schema / properties / order_class / description
      Added value: +"Set to \"mleg\" for multi-leg orders. Automatically\n         inferred when legs are provided."
    • addedInput schema / properties / position_intent / description
      Added value: +"\"buy_to_open\", \"buy_to_close\", \"sell_to_open\",\n             or \"sell_to_close\". Clarifies whether the trade\n             opens or closes a position. Optional but\n             recommended."
    • addedInput schema / properties / qty / description
      Added value: +"Number of contracts. Required for both single-leg and\n multi-leg orders. For multi-leg, this is the strategy\n multiplier — each leg's ratio_qty is scaled by this\n value (e.g., qty=\"10\" with ratio_qty=\"2\" = 20\n contracts for that leg)."
    • addedInput schema / properties / side / description
      Added value: +"\"buy\" or \"sell\". Required for single-leg."
    • addedInput schema / properties / symbol / description
      Added value: +"OCC option symbol (e.g., \"AAPL250321C00150000\").\n    Required for single-leg."
    • addedInput schema / properties / time_in_force / description
      Added value: +"\"day\" only. Options do not support other\n           values."
    • addedInput schema / properties / type / description
      Added value: +"\"market\" or \"limit\"."
  2. Addedv2.0.0

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already provide the core behavioral profile: readOnlyHint=false and destructiveHint=true. The description adds some useful behavior, such as the auto-inference of order_class='mleg' and that symbol/side are unnecessary on the parent for multi-leg. But it does not disclose execution traits like market vs. limit default behavior, possibility of rejection, or financial risk beyond what destructiveHint implies. It adds modest value without contradicting annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is four short, purposeful segments: a one-sentence purpose statement, then a clear bullet-like breakdown for each order type, and a final negation about unneeded fields. Every sentence earns its place; there is zero filler or repetition. It is front-loaded with the tool's main function and compactly conveys the critical branching logic.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (10 parameters, multi-leg structures, market vs. limit types), the description covers the two essential order modes and their required parameters. The rich schema handles per-parameter details like limit_price, time_in_force, and client_order_id, and an output schema exists proportional to the task. The only gap is that the description does not mention the market/limit distinction or position_intent context, but these are well documented in the schema, so the overall picture is complete enough.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3 nominal. The description goes beyond the schema by explicitly tying parameters to usage modes: symbol/side/qty for single-leg, and qty/legs/order_class for multi-leg. This grouping adds relational meaning that the flat schema alone does not convey, making it genuinely helpful. It earns a 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a direct statement, 'Place an options order (single-leg or multi-leg)', which names a specific verb, resource, and scope. It immediately differentiates from sibling tools like place_stock_order and place_crypto_order by specifying options, and it further distinguishes between single-leg and multi-leg variants. No ambiguity about what this tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit branch-based guidance: for single-leg orders, 'provide symbol, side, and qty'; for multi-leg orders, 'provide qty, legs, and optionally order_class="mleg"'. It also clarifies that symbol and side are not needed for multi-leg. However, it does not explicitly name alternative tools or state when to choose this over place_stock_order or place_crypto_order, so it stops short of a perfect 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools