BY CLONING THIS REPO YOU AGREE TO THESE TERMS.
This module provides functionality for interfacing with the Tradestation API (V3) to access account information, market data, and trading functionalities. It is intended to be used for testing purposes and is not complete. No copyright infringement was intended; please contact the repository owner for any inquiries and/or complaints regarding this.
Using this module requires an account with Tradestation and with an active API key.
For auto login functionality:
Read the Official API documentaion for more information about authentication, response structures.. etc.
To use as a Jupyter Notebook:
- Run all cells under 'Setup' and 'Authentication'
- Call
open_session
and save the returned session info to a variable (you will need this often) - Complete authentication
- Pass session info you saved to the desired API functions
- Returns or streams response json
To use as a Python Script:
import ts.py
sesh = open_session()
get_bars(sesh, 'MSFT')
See main.py
for an example script
For more detailed descriptions of how to use the module, see the notes included in TradestationAPI.ipynb
GNU GPLv3. Here.