Slick Sim 0.10.1
Exchange simulator that shadows real venues for risk-free strategy testing
Loading...
Searching...
No Matches
slick::sim::MDTradeSnapshotResponse Struct Reference

Payload of a SUB_RESPONSE for a venue's trade channel. More...

#include <common/market_data.hpp>

Collaboration diagram for slick::sim::MDTradeSnapshotResponse:

Public Attributes

uint32_t num_snapshot
 trades the subscriber's book snapshot reflects
uint32_t num_update
 trades it does not - deliver as a normal update
MDTrade trades [0]
 The snapshot block, then the update block, each contiguous and each chronological within itself.

Detailed Description

Payload of a SUB_RESPONSE for a venue's trade channel.

The trades are split against the book snapshot the subscriber receives alongside this response: a trade stamped after the book's last update is not reflected in that book, so replaying it as history would misrepresent it as settled. Those trades go in the update block instead and are delivered as a normal trade update.

Definition at line 179 of file market_data.hpp.

Member Data Documentation

◆ num_snapshot

uint32_t slick::sim::MDTradeSnapshotResponse::num_snapshot

trades the subscriber's book snapshot reflects

Definition at line 180 of file market_data.hpp.

◆ num_update

uint32_t slick::sim::MDTradeSnapshotResponse::num_update

trades it does not - deliver as a normal update

Definition at line 181 of file market_data.hpp.

◆ trades

MDTrade slick::sim::MDTradeSnapshotResponse::trades[0]

The snapshot block, then the update block, each contiguous and each chronological within itself.

The producer partitions into these two blocks rather than copying in history order: a trade the book absorbed is history whatever its timestamp, so an applied trade can follow an unapplied print that is newer than the book, and history order would interleave the blocks.

Definition at line 187 of file market_data.hpp.

Referenced by slick::sim::exch::Exchange::publishTradeSubscriptionResponse().


The documentation for this struct was generated from the following file: