Skip to main content

A python wrapper around the tastytrade open API

Project description

PyPI GitHub Discussions GitHub issues

Getting Started

Before using this SDK, ensure that you:

Install

pip install tastytrade-sdk

Use It

from tastytrade_sdk import Tastytrade

tasty = Tastytrade()

tasty.login(
    login='trader@email.com',
    password='password'
)

tasty.api.post('/sessions/validate')

tasty.logout()

Examples

Streaming Market Data

from tastytrade_sdk import Tastytrade

tasty = Tastytrade().login(login='trader@email.com', password='password')

# Subscribing to symbols across different instrument types
symbols = [
    'BTC/USD',
    'SPY',
    '/ESU3',
    'SPY   230630C00255000',
    './ESU3 EW2N3 230714C4310'
]

subscription = tasty.market_data.subscribe(
    symbols=symbols,
    on_quote=print,
    on_candle=print,
    on_greeks=print
)

# start streaming
subscription.open()

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tastytrade_sdk-1.0.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

tastytrade_sdk-1.0.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file tastytrade_sdk-1.0.0.tar.gz.

File metadata

  • Download URL: tastytrade_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.6 Linux/6.2.0-1015-azure

File hashes

Hashes for tastytrade_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 62e3ea754757e1d78268df5e83b4a0272db03733d654802fb4eaa47d363850f5
MD5 42c34b4c3d3b5a810732bb678471cb26
BLAKE2b-256 badc952cfb9538e3de3f17c0848d71be1a2faad0c8fe2bf2fbf7c6dd377fd949

See more details on using hashes here.

File details

Details for the file tastytrade_sdk-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: tastytrade_sdk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.6 Linux/6.2.0-1015-azure

File hashes

Hashes for tastytrade_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 10c8b7732026176b0e69447f98b756b601985e8b36be2bc638062ba9c3a00529
MD5 d8ed7ab12637f238cf1e7050a1493315
BLAKE2b-256 f678933d7418d38fe03b0d14b75d7bc8301d280becf977687395f1eeb5a58955

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page