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

The venue's reference prices and funding of one derivative (EventType::PerpState), from its public market data. More...

#include <fastmm/core/messages.hpp>

Public Attributes

EventHeader hdr
 
Price mark_price
 64
 
Price index_price
 72
 
double funding_rate
 80
 
Duration funding_interval
 88
 
Timestamp next_funding
 96
 
Qty open_interest
 104
 
std::uint8_t fields
 112
 
std::uint8_t pad_ [15]
 -> 128
 

Static Public Attributes

static constexpr std::uint8_t kMark = 1U << 0
 
static constexpr std::uint8_t kIndex = 1U << 1
 
static constexpr std::uint8_t kFunding = 1U << 2
 
static constexpr std::uint8_t kOpenInterest = 1U << 3
 

Detailed Description

The venue's reference prices and funding of one derivative (EventType::PerpState), from its public market data.

Market data: it rides the market-data ring and the journal, so a replay sees the same values at the same engine times. hdr.exch_ts is the venue's time of the values. fields names what the message carries; the engine keeps the last value of each field with the time it arrived (core/perp_book.hpp), so a venue that publishes mark, index and funding on separate channels sends one message per channel. mark_price kMark: the price the venue values positions and liquidations at index_price kIndex: the spot index the mark and the funding follow funding_rate kFunding: the rate the venue will apply at next_funding, per funding interval, as a decimal (0.0001 = 1 bp); positive: longs pay shorts funding_interval kFunding: how often funding is paid (a continuous venue reports the rate over this interval: Deribit's current_funding, 8 h) next_funding kFunding: venue time of the next payment; zero when funding is continuous open_interest kOpenInterest: contracts open

Member Data Documentation

◆ kMark

constexpr std::uint8_t fastmm::PerpStateMsg::kMark = 1U << 0
staticconstexpr

◆ kIndex

constexpr std::uint8_t fastmm::PerpStateMsg::kIndex = 1U << 1
staticconstexpr

◆ kFunding

constexpr std::uint8_t fastmm::PerpStateMsg::kFunding = 1U << 2
staticconstexpr

◆ kOpenInterest

constexpr std::uint8_t fastmm::PerpStateMsg::kOpenInterest = 1U << 3
staticconstexpr

◆ hdr

EventHeader fastmm::PerpStateMsg::hdr

◆ mark_price

Price fastmm::PerpStateMsg::mark_price

64

◆ index_price

Price fastmm::PerpStateMsg::index_price

72

◆ funding_rate

double fastmm::PerpStateMsg::funding_rate

80

◆ funding_interval

Duration fastmm::PerpStateMsg::funding_interval

88

◆ next_funding

Timestamp fastmm::PerpStateMsg::next_funding

96

◆ open_interest

Qty fastmm::PerpStateMsg::open_interest

104

◆ fields

std::uint8_t fastmm::PerpStateMsg::fields

112

◆ pad_

std::uint8_t fastmm::PerpStateMsg::pad_[15]

-> 128