What's Changed
- Made additional Customer fields optional for compatibility with the sandbox environment by @maneum1 in #302
- session client parameters by @Ramneantu in #311
You can now pass kwargs to thehttpx.AsyncClientobject in the session besides justproxy. Related to this, proxy is now part of these kwargs instead of a separate parameter, and passingssl_contexttoDXLinkStreameris deprecated since its client copies kwargs from theSessionobject used to initialize it. Proxies are no longer in test coverage. This is technically breaking in two edge cases:- Proxy was passed as a positional arg to session (not sure why anyone would do this though)
- Proxy URLs, if stored in serialized sessions, will be dropped when re-serialized.
provider_secretandrefresh_tokenparameters toSessionare now optional, and if not provided, the environment variables$TT_SECRETand$TT_REFRESHwill be tried.- In a lot of places, passing a string is valid even though a non-string iterable is expected, eg here:
This would actually subscribe to "S", "P", and "Y"! So now across the whole SDK, in places where
await streamer.subscribe(Quote, "SPY")
strisn't allowed by itself, we simply wrap it in a list. This means the above code now behaves as expected. Legnow has amultiplierproperty which is its quantity multiplied by its order action (-1 for sell, +1 for buy)- Rename
Session._refreshtoSession.refreshand add flag to force refresh the session if needed (as discussed in #309) DXLinkStreamer.subscribe_candlecan be called without thestart_timeparameter and defaults to the timestamp 1e9. This mirrors the way the Tastytrade web client typically uses the streamer.
New Contributors
- @Ramneantu made their first contribution in #311
Full Changelog: v12.0.2...v12.1.0