Messages

BatchBegin

struct BatchBegin

Identifies the beginning of a sequence of related messages.

BatchEnd

struct BatchEnd

Identifies the end of a sequence of related messages.

CancelOrder

struct roq::CancelOrder

Fields required to cancel an existing order.

Public Members

std::string_view account

Account name (as known to the gateway)

uint32_t order_id = 0

Order identifier (as known to client)

CreateOrder

struct roq::CreateOrder

Fields required to create an order.

Public Members

std::string_view account

Account name (as known to the gateway)

uint32_t order_id = 0

Order identifier (as known to client)

std::string_view exchange

Exchange name.

std::string_view symbol

Symbol.

Side side = Side::UNDEFINED

Order side.

double quantity = std::numeric_limits<double>::quiet_NaN()

Order quantity.

OrderType order_type = OrderType::UNDEFINED

Order type.

double price = std::numeric_limits<double>::quiet_NaN()

Limit price (depends on order_type)

TimeInForce time_in_force = TimeInForce::UNDEFINED

Time in force.

PositionEffect position_effect = PositionEffect::UNDEFINED

Position effect.

ExecutionInstruction execution_instruction = ExecutionInstruction::UNDEFINED

Execution instruction.

double stop_price = std::numeric_limits<double>::quiet_NaN()

Stop price (depends on order_type and time_in_force)

double max_show_quantity = std::numeric_limits<double>::quiet_NaN()

Order quantity visible to market (depends on exchange support)

std::string_view order_template

Order template (as known to the gateway)

DownloadBegin

struct roq::DownloadBegin

Identifies the beginning of a download sequence.

Public Members

std::string_view account

Account name (as known to the gateway)

DownloadEnd

struct roq::DownloadEnd

Identifies the end of a download sequence.

Public Members

std::string_view account

Account name (as known to the gateway)

uint32_t max_order_id = 0

Highest previous order identifier (as seen by gateway)

FundsUpdate

struct roq::FundsUpdate

Update relating to available funds.

Public Members

std::string_view account

Account name (as known to the gateway)

std::string_view currency

Currency name.

double balance = std::numeric_limits<double>::quiet_NaN()

Current funds.

double hold = std::numeric_limits<double>::quiet_NaN()

Funds on hold.

MarketByOrderUpdate

struct roq::MarketByOrderUpdate

Update relating to market by order.

Public Members

std::string_view exchange

Exchange name.

std::string_view symbol

Symbol.

roq::span<MBOUpdate> bids

List of bids.

roq::span<MBOUpdate> asks

List of asks.

bool snapshot = false

Full update (possibly old) if true and otherwise an incremental update.

std::chrono::nanoseconds exchange_time_utc = {}

Exchange timestamp (UTC)

MarketByPriceUpdate

struct roq::MarketByPriceUpdate

Update relating to market by price.

Public Members

std::string_view exchange

Exchange name.

std::string_view symbol

Symbol.

roq::span<MBPUpdate> bids

List of bids.

roq::span<MBPUpdate> asks

List of asks.

bool snapshot = false

Full update (possibly old) if true and otherwise an incremental update.

std::chrono::nanoseconds exchange_time_utc = {}

Exchange timestamp (UTC)

MarketDataStatus

struct roq::MarketDataStatus

Update relating to current status of market data connectivity.

Public Members

GatewayStatus status = GatewayStatus::UNDEFINED

Gateway status.

MarketStatus

struct roq::MarketStatus

Update relating to current trading status of a symbol.

Public Members

std::string_view exchange

Exchange name.

std::string_view symbol

Symbol.

TradingStatus trading_status = TradingStatus::UNDEFINED

Trading status.

ModifyOrder

struct roq::ModifyOrder

Fields required to modify an existing order.

Public Members

std::string_view account

Account name (as known to the gateway)

uint32_t order_id = 0

Order identifier (as known to client)

double quantity = std::numeric_limits<double>::quiet_NaN()

New quantity.

double price = std::numeric_limits<double>::quiet_NaN()

New limit price.

OrderAck

struct roq::OrderAck

Acknowledgement that a create/modify/cancel order request has been seen by gateway/exchange.

Public Members

std::string_view account

Account name (as known to the gateway)

uint32_t order_id = 0

Order identifier (as known to client)

RequestType type = RequestType::UNDEFINED

Request type.

Origin origin = Origin::UNDEFINED

Origin of ack.

RequestStatus status = RequestStatus::UNDEFINED

Request status.

Error error = Error::UNDEFINED

Error code.

std::string_view text

Descriptive text.

uint32_t gateway_order_id = 0

Order identifier (as known to gateway)

std::string_view external_order_id

External order identifier (as known to broker or exchange)

std::string_view request_id

Request identifier (as sent to broker or exchange)

OrderManagerStatus

struct roq::OrderManagerStatus

Update relating to current status of order manager connectivity.

Public Members

std::string_view account

Account name (as known to the gateway)

