Enums

All enums have been auto-generated. This adds some convenience:

  • Conversion to string representation.

  • Validation when converting from integer represenation (e.g. reading from a byte stream).

ConnectionStatus

struct roq::ConnectionStatus

Enumeration of exchange connectivity status as seen from a gateway.

Public Types

enum type_t

helper

Values:

enumerator UNDEFINED
enumerator DISCONNECTED
enumerator CONNECTING
enumerator LOGIN_SENT
enumerator DOWNLOADING
enumerator READY
enumerator LOGGED_OUT

Error

struct roq::Error

Enumeration of error types.

Public Types

enum type_t

helper

Values:

enumerator UNDEFINED
enumerator UNKNOWN
enumerator NOT_SUPPORTED

Request type not supported.

enumerator INVALID_ACCOUNT
enumerator INVALID_ORDER_ID
enumerator INVALID_EXCHANGE
enumerator INVALID_SYMBOL
enumerator INVALID_SIDE
enumerator INVALID_POSITION_EFFECT
enumerator INVALID_QUANTITY
enumerator INVALID_MAX_SHOW_QUANTITY
enumerator INVALID_ORDER_TYPE
enumerator INVALID_TIME_IN_FORCE
enumerator INVALID_EXECUTION_INSTRUCTION
enumerator INVALID_ORDER_TEMPLATE
enumerator INVALID_PRICE
enumerator INVALID_STOP_PRICE
enumerator INVALID_ROUTING_ID
enumerator INVALID_REQUEST_VERSION
enumerator INVALID_REQUEST_ID
enumerator INVALID_REQUEST_TYPE
enumerator INVALID_REQUEST_STATUS
enumerator INVALID_REQUEST_ARGS

Request arguments did not meet validation rules.

enumerator UNKNOWN_EXTERNAL_ORDER_ID

An external order identifier has not yet been received.

enumerator NOT_AUTHORIZED

User is not authorized.

enumerator REQUEST_RATE_LIMIT_REACHED

Request rate limit has been reached.

enumerator GATEWAY_NOT_READY

Gateway not ready (could be disconnected or currently downloading)

enumerator NETWORK_ERROR

Network disconnect event (unknown request/order status)

enumerator TIMEOUT

Response has not been received (unknown request/order status)

enumerator PARSE_ERROR

Message parse error (unknown request/order status)

enumerator MODIFY_HAS_NO_EFFECT

Modify request has no effect on order.

enumerator TOO_LATE_TO_MODIFY_OR_CANCEL

Too late to modify or cancel (order has been filled or is already canceled)

enumerator CONDITIONAL_REQUEST_HAS_FAILED

Happens when gateway detects chain failure.

enumerator UNKNOWN_ORDER_ID
enumerator INSUFFICIENT_FUNDS

Insufficient funds for order action.

ExecutionInstruction

struct roq::ExecutionInstruction

Enumeration of execution types.

Public Types

enum type_t

helper

Values:

enumerator UNDEFINED
enumerator PARTICIPATE_DO_NOT_INITIATE

Cancel if order would have executed on placement (i.e. not as maker)

enumerator CANCEL_IF_NOT_BEST

Cancel if order can not be placed at best price.

enumerator DO_NOT_INCREASE

Order may only reduce net position, order quantity can automatically be reduced by exchange.

enumerator DO_NOT_REDUCE

Order can not be partially filled, aka. all-or-none (AON) orders.

OptionType

struct roq::OptionType

Enumeration of option types.

Public Types

enum type_t

helper

Values:

enumerator UNDEFINED
enumerator CALL
enumerator PUT

OrderStatus

struct roq::OrderStatus

Last known order status received from exchange.

Public Types

enum type_t

helper

Values:

enumerator UNDEFINED
enumerator SENT

Order has been sent to exchange (no response has been received yet)

enumerator ACCEPTED

Order has been accepted by exchange and is not yet been activated.

enumerator SUSPENDED

Order has been suspended and requires external action to re-activate.

enumerator WORKING

Order is working and has not yet been completely filled.

enumerator STOPPED

Order has guaranteed fill at as of yet unknown price.

enumerator COMPLETED

Order has been completely filled.

enumerator EXPIRED

Order has expired.

enumerator CANCELED

Order has been canceled.

enumerator REJECTED

Order has been rejected.

OrderType

struct roq::OrderType

Enumeration of order types.

Public Types

enum type_t

helper

Values:

enumerator UNDEFINED
enumerator MARKET
enumerator LIMIT

OrderUpdateAction

struct roq::OrderUpdateAction

Enumeration of order update action types.

Public Types

enum type_t

helper

Values:

enumerator UNDEFINED
enumerator NEW
enumerator MODIFY
enumerator REMOVE

Origin

struct roq::Origin

Enumeration of origin types.

Public Types

enum type_t

helper

Values:

enumerator UNDEFINED
enumerator CLIENT
enumerator GATEWAY
enumerator BROKER
enumerator EXCHANGE

PositionEffect

struct roq::PositionEffect

Enumeration of position effect types.

Public Types

enum type_t

helper

Values:

enumerator UNDEFINED
enumerator OPEN
enumerator CLOSE

