Brokerages

Trading Technologies

Introduction

QuantConnect enables you to run your algorithms in live mode with real-time market data. We have successfully hosted more than 200,000 live algorithms and have had more than $22B in volume traded on our servers since 2015.

Trading Technologies (TT) was founded by Gary Kemp in 1994 with the goal to create professional trading software, infrastructure, and data solutions for a wide variety of users. TT provides access to trading Futures, Options, and Crypto. TT also provides a charting platform, infrastructure services, and risk management tools. TT is not actually a brokerage. The firm is a brokerage router with access to more than 30 execution destinations.

To view the implementation of the TT integration, see the Lean.Brokerages.TradingTechnologies repository.

Modeling

The TradingTechnologiesBrokerageModel does not have specific modeling for fees and slippage because TT is an order router and can execute on many exchanges and brokerages. To set the brokerage model and account type in an algorithm, see the TT brokerage model documentation. In live trading, TT reports the total fees of your orders after each order fill. Pass a different BrokerageName to SetBrokerageModel to backtest your algorithm with fee and slippage modeling. The brokerage model you set should support the asset classes and orders in your algorithm.

Create an Account

Follow the account creation wizard on the TT website to create a TT account.

Paper Trading

Our TT integration does not support paper trading through the TT Simulation environment, but you can follow these steps to simulate it:

  1. In the Initialize method of your algorithm, add one of the preceding SetBrokerageModel method calls.
  2. Deploy your algorithm with the QuantConnect Paper Trading brokerage.

Asset Classes

Our TT integration supports trading Futures.

Data Providers

The QuantConnect data provider provides Futures data during live trading.

Orders

We model the TT API by supporting several order types, the TimeInForce order property, and order updates. When you deploy live algorithms, you can place manual orders through the IDE.

Order Types

The following table describes the available order types for each asset class that our TT integration supports:

Order TypeFutures
MarketOrdergreen check
LimitOrdergreen check
StopMarketOrdergreen check
StopLimitOrdergreen check

TT enforces the following order rules:

  • If you are buying (selling) with a StopMarketOrder or a StopLimitOrder, the stop price of the order must be greater (less) than the current security price.
  • If you are buying (selling) with a StopLimitOrder, the limit price of the order must be greater (less) than the stop price.

Time In Force

We model the TT API by supporting the Day and GoodTilCanceled TimeInForce order properties.

Updates

We model the TT API by supporting order updates.

Fees

To view the TT trading fees, see the Pricing page on the TT website. To view how we model their fees, see Fees.

Margin

We model buying power and margin calls to ensure your algorithm stays within the margin requirements.

Slippage

Orders through TT do not experience slippage in backtests. In live trading, your orders may experience slippage.

To view how we model TT slippage, see Slippage.

Fills

We fill market orders immediately and completely in backtests. In live trading, if the quantity of your market orders exceeds the quantity available at the top of the order book, your orders are filled according to what is available in the order book.

To view how we model TT order fills, see Fills.

Security and Stability

Note the following security and stability aspects of our TT integration.

Account Credentials

When you deploy live algorithms with TT, we don't save your brokerage account credentials.

API Outages

We call the TT API to place live trades. Sometimes the API may be down. Check the TT status page to see if the API is currently working.

Deposits and Withdraws

You can deposit and withdraw cash from your brokerage account while you run an algorithm that's connected to the account. We sync the algorithm's cash holdings with the cash holdings in your brokerage account every day at 7:45 AM Eastern Time (ET).

Demo Algorithm

The following algorithm demonstrates the functionality of the TT brokerage:

Deploy Live Algorithms

You must have an available live trading node for each live trading algorithm you deploy.

Follow these steps to deploy a live algorithm:

  1. Open the project you want to deploy.
  2. Click the Lightning icon Deploy Live icon.
  3. On the Deploy Live page, click the Brokerage field and then click Trading Technologies from the drop-down menu.
  4. Enter your TT user name, account name, routing sender, session password, app key, and app secret.
  5. Our TT integration routes orders via the TT FIX 4.4 Connection. Contact your TT representative to set the exchange where you would like your orders sent. Your account details are not saved on QuantConnect.

    Our integration fetches your positions using the REST endpoint, so the app key and app secret are your REST App credentials.

  6. Click the Environment field and then click one of the environments from the drop-down menu.
  7. The following table shows the supported environments:

    EnvironmentDescription
    LiveTrade in the production environment
    UATTrade in the User Acceptance Testing environment
  8. Click the Node field and then click the live trading node that you want to use from the drop-down menu.
  9. (Optional) In the Data Provider section, click Show and change the data provider or add additional providers.
  10. If your brokerage account has existing cash holdings, follow these steps (see video):
    1. In the Algorithm Cash State section, click Show.
    2. Click Add Currency.
    3. Enter the currency ticker (for example, USD or CAD) and a quantity.
  11. (Optional) Set up notifications.
  12. Configure the Automatically restart algorithm setting.
  13. By enabling automatic restarts, the algorithm will use best efforts to restart the algorithm if it fails due to a runtime error. This can help improve the algorithm's resilience to temporary outages such as a brokerage API disconnection.

  14. Click Deploy.

The deployment process can take up to 5 minutes. When the algorithm deploys, the live results page displays. If you know your brokerage positions before you deployed, you can verify they have been loaded properly by checking your equity value in the runtime statistics, your cashbook holdings, and your position holdings.

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: