public class OtcMarketsOrder extends Order
Order
for the symbols traded on the OTC Markets. It includes the OTC Markets
specific quote data, such as Quote Access Payment (QAP) value
,
Quote Price Type
, Open/Closed status
,
and Unsolicited quote indicator
. The original event (OTC Quote) published by the exchange
is presented in the form of two separate OTCMarketsOrder
events (bid and ask side).
Note that the description of the fields (e.g. QAP) uses the original "quote" term.
For more information about original fields, QAP, Quote Flags and Extended Quote Flags, see OTC Markets Multicast Data Feed.
For more information about display requirements, see OTC Markets Display Requirements.
Like regular orders, OTC Markets order events arrive from
multiple sources for the same market symbol and are distinguished by their index
.
It is unique across all the sources of depth information for the symbol.
The event with sizeAsDouble
either 0
or NaN
is a signal to remove previously received order for the corresponding index.
The method hasSize
is a convenient method to test for size presence.
orderSide
open
unsolicited
otcMarketsPriceType
saturated
autoExecution
nmsConditional
OTCMarketsOrder
event has the following properties:
eventSymbol
- underlying symbol of this event;
source
- source of this event;
eventFlags
- transactional event flags;
index
- unique per-symbol index of this order;
time
- time of this order;
timeNanoPart
- microseconds and nanoseconds time part of this order;
sequence
- sequence of this order;
price
- price of this order;
size
- size of this order as integer number (rounded toward zero);
sizeAsDouble
- size of this order as floating number with fractions;
executedSize
- executed size of this order;
count
- number of individual orders in this aggregate order;
exchangeCode
- exchange code of this order;
orderSide
- side of this order;
scope
- scope of this order;
marketMaker
- market maker or other aggregate identifier of this order;
QAP
- Quote Access Payment of this OTC Markets order event;
open
- whether this OTC Markets order event is open;
unsolicited
- whether this OTC Markets order event is unsolicited;
otcMarketsPriceType
- OTC Markets price type of this OTC Markets order.
saturated
- whether this OTC Markets order event should NOT be considered for the inside price.
autoExecution
- whether this OTC Markets order is in 'AutoEx' mode.
nmsConditional
- whether this OTC Markets order represents a NMS conditional.
eventFlags
property.
See Event Flags section of OrderBase
class documentation for details.
IndexedEventModel
class handles all the snapshot and transaction logic and conveniently represents
a list current of events.
It relies on the code of AbstractIndexedEventModel
to handle this logic.
Use the source code of AbstractIndexedEventModel
for clarification on transactions and snapshot logic.
DXPublisher.publishEvents
method, least significant 32 bits of order index
must be in a range of from 0 to
Integer.MAX_VALUE
inclusive.
Use setSource
method after setIndex
to properly
include source identifier into the index.
A snapshot has to be published in the descending order of index
, starting with
an event with the largest index and marking it with IndexedEvent.SNAPSHOT_BEGIN
bit in eventFlags
,
and finishing the snapshot with an event that has zero 32 least significant bits of index.
IndexedEvent.SNAPSHOT_END
bit in eventFlags
is optional during publishing.
It will be properly set on receiving end anyway.
DXFeed.getLastEvent
method.
action
- event business meaning (see OrderAction
for more details)actionTime
- time of the last actionorderId
- ID of this orderauxOrderId
- additional ID for this ordertradeId
- trade (order execution) IDtradePrice
- price of the tradetradeSize
- size of the tradeOtcMarketsOrder#<source-id>
,
where <source-id>
is up to 4 ASCII characters with a mnemonic for the source like "pink".LEVEL_AGGREGATE, LEVEL_COMPOSITE, LEVEL_ORDER, LEVEL_REGIONAL, MAX_SEQUENCE, SIDE_BUY, SIDE_SELL
REMOVE_EVENT, SNAPSHOT_BEGIN, SNAPSHOT_END, SNAPSHOT_MODE, SNAPSHOT_SNIP, TX_PENDING
Constructor and Description |
---|
OtcMarketsOrder()
Creates new OTC Markets order event with default values.
|
OtcMarketsOrder(String eventSymbol)
Creates new OTC Markets order event with the specified event symbol.
|
Modifier and Type | Method and Description |
---|---|
protected StringBuilder |
fieldsToString(StringBuilder sb)
Appends the field values of this event to a provided
StringBuilder . |
OtcMarketsPriceType |
getOtcMarketsPriceType()
Returns OTC Markets price type of this OTC Markets order events.
|
int |
getQuoteAccessPayment()
Returns Quote Access Payment (QAP) of this OTC Markets order.
|
boolean |
isAutoExecution()
Returns whether this event is in 'AutoEx' mode.
|
boolean |
isNmsConditional()
Returns whether this event represents a NMS conditional.
|
boolean |
isOpen()
Returns whether this event is available for business within the operating hours of the OTC Link system.
|
boolean |
isSaturated()
Returns whether this event should NOT be considered for the inside price.
|
boolean |
isUnsolicited()
Returns whether this event is unsolicited.
|
void |
setAutoExecution(boolean autoExecution)
Changes whether this event is in 'AutoEx' mode.
|
void |
setNmsConditional(boolean nmsConditional)
Changes whether this event represents a NMS conditional.
|
void |
setOpen(boolean open)
Changes whether this event is available for business within the operating hours of the OTC Link system.
|
void |
setOtcMarketsPriceType(OtcMarketsPriceType otcPriceType)
Changes OTC Markets price type of this OTC Markets order events.
|
void |
setQuoteAccessPayment(int quoteAccessPayment)
Changes Quote Access Payment (QAP) of this OTC Markets order.
|
void |
setSaturated(boolean saturated)
Changes whether this event should NOT be considered for the inside price.
|
void |
setUnsolicited(boolean unsolicited)
Changes whether this event is unsolicited.
|
getMarketMaker, setMarketMaker
getAction, getActionTime, getAuxOrderId, getCount, getEventFlags, getExchangeCode, getExecutedSize, getFlags, getIndex, getLevel, getOrderId, getOrderSide, getPrice, getScope, getSequence, getSide, getSize, getSizeAsDouble, getSource, getTime, getTimeNanoPart, getTimeNanos, getTimeSequence, getTradeId, getTradePrice, getTradeSize, hasSize, setAction, setActionTime, setAuxOrderId, setCount, setEventFlags, setExchangeCode, setExecutedSize, setFlags, setIndex, setLevel, setOrderId, setOrderSide, setPrice, setScope, setSequence, setSide, setSize, setSizeAsDouble, setSource, setTime, setTimeNanoPart, setTimeNanos, setTimeSequence, setTradeId, setTradePrice, setTradeSize, toString
getEventSymbol, getEventTime, setEventSymbol, setEventTime
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getEventSymbol, getEventTime, setEventSymbol, setEventTime
public OtcMarketsOrder()
public OtcMarketsOrder(String eventSymbol)
eventSymbol
- event symbol.public int getQuoteAccessPayment()
public void setQuoteAccessPayment(int quoteAccessPayment)
quoteAccessPayment
- QAP of this OTC Markets order.public boolean isOpen()
true
if this event is available for business within the operating hours of the OTC Link system.public void setOpen(boolean open)
open
- true
if this event is available for business within the operating hours of the OTC Link system.public boolean isUnsolicited()
true
if this event is unsolicited.public void setUnsolicited(boolean unsolicited)
unsolicited
- true
if this event is unsolicited.public OtcMarketsPriceType getOtcMarketsPriceType()
public void setOtcMarketsPriceType(OtcMarketsPriceType otcPriceType)
otcPriceType
- OTC Markets price type of this OTC Markets order events.public boolean isSaturated()
true
if this event should NOT be considered for the inside price.public void setSaturated(boolean saturated)
saturated
- true
if this event should NOT be considered for the inside price.public boolean isAutoExecution()
true
if this event is in 'AutoEx' mode.public void setAutoExecution(boolean autoExecution)
autoExecution
- true
if this event is in 'AutoEx' mode.public boolean isNmsConditional()
size
is a round lot at least two times greater than the minimum round lot size in the security
and a trade message relating to the event cannot be sent or filled for less than the displayed size.true
if this event represents a NMS conditional.public void setNmsConditional(boolean nmsConditional)
nmsConditional
- true
if this event represents a NMS conditional.protected StringBuilder fieldsToString(StringBuilder sb)
StringBuilder
.
This method is responsible for converting each field to a string representation and appending it
to the StringBuilder
passed as a parameter.
Inheritor classes are encouraged to override this method to add additional fields specific
to their implementations. When overriding, the subclass should first call
super.fieldsToString(sb)
before appending its own fields to maintain the
structure of the data representation.
fieldsToString
in class Order
sb
- instance to which field values are appended.Copyright © 2002–2025 Devexperts LLC. All rights reserved.