How userfrm/thetadatadx works
ThetaDataDx is a multi-language market-data SDK backed by one Rust engine, with an optional compatible REST/WebSocket server and MCP interface. The main workflow is to configure credentials, connect a client to ThetaData, request historical data, subscribe to live data, or download flat files, then consume typed or columnar results. The README establishes the product capabilities and client modes; source-index references and excerpts support the internal and binding relationships shown. Some implementation details are unsampled, so uncertain links are omitted.
Main entry points: src/client.rs Unified Client · mdds/client.rs History & Snapshots · session.rs Live Streaming · lib.rs Rust SDK
Components 26
Rust Engine
- Client Builder
thetadatadx-rs/src/client_builder.rs - Credentials & Auth
thetadatadx-rs/src/auth/nexus.rs - Connection Config
thetadatadx-rs/src/config/mod.rs - Unified Client
thetadatadx-rs/src/client.rs - Typed Errors
thetadatadx-rs/src/error.rs - Typed & Columnar Data
thetadatadx-rs/src/columns.rs
Data Access
- History & Snapshots
thetadatadx-rs/src/mdds/client.rs - gRPC Transport
thetadatadx-rs/src/grpc/stream.rs - Live Streaming
thetadatadx-rs/src/fpss/session.rs - Stream Batches
thetadatadx-rs/src/fpss/batch_reader.rs - Flat Files
thetadatadx-rs/src/flatfiles/decoded.rs
Language SDKs
- Rust SDK
thetadatadx-rs/src/lib.rs - Python SDK
thetadatadx-py/src/lib.rs - Python Streaming
thetadatadx-py/src/fpss_client.rs - Python Flat Files
thetadatadx-py/src/flatfile_methods.rs - TypeScript SDK
thetadatadx-ts/src/lib.rs - C FFI
thetadatadx-ffi/src/lib.rs - C++ SDK
thetadatadx-cpp/src/thetadatadx.cpp
Optional Services
- Compat Server
tools/server/src/main.rs - REST Routes
tools/server/src/handler.rs - Flat-file Routes
tools/server/src/flatfile_routes.rs - WebSocket Service
tools/server/src/ws/session.rs - MCP Tools
tools/mcp/src/main.rs
Other components
- SDK User
- ThetaData
- Application
Connections 30
- SDK User → Client Builder: configures
README.md - Client Builder → Credentials & Auth: resolves credentials
thetadatadx-rs/src/client_builder.rs - Client Builder → Unified Client: connects
thetadatadx-rs/src/client_builder.rs - Unified Client → Connection Config: uses settings
thetadatadx-rs/src/client.rs - Unified Client → History & Snapshots: requests history
thetadatadx-rs/src/client.rs - Unified Client → Live Streaming: starts lazily
thetadatadx-rs/src/client.rs - Unified Client → Flat Files: downloads
thetadatadx-rs/src/client.rs - Credentials & Auth → ThetaData: authenticates
- History & Snapshots → gRPC Transport: uses transport
thetadatadx-rs/src/mdds/client.rs - Live Streaming → Stream Batches: dispatches batches
- History & Snapshots → ThetaData: fetches market data
README.md - Live Streaming → ThetaData: connects live feed
README.md - Flat Files → ThetaData: downloads datasets
README.md - History & Snapshots → Typed & Columnar Data: returns typed data
README.md - Live Streaming → SDK User: emits events
README.md - Flat Files → SDK User: returns rows
- Rust SDK → Unified Client: exposes
thetadatadx-rs/src/lib.rs - Python SDK → Rust SDK: wraps engine
thetadatadx-py/src/lib.rs - Python SDK → Python Streaming: exposes
thetadatadx-py/src/lib.rs - Python SDK → Python Flat Files: exposes
thetadatadx-py/src/lib.rs - TypeScript SDK → Rust SDK: wraps engine
- C FFI → Rust SDK: exposes engine
thetadatadx-ffi/src/lib.rs - C++ SDK → C FFI: uses bindings
- Compat Server → REST Routes: routes requests
tools/server/src/main.rs - Compat Server → Flat-file Routes: registers routes
tools/server/src/main.rs - Compat Server → WebSocket Service: starts service
- REST Routes → ThetaData: invokes SDK
tools/server/src/handler.rs - Flat-file Routes → ThetaData: serves downloads
- SDK User → MCP Tools: invokes tools
README.md - Unified Client → Application: delivers data
README.md