Build a Futures Trading Bot: API Guide for NQ, ES, MNQ

Build a Futures Trading Bot: API Guide for NQ, ES, MNQ

Category: Automation | Date: 2026-06-23

Build a Futures Trading Bot Without Wrestling Broker APIs

A futures trading bot needs three things: a signal, a way to place orders, and risk controls. The hard part is placing orders. Connecting directly to Tradovate means implementing OAuth 2.0, managing WebSocket sessions, refreshing tokens that expire every few hours, and handling separate demo and live endpoints. Most of your build time goes into plumbing instead of strategy.

Signal Trade App removes that plumbing. You get one REST API key and a few HTTP endpoints. The same code places orders on Tradovate, Rithmic, NinjaTrader, and ProjectX accounts — no OAuth, no WebSocket management, no token refresh loops. This guide builds a working bot in Python and Node.js.

Why Not Call the Tradovate API Directly?

You can, but you will spend days on authentication alone. Tradovate uses OAuth access tokens plus a separate market data token, both of which expire and must be refreshed. Real-time fills arrive over a WebSocket you have to keep alive with heartbeats. Demo and live use different URLs. And if you trade prop firm accounts across more than one broker, you repeat all of it for Rithmic and NinjaTrader, which have completely different APIs.

Signal Trade App normalizes every broker behind one REST API. Authenticate once with an API key header and place orders with the same JSON payload, no matter which broker is behind the account.

What You Need

  • A Signal Trade App account (start with the 5-day free trial)
  • A connected broker account (Tradovate, Rithmic, NinjaTrader, or ProjectX)
  • An API key generated in Settings
  • Python 3.9+ or Node.js 18+

Step 1: Get Your API Key

In the dashboard, open Settings and generate an API key. Every request authenticates with the X-API-Key header. Keep the key secret — it can place live orders.

Step 2: List Your Accounts

Fetch your connected accounts to get the account ID you will trade.

<code>import requests headers = {"X-API-Key": "YOUR_KEY"} r = requests.get("https://signaltradeapp.com/api/v1/accounts", headers=headers) print(r.json())</code>

Step 3: Place an Order (Python)

<code>import requests ACCOUNT_ID = "your-account-id" headers = {"X-API-Key": "YOUR_KEY", "Content-Type": "application/json"} order = {"symbol": "NQ", "action": "Buy", "qty": 2, "orderType": "Market"} r = requests.post(f"https://signaltradeapp.com/api/v1/accounts/{ACCOUNT_ID}/orders", json=order, headers=headers) print(r.status_code, r.json())</code>

Step 4: Place an Order (Node.js)

<code>const ACCOUNT_ID = "your-account-id"; const res = await fetch(`https://signaltradeapp.com/api/v1/accounts/${ACCOUNT_ID}/orders`, { method: "POST", headers: { "X-API-Key": "YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ symbol: "NQ", action: "Buy", qty: 2, orderType: "Market" }) }); console.log(res.status, await res.json());</code>

A Simple Strategy Loop

A bot is just this loop: read state, decide, act, repeat. Here is the skeleton in Python using a moving-average crossover as the example. Replace the signal logic with your own.

<code>import requests, time headers = {"X-API-Key": "YOUR_KEY", "Content-Type": "application/json"} ACCOUNT_ID = "your-account-id" def place(action, qty=1): order = {"symbol": "NQ", "action": action, "qty": qty, "orderType": "Market"} requests.post(f"https://signaltradeapp.com/api/v1/accounts/{ACCOUNT_ID}/orders", json=order, headers=headers) while True: signal = my_strategy() # returns "Buy", "Sell", or None if signal: place(signal) time.sleep(5)</code>

Because Signal Trade App handles the broker connection, your loop never touches OAuth or WebSockets. It just sends orders. The platform keeps the broker session alive and routes each order in under 100ms.

Risk Management: Do Not Let a Bug Blow Your Account

A bot that misfires can place dozens of orders before you notice. Build risk limits into Signal Trade App, not just your code, so they are enforced at the broker level even if your script crashes or loops.

  • Daily loss limits that auto-flatten and pause the account
  • Maximum quantity per order to catch sizing bugs
  • Daily profit targets to lock in gains
  • Session lockouts to block trading outside your hours

These run on the server. If your bot sends a 100-lot order by mistake, the max-quantity limit rejects it before it reaches the broker.

One Bot, Every Prop Firm Account

The biggest advantage of building on Signal Trade App is scale. The same order call can fan out to every account in a copy group. Run one bot and mirror its trades across Topstep, Apex, and MyFundedFutures accounts at once — even when those accounts sit on different brokers like Tradovate and Rithmic. No other API lets a single bot trade across broker platforms from one endpoint. Always confirm your prop firm permits automated trading first.

Pricing

Signal Trade App offers a 5-day free trial with no charge until it ends. After the trial, plans start at $30 for the first month, then $15/month for unlimited accounts, unlimited API calls, and full webhook access. A $599 self-hosted lifetime license is available if you want to run the platform on your own infrastructure.

Start Building

Start your 5-day free trial, generate an API key, and place your first programmatic order in minutes. See the full API documentation, or learn why developers choose it over the raw Tradovate API.

Frequently Asked Questions

  • <strong>What language can I use to build a futures trading bot?</strong> Any language that can make HTTP requests. The Signal Trade App API is REST with JSON, so Python, Node.js, Go, and C# all work. The examples here use Python and Node.js.
  • <strong>Do I need to handle Tradovate OAuth or WebSockets?</strong> No. Signal Trade App manages the broker connection. You authenticate with one API key and send orders over REST while the platform keeps the Tradovate, Rithmic, or NinjaTrader session alive.
  • <strong>Can my bot trade prop firm accounts?</strong> Yes, as long as your prop firm permits automated trading. Check your firm rules. One bot signal can route to multiple funded accounts across different brokers.
  • <strong>How fast is order execution?</strong> Orders route to the broker in under 100ms from the API call. Actual fill speed depends on the broker and market conditions.
  • <strong>What does it cost to use the API?</strong> There is no separate API fee. The 5-day free trial includes full API access, then $15/month after the first month. A $599 self-hosted license is also available.

Start Copy Trading Free

Signal Trade App lets you copy one trade across unlimited prop firm accounts in under 500ms. Sign up free with a 5-day Pro trial (credit card required, no charge during trial).

Related Reading

  • Help Center — Setup guides, broker connections, and risk management
  • Supported Platforms — Tradovate, NinjaTrader, TradingView, and more
  • Blog — More guides on copy trading, prop firms, and futures automation