
Most Tradovate users never touch the API. They trade by hand from the DOM or a chart, and that is perfectly fine. But if you like to automate things, such as logging your fills to a spreadsheet, watching account risk from a script or testing a simple strategy in demo, the API opens that door. The download on our homepage is an open-source Python package built for exactly this kind of work. This guide explains what it contains and how to use it responsibly.
What the Tradovate API is
Tradovate offers an application programming interface that lets software talk to your account. It works in two ways:
- REST requests for actions and lookups, such as getting an access token, listing accounts, reading positions or placing an order.
- WebSocket connections for live streams, such as real-time quotes and updates to your account as orders fill.
To use the API, you authenticate with your username and password plus application credentials, usually an app ID, a client ID and a secret. Tradovate controls who gets API access. Historically it has been tied to specific account types and add-ons, so check the current requirements in your Tradovate account before you plan a project around it.
Treat the API secret exactly like a password. Anyone who has it, together with your login, can act on your account.
What is in the downloadable toolkit
The ZIP is the main branch of an open-source repository on GitHub, published under the MIT licence. Its package is named tradovate and its setup file lists version 0.0.1 with Python 3.6 or newer.
Inside, the source is organised into modules that roughly follow the API's own sections:
- client for the main connection, authentication, token renewal and WebSocket handling.
- accounting for account lists, account details and risk status.
- contractLibrary for looking up contracts and products.
- risks for account risk information.
- users for user-related calls.
- configuration and config for settings.
The repository also includes a simple test script and a sample strategy script that the author describes as a demo trading bot on a five-minute equity index futures chart. Its requirements include requests, aiohttp and websocket-client for networking, pandas_ta and numpy for indicators, pytz for time zones and redis for storing data.
It is a small, early-stage project rather than a polished product. The README is short, and you should expect to read the code to understand how each function behaves.
Installing the toolkit
These steps follow the project's own README.
- Download the ZIP from the homepage and extract it.
- Open a terminal in the extracted folder.
- Create and activate a virtual environment so the packages stay isolated: run
python3 -m venv venvthen. venv/bin/activateon macOS or Linux. - Install the requirements with
pip install -r requirements.txt. - Install the package itself in editable mode with
pip install -e .
On Windows, the activation command differs: run the activate script inside the virtual environment's Scripts folder.
Setting credentials safely
The toolkit reads its settings from environment variables:
TO_ENVset toDEMOwhile testing.TO_NAMEandTO_PASSWORDfor your Tradovate login.TO_APPID,TO_CIDandTO_SECfor the application name, client ID and secret.
Put these in a local environment file or export them in your terminal session. Never commit them to a repository, paste them into a chat or share the file with anyone. Add the environment file to your ignore list if you use version control.
Then run the included test with python -m test. If authentication succeeds, you are connected to the demo environment.
Testing in demo first
Every new script should run in demo before it goes anywhere near a funded account. Even simple code can misbehave in ways you did not expect: a loop that places orders repeatedly, a time zone mistake that trades at the wrong hour or a reconnect routine that duplicates subscriptions.
A sensible testing path looks like this:
- Read-only first. Start with scripts that only read data, such as account lists, positions and quotes.
- Small orders in demo. Place single, small orders in the demo environment and confirm they appear in the Tradovate platform.
- Watch it run. Let any automated logic run for several sessions in demo while you watch, with the platform open.
- Build in limits. Add your own checks for maximum position size and daily loss, on top of the account risk settings.
Automation and prop firm accounts
If you trade a prop firm account, read the firm's policy before connecting any script. Many firms limit or prohibit automated trading, API access or trade copiers, and some treat any automation as a rule violation. The fact that the API technically works does not mean the firm allows it. Our prop firm guide covers the rules to check.
Reviewing third-party code
Because this is community code, review it before running it, especially anything that handles credentials or places orders.
- Check where credentials are read and that they are not sent anywhere except Tradovate's API.
- Look at which endpoints are called for demo versus live.
- Check the requirements file for anything you do not recognise.
- Run it in a virtual environment, not your system Python.
Pros
- Free, MIT-licensed and readable from top to bottom.
- Covers authentication, accounts, risk status and live streams.
- Includes a test script and a sample demo strategy.
Cons
- Early version with limited documentation.
- Requires API credentials and access from Tradovate.
- Some features expect extra services such as Redis.
Common problems
Installation fails
Upgrade pip, confirm your Python version and install inside a fresh virtual environment. Indicator libraries such as pandas_ta can be sensitive to the installed numpy version, so pinning a compatible version may help.
Authentication errors
Recheck every environment variable, especially TO_ENV, the client ID and the secret. Confirm that API access is enabled on your Tradovate account and that you are using the right environment.
Redis connection errors
Parts of the code save data to Redis. Either run a local Redis server or adjust the code to skip that step.
Keeping your scripts maintainable
Small scripts have a way of growing. A fill logger becomes a dashboard, and a dashboard becomes a strategy. Keep things manageable from the start by putting settings in one place, logging every request and response to a file while testing, and writing down which version of the toolkit you used. Because the download always points at the main branch, a fresh ZIP next month may differ from the one you have now.
If you change the toolkit's code, keep a copy of the original so you can compare. And whenever Tradovate announces changes to its API, re-test your scripts in demo before trusting them again.
When the API is the wrong tool
If you simply want to trade by hand, the official desktop, web and mobile apps described in our download guide are all you need. The API is for people who want to build their own tools and are comfortable maintaining them.
Ideas for a first project
Good first projects are useful and low-risk. A script that pulls your fills at the end of each day and writes them to a CSV file turns trade journaling into a one-click job. A small monitor that reads account risk status every minute and prints a warning when your daily loss passes a threshold is another sensible starting point. Neither places orders, so a bug costs you time rather than money.
Once those work reliably in demo, you will understand the authentication flow, token renewal and WebSocket handling well enough to judge whether anything more ambitious is worth building.
Questions and Answers
No. It is an open-source community project on GitHub under the MIT licence. Tradovate provides the API itself, not this package.
Yes. You need Tradovate API credentials, including a client ID and secret. Access depends on your account type, so check the current requirements.
Its setup file lists Python 3.6 or newer. Using a recent Python release inside a virtual environment is the safest choice.
The code can talk to live accounts, but test thoroughly in demo first and add your own size and loss limits before going further.
Only if your firm explicitly allows automation or API access. Many firms restrict it, so check the written policy first.
Conclusion
The download on our homepage is an open-source, MIT-licensed Python package for the Tradovate API, covering login, accounts, risk status, contracts and WebSocket streams. Install it in a virtual environment, keep your API secret private, set TO_ENV to DEMO and start with read-only scripts. Check prop firm rules before automating anything, and always review the code yourself before you run it.