Releases: databento/dbn
Releases · databento/dbn
0.18.1
0.18.0
Release notes
Enhancements
- Added links to example usage in documentation
- Added new predicate methods
InstrumentClass::is_option
,is_future
, andis_spread
to make it easier to work with multiple instrument class variants - Implemented
DecodeRecord
forDbnRecordDecoder
- Added
new_inferred
,with_buffer
,inferred_with_buffer
,from_file
,get_mut
,
andget_ref
methods toAsyncDynReader
for parity with the syncDynReader
- Improved documentation enumerating errors returned by functions
- Added new
DBNError
Python exception that's now the primary exception raised by
databento_dbn
- Improved async performance of decoding DBN files
- Added
StatMsg::ts_in_delta()
method that returns atime::Duration
for consistency
with other records with ats_in_delta
field
Breaking changes
- Changed type of
flags
inMboMsg
,TradeMsg
,Mbp1Msg
,Mbp10Msg
, andCbboMsg
fromu8
to a newFlagSet
type with predicate methods for the various bit flags
as well as setters. Theu8
value can still be obtained by calling theraw()
method.- Improved
Debug
formatting - Python and encodings are unaffected
- Improved
- Removed
write_dbn_file
function deprecated in version 0.14.0 from Python interface.
Please useTranscoder
instead - Switched
DecodeStream
fromstreaming_iterator
crate tofallible_streaming_iterator
to allow better notification of errors - Switched
EncodeDbn::encode_stream
from accepting animpl StreamingIterator
to
accepting anFallibleStreamingIterator
to allow bubbling up of decoding errors - Changed default value for
stype_in
andstype_out
inSymbolMappingMsg
to
u8::MAX
to match C++ client and to reflect an unknown value. This also changes the
value of these fields when upgrading aSymbolMappingMsgV1
to DBNv2 - Renamed
CbboMsg
toCBBOMsg
in Python for consistency with other schemas
Breaking changes
- Changed text serialization of
display_factor
to be affected bypretty_px
.
While it's not a price, it uses the same fixed-price decimal format as other prices - Changed text serialization of
unit_of_measure_qty
inInstrumentDefMsgV1
to be
affected bypretty_px
to match behavior ofInstrumentDefMsgV2
Release notes
Enhancements
- Added links to example usage in documentation
- Added new predicate methods
InstrumentClass::is_option
,is_future
, andis_spread
to make it easier to work with multiple instrument class variants - Implemented
DecodeRecord
forDbnRecordDecoder
- Added
new_inferred
,with_buffer
,inferred_with_buffer
,from_file
,get_mut
,
andget_ref
methods toAsyncDynReader
for parity with the syncDynReader
- Improved documentation enumerating errors returned by functions
- Added new
DBNError
Python exception that's now the primary exception raised by
databento_dbn
- Improved async performance of decoding DBN files
- Added
StatMsg::ts_in_delta()
method that returns atime::Duration
for consistency
with other records with ats_in_delta
field
Breaking changes
- Changed type of
flags
inMboMsg
,TradeMsg
,Mbp1Msg
,Mbp10Msg
, andCbboMsg
fromu8
to a newFlagSet
type with predicate methods for the various bit flags
as well as setters. Theu8
value can still be obtained by calling theraw()
method.- Improved
Debug
formatting - Python and encodings are unaffected
- Improved
- Removed
write_dbn_file
function deprecated in version 0.14.0 from Python interface.
Please useTranscoder
instead - Switched
DecodeStream
fromstreaming_iterator
crate tofallible_streaming_iterator
to allow better notification of errors - Switched
EncodeDbn::encode_stream
from accepting animpl StreamingIterator
to
accepting anFallibleStreamingIterator
to allow bubbling up of decoding errors - Changed default value for
stype_in
andstype_out
inSymbolMappingMsg
to
u8::MAX
to match C++ client and to reflect an unknown value. This also changes the
value of these fields when upgrading aSymbolMappingMsgV1
to DBNv2 - Renamed
CbboMsg
toCBBOMsg
in Python for consistency with other schemas
Breaking changes
- Changed text serialization of
display_factor
to be affected bypretty_px
.
While it's not a price, it uses the same fixed-price decimal format as other prices - Changed text serialization of
unit_of_measure_qty
inInstrumentDefMsgV1
to be
affected bypretty_px
to match behavior ofInstrumentDefMsgV2
0.17.1
Release notes
Bug fixes
- Added missing Python type stub for
StatusMsg
0.17.0
Release notes
Enhancements
- Added new record type
CbboMsg
, new rtypes and schema types forCbbo
,Cbbo1s
,
Cbbo1m
,Tcbbo
,Bbo1s
, andBbo1m
- Added
Volatility
andDelta
StatType
variants - Added
Undefined
andTimeProRata
MatchAlgorithm
variants - Exported more enums to Python:
Action
InstrumentClass
MatchAlgorithm
SecurityUpdateAction
Side
StatType
StatUpdateAction
StatusAction
StatusReason
TradingEvent
TriState
UserDefinedInstrument
Breaking changes
- Removed
Default
trait implementation forMbp1Msg
due to it now having multiple
permissiblertype
values. Users should usedefault_for_schema
instead - Changed the default
match_algorithm
forInstrumentDefMsg
andInstrumentDefMsgV1
fromFifo
toUndefined
- Made
Dataset
,Venue
, andPublisher
non-exhaustive to allow future additions
without breaking changes - Renamed publishers from deprecated datasets to their respective sources (
XNAS.NLS
andXNYS.TRADES
respectively)
Deprecations
- Deprecated dataset values
FINN.NLS
andFINY.TRADES
Bug fixes
- Fixed an issue where the Python
MappingIntervalDict
was not exported - Fixed Python type stubs for
VersionUpgradePolicy
andSType
0.16.0
Release notes
Enhancements
- Updated
StatusMsg
and made it public in preparation for releasing a status schema - Added
StatusAction
,StatusReason
,TradingEvent
, andTriState
enums for use in
the status schema - Added
-t
and--tsv
flags to DBN CLI to encode tab-separated values (TSV) - Added
delimiter
method to builders forDynEncoder
andCsvEncoder
to customize the
field delimiter character, allowing DBN to be encoded as tab-separated values (TSV) - Document cancellation safety for
AsyncRecordDecoder::decode_ref
(credit: @yongqli) - Added new publisher values for consolidated DBEQ.MAX
- Added C FFI conversion functions from
ErrorMsgV1
toErrorMsg
andSystemMsgV1
toSystemMsg
- Improved documentation for
side
field andSide
enum - Upgraded
async-compression
to 0.4.6 - Upgraded
strum
to 0.26
Breaking changes
- Changed default for
VersionUpgradePolicy
toUpgrade
- Changed default
upgrade_policy
forDbnDecoder
,AsyncDbnDecoder
, and Python
DBNDecoder
toUpgrade
so by default the primary record types can always be used - Changed fields of previously-hidden
StatusMsg
record type - Updated text serialization order of status schema to match other schemas
- Changed text serialization
unit_of_measure_qty
to be affected bypretty_px
. While
it's not a price, it uses the same fixed-price decimal format as other prices - Made
StatType
andVersionUpgradePolicy
non-exhaustive to allow future additions
without breaking changes - Renamed
_dummy
field inImbalanceMsg
andStatMsg
to_reserved
- Added
ts_out
parameter toRecordDecoder
andAsyncRecordDecoder
with_upgrade_policy
methods
Bug fixes
- Fixed handling of
ts_out
when upgrading DBNv1 records to version 2 - Added missing
StatType::Vwap
variant used in the ICE datasets - Fixed an issue with Python stub file distribution
- Fixed missing handling of
ErrorMsgV1
andSystemMsgV1
inrtype
dispatch macros
0.15.1
Release notes
Bug fixes
- Fixed an import error in the Python type stub file
0.15.0
Release notes
Enhancements
- Improved
Debug
implementation for all record types- Prices are formatted as decimals
- Fixed-length strings are formatted as strings
- Bit flag fields are formatted as binary
- Several fields are formatted as enums instead of their raw representations
- Improved
Debug
implementation forRecordRef
to showRecordHeader
- Added
--schema
option todbn
CLI tool to filter a DBN to a particular schema. This
allows outputting saved live data to CSV - Allowed passing
--limit
option todbn
CLI tool with--metadata
flag - Improved performance of decoding uncompressed DBN fragments with the
dbn
CLI tool - Added builders to
CsvEncoder
,DynEncoder
, andJsonEncoder
to assist with the
growing number of customizations- Added option to write CSV header as part of creating
CsvEncoder
to make it harder
to forget
- Added option to write CSV header as part of creating
- Added
-s
/--map-symbols
flag to CLI to create asymbol
field in the output with
the text symbol mapped from the instrument ID - Added
version
param to PythonMetadata
contructor choose between DBNv1 and DBNv2 - Implemented
EncodeRecordTextExt
forDynEncoder
- Implemented
Deserialize
andSerialize
for all records and enums (withserde
feature enabled). This allows serializing records with additional encodings not
supported by the DBN crate - Implemented
Hash
for all record types - Added new publisher value for OPRA MIAX Sapphire
- Added Python type definition for
Metadata.__init__
- Added
metadata_mut
method to decoders to get a mutable reference to the decoded
metadata - Improved panic message on
RecordRef::get
when length doesn't match expected to be
actionable - Added
encode::ZSTD_COMPRESSION_LEVEL
constant
Breaking changes
- Increased size of
SystemMsg
andErrorMsg
to provide better messages from Live
gateway- Increased length of
err
andmsg
fields for more detailed messages - Added
is_last
field toErrorMsg
to indicate the last error in a chain - Added
code
field toSystemMsg
andErrorMsg
, although currently unused - Added new
is_last
parameter toErrorMsg::new
- Decoding these is backwards-compatible and records with longer messages won't be
sent during the DBN version 2 migration period - Renamed previous records to
compat::ErrorMsgV1
andcompat::SystemMsgV1
- Increased length of
- Split
DecodeDbn
trait intoDecodeRecord
andDbnMetadata
traits for more
flexibility.DecodeDbn
continues to exist as a trait alias - Moved
decode_stream
out ofDecodeDbn
to its own separate traitDecodeStream
- Changed trait bounds of
EncodeDbn::encode_decoded
andencode_decoded_with_limit
to
DecodeRecordRef + DbnMetadata
Bug fixes
- Fixed panic in
TsSymbolMap
whenstart_date
==end_date
- Added missing Python
__eq__
and__ne__
implementations forBidAskPair
- Fixed Python
size_hint
return value forInstrumentDefMsgV1
and
SymbolMappingMsgV1
- Fixed cases where
dbn
CLI tool would write a broken pipe error to standard error
such as when piping tohead
- Fixed bug in sync and async
MetadataEncoder
s whereversion
was used to determine
the encoded length of fixed-length symbols instead of thesymbol_cstr_len
field
0.14.2
Release notes
Enhancements
- Added
set_upgrade_policy
setters toDbnDecoder
,DbnRecordDecoder
,
AsyncDbnDecoder
, andAsyncDbnRecordDecoder
- Added
from_schema
classmethod for PythonRType
enum
Breaking changes
- Renamed parameter for Python Enum classmethod constructors to
value
fromdata
.
0.14.1
Release notes
Enhancements
- Added new trait
compat::SymbolMappingRec
for code reuse when working with
both versions ofSymbolMappingMsg
- Changed
PitSymbolMap::on_symbol_mapping
to accept either version of
SymbolMappingMsg
Bug fixes
- Fixed missing DBNv1 compatibility in
PitSymbolMap::on_record
- Fixed missing Python export for
VersionUpgradePolicy
- Fixed missing Python export and methods for
InstrumentDefMsgV1
and
SymbolMappingMsgV1
- Fixed bug where Python
DbnDecoder
andTranscoder
would throw exceptions
when attempting to decode partial metadata
0.14.0
Release notes
Enhancements
- This version begins the transition to DBN version 2 (DBNv2). In this version, the
decoders support decoding both versions of DBN and the DBN encoders default to
keeping version of the input. However, in a future version, decoders will by default
convert DBNv1 to DBNv2 and support will be dropped for encoding DBNv1.- Affects
SymbolMappingMsg
,InstrumentDefMsg
, andMetadata
. All other record
types and market data schemas are unchanged - Version 1 structs can be converted to version 2 structs with the
From
trait
- Affects
- Added
symbol_cstr_len
field toMetadata
to indicate the length of fixed symbol
strings - Added
stype_in
andstype_out
fields toSymbolMappingMsg
to provide more context
with live symbology updates - Added smart wrapping to
dbn
CLI help output - Updated
rtype_dispatch
family of macros to check record length to handle both
versions of records. This is temporary during the transition period - Added
VersionUpgradePolicy
enum and associated methods to the decoders to
allow specifying how to handle decoding records from prior DBN versions - Added
Metadata::upgrade()
method to updateMetadata
from a prior DBN version to
the latest version - Added
-u
/--upgrade
flags todbn
CLI that when passed upgrades DBN data from
previous versions. By default data is decoded as-is - Made
AsyncDbnDecoder::decode_record
,AsyncDbnDecoder::decode_record_ref
,
dbn::AsyncRecordDecoder::decode
, anddbn::AsyncRecordDecoder::decode_ref
cancellation safe. This makes them safe to use within a
tokio::select!
(https://docs.rs/tokio/latest/tokio/macro.select.html) statement - Added documention around cancellation safety for async APIs
- Improved error messages for conversion errors
- Added
TOB
flag to denote top-of-book messages - Added new publisher values in preparation for IFEU.IMPACT and NDEX.IMPACT datasets
- Added new publisher values for consolidated DBEQ.BASIC and DBEQ.PLUS
- Added
MAX_RECORD_LEN
constant for the length of the largest record type - Exposed record flag constants in
databento_dbn
withF_
prefix - Added export to Python for
RType
Breaking changes
- The old
InstrumentDefMsg
is nowcompat::InstrumentDefMsgV1
compat::InstrumentDefMsgV2
is now an alias forInstrumentDefMsg
- The old
SymbolMappingMsg
is nowcompat::SymbolMappingMsgV1
compat::SymbolMappingMsgV2
is now an alias forSymbolMappingMsg
- Changed
SYMBOL_CSTR_LEN
constant to 71. Previous value is now in
compat::SYMBOL_CSTR_V1
- Changed
DBN_VERSION
constant to 2 security_update_action
was converted to a rawc_char
to safely support adding
variants in the future- Renamed
_dummy
inInstrumentDefMsg
to_reserved
- Removed
_reserved2
,_reserved3
, and_reserved5
fromInstrumentDefMsg
- Removed
_dummy
fromSymbolMappingMsg
- Moved position of
strike_price
withinInstrumentDefMsg
but left text serialization
order unchanged - Made
Error
non-exhaustive, meaning it can no longer be exhaustively matched against.
This allows adding additional error variants in the future without a breaking change - Added
upgrade_policy
parameter toRecordDecoder::with_version
constructor to
control whether records of previous versions will be upgraded - Added
upgrade_policy
parameter toDynDecoder
constructors to control whether
records of previous versions will be upgraded - Renamed
symbol_map
parameter for Python Transcoder tosymbol_interval_map
to
better reflect the date intervals it contains
Deprecations
- Deprecated unused
write_dbn_file
function from Python interface. Please use
Transcoder
instead
Bug fixes
- Fixed typo in Python type definition for
InstrumentDefMsg.pretty_high_limit_price
- Fixed type signature for
Metadata.stype_in
andMetadata.stype_out
Python methods - Fixed incorrect version in
pyproject.toml