QuantConnect / QuantConnect/Lean

Add Tradovate Brokerage Support for Futures Trading

Open
#9,136 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Brokerage feature
Dominant language
C#
Stars
21.7k
Forks
5.3k
Avg merge
2d 22h
Merged PRs (30d)
34

Description

Summary

I'd like to contribute Tradovate brokerage support to LEAN. Tradovate is a popular futures broker, especially among prop firm traders using platforms like Apex Trader Funding, TopStep, and others that are backed by Tradovate infrastructure.

What's Included

This PR to LEAN (models only):

  • TradovateBrokerageModel - Order type and security type validation
  • TradovateFeeModel - Per-contract fee structure (micro/e-mini/standard)
  • BrokerageName.Tradovate enum value

Separate brokerage implementation repository:

  • Full brokerage implementation with 88 unit tests
  • REST API client for order placement/modification/cancellation
  • WebSocket client for real-time order updates
  • OAuth and API key authentication with automatic token refresh
  • Symbol mapping for CME futures contracts
  • WebSocket reconnection with exponential backoff
Supported Features

Market orders
Limit orders
Stop orders
Stop-limit orders
Trailing stop orders (native Tradovate support
Order modifications
Order cancellation
Partial fill handling
Multiple sub-accounts
Demo & Live environments

Known Limitations

Execution-only brokerage - No market data streaming or historical data.

Reason: CME requires a sub-vendor license ($290-375/month per exchange) for API market data distribution. Since Tradovate is popular with budget-conscious prop firm traders, this cost is prohibitive for most users. The brokerage is designed to work with separate data feeds (IQFeed, Databento, QuantConnect Cloud data, etc.). Additionally, when running in QC cloud can rely on that market data

Fee Structure

Based on Tradovate's published commission schedule:

  • Micro futures (MYM, MES, MNQ, M2K, MCL, MGC): $0.79/contract
  • E-mini futures (YM, ES, NQ, RTY): $1.29/contract
  • Standard futures (ZB, ZN, CL, GC, SI): $1.79/contract
Testing
  • TradovateBrokerageModel: 15 tests
  • TradovateFeeModel: 15 tests
  • Brokerage implementation: 88 tests
  • Live tested with Tradovate demo account
Related

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing brokerage models, fee models, and BrokerageName enum in LEAN, then review the TradovateBrokerageModel and TradovateFeeModel requirements in the issue. Use the listed 15 model tests and 15 fee-model tests as the validation target; done means the Tradovate enum, order and security validation, and per-contract fee behavior are covered and the tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.