Priority

struct roq::Priority

Enumeration of priority.

Public Types

enum type_t

helper

Values:

enumerator UNDEFINED
enumerator PRIMARY

Primary.

RequestStatus

struct roq::RequestStatus

Enumeration of request status types.

Public Types

enum type_t

helper

Values:

enumerator UNDEFINED
enumerator FORWARDED
enumerator ACCEPTED
enumerator REJECTED
enumerator DISCONNECTED
enumerator TIMEOUT
enumerator FAILED

Generic failure.

RequestType

struct roq::RequestType

Enumeration of request types.

Public Types

enum type_t

helper

Values:

enumerator UNDEFINED
enumerator CREATE_ORDER
enumerator MODIFY_ORDER
enumerator CANCEL_ORDER

SecurityType

struct roq::SecurityType

Enumeration of security/instrument types.

Public Types

enum type_t

helper

Values:

enumerator UNDEFINED
enumerator SPOT
enumerator FUTURES
enumerator OPTION

Side

struct roq::Side

Enumeration of the side of a trade.

Public Types

enum type_t

helper

Values:

enumerator UNDEFINED
enumerator BUY
enumerator SELL

StatisticsType

struct roq::StatisticsType

Enumeration of a statistics type.

Public Types

enum type_t

helper

Values:

enumerator UNDEFINED
enumerator OPEN_PRICE
enumerator SETTLEMENT_PRICE
enumerator CLOSE_PRICE
enumerator OPEN_INTEREST
enumerator PRE_OPEN_INTEREST
enumerator PRE_SETTLEMENT_PRICE
enumerator PRE_CLOSE_PRICE
enumerator HIGHEST_TRADED_PRICE
enumerator LOWEST_TRADED_PRICE
enumerator UPPER_LIMIT_PRICE
enumerator LOWER_LIMIT_PRICE
enumerator INDEX_VALUE
enumerator MARGIN_RATE
enumerator FUNDING_RATE
enumerator FUNDING_RATE_PREDICTION
enumerator TRADE_VOLUME

StreamType

struct roq::StreamType

Enumeration of stream types.

Public Types

enum type_t

helper

Values:

enumerator UNDEFINED
enumerator FIX

FIX.

enumerator WEB_SOCKET

Web-Socket.

enumerator REST

REST.

SupportType

struct roq::SupportType

Enumeration of support types.

Public Types

enum type_t

helper

Values:

enumerator UNDEFINED
enumerator REFERENCE_DATA

Reference data.

enumerator MARKET_STATUS

Market status.

enumerator TOP_OF_BOOK

Top of book.

enumerator MARKET_BY_PRICE

Market by price.

enumerator MARKET_BY_ORDER

Market by order.

enumerator TRADE_SUMMARY

Trade summary.

enumerator STATISTICS

Statistics.

enumerator CREATE_ORDER

Create order.

enumerator MODIFY_ORDER

Modify order.

enumerator CANCEL_ORDER

Cancel order.

enumerator ORDER_ACK

Order ack.

enumerator ORDER

Order.

enumerator ORDER_STATE

Order.

enumerator TRADE

Trade.

enumerator POSITION

Position.

enumerator FUNDS

Funds.

TimeInForce

struct roq::TimeInForce

Order life-time, aka time in force.

Public Types

enum type_t

helper

Values:

enumerator UNDEFINED
enumerator GFD

Good for day, aka DAY.

enumerator GTC

Good till canceled.

enumerator OPG

At the open.

enumerator IOC

Immediate or cancel.

enumerator FOK

Fill or kill.

enumerator GTX

Good till crossing.

enumerator GTD

Good till date.

enumerator AT_THE_CLOSE

At the close.

enumerator GOOD_THROUGH_CROSSING

Good through crossing.

enumerator AT_CROSSING

At crossing.

enumerator GOOD_FOR_TIME

Good for time.

enumerator GFA

Good for auction.

enumerator GFM

Good for this month.

TradingStatus

struct roq::TradingStatus

Enumeration of the tradig status of a symbol.

Public Types

enum type_t

helper

Values:

enumerator UNDEFINED
enumerator START_OF_DAY

No matching, no order actions.

enumerator PRE_OPEN

No matching, all order actions.

enumerator PRE_OPEN_NO_CANCEL

No matching, only new orders.

enumerator PRE_OPEN_FREEZE

Matching, no order actions.

enumerator OPEN

Matching, all order actions.

enumerator FAST_MARKET

Same as Open, some settings could be relaxed by the exchange.

enumerator HALT

No matching, only order cancellation.

enumerator CLOSE_NOT_FINAL

Same as Close, state required to support mid-session PreOpen.

enumerator PRE_CLOSE

No matching, all order actions.

enumerator PRE_CLOSE_NO_CANCEL

No matching, only new orders.

enumerator PRE_CLOSE_FREEZE

Matching, no order actions.

enumerator CLOSE

No matching, no order actions, good-for-day orders automatically canceled.

enumerator POST_CLOSE

No matching, all order actions (only with next-trading-day validity)

enumerator END_OF_DAY

No matching, no order actions.