Skip to content

Commit 214ab9c

Browse files
committed
DOC: Update imbalance docs
1 parent 31dbdec commit 214ab9c

File tree

3 files changed

+107
-44
lines changed

3 files changed

+107
-44
lines changed

python/python/databento_dbn/_lib.pyi

Lines changed: 45 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4246,7 +4246,7 @@ class ImbalanceMsg(Record):
42464246
def ref_price(self) -> int:
42474247
"""
42484248
The price at which the imbalance shares are calculated, where every 1 unit corresponds
4249-
to 1e-9, i.e. 1/1,000,000,000 or 0.000000001.
4249+
to 1e-9, i.e. 1/1,000,000,000 or 0.000000001. Will be `UNDEF_PRICE` when unused.
42504250
42514251
See [Prices](https://databento.com/docs/standards-and-conventions/common-fields-enums-types#prices).
42524252
@@ -4275,7 +4275,8 @@ class ImbalanceMsg(Record):
42754275
@property
42764276
def auction_time(self) -> int:
42774277
"""
4278-
Reserved for future use.
4278+
Projected auction timestamp expressed as the number of nanoseconds since the UNIX epoch.
4279+
Will be `UNDEF_TIMESTAMP` when unused.
42794280
42804281
Returns
42814282
-------
@@ -4302,7 +4303,7 @@ class ImbalanceMsg(Record):
43024303
def cont_book_clr_price(self) -> int:
43034304
"""
43044305
The hypothetical auction-clearing price for both cross and continuous orders where every
4305-
1 unit corresponds to 1e-9, i.e. 1/1,000,000,000 or 0.000000001.
4306+
1 unit corresponds to 1e-9, i.e. 1/1,000,000,000 or 0.000000001. Will be `UNDEF_PRICE` when unused.
43064307
43074308
See [Prices](https://databento.com/docs/standards-and-conventions/common-fields-enums-types#prices).
43084309
@@ -4335,7 +4336,7 @@ class ImbalanceMsg(Record):
43354336
def auct_interest_clr_price(self) -> int:
43364337
"""
43374338
The hypothetical auction-clearing price for cross orders only where every 1 unit corresponds
4338-
to 1e-9, i.e. 1/1,000,000,000 or 0.000000001.
4339+
to 1e-9, i.e. 1/1,000,000,000 or 0.000000001. Will be `UNDEF_PRICE` when unused.
43394340
43404341
See [Prices](https://databento.com/docs/standards-and-conventions/common-fields-enums-types#prices).
43414342
@@ -4367,7 +4368,11 @@ class ImbalanceMsg(Record):
43674368
@property
43684369
def ssr_filling_price(self) -> int:
43694370
"""
4370-
Reserved for future use.
4371+
The price at which sell short interest will be filed if a sell short restriction is
4372+
in effect, where every 1 unit corresponds to 1e-9, i.e. 1/1,000,000,000 or 0.000000001.
4373+
Will be `UNDEF_PRICE` when unused.
4374+
4375+
See [Prices](https://databento.com/docs/standards-and-conventions/common-fields-enums-types#prices).
43714376
43724377
Returns
43734378
-------
@@ -4397,7 +4402,11 @@ class ImbalanceMsg(Record):
43974402
@property
43984403
def ind_match_price(self) -> int:
43994404
"""
4400-
Reserved for future use.
4405+
The price at which the highest number of shares would trade, subject to auction collars,
4406+
where every 1 unit corresponds to 1e-9, i.e. 1/1,000,000,000 or 0.000000001.
4407+
Will be `UNDEF_PRICE` when unused.
4408+
4409+
See [Prices](https://databento.com/docs/standards-and-conventions/common-fields-enums-types#prices).
44014410
44024411
Returns
44034412
-------
@@ -4427,7 +4436,10 @@ class ImbalanceMsg(Record):
44274436
@property
44284437
def upper_collar(self) -> int:
44294438
"""
4430-
Reserved for future use.
4439+
Upper limit of the auction collar, where every 1 unit corresponds
4440+
to 1e-9, i.e. 1/1,000,000,000 or 0.000000001. Will be `UNDEF_PRICE` when unused.
4441+
4442+
See [Prices](https://databento.com/docs/standards-and-conventions/common-fields-enums-types#prices).
44314443
44324444
Returns
44334445
-------
@@ -4457,7 +4469,10 @@ class ImbalanceMsg(Record):
44574469
@property
44584470
def lower_collar(self) -> int:
44594471
"""
4460-
Reserved for future use.
4472+
Upper limit of the auction collar, where every 1 unit corresponds
4473+
to 1e-9, i.e. 1/1,000,000,000 or 0.000000001. Will be `UNDEF_PRICE` when unused.
4474+
4475+
See [Prices](https://databento.com/docs/standards-and-conventions/common-fields-enums-types#prices).
44614476
44624477
Returns
44634478
-------
@@ -4473,6 +4488,7 @@ class ImbalanceMsg(Record):
44734488
def paired_qty(self) -> int:
44744489
"""
44754490
The quantity of shares that are eligible to be matched at `ref_price`.
4491+
Will be `UNDEF_ORDER_SIZE` when unused.
44764492
44774493
Returns
44784494
-------
@@ -4484,6 +4500,7 @@ class ImbalanceMsg(Record):
44844500
def total_imbalance_qty(self) -> int:
44854501
"""
44864502
The quantity of shares that are not paired at `ref_price`.
4503+
Will be `UNDEF_ORDER_SIZE` when not used.
44874504
44884505
Returns
44894506
-------
@@ -4494,7 +4511,8 @@ class ImbalanceMsg(Record):
44944511
@property
44954512
def market_imbalance_qty(self) -> int:
44964513
"""
4497-
Reserved for future use.
4514+
The total market order imbalance quantity at the `ref_price`.
4515+
Will be `UNDEF_ORDER_SIZE` when unused.
44984516
44994517
Returns
45004518
-------
@@ -4505,7 +4523,8 @@ class ImbalanceMsg(Record):
45054523
@property
45064524
def unpaired_qty(self) -> int:
45074525
"""
4508-
Reserved for future use.
4526+
During the Closing Auction, the number of unpaired shares priced at or better than the `ref_price`.
4527+
Will be `UNDEF_ORDER_SIZE` when unused.
45094528
45104529
Returns
45114530
-------
@@ -4516,7 +4535,9 @@ class ImbalanceMsg(Record):
45164535
@property
45174536
def auction_type(self) -> str:
45184537
"""
4519-
Venue-specific character code indicating the auction type.
4538+
Venue-specific character code indicating the auction type. Will be `~` when unused.
4539+
4540+
Refer to the [venue-specific documentation](https://databento.com/docs/venues-and-datasets).
45204541
45214542
Returns
45224543
-------
@@ -4528,6 +4549,7 @@ class ImbalanceMsg(Record):
45284549
def side(self) -> Side | str:
45294550
"""
45304551
The market side of the `total_imbalance_qty`. Can be **A**sk, **B**id, or **N**one.
4552+
Will be **N**one when unused or not applicable.
45314553
45324554
See [Side](https://databento.com/docs/standards-and-conventions/common-fields-enums-types#side).
45334555
@@ -4540,7 +4562,9 @@ class ImbalanceMsg(Record):
45404562
@property
45414563
def auction_status(self) -> int:
45424564
"""
4543-
Reserved for future use.
4565+
Venue-specific status code.
4566+
4567+
Refer to the [venue-specific documentation](https://databento.com/docs/venues-and-datasets).
45444568
45454569
Returns
45464570
-------
@@ -4551,7 +4575,9 @@ class ImbalanceMsg(Record):
45514575
@property
45524576
def freeze_status(self) -> int:
45534577
"""
4554-
Reserved for future use.
4578+
Venue-specific status code.
4579+
4580+
Refer to the [venue-specific documentation](https://databento.com/docs/venues-and-datasets).
45554581
45564582
Returns
45574583
-------
@@ -4562,7 +4588,7 @@ class ImbalanceMsg(Record):
45624588
@property
45634589
def num_extensions(self) -> int:
45644590
"""
4565-
Reserved for future use.
4591+
The number of times the halt period has been extended.
45664592
45674593
Returns
45684594
-------
@@ -4573,7 +4599,9 @@ class ImbalanceMsg(Record):
45734599
@property
45744600
def unpaired_side(self) -> Side | str:
45754601
"""
4576-
Reserved for future use.
4602+
The side of the `unpaired_qty`. Will be **N**one when unused or not applicable.
4603+
4604+
See [Side](https://databento.com/docs/standards-and-conventions/common-fields-enums-types#side).
45774605
45784606
Returns
45794607
-------
@@ -4586,6 +4614,8 @@ class ImbalanceMsg(Record):
45864614
"""
45874615
Venue-specific character code. For Nasdaq, contains the raw Price Variation Indicator.
45884616
4617+
Refer to the [venue-specific documentation](https://databento.com/docs/venues-and-datasets).
4618+
45894619
Returns
45904620
-------
45914621
str

rust/dbn/src/compat.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,15 @@ pub struct InstrumentDefMsgV1 {
119119
/// The last eligible trade time expressed as the number of nanoseconds since the
120120
/// UNIX epoch.
121121
///
122-
/// Will be [`crate::UNDEF_TIMESTAMP`] when null, such as for equities. Some publishers
122+
/// Will be [`UNDEF_TIMESTAMP`](crate::UNDEF_TIMESTAMP) when null, such as for equities. Some publishers
123123
/// only provide date-level granularity.
124124
#[dbn(unix_nanos)]
125125
#[pyo3(get, set)]
126126
pub expiration: u64,
127127
/// The time of instrument activation expressed as the number of nanoseconds since the
128128
/// UNIX epoch.
129129
///
130-
/// Will be [`crate::UNDEF_TIMESTAMP`] when null, such as for equities. Some publishers
130+
/// Will be [`UNDEF_TIMESTAMP`](crate::UNDEF_TIMESTAMP) when null, such as for equities. Some publishers
131131
/// only provide date-level granularity.
132132
#[dbn(unix_nanos)]
133133
#[pyo3(get, set)]
@@ -392,7 +392,7 @@ pub struct StatMsgV1 {
392392
#[pyo3(get, set)]
393393
pub ts_recv: u64,
394394
/// The reference timestamp of the statistic value expressed as the number of
395-
/// nanoseconds since the UNIX epoch. Will be [`crate::UNDEF_TIMESTAMP`] when
395+
/// nanoseconds since the UNIX epoch. Will be [`UNDEF_TIMESTAMP`](crate::UNDEF_TIMESTAMP) when
396396
/// unused.
397397
#[dbn(unix_nanos)]
398398
#[pyo3(get, set)]
@@ -405,8 +405,8 @@ pub struct StatMsgV1 {
405405
#[dbn(fixed_price)]
406406
#[pyo3(get, set)]
407407
pub price: i64,
408-
/// The value for non-price statistics. Will be [`crate::UNDEF_STAT_QUANTITY`] when
409-
/// unused.
408+
/// The value for non-price statistics. Will be [`UNDEF_STAT_QUANTITY`](crate::UNDEF_STAT_QUANTITY)
409+
/// when unused.
410410
#[pyo3(get, set)]
411411
pub quantity: i32,
412412
/// The message sequence number assigned at the venue.
@@ -541,15 +541,15 @@ pub struct InstrumentDefMsgV2 {
541541
/// The last eligible trade time expressed as the number of nanoseconds since the
542542
/// UNIX epoch.
543543
///
544-
/// Will be [`crate::UNDEF_TIMESTAMP`] when null, such as for equities. Some publishers
544+
/// Will be [`UNDEF_TIMESTAMP`](crate::UNDEF_TIMESTAMP) when null, such as for equities. Some publishers
545545
/// only provide date-level granularity.
546546
#[dbn(unix_nanos)]
547547
#[pyo3(get, set)]
548548
pub expiration: u64,
549549
/// The time of instrument activation expressed as the number of nanoseconds since the
550550
/// UNIX epoch.
551551
///
552-
/// Will be [`crate::UNDEF_TIMESTAMP`] when null, such as for equities. Some publishers
552+
/// Will be [`UNDEF_TIMESTAMP`](crate::UNDEF_TIMESTAMP) when null, such as for equities. Some publishers
553553
/// only provide date-level granularity.
554554
#[dbn(unix_nanos)]
555555
#[pyo3(get, set)]

0 commit comments

Comments
 (0)