Skip to content

Commit

Permalink
Define the flattened "fundamental double auction" emitted tick type set
Browse files Browse the repository at this point in the history
  • Loading branch information
goodboy committed Jun 20, 2023
1 parent 70b25a2 commit 55b2d26
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion piker/data/_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,13 +740,21 @@ async def sample_and_broadcast(
)


# a working tick-type-classes template
# tick-type-classes template for all possible "lowest level" events
# that can can be emitted by the "top of book" L1 queues and
# price-matching (with eventual clearing) in a double auction
# market (queuing) system.
_tick_groups = {
'clears': {'trade', 'dark_trade', 'last'},
'bids': {'bid', 'bsize'},
'asks': {'ask', 'asize'},
}

# XXX alo define the flattened set of all such "fundamental ticks"
# so that it can be used as filter, eg. in the graphics display
# loop to compute running windowed y-ranges B)
_auction_ticks: set[str] = set.union(*_tick_groups.values())


def frame_ticks(
first_quote: dict,
Expand Down

0 comments on commit 55b2d26

Please sign in to comment.