algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
Loading...
Searching...
No Matches
algotradelib::QuoteSnapshot Struct Reference

A quote: the last traded price of an instrument at a point in time. More...

#include <algotradelib/src/core/types.hpp>

Collaboration diagram for algotradelib::QuoteSnapshot:

Public Attributes

InstrumentId instrument_
 The instrument.
Decimal64 last_price_
 The last traded price, as the broker reported it.
Currency currency_
 The currency of last_price_.
std::optional< std::chrono::system_clock::time_point > exchange_time_
 When the exchange says the quote was true, if the broker gave a timestamp.
std::chrono::system_clock::time_point received_at_
 When this process received the quote, on this machine's clock.
std::optional< TopOfBook > top_of_book_
 The best bid and offer.
std::optional< Decimal64 > volume_
 The session's cumulative traded volume, if the broker gave it.

Detailed Description

A quote: the last traded price of an instrument at a point in time.

Definition at line 870 of file types.hpp.

Member Data Documentation

◆ currency_

Currency algotradelib::QuoteSnapshot::currency_

The currency of last_price_.

Definition at line 876 of file types.hpp.

◆ exchange_time_

std::optional<std::chrono::system_clock::time_point> algotradelib::QuoteSnapshot::exchange_time_

When the exchange says the quote was true, if the broker gave a timestamp.

Definition at line 878 of file types.hpp.

◆ instrument_

InstrumentId algotradelib::QuoteSnapshot::instrument_

◆ last_price_

Decimal64 algotradelib::QuoteSnapshot::last_price_

The last traded price, as the broker reported it.

Definition at line 874 of file types.hpp.

Referenced by algotradelib::backtest::Backtester< Strategy, CapsType >::feed(), and algotradelib::runner::Runner< Strategy, CapsType, Tag, Executor >::feed().

◆ received_at_

std::chrono::system_clock::time_point algotradelib::QuoteSnapshot::received_at_

When this process received the quote, on this machine's clock.

Definition at line 880 of file types.hpp.

Referenced by algotradelib::backtest::Backtester< Strategy, CapsType >::feed(), and algotradelib::runner::Runner< Strategy, CapsType, Tag, Executor >::feed().

◆ top_of_book_

std::optional<TopOfBook> algotradelib::QuoteSnapshot::top_of_book_

The best bid and offer.

Warning
Only Kiwoom's quote fills this (from ka10007's best bid and offer); it is empty on every quote from KIS or Toss. For the spread or midpoint there, read the order book with the session's depth().

Definition at line 889 of file types.hpp.

◆ volume_

std::optional<Decimal64> algotradelib::QuoteSnapshot::volume_

The session's cumulative traded volume, if the broker gave it.

Definition at line 891 of file types.hpp.


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