Overview
Submits an option order.
Description

This API places an option order. It's recommended to preview the order with Preview Option Order before placing it. Once it has been placed, the order can be viewed with the List Orders API.

Throughout this documentation, the terms "submit" and "place" refer to entering an order into the system to be executed. The actual execution of the order depends on a variety of circumstances. To receive timely notification of the order status, use the streaming order status API, detailed elsewhere in this documentation.

The related Preview Option Order API returns a preview of an order that includes estimated order cost and a unique preview ID. It is possible to place an order without first previewing it, but a typical order workflow lets the user preview the order before submitting it. Be aware that, once an order has been previewed, placing the order requires that it include the preview ID and the same parameters that were used in the preview.

URL
https://etws.etrade.com/order/rest/placeoptionorder
HTTP Method: POST

Since this is a POST request, the parameters are included in the request as XML or JSON.

Request Parameters
Parameter Type Required? Description
accountId integer required Numeric account ID
symbolInfo complex required Container for option identifier
symbol string required The market symbol for the underlier.
callOrPut enum required Option type - specifies either CALL or PUT
strikePrice double required The strike price for this option
expirationYear integer required The 4-digit year the option will expire
expirationMonth integer required The month (1-12) the option will expire
expirationDay integer required The day (1-31) the option will expire
orderAction enum required The action that the broker is requested to perform. Possible values are:
• BUY_OPEN
• SELL_OPEN
• BUY_CLOSE
• SELL_CLOSE
priceType enum required The type of pricing specified in the equity order. Possible values are:
• MARKET
• LIMIT
• STOP
• STOP_LIMIT
If STOP, requires a stopPrice. If LIMIT, requires a limitPrice. If STOP_LIMIT, requires a stopLimitPrice.
limitPrice double conditional The highest price at which to buy or the lowest price at which to sell. Required if priceType is STOP or STOP_LIMIT.
stopPrice double conditional The price at which to buy or sell if specified in a stop order. Required if priceType is STOP.
stopLimitPrice double conditional The designated boundary price for a stop-limit order. Required if priceType is STOP_LIMIT.
allOrNone boolean optional If TRUE, the transactions specified in the order must be executed all at once, or not at all. Default is FALSE.
quantity integer required The number of shares to buy or sell
reserveOrder boolean optional If TRUE, publicly displays only a limited number of shares (the reserve quantity), instead of the entire order, to avoid influencing other traders. Default is FALSE. If TRUE, must also specify the reserveQuantity.
reserveQuantity integer conditional The number of shares displayed for a reserve order. Required if reserveOrder is TRUE.
orderTerm enum required Specifies the term for which the order is in effect. Possible values are:
• GOOD_UNTIL_CANCEL
• GOOD_FOR_DAY
• IMMEDIATE_OR_CANCEL (only for limit orders)
• FILL_OR_KILL (only for limit orders)
routingDestination enum optional The exchange where the order should be executed. Users may want to specify this if they believe they can get a better order fill at a specific exchange, rather than relying on the automatic order routing system. Possible values are:
• AUTO (default)
• ARCA
• NSDQ
• NYSE
previewId long conditional If the order was not previewed, this parameter should not be specified. If the order was previewed, this parameter must specify the numeric preview ID from the preview, and other parameters of this request must match the parameters of the preview.
clientOrderId string required A reference number generated by the developer. Used to ensure that a duplicate order is not being submitted. It can be any value of 20 alphanumeric characters or less, but must be unique within this account. It does not appear in any API responses.
routingDestination enum optional The exchange where the order should be executed. Possible values are:
• AUTO (default)
• ARCA
• NSDQ
• NYSE
Response Properties
Property Type Description
accountId integer Numeric account ID
allOrNone boolean If TRUE, the transactions specified in the order must be executed all at once, or not at all.
estimatedCommission double The cost billed to the user to perform the requested action
estimatedTotalAmount double The cost or proceeds, including broker commission, resulting from the requested action
messageList complex Container for messages describing the result of the action
message complex Container for a result message
   msgDesc string Text of the result message, indicating order status, success or failure, additional requirements that must be met before placing the order, etc. Applications typically display this message to the user, which may result in further user action.
   msgCode integer Standard numeric code of the result message. Refer to the Error Messages documentation for examples. May optionally be displayed to the user, but is primarily intended for internal use.
