Skip to content

Releases: tastyware/tastytrade

tastyware/tastytrade:v12.0.2

09 Feb 17:47

Choose a tag to compare

What's Changed

  • Use more permissive Iterable type in API calls where any iterable works. Previously a list was required.
  • Add temporary fix for frankie567/httpx-ws#107 until frankie567/httpx-ws#129 is merged.
  • Add docs on using anyio BlockingPortals to use the SDK in a sync context.
  • Fix broken part of streamer proxy test

Full Changelog: v12.0.1...v12.0.2

tastyware/tastytrade:v12.0.1

06 Feb 15:01

Choose a tag to compare

What's Changed

  • Regression fixed in new streamer implementation where DXLinkStreamer keepalive pings were not actually keeping the connection alive, since the pings were expected to be of a specific format and not generic. This issue did not affect AlertStreamer which keeps on using httpx_ws' default keepalive implementation.

Full Changelog: v12.0.0...v12.0.1

tastyware/tastytrade:v12.0.0

05 Feb 19:49
0c6c0b1

Choose a tag to compare

What's Changed

For a long time this library was mostly sync, with the streamers being the exception. #168 added async endpoints on top of the existing endpoints, which gave users more flexibility. With this change, I the library moves to async-only.

There are a few reasons for this. First of all, having both sync and async versions of everything resulted in a ton of code duplication. Second, both streamers are (and always have been) async, meaning that almost all users are already implementing at least some async code, so having the separate sync versions makes less sense. Finally, this change allows us to support Trio and clean up the streamer implementation which was hard to reason about and prone to bugs.

  • httpx-ws library replaces websockets, allowing for Trio support. As a consequence of this, reconnect and disconnect functionality is gone (however, this is almost certainly better handled on the user side anyways).
  • Streamers now use httpx-ws websockets and structured concurrency, making them much simpler and easier to reason about (which implies a lower chance of bugs in the future). We also get to use the helpful send_json and receive_json functions instead of wrapping everything in json.dumps/json.loads.
  • Python 3.10 support is dropped as we're now using ExceptionGroups. This would likely have happened soon anyways as the official support lifecycle only goes through October 2026.
  • All previous sync endpoints are now async. All previous async endpoints have been removed (so instead of having endpoints named Account.a_get for async and Account.get for sync, we have a single endpoint named Account.get, which is async).
  • Session token refreshing is smarter: Instead of making users check and refresh themselves, they will auto-refresh before any request if they're close to expiry. Sessions also have an optional async context manager which can be used to ensure cleanup happens.
  • tastytrade.dxfeed.Quote events now have helpful mid_price and micro_price properties calculated from its bid/ask prices.
  • tastytrade.order.OrderAction has a multiplier property which is -1 when it's a "Sell" leg and 1 when it's a "Buy" leg.
  • Test suite now runs on both asyncio and Trio.

Full Changelog: v11.1.0...v12.0.0

tastyware/tastytrade:v11.1.0

18 Dec 20:54

Choose a tag to compare

What's Changed

  • added check if market is open at this moment in utils by @Quenos in #288
  • remove broken account endpoints related to OAuth migration:
    • get_position_limit
    • get_effective_margin_requirements
    • get_order_chain

Full Changelog: v11.0.5...v11.1.0

tastyware/tastytrade:v11.0.5

11 Dec 01:01

Choose a tag to compare

What's Changed

Full Changelog: v11.0.4...v11.0.5

tastyware/tastytrade:v11.0.4

08 Dec 23:17

Choose a tag to compare

What's Changed

  • Add external_identifier field to NewOrder and PlacedOrder classes by @markudevelop in #290
  • Fix #291 caused by sandbox environment not accepting versioning headers

New Contributors

Full Changelog: v11.0.3...v11.0.4

tastyware/tastytrade:v11.0.3

14 Nov 20:38

Choose a tag to compare

What's Changed

  • Type correction in PlacedOrder by @quantx-heiko in #286
    Fixes bug where any call to replace_order would fail. Likely caused by pydantic or API changes.

Full Changelog: v11.0.2...v11.0.3

tastyware/tastytrade:v11.0.2

02 Nov 19:25

Choose a tag to compare

What's Changed

  • Fix bug with tastytrade.metrics.get_risk_free_rate

Full Changelog: v11.0.1...v11.0.2

tastyware/tastytrade:v11.0.1

28 Oct 22:04

Choose a tag to compare

What's Changed

  • fix a small bug caused by pagination info not always present in JSON response

Full Changelog: v11.0.0...v11.0.1

tastyware/tastytrade:v11.0.0

28 Oct 00:53

Choose a tag to compare

What's Changed

  • remove username/password auth by @Graeme22 in #270
    Per Tastytrade docs, username/password authentication is scheduled for removal, so it has been removed here. OAuth is now the only way to authenticate to the API, and the Session class is now what used to be called OAuthSession. To authenticate you must create an OAuth application and save the refresh token and client secret. This process is documented here.
  • Python 3.9 support is now dropped as it has reached end-of-life. It's no longer in CI and Python 3.10's typing features (such as bool | None instead of Optional[bool]) are now present across the SDK.
  • The experimental backtesting module has been removed as it didn't provide much utility as part of the SDK.
  • Added docs example for a cryptocurrency order
  • More endpoints now support pagination, as documented in Tastytrade developer docs and the SDK docs
  • All endpoints now use the API's new versioning header, so breaking changes to the API won't affect the SDK

Full Changelog: v10.3.0...v11.0.0