tdbe -- ThetaData Binary Encoding
Pure data-format crate for ThetaData market data. Zero networking dependencies.
tdbe owns all data types and codecs with zero networking dependencies.
The thetadatadx client crate depends on tdbe for type definitions.
What it contains
| Module | Contents |
|---|---|
types |
Price, SecType, DataType, StreamMsgType, and the generated tick structs (TradeTick, QuoteTick, EodTick, OhlcTick, ...) |
codec |
FIT nibble decoder and FIE string encoder used by FPSS tick compression |
greeks |
Full Black-Scholes calculator: 23 Greeks + IV bisection solver |
flags |
Bit flags and condition codes for market data records |
latency |
Wire-to-application latency computation (latency_ns) |
error |
Encoding-layer error types |
Quick start
[]
= "0.1"
use ;
use greeks;
// Fixed-point price encoding
let p = new; // 150.25
assert_eq!;
// Compute all 23 Greeks offline. Returns `Result<GreeksResult, Error>`
// — `Error::Config` for an unrecognised `right`.
let result = all_greeks?;
println!;
Relationship to thetadatadx
thetadatadx depends on tdbe for all data types and codecs, then adds
networking (gRPC historical via MDDS, real-time streaming via FPSS), authentication,
and the unified ThetaDataDx client. If you only need types and offline Greeks,
depend on tdbe alone.
License
Apache-2.0 -- see LICENSE.