{"retail-trader-api-production--trader-api--individual--documentation":{"role":"asset","identifier":"6006","uuid":"6282c09d-6f83-43a0-b43c-6a8adcef12bd","url_alias":"RETAIL-TRADER-API-PRODUCTION--TRADER-API--INDIVIDUAL--DOCUMENTATION","published_date":"2025-10-30T14:39:41+00:00","language":"en","moderation_state":"published","title":"RETAIL-TRADER-API-PRODUCTION--TRADER-API--INDIVIDUAL--DOCUMENTATION","nid":"6006","body":"<div><h1>Schwab &amp; API Security</h1><p>Schwab is committed to providing the highest standards of digital security and privacy for our Clients. Using the OAuth 2 authorization framework, Schwab is able to provide secure, delegated access over HTTPS to devices, APIs, servers and applications using access tokens in place of Client credentials.</p><p>&nbsp;</p><div>OAuth 2 Overview</div><p>Schwab employs the OAuth 2 protocol to secure services from unauthorized access. OAuth 2 is the second iteration of this IETF traditional client-server authentication framework and a current standard for RESTful API security. Our implementation adheres to current IETF standards. This open standard framework operates over HTTPS effectively replacing <em>username+password</em> with an encrypted token to access <strong>User</strong> data. Official IETF RFC articles may be found here:</p><ul><li>OAuth 2 - <a href=\"https://tools.ietf.org/html/rfc6749\">https://tools.ietf.org/html/rfc6749</a></li><li>Bearer Token - <a href=\"https://tools.ietf.org/html/rfc6750\">https://tools.ietf.org/html/rfc6750</a></li></ul><p><strong>Bearer</strong> tokens are used for the OAuth <strong>authorization_code</strong> Grant Type</p><p>&nbsp;</p><h2>Three Legged Workflow</h2><p>Three Legged OAuth is a workflow <em>(Flow)</em> that allows Users to grant an <strong>App</strong> permission to access to <strong>Protected Resources</strong>, such as their account information, without disclosing credentials. OAuth directs Users to Schwab's Login Micro Site (<strong>LMS</strong>) to perform the Consent and Grant (<strong>CAG</strong>) process. Here, the User may select and authorize the accounts they wish to be shared with the Third-Party Application <em>(Application)</em>. Upon completion of the CAG process, the User is redirected back to the Application.</p><h3>Key Terms</h3><p>&nbsp;</p><h4>•&nbsp;App</h4><p>OAuth registration is managed by Apps on the Dev Portal. Here, these Apps are owned by a Company and used internally to manage Application access to Protected Resource data. App elements and attributes include:</p><p>&nbsp;</p><p class=\"sdps-p-left_large\"><em><strong>•&nbsp;Client ID &amp; Client Secret</strong></em>&nbsp;<br>These string values are unique to an App and are generated when it gets approved and registered with the OAuth server. When an App is authorized using the OAuth Flow, these elements help to identify and control what access that App has to Protected Resources data going forward. Permissions to use access an API Product is also tied to an App and its corresponding Client ID. The Client Secret will never be exposed outside of the OAuth Flow and App management in the Dev Portal. Client Secret values should always be kept confidential and stored securely by an Application.</p><p class=\"sdps-p-left_large\"><em><strong>•&nbsp;Callback URL</strong></em>&nbsp;<br>OAuth uses the Callback URL (<em>\"redirect_uri\"</em>) to redirect the User and OAuth Flow back to the Application when necessary. This will be used as the URL \"host\" of that Application's landing page.</p><ul class=\"sdps-p-left_xxx-large\"><li>Callback URLs must be HTTPS.</li><li>Multiple URLs are supported by separating each with a comma.</li><li>There is a 255 character limit on this field including all URLs listed.</li><li>Local host Callback URL can be: <a href=\"https://127.0.0.1\">https://127.0.0.1</a></li></ul><p>&nbsp;</p><p class=\"sdps-p-left_large\"><em><strong>•&nbsp;Display Name</strong></em>&nbsp;<br>The Display Name is established when the App is created in the Dev Portal and shown on screen to the User performing CAG activities. This helps to ensure that consent is granted to the appropriate App.</p><p class=\"sdps-p-left_large\"><em><strong>•&nbsp;Environment</strong></em>&nbsp;<br>Apps may exist in either Sandbox (test data access) or the Production environment (live data access). See the \"Creating an App\" and \"Promoting an App to Production\" sections for more information.<br>- The Trader API Sandbox environments will be available later this year.</p><p class=\"sdps-p-left_large\"><em><strong>•&nbsp;Product Subscription</strong></em>&nbsp;<br>Apps may only subscribe to a single API Product, for example, Trader API - Individual.</p><p>&nbsp;</p><h4>•&nbsp;Third-Party Application (<em>User-Agent /\"Application\"</em>):</h4><p>This will represent any website, stand-alone application or other HTTP platform that uses an OAuth Bearer token to access Protected Resource data on behalf of a User.&nbsp;<br><strong>Please note</strong> - this is completely different than the \"App\" as defined here.</p><p>&nbsp;</p><p>&nbsp;</p><h4>•&nbsp;CAG - Consent and Grant</h4><p>Using LMS, Schwab Users will provide their approval of Application access and select the accounts they wish to link.</p><p>&nbsp;</p><p>&nbsp;</p><h4>•&nbsp;LMS - Login Micro Site</h4><p>A website for Users to log into Schwab directly from an Application to perform CAG activities.</p><p>&nbsp;</p><p>&nbsp;</p><h4>•&nbsp;LOB - Line of Business</h4><p>Owner of an API Product or functional grouping of APIs in Schwab's Dev Portal. Examples: Data Aggregation Services, Tax Services, etc. Companies may request access to API Products owned by the LOB.</p><p>&nbsp;</p><p>&nbsp;</p><h4>•&nbsp;Roles</h4><p>IETF's OAuth 2 framework defines four Roles, such as the Resource Owner (User), referenced throughout this OAuth documentation.</p><p>&nbsp;</p><p>&nbsp;</p><h4>•&nbsp;User</h4><p>User is the Protected Resource Owner that authorizes Application access to their information. User may be referenced interchangeably with: a Schwab Client, the Resource Owner, End User, or App User.&nbsp;<br>Further IETF OAuth definition of Resource Owner can be found at: <a href=\"https://tools.ietf.org/html/rfc6749#section-1.1\">https://tools.ietf.org/html/rfc6749#section-1.1</a></p><p>&nbsp;</p><p>&nbsp;</p><h4>•&nbsp;Token</h4><p>Several types of Tokens are used in OAuth 2 Flows. All Tokens are simply string values representing attributes such as scope, lifetime and other information that is used for different purposes.</p><p>&nbsp;</p><p class=\"sdps-p-left_large\"><em><strong>•&nbsp;Access Token:</strong></em>&nbsp;<br>To enhance API security, Apps will use an Access Token to access a User's Protected Resources. This is used in place of their <em>username+password</em> combination. A Trader API access token is valid for 30 minutes after creation.</p><p class=\"sdps-p-left_large\"><em><strong>•&nbsp;Bearer Token:</strong></em>&nbsp;<br>A Bearer token is the Access Token in the context of an API call for Protected Resource data. It is passed in the Authorization header as \"Bearer {access_token_value}.\"</p><p class=\"sdps-p-left_large\"><em><strong>•&nbsp;Refresh Token:</strong></em>&nbsp;<br>The Refresh Token renews access to a User's Protected Resources. This may be done before, or at any point after the current, valid <strong>access_token</strong> expires. When they do expire, the corresponding Refresh Token is used to request a new Access Token as opposed to repeating the entire Flow. This token is provided along with the initial Access Token and should be stored for later use.&nbsp;<br>A Trader API refresh token is valid for 7 days after creation. Upon expiration, a new set refresh token must be recreated using the authorization_code Grant Type authentication flow (CAG/LMS).</p><p><br><br>&nbsp;</p><h3>Three Legged Flow Entities</h3><p>The primary entities involved in the Three Legged OAuth Flow are the following:</p><ul><li><strong>Resource Owner</strong> <em>(User)</em> - Schwab Client or User that owns and grants access to Protected Resources</li><li><strong>OAuth Client</strong> <em>(App)</em> - This is the App, living in the Dev Portal. Using its Client ID and Client Secret, it requests access to Protected Resources on behalf of the User.</li><li><strong>User-Agent</strong> <em>(3rd-party application)</em> - The Resource Owner will use this application, or website, to interact with Schwab APIs and access Protected Resources</li><li><strong>Authorization Server</strong> <em>(OAuth server)</em> - OAuth server that authenticates OAuth Clients and issues Tokens</li><li><strong>Resource Server</strong> - Schwab server that hosts our Users' Protected Resources, such as financial account information</li></ul><p>&nbsp;</p><h3>OAuth Flow - Sequence Diagram</h3><p><img src=\"https://bynder.schwab.com/m/776686ca9059a239\"></p><h3>Step 1: App Authorization</h3><p>This endpoint authorizes a specific App to access to Protected Resources on behalf of the Resource Owner (User).</p><p>An Application passes the parameters of a registered App to direct the Flow to LMS. Once CAG activities are completed in LMS, an Authorization Code (\"code\") is returned in the landing URL following a redirect. The \"code\" parameter will be used in Step 2 to create the initial set of Refresh and Access Tokens. The Callback URL will be the \"host\" of this Application's landing page.</p><p><strong>Following the CAG activities:</strong></p><ul><li>An Authorization Code will be provided and can be exchanged for an Access Token in the next step.</li><li>This Access Token can be used to call API Product endpoints for Protected Resource data after rest of this Flow is completed. An Access Token is valid for 30 minutes on the Trader API.</li><li>Once a Refresh Token is invalidated or expired, the CAG activities will need to be completed again to restart the OAuth flow. A Refresh Token is valid for 7 days.</li></ul><p><strong>Request Template - Authorization URL</strong></p><p>https://api.schwabapi.com/v1/oauth/authorize?client_id={CONSUMER _KEY}&amp;redirect_uri={APP_CALLBACK_URL}</p><p><strong>Response Template - Final landing URL</strong></p><p>https://{APP_CALLBACK_URL}/?code={AUTHORIZATION_CODE_GENERATED}&amp;session={SESSION_ID}</p><p>The website will be redirected to a 404 page, but the address bar will contain \"code\" needed for the next step.</p><h3>Step 2: Access Token Creation</h3><p>POST https://api.schwabapi.com/v1/oauth/token</p><p>This first POST call to the //oauth/token endpoint exchanges the <strong>\"code\" (authorization_code)</strong>, returned above, for the initial <strong>\"access_token\"</strong>. This is used to access Protected Resources from an API Product. An Access Token is valid for 30 minutes on the Trader API.</p><p>The \"code\" within this request must be URL decoded prior to making the request. For example, this should end in '@' instead of '%40' when used in the request.</p><p><strong>\"Access Token\" - Request Example (cURL)</strong><br>&nbsp;</p><div class=\"mat-app-background\">curl -X POST https://api.schwabapi.com/v1/oauth/token \\&nbsp;<br>-H 'Authorization: Basic {BASE64_ENCODED_Client_ID:Client_Secret} \\&nbsp;<br>-H 'Content-Type: application/x-www-form-urlencoded' \\&nbsp;<br>-d 'grant_type=authorization_code&amp;code={AUTHORIZATION_CODE_VALUE}&amp;redirect_uri=https://example_url.com/callback_example'&nbsp;<br>&nbsp;</div><p>&nbsp;</p><p><strong>Response Example (body)</strong><br><strong>Example - Access Token Response</strong></p><div class=\"mat-app-background\">{&nbsp;<br>&nbsp; \"expires_in\": 1800, //Number of seconds access_token is valid for&nbsp;<br>&nbsp; \"token_type\": \"Bearer\",&nbsp;<br>&nbsp; \"scope\": \"api\",&nbsp;<br>&nbsp; \"refresh_token\": \"{REFRESH_TOKEN_HERE}\", //Valid for 7 days&nbsp;<br>&nbsp; \"access_token\": \"{ACCESS_TOKEN_HERE}\", //Valid for 30 minutes&nbsp;<br>&nbsp; \"id_token\": \"{JWT_HERE}\"&nbsp;<br>}</div><p>&nbsp;</p><p>A Trader API access token is valid for 30 minutes. A Trader API refresh token is valid for 7 days.</p><h3>Step 3: Make an API Call</h3><p>API Product calls use the following authorization header format:&nbsp;<br><strong>Authorization: Bearer {access_token}&nbsp;</strong><br>The Application supplies the access_token value after the Bearer keyword like the example below:<br><strong>Authorization: Bearer I0.kC95zyI039S-YTEw=</strong></p><h3>Step 4: Refresh an Access Token (with existing Refresh Token)</h3><p>POST https://api.schwabapi.com/v1/oauth/token</p><p>An OAuth Refresh Token functionality renews access to a Userâ€™s Protected Resources before, or soon after, the current <strong>access_token</strong> expires.</p><p><strong>\"Refresh Token\" - Request Example (cURL)</strong></p><div class=\"mat-app-background\">curl -X POST https://api.schwabapi.com/v1/oauth/token \\&nbsp;<br>-H 'Authorization: Basic {BASE64_ENCODED_Client_ID:Client_Secret} \\&nbsp;<br>-H 'Content-Type: application/x-www-form-urlencoded' \\&nbsp;<br>-d 'grant_type=refresh_token&amp;refresh_token={REFRESH_TOKEN_GENERATED_FROM_PRIOR_STEP}<br>&nbsp;</div><p><strong>Response Example (body)</strong><br><strong>Example - Refresh Token Response</strong></p><div class=\"mat-app-background\">{&nbsp;<br>&nbsp; \"expires_in\": 1800, //Number of seconds access_token is valid for&nbsp;<br>&nbsp; \"token_type\": \"Bearer\",&nbsp;<br>&nbsp; \"scope\": \"api\",&nbsp;<br>&nbsp; \"refresh_token\": \"{REFRESH_TOKEN_HERE}\", //Valid for 7 days&nbsp;<br>&nbsp; \"access_token\": \"{NEW_ACCESS_TOKEN_HERE}\",//Valid for 30 minutes&nbsp;<br>&nbsp; \"id_token\": \"{JWT_HERE}\"&nbsp;<br>}</div><p>&nbsp;</p><h3>Should I Refresh or Restart OAuth?</h3><p>The Refresh Token step (Step 4) can be executed <em>before an Access Token expires</em>. Certain conditions and edge-cases exist where your application may need to restart the OAuth Flow as opposed to attempting to use the \"Refresh Token\" step.</p><p>The Refresh Token step (Step 4) will no longer be available once a Refresh Token is expired after 7 days or invalidated (e.g., User password reset). If the refresh token is no longer valid, App Authorization (Step 1) and Access Token Creation (Step 2) must be repeated to restart the OAuth Flow.</p><h2>Place Order Samples</h2><p>Below, you will find examples specific to orders for use in the Schwab Trader API POST and PUT Order endpoints. Order entry will only be available for the assetType 'EQUIT' and 'OPTION as of this time.</p><p>Trader API applications (Individual and Commercial) are limited in the number of PUT/POST/DELETE order requests per minute per account based on the properties of the application specified during registration or follow-up process. Throttle limits for orders can be set from zero (0) to 120 requests per minute per account. Get order requests are unthrottled. Contact TraderAPI@schwab.com for further information.</p><p><strong>Options and their Symbology:</strong>&nbsp;<br>Options symbols are broken down as:&nbsp;<br>Underlying Symbol (6 characters including spaces) | Expiration (6 characters) | Call/Put (1 character) | Strike Price (5+3=8 characters)&nbsp;<br><br>Option Symbol: XYZ 210115C00050000<br>Stock Symbol: XYZ<br>Expiration: 2021/01/15<br>Type: Call<br>Strike Price: $50.00<br><br>Option Symbol: XYZ 210115C00055000<br>Stock Symbol: XYZ<br>Expiration: 2021/01/15<br>Type: Call<br>Strike Price: $55.00<br><br>Option Symbol: XYZ 210115C00062500<br>Stock Symbol: XYZ<br>Expiration: 2021/01/15<br>Type: Call<br>Strike Price: $62.50<br>&nbsp;</p><p>Instruction for EQUITY and OPTION&nbsp;<br>&nbsp;</p><table class=\"table table-bordered\"><thead><tr><th>Instruction</th><th>EQUITY (Stocks and ETFs)</th><th>Option</th></tr></thead><tbody><tr></tr><tr><td>BUY</td><td>ACCEPTED</td><td>REJECT</td></tr><tr><td>SELL</td><td>ACCEPTED</td><td>REJECT</td></tr><tr><td>BUY_TO_OPEN</td><td>REJECT</td><td>ACCEPTED</td></tr><tr><td>BUY_TO_COVER</td><td>ACCEPTED</td><td>REJECT</td></tr><tr><td>BUY_TO_CLOSE</td><td>REJECT</td><td>ACCEPTED</td></tr><tr><td>SELL_TO_OPEN</td><td>REJECT</td><td>ACCEPTED</td></tr><tr><td>SELL_SHORT</td><td>ACCEPTED</td><td>REJECT</td></tr><tr><td>SELL_TO_CLOSE</td><td>REJECT</td><td>ACCEPTED</td></tr></tbody></table><p><strong>Buy Market: Stock</strong><br>Buy 15 shares of XYZ at the Market good for the Day.<br>&nbsp;</p><div class=\"mat-app-background\">{<br>&nbsp; \"orderType\": \"MARKET\",&nbsp;<br>&nbsp; \"session\": \"NORMAL\",&nbsp;<br>&nbsp; \"duration\": \"DAY\",&nbsp;<br>&nbsp; \"orderStrategyType\": \"SINGLE\",&nbsp;<br>&nbsp; \"orderLegCollection\": [&nbsp;<br>&nbsp;&nbsp; {&nbsp;<br>&nbsp;&nbsp;&nbsp; \"instruction\": \"BUY\",&nbsp;<br>&nbsp;&nbsp;&nbsp; \"quantity\": 15,&nbsp;<br>&nbsp;&nbsp;&nbsp; \"instrument\": {&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp; \"symbol\": \"XYZ\",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp; \"assetType\": \"EQUITY\"&nbsp;<br>&nbsp;&nbsp;&nbsp; }&nbsp;<br>&nbsp;&nbsp; }&nbsp;<br>&nbsp; ]&nbsp;<br>}<br>&nbsp;</div><p>&nbsp;</p><p><strong>Buy Limit: Single Option</strong>&nbsp;<br>Buy to open 10 contracts of the XYZ March 15, 2024 $50 CALL at a Limit of $6.45 good for the Day.<br>&nbsp;</p><div class=\"mat-app-background\">{&nbsp;<br>&nbsp; \"complexOrderStrategyType\": \"NONE\",&nbsp;<br>&nbsp; \"orderType\": \"LIMIT\",&nbsp;<br>&nbsp; \"session\": \"NORMAL\",&nbsp;<br>&nbsp; \"price\": \"6.45\",&nbsp;<br>&nbsp; \"duration\": \"DAY\",&nbsp;<br>&nbsp; \"orderStrategyType\": \"SINGLE\",&nbsp;<br>&nbsp; \"orderLegCollection\": [&nbsp;<br>&nbsp;&nbsp; {&nbsp;<br>&nbsp;&nbsp;&nbsp; \"instruction\": \"BUY_TO_OPEN\",&nbsp;<br>&nbsp;&nbsp;&nbsp; \"quantity\": 10,&nbsp;<br>&nbsp;&nbsp;&nbsp; \"instrument\": {&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp; \"symbol\": \"XYZ&nbsp;&nbsp;&nbsp;240315C00500000\",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp; \"assetType\": \"OPTION\"&nbsp;<br>&nbsp;&nbsp;&nbsp; }&nbsp;<br>&nbsp;&nbsp; }&nbsp;<br>&nbsp; ]&nbsp;<br>}&nbsp;<br>&nbsp;</div><p>&nbsp;</p><p><strong>Buy Limit: Vertical Call Spread</strong><br>Buy to open 2 contracts of the XYZ March 15, 2024 $45 Put and Sell to open 2 contract of the XYZ March 15, 2024 $43 Put at a LIMIT price of $0.10 good for the Day.<br>&nbsp;</p><div class=\"mat-app-background\">{<br>&nbsp; \"orderType\": \"NET_DEBIT\",<br>&nbsp; \"session\": \"NORMAL\",<br>&nbsp; \"price\": \"0.10\",<br>&nbsp; \"duration\": \"DAY\",<br>&nbsp; \"orderStrategyType\": \"SINGLE\",<br>&nbsp; \"orderLegCollection\": [<br>&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; \"instruction\": \"BUY_TO_OPEN\",<br>&nbsp;&nbsp;&nbsp; \"quantity\": 2,<br>&nbsp;&nbsp;&nbsp; \"instrument\": {<br>&nbsp;&nbsp;&nbsp;&nbsp; \"symbol\": \"XYZ&nbsp;&nbsp;&nbsp;240315P00045000\",<br>&nbsp;&nbsp;&nbsp;&nbsp; \"assetType\": \"OPTION\"<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp; },<br>&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; \"instruction\": \"SELL_TO_OPEN\",<br>&nbsp;&nbsp;&nbsp; \"quantity\": 2,<br>&nbsp;&nbsp;&nbsp; \"instrument\": {<br>&nbsp;&nbsp;&nbsp;&nbsp; \"symbol\": \"XYZ&nbsp;&nbsp;&nbsp;240315P00043000\",<br>&nbsp;&nbsp;&nbsp; &nbsp; \"assetType\": \"OPTION\"<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp; }<br>&nbsp; ]<br>}<br>&nbsp;</div><p>&nbsp;</p><p><strong>Conditional Order: One Triggers Another</strong><br>Buy 10 shares of XYZ at a Limit price of $34.97 good for the Day. If filled, immediately submit an order to Sell 10 shares of XYZ with a Limit price of $42.03 good for the Day. Also known as 1st Trigger Sequence.<br>&nbsp;</p><div class=\"mat-app-background\">{&nbsp;<br>&nbsp; \"orderType\": \"LIMIT\",&nbsp;<br>&nbsp; \"session\": \"NORMAL\",&nbsp;<br>&nbsp; \"price\": \"34.97\",&nbsp;<br>&nbsp; \"duration\": \"DAY\",&nbsp;<br>&nbsp; \"orderStrategyType\": \"TRIGGER\",&nbsp;<br>&nbsp; \"orderLegCollection\": [&nbsp;<br>&nbsp;&nbsp; {&nbsp;<br>&nbsp;&nbsp;&nbsp; \"instruction\": \"BUY\",&nbsp;<br>&nbsp;&nbsp;&nbsp; \"quantity\": 10,&nbsp;<br>&nbsp;&nbsp;&nbsp; \"instrument\": {&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp; \"symbol\": \"XYZ\",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp; \"assetType\": \"EQUITY\"&nbsp;<br>&nbsp;&nbsp;&nbsp; }&nbsp;<br>&nbsp;&nbsp; }&nbsp;<br>&nbsp; ],&nbsp;<br>&nbsp; \"childOrderStrategies\": [&nbsp;<br>&nbsp;&nbsp; {&nbsp;<br>&nbsp;&nbsp;&nbsp; \"orderType\": \"LIMIT\",&nbsp;<br>&nbsp;&nbsp;&nbsp; \"session\": \"NORMAL\",&nbsp;<br>&nbsp;&nbsp;&nbsp; \"price\": \"42.03\",&nbsp;<br>&nbsp;&nbsp;&nbsp; \"duration\": \"DAY\",&nbsp;<br>&nbsp;&nbsp;&nbsp; \"orderStrategyType\": \"SINGLE\",&nbsp;<br>&nbsp;&nbsp;&nbsp; \"orderLegCollection\": [&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"instruction\": \"SELL\",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"quantity\": 10,&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"instrument\": {&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"symbol\": \"XYZ\",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"assetType\": \"EQUITY\"&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;<br>&nbsp;&nbsp;&nbsp; ]&nbsp;<br>&nbsp;&nbsp; }&nbsp;<br>&nbsp; ]&nbsp;<br>}<br>&nbsp;</div><p>&nbsp;</p><p><strong>Conditional Order: One Cancels Another</strong><br>Sell 2 shares of XYZ at a Limit price of $45.97 and Sell 2 shares of XYZ with a Stop Limit order where the stop price is $37.03 and limit is $37.00. Both orders are sent at the same time. If one order fills, the other order is immediately cancelled. Both orders are good for the Day. Also known as an OCO order.<br>&nbsp;</p><div class=\"mat-app-background\">{&nbsp;<br>&nbsp; \"orderStrategyType\": \"OCO\",&nbsp;<br>&nbsp; \"childOrderStrategies\": [&nbsp;<br>&nbsp;&nbsp; {&nbsp;<br>&nbsp;&nbsp;&nbsp; \"orderType\": \"LIMIT\",&nbsp;<br>&nbsp;&nbsp;&nbsp; \"session\": \"NORMAL\",&nbsp;<br>&nbsp;&nbsp;&nbsp; \"price\": \"45.97\",&nbsp;<br>&nbsp;&nbsp;&nbsp; \"duration\": \"DAY\",&nbsp;<br>&nbsp;&nbsp;&nbsp; \"orderStrategyType\": \"SINGLE\",&nbsp;<br>&nbsp;&nbsp;&nbsp; \"orderLegCollection\": [&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"instruction\": \"SELL\",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"quantity\": 2,&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"instrument\": {&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"symbol\": \"XYZ\",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"assetType\": \"EQUITY\"&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;<br>&nbsp;&nbsp;&nbsp; ]&nbsp;<br>&nbsp;&nbsp; },&nbsp;<br>&nbsp;&nbsp; {&nbsp;<br>&nbsp;&nbsp;&nbsp; \"orderType\": \"STOP_LIMIT\",&nbsp;<br>&nbsp;&nbsp;&nbsp; \"session\": \"NORMAL\",&nbsp;<br>&nbsp;&nbsp;&nbsp; \"price\": \"37.00\",&nbsp;<br>&nbsp;&nbsp;&nbsp; \"stopPrice\": \"37.03\",&nbsp;<br>&nbsp;&nbsp;&nbsp; \"duration\": \"DAY\",&nbsp;<br>&nbsp;&nbsp;&nbsp; \"orderStrategyType\": \"SINGLE\",&nbsp;<br>&nbsp;&nbsp;&nbsp; \"orderLegCollection\": [&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"instruction\": \"SELL\",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"quantity\": 2,&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"instrument\": {&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"symbol\": \"XYZ\",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"assetType\": \"EQUITY\"&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;<br>&nbsp;&nbsp;&nbsp; ]&nbsp;<br>&nbsp;&nbsp; }&nbsp;<br>&nbsp; ]&nbsp;<br>}<br>&nbsp;</div><p>&nbsp;</p><p><strong>Conditional Order: One Triggers A One Cancels Another</strong><br>Buy 5 shares of XYZ at a Limit price of $14.97 good for the Day. Once filled, 2 sell orders are immediately sent: Sell 5 shares of XYZ at a Limit price of $15.27 and Sell 5 shares of XYZ with a Stop order where the stop price is $11.27. If one of the sell orders fill, the other order is immediately cancelled. Both Sell orders are Good till Cancel. Also known as a 1st Trigger OCO order.<br>&nbsp;</p><div class=\"mat-app-background\">{&nbsp;<br>&nbsp; \"orderStrategyType\": \"TRIGGER\",&nbsp;<br>&nbsp; \"session\": \"NORMAL\",&nbsp;<br>&nbsp; \"duration\": \"DAY\",&nbsp;<br>&nbsp; \"orderType\": \"LIMIT\",&nbsp;<br>&nbsp; \"price\": 14.97,&nbsp;<br>&nbsp; \"orderLegCollection\": [&nbsp;<br>&nbsp;&nbsp; {&nbsp;<br>&nbsp;&nbsp;&nbsp; \"instruction\": \"BUY\",&nbsp;<br>&nbsp;&nbsp;&nbsp; \"quantity\": 5,&nbsp;<br>&nbsp;&nbsp;&nbsp; \"instrument\": {&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp; \"assetType\": \"EQUITY\",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp; \"symbol\": \"XYZ\"&nbsp;<br>&nbsp;&nbsp;&nbsp; }&nbsp;<br>&nbsp;&nbsp; }&nbsp;<br>&nbsp; ],&nbsp;<br>&nbsp; \"childOrderStrategies\": [&nbsp;<br>&nbsp;&nbsp; {&nbsp;<br>&nbsp;&nbsp;&nbsp; \"orderStrategyType\": \"OCO\",&nbsp;<br>&nbsp;&nbsp;&nbsp; \"childOrderStrategies\": [&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"orderStrategyType\": \"SINGLE\",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"session\": \"NORMAL\",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"duration\": \"GOOD_TILL_CANCEL\",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"orderType\": \"LIMIT\",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"price\": 15.27,&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"orderLegCollection\": [&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"instruction\": \"SELL\",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"quantity\": 5,&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"instrument\": {&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"assetType\": \"EQUITY\",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"symbol\": \"XYZ\"&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp; },&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"orderStrategyType\": \"SINGLE\",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"session\": \"NORMAL\",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"duration\": \"GOOD_TILL_CANCEL\",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"orderType\": \"STOP\",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"stopPrice\": 11.27,&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"orderLegCollection\": [&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"instruction\": \"SELL\",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"quantity\": 5,&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"instrument\": {&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"assetType\": \"EQUITY\",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \"symbol\": \"XYZ\"&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;<br>&nbsp;&nbsp;&nbsp; ]&nbsp;<br>&nbsp;&nbsp; }&nbsp;<br>&nbsp; ]&nbsp;<br>}<br>&nbsp;</div><p>&nbsp;</p><p><strong>Sell Trailing Stop: Stock</strong><br>Sell 10 shares of XYZ with a Trailing Stop where the trail is a -$10 offset from the time the order is submitted. As the stock price goes up, the -$10 trailing offset will follow. If stock XYZ goes from $110 to $130, your trail will automatically be adjusted to $120. If XYZ falls to $120 or below, a Market order is submitted. This order is good for the Day.<br>&nbsp;</p><div class=\"mat-app-background\">{&nbsp;<br>&nbsp; \"complexOrderStrategyType\": \"NONE\",&nbsp;<br>&nbsp; \"orderType\": \"TRAILING_STOP\",&nbsp;<br>&nbsp; \"session\": \"NORMAL\",&nbsp;<br>&nbsp; \"stopPriceLinkBasis\": \"BID\",&nbsp;<br>&nbsp; \"stopPriceLinkType\": \"VALUE\",&nbsp;<br>&nbsp; \"stopPriceOffset\": 10,&nbsp;<br>&nbsp; \"duration\": \"DAY\",&nbsp;<br>&nbsp; \"orderStrategyType\": \"SINGLE\",<br>&nbsp; \"orderLegCollection\": [&nbsp;<br>&nbsp;&nbsp; {&nbsp;<br>&nbsp;&nbsp;&nbsp; \"instruction\": \"SELL\",&nbsp;<br>&nbsp;&nbsp;&nbsp; \"quantity\": 10,&nbsp;<br>&nbsp;&nbsp;&nbsp; \"instrument\": {&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp; \"symbol\": \"XYZ\",&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp; \"assetType\": \"EQUITY\"&nbsp;<br>&nbsp;&nbsp;&nbsp; }&nbsp;<br>&nbsp;&nbsp; }&nbsp;<br>&nbsp; ]&nbsp;<br>}</div><p>&nbsp;</p></div>"}}