peter-oroszvari / tastytrade-api Goto Github PK
View Code? Open in Web Editor NEWPython SDK for Tastytrade API
License: MIT License
Python SDK for Tastytrade API
License: MIT License
Hi, Just wondering we can use this package to develop out own option trading python script.
Hi Peter,
could you please add an example for printing streaming prices to the terminal for a certain stock or option?
I could not figure out completely. The dxfeed example contains some commented code for this, I can log on to tasty, receive the token and the streamer-url.
from tastytrade_api.streamer.dxfeed_handler import DxFeedClient
from tastytrade_api.authentication import TastytradeAuth
import configparser
config = configparser.ConfigParser()
config.read('config.ini')
username = config.get('ACCOUNT', 'username')
password = config.get('ACCOUNT', 'password')
websocket_url = config.get('WEBSOCKET', 'websocket_url')
auth = TastytradeAuth(username, password)
auth_data = auth.login()
print("Session token:", auth.session_token)
dxfeedtoken = TastytradeAuth.get_dxfeed_token(auth)
print(dxfeedtoken)
client = DxFeedClient(websocket_url, auth.session_token)
client.connect()
client.handshake_complete.wait()
client.subscribe("Quote", "AAPL")
client.subscribe("Quote", "TSLA")
while True:
time.sleep(1)
The code fails with the client.handshake_complete.wait(), with the error: "Handshake failed".
Am I missing something here?
Hello,
I'm the maintainer of the unofficial TT API as of a few years ago. Previously we were reverse-engineering the private API but now that it's public things are a bit easier--however all of the existing functionality is still working as normal.
If you're interested in collaborating, take a look at my profile! I figured it'd be easier than reinventing the wheel.
Removing fixed URLs stored in variables from the code and moving them to init.py variable.
Refactoring the dxfeed module, managing unsubscriptions, and modifying the output returned by the module.
Provide examples for all the implemented endpoints.
Trading folder not getting created while installing thru pip install
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.