Inbound Messages#

Note on Terminology: This page uses official OUCH 5.0 terminology (exchange perspective). In this documentation, “Inbound Messages” means Client → Exchange. For client-perspective terminology (Egress/Ingress), see Terminology Glossary.

Inbound messages are sent from the participant to the OUCH host. They are not sequenced, but are processed sequentially by NASDAQ. They are safe for retransmission.

Type O — Enter Order#

Enter Order — Field Specification#

Name

Offset

Length

Type

Notes

Type

0

1

‘O’

Message type

UserRefNum

1

4

Numeric

Unique, strictly increasing

Side

5

1

Alpha

B/S/T/E

Quantity

6

4

Integer

1–999999

Symbol

10

8

Alpha

Stock symbol

Price

18

8

Price

Implied 4 decimals

Time In Force

26

1

Alpha

0/3/5/6/E

Display

27

1

Alpha

Y/N/A

Capacity

28

1

Alpha

A/P/R/O

Intermarket Sweep Elig

29

1

Alpha

Y/N

CrossType

30

1

Alpha

N/O/C/H/S/R/E/A

ClOrdID

31

14

Alpha

Not required unique

Appendage Length

45

2

Integer

Length of appendage

Optional Appendage

47

var

TagValue

See Note 1 for supported options

Notes for Enter Order#

  • Note 1 (Optional Appendage): Available options on Enter Order: Firm, MinQty, CustomerType, MaxFloor, PriceType, PegOffset, DiscretionPrice, DiscretionPriceType, DiscretionPegOffset, PostOnly, RandomReserves, ExpireTime, TradeNow, HandleInst, GroupID, SharesLocated, LocateBroker, UserRefIdx.

Type U — Replace Order Request#

Replace Order Request — Field Specification#

Name

Offset

Length

Type

Notes

Type

0

1

‘U’

Replace message

OrigUserRefNum

1

4

Numeric

Existing order

UserRefNum

5

4

Numeric

New unique UserRefNum

Quantity

9

4

Integer

Total liability

Price

13

8

Price

Replacement price

Time In Force

21

1

Alpha

0/3/5/6

Display

22

1

Alpha

Y/N/A

Intermarket Sweep Elig

23

1

Alpha

Y/N

ClOrdID

24

14

Alpha

Replacement ID

Appendage Length

38

2

Integer

Length

Optional Appendage

40

var

TagValue

See Note 1 for supported options

Notes for Replace Order#

  • Note 1 (Optional Appendage): Supported fields (inherited or overridable) on Replace Order: MinQty, MaxFloor, PriceType, PostOnly, ExpireTime, TradeNow, HandleInst, RandomReserves, PegOffset, DiscretionPrice, DiscretionPriceType, DiscretionPegOffset, SharesLocated, LocateBroker, UserRefIdx, Side.

    • Firm and GroupID are inherited from the original order.

    • If UserRefIdx was used on the original order, it must be present and match here.

The Replace Order Message allows you to cancel and replace an existing order in a single message. This is more efficient than canceling an existing order and immediately succeeding it with a new order. Replacing an order always gives it a new timestamp for its time priority on the book. If you wish you simply partially cancel an order and retain its time priority, send a Cancel Order Message instead.

There are two Order UserRefNums in the Replace Order Message. The first must be filled out with the Order UserRefNum of the existing order; the second must be a new Order UserRefNum for the replacement. The replacement Order UserRefNum must be unique in the same way as Order UserRefNums are in the Enter Order Message, and replacement Order UserRefNums may not be the same as the UserRefNum sent in Enter Order Messages. Any replacement Order UserRefNum that has already been used in another Enter Order Message or Replace Order Message will be ignored.

NASDAQ may respond to the Replace Order Message in several ways:

  1. If the order for the existing Order UserRefNum is no longer live or if the replacement Order UserRefNum was already used, the replacement will be silently ignored. The replacement Order UserRefNum will not be consumed and may be reused in this case.

  2. If the order for the existing Order UserRefNum is live but the details of the replace are invalid (e.g.: new Shares >= 1,000,000), a Cancel Order Message will take the existing order out of the book. The replacement Order UserRefNum will not be consumed, and may be reused in this case.

  3. If the order for the existing Order UserRefNum is live but the existing order cannot be canceled (e.g. the existing Order is a cross order in the late period), there will be an Order Reject Message. This reject message denotes that no change has occurred to the existing order; the existing order remains fully intact with its original instructions. The Order Reject Message consumes the replacement Order UserRefNum, so the replacement Order UserRefNum may not be reused.

  4. If the order for the existing Order UserRefNum is live and can be replaced, you will receive either a Replaced Message or an Atomically Replaced and Canceled Message.

