FastMM documentation
FastMM C++ API 0.14.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
fastmm::BinanceFuturesSyncTraits Struct Reference

Binance USDT-M futures: first applied delta must have U <= L and u >= L, or follow the snapshot directly (pu == L); afterwards each delta's pu must equal the previous delta's u. More...

#include <fastmm/core/book/book_syncer.hpp>

Static Public Member Functions

static constexpr bool is_stale (const BookDeltaMsg &d, std::uint64_t snap) noexcept
 
static constexpr bool first_applies (const BookDeltaMsg &d, std::uint64_t snap) noexcept
 
static constexpr bool next_applies (const BookDeltaMsg &d, std::uint64_t prev_u) noexcept
 
static constexpr bool is_snapshot_marker (const BookDeltaMsg &) noexcept
 

Static Public Attributes

static constexpr bool kNeedsRestSnapshot = true
 
static constexpr bool kBuffersDeltas = true
 

Detailed Description

Binance USDT-M futures: first applied delta must have U <= L and u >= L, or follow the snapshot directly (pu == L); afterwards each delta's pu must equal the previous delta's u.

The REST depth is current to the stream's 100 ms batch, so L is often the u of a batch that went out before the stream (re)started or before the buffer was reset, and the next event begins after L. It does not bracket L, but its pu names L: it is the update that follows the snapshot. Without the pu rule a quiet book resynced on its first event after every snapshot, 2 s away each time.

Member Function Documentation

◆ is_stale()

static constexpr bool fastmm::BinanceFuturesSyncTraits::is_stale ( const BookDeltaMsg &  d,
std::uint64_t  snap 
)
inlinestaticconstexprnoexcept

◆ first_applies()

static constexpr bool fastmm::BinanceFuturesSyncTraits::first_applies ( const BookDeltaMsg &  d,
std::uint64_t  snap 
)
inlinestaticconstexprnoexcept

◆ next_applies()

static constexpr bool fastmm::BinanceFuturesSyncTraits::next_applies ( const BookDeltaMsg &  d,
std::uint64_t  prev_u 
)
inlinestaticconstexprnoexcept

◆ is_snapshot_marker()

static constexpr bool fastmm::BinanceFuturesSyncTraits::is_snapshot_marker ( const BookDeltaMsg &  )
inlinestaticconstexprnoexcept

Member Data Documentation

◆ kNeedsRestSnapshot

constexpr bool fastmm::BinanceFuturesSyncTraits::kNeedsRestSnapshot = true
staticconstexpr

◆ kBuffersDeltas

constexpr bool fastmm::BinanceFuturesSyncTraits::kBuffersDeltas = true
staticconstexpr