Getting Started

Prerequisites

TWS Setup

Trademade works with Interactive Brokers and connects to either Trader Workstation (TWS) or IB Gateway. Any recent 10.x version is compatible. There are a few steps required to configure TWS so that it can be used by Trademade.

Open TWS and open the Global Configuration window, and from there navigate to the API settings.

TWS API Configuration

Ensure that Enable ActiveX and Socket Clients is checked and Read-Only API is unchecked. Take note of value in the Socket port field because you'll need that to configure Trademade's config.yaml file later.

Then navigate to the Precautions item:

TWS Order Precautions

Ensure that the Bypass Order Precautions for API Orders item is checked.

Market Data Subscriptions

Trademade requires your Interactive Brokers account to have the following market data subscriptions:

  • CBOE Streaming Market Indexes
  • CME Real-Time
  • OPRA (US Options Exchanges)

Telegram

Trademade uses Telegram as its primary user interface.

Create a Telegram account if you haven't already. Once you've done that, you need to create a Telegram bot that Trademade will use to communicate with you.

Initiate a conversation with @BotFather on Telegram by messaging it /start, and then /newbot to create a new bot:

Telegram Botfather

You can use whatever name you want for the bot. Same goes for the bot's username, with the only requirement being that it has to end with bot.

Once you've created the bot, Telegram will issue you a token that will be used to control your bot. Take note of this value because you're going to use it in your config.yaml next, when we move on to configuring Trademade.

Previous
Introduction