Replace Order Messages may be chained together, so that a single order is replaced over and over again. There is no limit to the number of replaces; however no single order/replace chain may execute more than 999,999 shares cumulatively.

The Shares on the replace denote the total number of shares liable for the whole chain. Here is an example: • Enter Order Message for 500 shares • Accepted Message for 500 shares • Executed Message for 100 shares

At this point, you decide to replace the order. If you want to be exposed for A. the remaining 400 shares, send the Replace Order Message with 500 Shares. This 500 equals the 400 exposed plus the 100 previously executed. B. a new 500 shares, send the Replace Order Message with 600 Shares. This 600 equals the 500 new shares plus the 100 previously executed.

This may seem a bit confusing at first, but it inhibits the risk of double-liability throughout the order/replace chain.

Type X — Cancel Order Request#

Name

Offset

Length

Type

Notes

Type

0

1

‘X’

Cancel message

UserRefNum

1

4

Numeric

Original order

Quantity

5

4

Integer

New intended size (0=cancel)

Appendage Length

9

2

Integer

Optional

Optional Appendage

11

var

TagValue

See Note 1

Notes for Cancel Order#

  • Note 1 (Optional Appendage): Supported option on Cancel Order: UserRefIdx.

The Cancel Order Message is used to request that an order be canceled or reduced. In the Cancel Order Message, you must specify the new “intended order size” for the order. The “intended order size” is the maximum number of shares that can be executed in total after the cancel is applied.

To cancel the entire balance of an order, you would enter a Cancel Order Message with a Shares field of zero. Note that the only acknowledgment to a Cancel Order Message is the resulting Canceled Order Message. There is no “too late to cancel” message since by the time you received it, you would already have gotten the execution. Superfluous Cancel Order Messages are silently ignored.

Type M — Modify Order Request#

Name

Offset

Length

Type

Notes

Type

0

1

‘M’

Modify

UserRefNum

1

4

Numeric

Original

Side

5

1

Alpha

Limited transitions allowed

Quantity

6

4

Integer

New intended size

Appendage Length

10

2

Integer

Optional

Optional Appendage

12

var

TagValue

See Note 2

The Modify Order Message is used to request modifications that will not affect order priority on the book. Since priority of the order does not change (exception noted), allowed modifications are restricted to only the ones specified in the message details below. Increasing share amount is not allowed and requests to do so will be ignored.

Only the following Side modifications are allowed: - S↔E - S↔T - E↔T

Notes for Modify Order#

  • Note 1 (Allowed Side Modifications): Only these side changes are allowed: S E, S T, E T.

  • Note 2 (Optional Appendage): Supported options: UserRefIdx, SharesLocated, LocateBroker.

Type C — Mass Cancel Request#

Name

Offset

Length

Type

Notes

Type

0

1

‘C’

Mass cancel

UserRefNum

1

4

Numeric

Unique

Firm

5

4

Alpha

All caps

Symbol

9

8

Alpha

Optional

Appendage Length

17

2

Integer

Length

Optional Appendage

19

var

TagValue

See Notes 1–2

Notes for Mass Cancel#

  • Note 1 (Supported Options): Side, Group ID, UserRefIdx.

  • Note 2 (Group ID Behavior):

    • If Group ID = 0: all orders without a Group ID are cancelled.

    • If Group ID is not specified: all orders are cancelled regardless of Group ID presence.

Type D — Disable Order Entry Request#

Name

Offset

Length

Type

Notes

Type

0

1

‘D’

Disable

UserRefNum

1

4

Numeric

Unique

Firm

5

4

Alpha

All caps

Appendage Length

9

2

Integer

Optional

Optional Appendage

11

var

TagValue

See Note 1

Notes for Disable Order Entry#

  • Note 1 (Optional Appendage): Supported option: UserRefIdx.

Type E — Enable Order Entry Request#

Name

Offset

Length

Type

Notes

Type

0

1

‘E’

Enable

UserRefNum

1

4

Numeric

Unique

Firm

5

4

Alpha

All caps

Appendage Length

9

2

Integer

Optional

Optional Appendage

11

var

TagValue

See Note 1

Notes for Enable Order Entry#

  • Note 1 (Optional Appendage): Supported option: UserRefIdx.

Type Q — Account Query Request#

Name

Offset

Length

Type

Notes

Type

0

1

‘Q’

Query

Appendage Length

1

2

Integer

Optional

Optional Appendage

3

var

TagValue

See Note 1

Notes for Account Query Request#

  • Note 1 (Optional Appendage): Supported option: UserRefIdx.