Tradovate API

Place OCO and OSO Bracket Orders via the Tradovate API

Placing OCO and OSO bracket orders through the Tradovate API isn't complicated once you see how the pieces fit together. Here's the entry, stop, and target legs with placeOSO, placeOCO, and orderStrategy, one step at a time.

On This Page

Placing OCO and OSO bracket orders through the Tradovate API isn't complicated once you see how the pieces fit together. Whether you're wiring up a custom bot, auditing your exits, or building automation like PickMyTrade, this guide walks you through the entry, stop, and target legs with placeOSO, placeOCO, and orderStrategy, one step at a time.

What Are OCO and OSO Bracket Orders?

A bracket wraps a trade entry with a protective stop-loss and a take-profit target, so every position is risk-defined from the first tick. OSO (order-sends-other) fires the child stop and target only after the parent entry fills. OCO (one-cancels-other) links two live orders so that filling one automatically cancels the other. A complete bracket usually leans on both ideas at once.

Place OCO & OSO Bracket Orders via the API: Step by Step

1

Authenticate and Grab Your Account IDs

Get an access token, then note two things: your numeric accountId and your username accountSpec. Every bracket call needs both. Set isAutomated: true on bot orders, CME rules require automated orders to carry that flag, and Tradovate will reject them if it's missing.

Tradovate API Access prerequisite screen: this trial cannot subscribe or generate credentials until the funded live-account requirement is met. No API key or secret is shown.
Tradovate API Access prerequisite screen: this trial cannot subscribe or generate credentials until the funded live-account requirement is met. No API key or secret is shown. Reference capture; it does not establish the status or permissions of your account.

View full-size image · Image source

2

Send an OSO Bracket (Entry + Stop + Target)

POST to /order/placeOSO. The top-level object is your entry order, with fields like accountSpec, accountId, action, symbol, orderQty, orderType, and isAutomated; bracket1 and bracket2 are the contingent exits that activate the instant that entry fills. Use a Limit bracket with a price for the target and a Stop bracket with a stopPrice for the loss, whether they sit in bracket1 or bracket2 makes no difference. A successful response hands you back orderId, bracket1Id, and bracket2Id. Swap the example prices for your own levels before you fire it.

Official Tradovate Partner API placeOSO documentation explains linked entry and bracket orders with an example request.
Official Tradovate Partner API placeOSO documentation explains linked entry and bracket orders with an example request. Documentation example; it does not establish the status or permissions of your account.

View full-size image · Image source

3

Link Two Exits with OCO

Already in a position and just need a stop and target that cancel each other? POST to /order/placeOCO. The main object is one leg, carrying accountSpec, accountId, action, symbol, orderQty, orderType, and stopPrice; the nested other object is the second leg. When either leg fills, Tradovate cancels its sibling. Send the body as real JSON, use json=payload, not data=, or you'll hit an "Invalid JSON" error. And make sure the two legs form a valid stop/target pair, otherwise Tradovate returns "Wrong OCO combination."

Official Tradovate Partner API placeOCO documentation shows the other order object and linked-order cancellation behavior.
Official Tradovate Partner API placeOCO documentation shows the other order object and linked-order cancellation behavior. Documentation example; it does not establish the status or permissions of your account.

View full-size image · Image source

4

Automate Managed Brackets with orderStrategy

For a fully server-side, ATM-style bracket, Tradovate exposes an order-strategy endpoint (startOrderStrategy). It takes a brackets array of qty, profitTarget, and stopLoss offsets and manages the exits for you once the entry fills. Route this call over a WebSocket for reliability; if it errors out, fall back to the paired placeOSO/placeOCO approach above.

Official Tradovate Partner API order-strategy example includes a brackets array and orderStrategyTypeId 2 in the published request.
Official Tradovate Partner API order-strategy example includes a brackets array and orderStrategyTypeId 2 in the published request. Documentation example; it does not establish the status or permissions of your account.

View full-size image · Image source

5

Confirm the Bracket Legs in Tradovate

Open the Orders panel (and the Positions panel) in the Tradovate web platform and confirm your entry filled and that both the stop and target legs are working. If you close the position by hand, cancel any orphaned leg so it doesn't sit in the book waiting to fill.

Personal Tradovate simulation example: a one-contract MESZ6 buy limit at 7700.00 is Working; its sell-limit target at 7710.00 and sell-stop at 7690.00 are Suspended while entry remains unfilled.
Personal Tradovate simulation example: a one-contract MESZ6 buy limit at 7700.00 is Working; its sell-limit target at 7710.00 and sell-stop at 7690.00 are Suspended while entry remains unfilled. Historical reference; interface details, fees and eligibility may have changed.

View full-size image · Image source

When This Is Useful

  • Ship risk-defined automation where every entry carries a stop and a target.
  • Audit or reconcile API fills against what actually shows in the platform.
  • Migrate a TradingView or custom strategy to direct order routing.
  • Guarantee an exit is in the book the instant a position opens.

Connect TradingView Alerts to Tradovate

Use PickMyTrade to connect TradingView alerts to your Tradovate account. Review your account permissions and test your setup before trading live.

Start Your Free 7-Day Trial

Frequently Asked Questions

OSO sends child orders that activate only after the parent entry fills. OCO links two live orders so that filling one cancels the other. A full bracket often uses both together.

Use orderType: "Limit" with a price for the take-profit and orderType: "Stop" with a stopPrice for the loss. Whether they sit in bracket1 or bracket2 doesn't change the behavior.

Send the payload as real JSON rather than a form/data string, and make sure the two legs' actions and prices form a valid stop-and-target pair.

This guide is for educational and informational purposes only and is not financial, investment, or trading advice. Trading futures and other leveraged products carries a substantial risk of loss and is not suitable for every investor. PickMyTrade is an independent third-party automation platform and is not affiliated with, endorsed by, or sponsored by Tradovate, Inc. "Tradovate" and all related names, logos, and trademarks are the property of their respective owners. Platform features and steps change over time, so always confirm the current process in the official Tradovate platform and documentation before acting.