Giter VIP home page Giter VIP logo

tastytrade-api's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

tastytrade-api's Issues

Stock / option price streaming example

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?

Collab

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.

Fix URLs

Removing fixed URLs stored in variables from the code and moving them to init.py variable.

Update dxfeed.py

Refactoring the dxfeed module, managing unsubscriptions, and modifying the output returned by the module.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.