FastMM documentation
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
venue.hpp File Reference

Venue: the control-path interface every exchange connector implements (6.2). More...

#include "fastmm/core/fees.hpp"
#include "fastmm/core/fill_audit.hpp"
#include "fastmm/core/instrument.hpp"
#include "fastmm/core/msg_ring.hpp"
#include "fastmm/core/order_budget.hpp"
#include "fastmm/core/result.hpp"
#include "fastmm/core/seqlock.hpp"
#include "fastmm/core/strong_id.hpp"
#include "fastmm/core/time.hpp"
#include "fastmm/core/transfer.hpp"
#include "fastmm/net/reactor.hpp"
#include "fastmm/venues/event_sink.hpp"
#include "fastmm/venues/symbology.hpp"
#include "fastmm/venues/wire_latency.hpp"
#include <cstdint>
#include <functional>
#include <span>
#include <string>
#include <string_view>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

struct  fastmm::venues::VenueCaps
 
struct  fastmm::venues::VenueFeedStatus
 
struct  fastmm::venues::VenueStatus
 Snapshot for the stats line; every field is a plain counter so it can be copied out from the control thread (the venue publishes it through a Seqlocked). More...
 
struct  fastmm::venues::VenueFee
 The account's own fee rates on one instrument (Venue::account_fees). More...
 
class  fastmm::venues::Venue
 

Namespaces

namespace  fastmm
 
namespace  fastmm::venues
 

Enumerations

enum class  fastmm::venues::ChannelState : std::uint8_t { fastmm::venues::Down = 0 , fastmm::venues::Connecting = 1 , fastmm::venues::Live = 2 , fastmm::venues::Stale = 3 }
 
enum class  fastmm::venues::FeedState : std::uint8_t {
  fastmm::venues::None = 0 , fastmm::venues::Down = 1 , fastmm::venues::Snapshot = 2 , fastmm::venues::Live = 3 ,
  fastmm::venues::Lost = 4
}
 Multicast feed (nasdaq_itch, ADR-0015 section 5); zero for the WebSocket venues. More...
 

Functions

constexpr std::string_view fastmm::venues::to_string (ChannelState s) noexcept
 
constexpr std::string_view fastmm::venues::to_string (FeedState s) noexcept
 
void fastmm::venues::unsend (VenueStatus &s, OrderCommandKind k) noexcept
 An order counted as sent whose batch was then never written (the connection failed at uncork()): the connector rejects it, so it is taken back out of the sent counters.
 

Detailed Description

Venue: the control-path interface every exchange connector implements (6.2).

Nothing here is on the hot path; the hot path lives in the connector's feed/gateway objects that the concrete Venue owns and drives from its reactor thread.

Threading contract (see include/fastmm/live/session.hpp):

  • load_reference_data() and attach() run once on the main thread before any reactor thread starts (blocking REST allowed).
  • connect/disconnect/subscribe/on_timer/on_wake/request_open_orders run on the venue's reactor thread (the backend posts them there).
  • cancel_all() must be callable from ANY thread, including when the reactor thread is wedged: implementations use an independent blocking REST connection (6.7 kill switch).