orderNum integer Numeric order ID
orderTime long The time the order was submitted
optionSymbol complex Container for the option identifier
symbol string The market symbol for the underlier
callOrPut string Option type - specifies either CALL or PUT
strikePrice double The strike price for this option
expirationYear integer The 4-digit year the option will expire
expirationMonth integer The month (1-12) the option will expire
expirationDay integer The day (1-31) the option will expire
quantity integer The number of shares to buy or sell
reserveOrder boolean If TRUE, this is a reserve order - meaning that only a limited number of shares will be publicly displayed, instead of the entire order, to avoid influencing other traders.
reserveQuantity integer The number of shares to be publicly displayed if this is a reserve order
orderTerm string Specifies the term for which the order is in effect. Possible values are:
• GOOD_UNTIL_CANCEL
• GOOD_FOR_DAY
• IMMEDIATE_OR_CANCEL (only for limit orders)
• FILL_OR_KILL (only for limit orders)
orderAction string The action that the broker is requested to perform. Possible values are:
• BUY_OPEN
• SELL_OPEN
• BUY_CLOSE
• SELL_CLOSE
priceType string The type of pricing. Possible values are:
• MARKET
• LIMIT
• STOP
• STOP_LIMIT
limitPrice double The highest price at which to buy or the lowest price at which to sell if specified in a limit order. Returned if priceType is LIMIT.
stopPrice double The price at which a stock is to be bought or sold if specified in a stop order. Returned if priceType is STOP.
stopLimitPrice double The designated boundary price for a stop-limit order. Returned if priceType is STOP_LIMIT.
routingDestination string The exchange where the order should be executed. Users may want to specify this if they believe they can get a better order fill at a specific exchange, rather than relying on the automatic order routing system. Possible values are:
• AUTO
• ARCA
• NSDQ
• NYSE
Sample Request
Request URL
POST https://etwssandbox.etrade.com/order/sandbox/rest/placeoptionorder.json
Request Parameters - XML
<PlaceOptionOrder xmlns="http://order.etws.etrade.com">
  <OptionOrderRequest>
    <accountId>83405188</accountId>
    <clientOrderId>259</clientOrderId>
    <limitPrice>10</limitPrice>
    <previewId></previewId>
    <stopPrice></stopPrice>
    <stopLimitPrice></stopLimitPrice>
    <allOrNone></allOrNone>
    <quantity>1</quantity>
    <reserveOrder></reserveOrder>
    <reserveQuantity></reserveQuantity>
    <symbolInfo>
      <symbol>IBM</symbol>
      <callOrPut>CALL</callOrPut>
      <strikePrice>115</strikePrice>
      <expirationYear>2010</expirationYear>
      <expirationMonth>4</expirationMonth>
      <expirationDay>17</expirationDay>
    </symbolInfo>
    <orderAction>BUY_OPEN</orderAction>
    <priceType>LIMIT</priceType>
    <routingDestination></routingDestination>
    <marketSession></marketSession>
    <orderTerm>GOOD_FOR_DAY</orderTerm>
  </OptionOrderRequest>
</PlaceOptionOrder>
Request Parameters - JSON
{
  "PlaceOptionOrder": {
    "-xmlns": "http://order.etws.etrade.com",
    "OptionOrderRequest": {
      "accountId": "83405188",
      "clientOrderId": "259",
      "limitPrice": "10",
      "quantity": "1",
      "symbolInfo": {
        "symbol": "IBM",
        "callOrPut": "CALL",
        "strikePrice": "115",
        "expirationYear": "2010",
        "expirationMonth": "4",
        "expirationDay": "17"
      },
      "orderAction": "BUY_OPEN",
      "priceType": "LIMIT",
      "orderTerm": "GOOD_FOR_DAY"
    }
  }
}
Sample Response - XML
<PlaceOptionOrderResponse>
  <optionOrderResponse>
    <accountId>83405188</accountId>
    <allOrNone>false</allOrNone>
    <estimatedCommission>8.74</estimatedCommission>
    <estimatedTotalAmount>1008.78</estimatedTotalAmount>
    <messageList>
      <message>
        <msgDesc>Your order was successfully entered during market hours.</msgDesc>
        <msgCode>1026</msgCode>
      </message>
    </messageList>
    <orderNum>257</orderNum>
    <orderTime>1269430628956</orderTime>
    <quantity>1</quantity>
    <reserveOrder>false</reserveOrder>
    <reserveQuantity>0</reserveQuantity>
    <orderTerm>GOOD_FOR_DAY</orderTerm>
    <limitPrice>10</limitPrice>
    <optionSymbol>
      <symbol>IBM</symbol>
      <callOrPut>CALL</callOrPut>
      <strikePrice>115.000000</strikePrice>
      <expirationYear>2010</expirationYear>
      <expirationMonth>4</expirationMonth>
      <expirationDay>17</expirationDay>
    </optionSymbol>
    <orderAction>BUY_OPEN</orderAction>
    <priceType>LIMIT</priceType>
  </optionOrderResponse>
</PlaceOptionOrderResponse>
Sample response – JSON
 {
  "PlaceOptionOrderResponse": {
    "optionOrderResponse": {
      "accountId": "83405188",
      "allOrNone": "FALSE",
      "estimatedCommission": "8.74",
      "estimatedTotalAmount": "1008.78",
      "messageList": {
        "message": {
          "msgDesc": "Your order was successfully entered during market hours.",
          "msgCode": "1026"
        }
      },
      "orderNum": "257",
      "orderTime": "1269430628956",
      "quantity": "1",
      "reserveOrder": "FALSE",
      "reserveQuantity": "0",
      "orderTerm": "GOOD_FOR_DAY",
      "limitPrice": "10",
      "optionSymbol": {
        "symbol": "IBM",
        "callOrPut": "CALL",
        "strikePrice": "115.000000",
        "expirationYear": "2010",
        "expirationMonth": "4",
        "expirationDay": "17"
      },
      "orderAction": "BUY_OPEN",
      "priceType": "LIMIT"
    }
  }
}
Notes
  • For equity and option orders, types STOP and STOP LIMIT represent the "Stop On Quote" and "Stop Limit on Quote" price types offered by E*TRADE, respectively.
  • For equity orders, use limit price for type LIMIT, stop price for type STOP, and both prices for type STOP_LIMIT. For option orders, use limit limit price for type LIMIT, stop price for type STOP, and stop-limit price for type STOP_LIMIT.
  • The clientOrderID element is used to ensure that a duplicate order is not inadvertently submitted. Within a given account, clientOrderID must be unique for every order (regardless of which APIs are used).
Sample use cases
Some possible use-cases and workflows are described below.
Purpose Workflow Related APIs
Place order On the order screen, enable the menu option to place an order only when displaying the response from the preview API. In addition to the order preview, show account ID, name, and balances, as well as product fundamentals, intraday, and current (streaming) price info. Confirm that the user account is approved for option trading. Check market rules for option orders and display warnings if needed. Display response. Get Quote, List Accounts, Get Account Balance, Streaming API
Display order status When placing or changing an order, register for push notifications on the account. Have a listener process on each page appropriately - for instance, be prepared to display order status updates on the completed order display, order list display, or account display. See Notifications and Streaming API documentation for details.
Sandbox Samples

The following is an example of a request and response in the sandbox environment. Note that the HTTP POST method is used.

Request URL
POST https://etwssandbox.etrade.com/order/sandbox/rest/placeoptionorder
Request Parameters - XML
 <PlaceOptionOrder xmlns="http://order.etws.etrade.com">
  <OptionOrderRequest>
    <stopLimitPrice></stopLimitPrice>
    <symbolInfo>
      <symbol>AAPL</symbol>
      <callOrPut>CALL</callOrPut>
      <strikePrice>585</strikePrice>
      <expirationYear>2012</expirationYear>
      <expirationMonth>07</expirationMonth>
      <expirationDay>21</expirationDay>
    </symbolInfo>
    <orderAction>BUY_OPEN</orderAction>
    <priceType>LIMIT</priceType>
    <routingDestination></routingDestination>
    <marketSession>REGULAR</marketSession>
    <orderTerm>GOOD_FOR_DAY</orderTerm>
    <allOrNone></allOrNone>
    <quantity>4</quantity>
    <reserveOrder></reserveOrder>
    <reserveQuantity></reserveQuantity>
    <accountId>83550325</accountId>
    <clientOrderId>12345</clientOrderId>
    <limitPrice>3</limitPrice>
    <previewId></previewId>
    <stopPrice></stopPrice>
  </OptionOrderRequest>
</PlaceOptionOrder>
Response
<PlaceOptionOrderResponse>
  <optionOrderResponse>
    <accountId>83405188</accountId>
    <allOrNone>false</allOrNone>
    <estimatedCommission>8</estimatedCommission>
    <estimatedTotalAmount>12008.056</estimatedTotalAmount>
    <messageList>
      <message>
        <msgDesc>Your order was successfully entered during market hours.</msgDesc>
        <msgCode>1026</msgCode>
      </message>
    </messageList>
    <orderNum>1260</orderNum>
    <orderTime>1267042264205</orderTime>
    <quantity>4</quantity>
    <reserveOrder>false</reserveOrder>
    <reserveQuantity>0</reserveQuantity>
    <orderTerm>FILL_OR_KILL</orderTerm>
    <limitPrice>30</limitPrice>
    <optionSymbol>
      <symbol>MSFT</symbol>
      <callOrPut>CALL</callOrPut>
      <strikePrice>12.500000</strikePrice>
      <expirationYear>2010</expirationYear>
      <expirationMonth>4</expirationMonth>
      <expirationDay>17</expirationDay>
    </optionSymbol>
    <orderAction>BUY_OPEN</orderAction>
    <priceType>LIMIT</priceType>
  </optionOrderResponse>
</PlaceOptionOrderResponse>
Related APIs
PLEASE READ THE IMPORTANT DISCLOSURES BELOW

By using E*TRADE API ("API") and accepting the terms of the Application Programming Interface License Agreement and the Application Programming Interface User Agreement, you agree that API may employ security policies, procedures and systems of Third Party providers which may or may not be less stringent and secure than the policies, procedures and systems of E*TRADE Securities LLC ("E*TRADE") or its affiliates. Material provided on API may have been produced by independent third parties not affiliated or endorsed by E*TRADE or its affiliates ("Third Party"). To the extent that API or Third Party providers express opinions or make recommendations, you understand that such opinions or recommendations are expressed by the Third Party provider and are not the opinions or recommendations of E*TRADE or its affiliates. E*TRADE is not responsible for the accuracy of market data displayed on API or made available by Third Party providers. There may be latency between the time an order (or other information) is submitted from API and the time the order is received by E*TRADE. The E*TRADE Two Second Execution Guarantee or any similar guarantee does not apply for orders placed through API and Third Party provider web sites. The E*TRADE CompleteTM Protection Guarantee does not apply. Orders created and submitted through API are not vetted until they are received by E*TRADE. It is possible that E*TRADE may reject an order placed through API. Please see the Application Programming Interface License Agreement and the Application Programming Interface User Agreement for more information.


The E*TRADE family of companies provides financial services including trading, investing, and related banking products and services to retail investors.


Securities products and services offered by E*TRADE Securities LLC, Member FINRA/SIPC.


System response and account access times may vary due to a variety of factors, including trading volumes, market conditions, system performance, and other factors.