Skip to content

v0.8.0

Choose a tag to compare

@github-actions github-actions released this 31 Oct 05:10
· 44 commits to main since this release

The local server sends every response as its rows arrive, every flat file writes to disk from its own endpoint in every binding, and each binding's StreamingClient runs on the same streaming lifecycle as client.stream. Each binding's surface is now expanded from the same tables in the Rust core. Apart from the removals and behaviour changes below, names, signatures and C symbols are unchanged.

Breaking changes

Flat files, every binding

  • The older flat-file service path is removed: the flat_files view, the flatfile_* calls, the C thetadatadx_flatfile_* and thetadatadx_market_data_flatfile_* functions, the MCP thetadatadx_flatfile_* tools and the flatfiles_* settings. Each flat file is an endpoint, and its new _to_path companion writes it to disk; the changelog maps every removed call to its replacement. FlatFileFormat gains JsonLegacy, so an exhaustive Rust match needs an arm for it. (#1474)

Standalone streaming clients: Python, TypeScript, C and C++

  • StreamingClient and the thetadatadx_streaming_* handle now behave as client.stream does. Listing or changing subscriptions before streaming starts raises NetworkError (C: THETADATADX_ERR_NETWORK). A failed reconnect() keeps its callback and can be retried. A C or C++ shutdown is no longer terminal: set_callback afterwards starts a new session with nothing subscribed. Each change and its migration is in the changelog. (#1490)

C and C++

  • Tick structs drop their 64-byte alignment and take the natural layout of the Rust rows, so they shrink (QuoteTick from 128 to 88 bytes) while every field keeps its offset, and the THETADATADX_ALIGN64_* macros are gone: rebuild against the new headers.

OpenAPI document

  • Each route's optional parameters are listed in the order the SDKs take them, so a client generated with optional arguments passed by position should be regenerated and called with those arguments by name. (#1488)

Local server

  • A request with more than 32 query parameters is refused with a plain-text body, as every other failed request is, instead of the JSON error_type envelope.

Rust

  • The grpc-codegen feature is removed. It changed nothing in the library; remove it from the feature list.
  • Six binding-only methods leave StreamSurface: start_streaming_scoped, reconnect_streaming_scoped, start_streaming_with_teardown, reconnect_streaming_with_teardown, current_thread_is_dispatcher and prev_drained_is_set. Use start_streaming, reconnect_streaming and await_drain.
  • The live-tests and mimalloc-allocator features are removed. live-tests did nothing; in place of mimalloc-allocator, depend on mimalloc directly and register mimalloc::MiMalloc.
  • The seven list endpoints that were plain async fns return a builder, like every other endpoint, and their <name>_with_deadline twins are removed: call .with_deadline(d) on the builder instead.

Highlights

  • The local server streams. Every route writes its response as the rows arrive from the market-data service, instead of holding the whole answer in memory before sending the first byte. (#1473)
  • Flat files to disk. <endpoint>_to_path writes any of the eight flat files to disk in Rust, Python (with an _async companion), TypeScript, C++, C and the MCP server, byte for byte the body the local server answers for the same file, in csv, json, json_legacy, ndjson or html. The file is written under a temporary name and takes its own only once complete, and a download that stalls is retried rather than left hanging. (#1474)
  • Typed Python stubs. The tick rows and lists the market-data methods return, every endpoint builder, StringList and AsyncClient are typed in the stub, and enum parameters accept the enum as well as its string, so type checkers and IDEs know every attribute and argument instead of Any. Each _async method states the same defaults as its synchronous twin. (#1488)
  • Symbol lists on the local server. symbol=AAPL,MSFT,NVDA,TSLA on /v3/option/list/contracts and the list-dates routes is answered as it is through the SDK, where the server used to refuse any symbol longer than 16 characters.
  • Smaller tick rows. Rows are laid out at their natural alignment rather than padded to 64 bytes, so a bulk pull or flat file holds less memory (a quote row is 88 bytes, not 128).
  • Installs from source survive new compilers. A Rust release that adds a warning no longer breaks pip install thetadatadx-py from the source distribution on a platform without a wheel.
  • Timestamps from their own instant. The local server writes last_trade on the EOD routes and quote_timestamp on the trade-quote routes from the instant the vendor sent, as the terminal does, instead of with the date of the neighbouring column.
  • Option chains in the terminal's row order. Large option-chain requests return the vendor's contract order, as the terminal does.
  • No busy core while idle. Without a config file the local server backs off when no streaming events arrive, instead of holding a CPU core for as long as it runs.
  • Streaming fixes. A raw stream builder started inside a delivery handler on the same client fails fast instead of hanging when the request pool is fully committed, and Python panic_count() counts an exception raised on the last events of a stopped stream.

See the full changelog for every change and the reason for it.

What's Changed

  • fix(server): idle backoff and terminal chain order; correct stale docs by @userFRM in #1476
  • test(server): compare every route's response with recorded golden bytes by @userFRM in #1477
  • build: put every crate in one Cargo workspace with one lockfile by @userFRM in #1478
  • refactor(rs): keep the condition tables as plain source by @userFRM in #1479
  • refactor(rs): expand the engine's endpoint surface from one table by @userFRM in #1480
  • refactor: expand the Python, TypeScript and C endpoint surfaces from the endpoint table by @userFRM in #1481
  • ci: run the source wording check locally instead of in CI by @userFRM in #1482
  • refactor(codegen): render every endpoint output from the endpoint table and retire endpoint_surface.toml by @userFRM in #1483
  • refactor: expand enums, ticks, streaming events and config accessors from engine tables by @userFRM in #1484
  • ci(parity): keep only the parity checks that guard hand-written surface by @userFRM in #1485
  • perf(server)!: stream responses from the upstream table and write flat files from their endpoints by @userFRM in #1486
  • build(deps): bump tower-http from 0.6.11 to 0.7.1 by @dependabot[bot] in #1493
  • build(deps): bump the patch-minor group with 6 updates by @dependabot[bot] in #1492
  • build(deps): bump pyo3 from 0.29.0 to 0.29.3 by @dependabot[bot] in #1494
  • refactor: render the remaining table copies, write the request runtime once, check bindings against their builds by @userFRM in #1495
  • fix: bound a stalled flat-file download and keep the by-name flat-file calls internal by @userFRM in #1496
  • refactor!: run every StreamingClient on the client's streaming lifecycle by @userFRM in #1497
  • chore(release): 0.8.0 by @userFRM in #1498

Full Changelog: v0.7.0...v0.8.0