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.

CancelAllOrders

struct roq::CancelAllOrders

Fields required to cancel all orders.

Public Members

std::string_view account

Account name (as known to the gateway)

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 = {}

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 = {}

Order identifier (as known to client)

std::string_view exchange

Exchange name.

std::string_view symbol

Symbol.

Side side = {}

Order side.

double quantity = NaN

Order quantity.

OrderType order_type = {}

Order type.

double price = NaN

Limit price (depends on order_type)

TimeInForce time_in_force = {}

Time in force.

PositionEffect position_effect = {}

Position effect.

ExecutionInstruction execution_instruction = {}

Execution instruction.

double stop_price = NaN

Stop price (depends on order_type and time_in_force)

double max_show_quantity = NaN

Quantity visible to market (requires exchange support)

std::string_view order_template

Order template (as known to the gateway)

std::string_view routing_id

Routing identifier.

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 = {}

Highest previous order identifier (as seen by gateway)

ExternalLatency

struct roq::ExternalLatency

Update relating to external latency.

Public Members

uint16_t stream_id = {}

Stream identifier.

std::chrono::nanoseconds latency = {}

latency measurement (1-way)

FundsUpdate

struct roq::FundsUpdate

Update relating to available funds.

Public Members

uint16_t stream_id = {}

Stream identifier.

std::string_view account

Account name (as known to the gateway)

std::string_view currency

Currency name.

double balance = NaN

Current funds.

double hold = NaN

Funds on hold.

std::string_view external_account

External account name (as known to broker or exchange)

GatewaySettings

struct roq::GatewaySettings

Gateway settings.

Public Members

uint32_t mbp_max_depth = {}

MBP max depth.

bool mbp_allow_price_inversion = false

MBP allow price inversion?

bool mbp_allow_fractional_tick_size = false

MBP allow fractional tick-size?

bool mbp_allow_remove_non_existing = false

MBP allow remove operation on non-existing level?

GatewayStatus

struct roq::GatewayStatus

Update relating to current gateway service status.

Public Members

std::string_view account

Account name (as known to the gateway)

uint64_t supported = {}

Supported update types (bit mask)

uint64_t available = {}

Update types (bit mask) available from all streams.

uint64_t unavailable = {}

Update types (bit mask) unavailable from one or more streams.

MarketByOrderUpdate

struct roq::MarketByOrderUpdate

Update relating to market by order.

Public Members

uint16_t stream_id = {}

Stream identifier.

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

uint16_t stream_id = {}

Stream identifier.

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)

MarketStatus

struct roq::MarketStatus

Update relating to current trading status of a symbol.

Public Members

uint16_t stream_id = {}

Stream identifier.

std::string_view exchange

Exchange name.

std::string_view symbol

Symbol.

TradingStatus trading_status = {}

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 = {}

Order identifier (as known to client)

double quantity = NaN

New quantity.

double price = NaN

New limit price.

OrderAck

struct roq::OrderAck

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

Public Members

uint16_t stream_id = {}

Stream identifier.

std::string_view account

Account name (as known to the gateway)

uint32_t order_id = {}

Order identifier (as known to client)

RequestType type = {}

Request type.

Origin origin = {}

Origin of ack.

RequestStatus status = {}

Request status.

Error error = {}

Error code.

std::string_view text

Descriptive text.

uint32_t gateway_order_id = {}

Order identifier (as known to gateway)

std::string_view external_account

External account name (as known to broker or exchange)

std::string_view external_order_id

External order identifier (as known to broker or exchange)

std::string_view routing_id

Routing identifier.

std::string_view request_id

Request identifier (as sent to broker or exchange)

OrderUpdate

struct roq::OrderUpdate

Update relating to current status of an order.

Public Members

uint16_t stream_id = {}

Stream identifier.

std::string_view account

Account name (as known to the gateway)

uint32_t order_id = {}

Order identifier (as known to client)

std::string_view exchange

Exchange name.

std::string_view symbol

Symbol.

OrderStatus status = {}

Order status.

Side side = {}

Side.

double price = NaN

Price.

double remaining_quantity = NaN

Remaining quantity.

double traded_quantity = NaN

Traded quantity.

PositionEffect position_effect = {}

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 = {}

Order identifier (as known to gateway)

std::string_view external_account

External account name (as known to broker or exchange)

std::string_view external_order_id

External order identifier (as known to broker or exchange)

std::string_view routing_id

Routing identifier.

PositionUpdate

struct roq::PositionUpdate

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

Public Members

uint16_t stream_id = {}

Stream identifier.

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.

double position = NaN

Current position.

uint32_t last_trade_id = {}

Last processed trade identifier.

double position_cost = NaN

Position cost.

double position_yesterday = NaN

Position as of yesterday.

double position_cost_yesterday = NaN

Position cost as of yesterday.

std::string_view external_account

External account name (as known to broker or exchange)

RateLimitUsage

struct roq::RateLimitUsage

Rate-limit usage vs high-water mark.

Public Members

uint16_t stream_id = {}

Stream identifier.

bool above_high_water_mark = false

true when there is an increased probability that the next request could fail

ReferenceData

struct roq::ReferenceData

Update relating to the reference data for a symbol.

Public Members

uint16_t stream_id = {}

Stream identifier.

std::string_view exchange

Exchange name.

std::string_view symbol

Symbol.

std::string_view description

Description.

SecurityType security_type = {}

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 = NaN

Minimum price increment.

double multiplier = NaN

Multiplier (notional)

double min_trade_vol = NaN

Minimum trade volume.

OptionType option_type = {}

Option type.

std::string_view strike_currency

Strike currency.

double strike_price = NaN

Strike price.

std::string_view underlying

Underlying instrument.

std::string_view time_zone

Time-zone.

roq::chrono::days issue_date = {}

Issue date.

roq::chrono::days settlement_date = {}

Settlement date.

std::chrono::seconds expiry_datetime = {}

Expiry datetime.

std::chrono::seconds expiry_datetime_utc = {}

Expiry datetime.

StatisticsUpdate

struct roq::StatisticsUpdate

Update relating to statistics published by the exchange.

Public Members

uint16_t stream_id = {}

Stream identifier.

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)

StreamStatus

struct roq::StreamStatus

Update relating to current stream status.

Public Members

uint16_t stream_id = {}

Stream identifier.

std::string_view account

Account name (as known to the gateway)

uint64_t supports = {}

Update types (bit mask)

ConnectionStatus status = {}

Connection status.

StreamType type = {}

Stream type.

Priority priority = {}

Priority.

TopOfBook

struct roq::TopOfBook

Update relating to top of book (aggregate price)

Public Members

uint16_t stream_id = {}

Stream identifier.

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

uint16_t stream_id = {}

Stream identifier.

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

uint16_t stream_id = {}

Stream identifier.

std::string_view account

Account name (as known to the gateway)

uint32_t order_id = {}

Order identifier (as known to client)

std::string_view exchange

Exchange name.

std::string_view symbol

Symbol.

Side side = {}

Side.

PositionEffect position_effect = {}

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 = {}

Order identifier (as known to gateway)

std::string_view external_account

External account name (as known to broker or exchange)

std::string_view external_order_id

External order identifier (as known to broker or exchange)

std::string_view routing_id

Routing identifier.

roq::span<Fill> fills

List of fills.