Skip to content

Add Tradovate Brokerage Support for Futures Trading #9136

@adamoverton

Description

@adamoverton

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions