ZagTrader

FIX Protocol Tag 40: OrdType

Order type, such as market, limit, stop or stop limit.

Tag number
40
Data type
CHAR
FIX versions
FIX 4.0 to 5.0 SP2
Used in
39 message types

Practical notes on OrdType

OrdType is the order type: 1 Market, 2 Limit, 3 Stop, 4 Stop limit are the common ones; P is Pegged.

  • Limit and stop limit orders need Price (44). Stop and stop limit orders need StopPx (99).
  • Support varies by venue. An unsupported type is usually rejected with OrdRejReason 11 (Unsupported order characteristic).

Common mistakes

  • Sending Price on a market order; some venues reject it, others ignore it.

Changes between FIX versions

  • The FIX 4.4 dictionary has no Market on close (5), On close (A) or Limit on close (B). Close orders are sent as market or limit orders with TimeInForce (59) = 7, At the Close, available from FIX 4.3.
  • FIX 4.3 adds Market if touched (J) and Market with leftover as limit (K).

Tag 40 in each FIX version

Values and message usage as defined in a specific version.

Data type

CHAR: A single character.

Valid values

26 enumerated values across all FIX versions.

ValueMeaningFIX versions
1MarketAll
2LimitAll
3StopAll
4Stop limitAll
5Market on close4.0, 4.1, 4.2, 4.3, 5.0, 5.0 SP1, 5.0 SP2
6With or withoutAll
7Limit or betterAll
8Limit with or withoutAll
9On basisAll
AOn close4.0, 4.1, 4.2, 4.3, 5.0, 5.0 SP1, 5.0 SP2
BLimit on close4.0, 4.1, 4.2, 4.3, 5.0, 5.0 SP1, 5.0 SP2
CForex market4.0, 4.1, 4.2, 4.3, 5.0, 5.0 SP1, 5.0 SP2
DPreviously quotedAll
EPreviously indicatedAll
PPeggedAll
FForex limit4.1, 4.2, 4.3, 5.0, 5.0 SP1, 5.0 SP2
GForex swap4.1, 4.2, 4.3, 4.4, 5.0, 5.0 SP1, 5.0 SP2
HForex previously quoted4.1, 4.2, 4.3, 5.0, 5.0 SP1, 5.0 SP2
IFunari4.2, 4.3, 4.4, 5.0, 5.0 SP1, 5.0 SP2
JMarket if touched4.3, 4.4, 5.0, 5.0 SP1, 5.0 SP2
KMarket with left over as limit4.3, 4.4, 5.0, 5.0 SP1, 5.0 SP2
LPrevious fund valuation point4.3, 4.4, 5.0, 5.0 SP1, 5.0 SP2
MNext fund valuation point4.3, 4.4, 5.0, 5.0 SP1, 5.0 SP2
QCounter order selection5.0, 5.0 SP1, 5.0 SP2
RStop on bid or offer5.0 SP2
SStop limit on bid or offer5.0 SP2

Example

40=1

Illustrative value. In a message, fields are separated by the SOH character (0x01), often shown as | or ^ in logs.

Decode a message with this tag

Message types that use tag 40

Covers every version from FIX 4.0 to 5.0 SP2, including fields reached through components and repeating groups. The version pages above show whether the tag is required in each message.

Field and message data comes from the QuickFIX data dictionaries for FIX 4.0 to 5.0 SP2 and FIXT 1.1, used under the QuickFIX Software License. This product includes software developed by quickfixengine.org (http://www.quickfixengine.org/). Enumerated value names are converted to plain text for reading.