Enum Fraction
- Namespace
- DatabentoDotNet.Reference
- Assembly
- DatabentoDotNet.Reference.dll
How fractions are handled at settlement.
[JsonConverter(typeof(FractionJsonConverter))]
public enum Fraction : byte
- Extension Methods
Fields
Cash = 67Cash (
C).Fractions = 70Fractions (
F).RoundDown = 68Round down (
D).RoundUp = 85Round up (
U).
Remarks
One of the nine closed reference enums: byte-backed, one character on the wire, and an unrecognised code is an error rather than an opaque value. ReferenceWireStrings carries the argument for all three.
A blank is legal here, and it is not a member. The dictionary lists a null-code entry
described as "A Blank value is possible" in both groups that report these codes, and upstream
models the field as Option<Fraction> (corporate.rs:373). So the field a
response model declares is Nullable<T> of this type carrying
NullableFractionJsonConverter, which reads a blank as null.
FractionJsonConverter, the one this type carries by attribute, rejects a
blank — a non-nullable field has no way to say "no value".
Ported from databento-rs/src/reference/enums.rs:2741, and checked against both the
FRACCD and FRACTIONS groups of the vendored corporate_actions.list_enums
response. Those are two groups with the same four codes and descriptions that differ only in
punctuation (Round-Down against Round Down); that they agree is asserted, so if
they ever stop agreeing the failure names which one moved.