GatewayStatus status = GatewayStatus::UNDEFINED

Gateway status.

OrderUpdate

struct roq::OrderUpdate

Update relating to current status of an order.

Public Members

std::string_view account

Account name (as known to the gateway)

uint32_t order_id = 0

Order identifier (as known to client)

std::string_view exchange

Exchange name.

std::string_view symbol

Symbol.

OrderStatus status = OrderStatus::UNDEFINED

Order status.

Side side = Side::UNDEFINED

Side.

double price = std::numeric_limits<double>::quiet_NaN()

Price.

double remaining_quantity = std::numeric_limits<double>::quiet_NaN()

Remaining quantity.

double traded_quantity = std::numeric_limits<double>::quiet_NaN()

Traded quantity.

PositionEffect position_effect = PositionEffect::UNDEFINED

Position effect.

std::string_view order_template

Order template (as known to the gateway)

std::chrono::nanoseconds create_time_utc = {}

Created timestamp (UTC)

std::chrono::nanoseconds update_time_utc = {}

Updated timestamp (UTC)

uint32_t gateway_order_id = 0

Order identifier (as known to gateway)

std::string_view external_order_id

External order identifier (as known to broker or exchange)

PositionUpdate

struct roq::PositionUpdate

Update relating to current position for a symbol/side/account.

Public Members

std::string_view account

Account name (as known to the gateway)

std::string_view exchange

Exchange name.

std::string_view symbol

Symbol.

Side side = Side::UNDEFINED

Side.

double position = std::numeric_limits<double>::quiet_NaN()

Current position.

uint32_t last_trade_id = 0

Last processed trade identifier.

double position_cost = std::numeric_limits<double>::quiet_NaN()

Position cost.

double position_yesterday = std::numeric_limits<double>::quiet_NaN()

Position as of yesterday.

double position_cost_yesterday = std::numeric_limits<double>::quiet_NaN()

Position cost as of yesterday.

ReferenceData

struct roq::ReferenceData

Update relating to the reference data for a symbol.

Public Members

std::string_view exchange

Exchange name.

std::string_view symbol

Symbol.

SecurityType security_type = SecurityType::UNDEFINED

Security type.

std::string_view currency

Currency name.

std::string_view settlement_currency

Currency name.

std::string_view commission_currency

Currency name.

double tick_size = std::numeric_limits<double>::quiet_NaN()

Minimum price increment.

double limit_up = std::numeric_limits<double>::quiet_NaN()

Limit up price.

double limit_down = std::numeric_limits<double>::quiet_NaN()

Limit down price.

double multiplier = std::numeric_limits<double>::quiet_NaN()

Multiplier (notional)

double min_trade_vol = std::numeric_limits<double>::quiet_NaN()

Minimum trade volume.

OptionType option_type = OptionType::UNDEFINED

Option type.

std::string_view strike_currency

Currency name.

double strike_price = std::numeric_limits<double>::quiet_NaN()

Strike price.

StatisticsUpdate

struct roq::StatisticsUpdate

Update relating to statistics published by the exchange.

Public Members

std::string_view exchange

Exchange name.

std::string_view symbol

Symbol.

roq::span<Statistics> statistics

List of statistics.

bool snapshot = false

Full update (possibly old) if true and otherwise an incremental update.

std::chrono::nanoseconds exchange_time_utc = {}

Exchange timestamp (UTC)

TopOfBook

struct roq::TopOfBook

Update relating to top of book (aggregate price)

Public Members

std::string_view exchange

Exchange name.

std::string_view symbol

Symbol.

Layer layer

Top of book.

bool snapshot = false

Full update (possibly old) if true and otherwise an incremental update.

std::chrono::nanoseconds exchange_time_utc = {}

Exchange timestamp (UTC)

TradeSummary

struct roq::TradeSummary

Update relating to trade reporting by the exchange.

Public Members

std::string_view exchange

Exchange name.

std::string_view symbol

Symbol.

roq::span<Trade> trades

List of trades.

std::chrono::nanoseconds exchange_time_utc = {}

Exchange timestamp (UTC)

TradeUpdate

struct roq::TradeUpdate

Update relating to order being partially or fully filled.

Public Members

std::string_view account

Account name (as known to the gateway)

uint32_t order_id = 0

Order identifier (as known to client)

std::string_view exchange

Exchange name.

std::string_view symbol

Symbol.

Side side = Side::UNDEFINED

Side.

PositionEffect position_effect = PositionEffect::UNDEFINED

Position effect.

std::string_view order_template

Order template (as known to the gateway)

std::chrono::nanoseconds create_time_utc = {}

Created timestamp (UTC)

std::chrono::nanoseconds update_time_utc = {}

Updated timestamp (UTC)

uint32_t gateway_order_id = 0

Order identifier (as known to gateway)

std::string_view external_order_id

External order identifier (as known to broker or exchange)

roq::span<Fill> fills

List of fills.