- Changed
Metadata::symbol_map
andsymbol_map_for_date
to returnString
values instead of&str
, which made it difficult to use
- Added
start
andend
getters toMetadata
that returntime::OffsetDateTime
- Added
symbol_map
andsymbol_map_for_date
methods toMetadata
to aid historical symbology mapping from the instrument IDs in records - Added
DynReader
struct for being agnostic about whether an input stream is zstd-compressed - Improved safety of
RecordRef::get
by adding length check - Added Python DBN
Transcoder
class for converting DBN to JSON and CSV with optional zstd compression - Added optional
has_metadata
parameter to PythonDBNDecoder
to allow decoding plain records by passingFalse
. By defaultDBNDecoder
expects a complete DBN stream, which begins with metadata - Added
get_ref
methods todbn::Decoder
anddbn::RecordDecoder
which return a reference to the inner reader - Added
UNDEF_PRICE
,UNDEF_ORDER_SIZE
,UNDEF_STAT_QUANTITY
, andUNDEF_TIMESTAMP
constants todatabento_dbn
Python package to make it easier to filter null values - Added
Metadata::builder()
function to create a new builder instance
- Split out
EncodeRecordRef
trait fromEncodeDbn
to have a boxable trait (i.e.Box<dyn EncodeRecordRef>
) for dynamic encoding - Split out
EncodeRecord
trait fromEncodeDbn
- Split out
DecodeRecordRef
trait fromDecodeDbn
to have a boxable trait (i.e.Box<dyn DecodeRecordRef>
) for dynamic decoding - Changed
DynWriter
from an enum to a struct with only private fields
- Fixed typo in
BATY.PITCH.BATY
publisher - Fixed typo in
README.md
(credit: @thomas-k-cameron)
- Added
publisher
method toRecordHeader
and all record types for converting thepublisher_id
to an enum - Added getters that return
time::OffsetDateTime
for the following fields:ts_event
,ts_recv
,ts_ref
,activation
,expiration
,start_ts
,end_ts
,ts_out
- Added getters for
ts_in_delta
that returntime::Duration
- Fixed missing
raw_instrument_id
field in PythonInstrumentDefMsg
- Fixed missing
OHLCV_EOD
variant in PythonSchema
type hint
- Added new
OhlcvEod
schema variant for future use with OHLCV bars based around the end of the trading session - Implemented
std::fmt::Display
for publisher enums (Publisher
,Dataset
, andVenue
)
- Fixed Python type hint for
Encoding.variants()
- Added
raw_instrument_id
field toInstrumentDefMsg
(definition schema) for use in future datasets consolidated from multiple publishers - Added new
OHLCV_EOD
rtype for future daily OHLCV schema based on the trading session - Added new
SType::Nasdaq
andSType::Cms
to support querying US equities datasets using either convention, regardless of the original convention of the dataset. - Relaxed
pyo3
,tokio
, andzstd
dependency version requirements - Added
FIXED_PRICE_SCALE
constant todatabento_dbn
Python package - Added generated field metadata for each record type to aid in pandas DataFrame creation
- Changed
size_hint
class method to class attribute for Python records
- Fixed multi-frame Zstd decoding for async decoders
- Switched from
anyhow::Error
to customdbn::Error
for all public fallible functions and methods. This should make it easier to disambiguate between error types. EncodeDbn::encode_record
andEncodeDbn::record_record_ref
no longer treat aBrokenPipe
error differently- Added
AsyncDbnDecoder
- Added
pretty::Px
andpretty::Ts
newtypes to expose price and timestamp formatting logic outside of CSV and JSON encoding - Added interning for Python strings
- Added
rtype
to encoded JSON and CSV to aid differeniating between different record types. This is particularly important when working with live data. - Added
pretty_
Python attributes for DBN price fields - Added
pretty_
Python attributes for DBN UTC timestamp fields
- All fallible operations now return a
dbn::Error
instead of ananyhow::Error
- Updated serialization order to serialize
ts_recv
andts_event
first - Moved header fields (
rtype
,publisher_id
,instrument_id
, andts_event
) to nested object under the keyhd
in JSON encoding to match structure definitions - Changed JSON encoding of all 64-bit integers to strings to avoid loss of precision
- Updated
MboMsg
serialization order to serializeaction
,side
, andchannel_id
earlier given their importance - Updated
Mbp1Msg
,Mbp10Msg
, andTradeMsg
serialization order to serializeaction
,side
, anddepth
earlier given their importance - Updated
InstrumentDefMsg
serialization order to serializeraw_symbol
,security_update_action
, andinstrument_class
earlier given their importance - Removed
bool
return value fromEncodeDbn::encode_record
andEncodeDbn::record_record_ref
. These now returndbn::Result<()>
.
- Fixed handling of NUL byte when encoding DBN to CSV and JSON
- Fixed handling of broken pipe in
dbn
CLI tool
- Added Python
variants
method to return an iterator over the enum variants forCompression
,Encoding
,Schema
, andSType
- Improved Python enum conversions for
Compression
,Encoding
,Schema
, andSType
- Added publishers enums
- Added export to Python for
Compression
,Encoding
,SType
, andSchema
enums - Improved Python string representation of
ErrorMsg
andSystemMsg
- Added async JSON encoder
- Dropped support for Python 3.7
- Fixed pretty timestamp formatting to match API
- Added
--fragment
and--zstd-fragment
CLI arguments to read DBN streams without metadata - Added
csv::Decoder::get_ref
that returns reference to the underlying writer - Added missing Python getter for
InstrumentDefMsg::group
- Added dataset constants
- Changed
c_char
fields to be exposed to Python asstr
- Added
--limit NUM
CLI argument to output only the firstNUM
records - Added
AsRef<[u8]>
implementation forRecordRef
- Added Python
size_hint
classmethod for DBN records - Improved DBN encoding performance of
RecordRef
s - Added
use_pretty_px
for price formatting anduse_pretty_ts
for datetime formatting to CSV and JSON encoders - Added
UNDEF_TIMESTAMP
constant for when timestamp fields are unset
- Renamed
booklevel
MBP field tolevels
for brevity and consistent naming - Renamed
--pretty-json
CLI flag to--pretty
and added support for CSV. Passing this flag now also enablesuse_pretty_px
anduse_pretty_ts
- Removed
open_interest_qty
andcleared_volume
fields that were always unset from definition schema - Changed Python
DBNDecoder.decode
to return records with ats_out
attribute, instead of a tuple - Rename Python
DbnDecoder
toDBNDecoder
- Fixed
Action
conversion methods (credit: @thomas-k-cameron)
- Added
F
ill action type for MBO messages - Added Python type stub for
StatMsg
- Added support for Statistics schema
- Added
RType
enum for exhaustive pattern matching - Added
&str
getters for morec_char
array record fields - Changed
DbnDecoder.decode
to always return a list of tuples
- Changed
schema
andstype_in
to optional inMetadata
to support live data - Renamed
SType::ProductId
toSType::InstrumentId
andSType::Native
toSType::RawSymbol
- Renamed
RecordHeader::product_id
toinstrument_id
- Renamed
InstrumentDefMsg::symbol
toraw_symbol
- Renamed
SymbolMapping::native_symbol
toraw_symbol
- Deprecated
SType::Smart
to split intoSType::Parent
andSType::Continuous
- Fixed value associated with
Side::None
- Fixed issue with decoding partial records in Python
DbnDecoder
- Fixed missing type hint for Metadata bytes support
- Added support for equality comparisons in Python classes
- Fixed typo in Python type stubs
- Fixed support for
ErrorMsg
,SystemMsg
, andSymbolMappingMsg
in Python
- Added enums
MatchAlgorithm
,UserDefinedInstrument
- Added constants
UNDEF_PRICE
andUNDEF_ORDER_SIZE
- Added Python type stubs for
databento_dbn
package
- Fixed
Metadata.__bytes__
method to return valid DBN - Fixed panics when decoding invalid records
- Fixed issue with attempting to decode partial records in Python
DbnDecoder
- Fixed support for
ImbalanceMsg
in PythonDbnDecoder
- Added support for Imbalance schema
- Updated
InstrumentDefMsg
to include options-related fields andinstrument_class
- Added support for encoding and decoding
ts_out
- Added
ts_out
toMetadata
- Improved enum API
- Relaxed requirement for slice passed to
RecordRef::new
to be mutable - Added error forwarding from
DecodeDbn
methods - Added
SystemMsg
record - Exposed constructor and additional methods for DBN records and
Metadata
to Python - Made
RecordRef
implementSync
andSend
- Introduced separate rtypes for each OHLCV schema
- Removed
record_count
fromMetadata
- Changed serialization of
c_char
fields to strings instead of ints - Renamed
dbn::RecordDecoder::decode_record
todecode
- Renamed
dbn::RecordDecoder::decode_record_ref
todecode_ref
- Renamed
HasRType::size
torecord_size
to avoid confusion with order size fields - Stopped serializing
related
andrelated_security_id
fields inInstrumentDefMsg
- Added records and
Metadata
as exports ofdatabento_dbn
Python package - Improved how
Metadata
appears in Python and added__repr__
- Fixed bug where
dbn
CLI tool didn't truncate existing files
- Added improved Python bindings for decoding DBN
- Standardized documentation for
start
,end
, andlimit
- Fixed bug with
encode_metadata
Python function
- Added ability to migrate legacy DBZ to DBN through CLI
- Relaxed requirement that DBN be Zstandard-compressed
- Folded in
databento-defs
- Added support for async encoding and decoding
- Added billable size calculation to
dbn
CLI - Added
MetadataBuilder
to assist with defaults - Refactored into encoder and decoder types
- Renamed DBZ to DBN
- Renamed python package to
databento-dbn
- Moved metadata out of skippable frame
- Added Python DBZ writing example
- Changed databento-defs dependency to crates.io version
- Added interface for writing DBZ files
- Enabled Zstd checksums
- Changed DBZ decoding to use streaming-iterator
- Changed JSON output to NDJSON
- Change nanosecond timestamps to strings in JSON to avoid loss of precision when parsing
- Initial release