OUCH Trading Specificationfor Bonds
Version 1.4
Updated 1 April 2020

OUCH Trading Specification for Bonds

2020-04-01

Table of Contents
1.

Introduction .................................................................................................................................. 3

2.

Overview ...................................................................................................................................... 3

3.

Fault Redundancy ......................................................................................................................... 3

4.

Service Configuration ................................................................................................................... 3

5.

Data Types .................................................................................................................................... 3

6.

Inbound Messages ........................................................................................................................ 3

7.

6.1

Enter Order Message ............................................................................................................. 4

6.2

Replace Order Message ......................................................................................................... 5

6.3

Cancel Order Message .......................................................................................................... 6

Outbound Sequenced Messages ................................................................................................... 6
7.1

System Event Message .......................................................................................................... 6

7.2

Order Accepted Message ....................................................................................................... 6

7.3

Order Replaced Message ....................................................................................................... 77.4

Order Canceled Message ....................................................................................................... 87.5

Order AIQ Canceled Message ............................................................................................... 97.6

Order Executed with Counter Party Message ..................................................................... 107.7

Order Rejected Message...................................................................................................... 10Revision History ................................................................................................................................ 122

OUCH Trading Specification for Bonds

1.

2020-04-01

Introduction

This document explains access to the bonds trading services of Japannext PTS via the OUCH protocol. It
describes the service's configuration and specifies the application messages. For further information andinquiries regarding trading services or for questions concerning connectivity please contact Japannext PTS
Technical Support via email to: ito@japannext.co.jp.

2.

Overview

The message protocol of OUCH is widely used and considered an industry standard. By using the OUCH
protocol, clients are able to access different markets and liquidity pools operated by Japannext PTS. They
can enter new orders, modify or cancel existing orders, and receive execution reports in real-time.
The point-to-point transport layer for OUCH messages is SoupBinTCP.

3.

Fault Redundancy

A single OUCH account can be bound to multiple physical OUCH machines, which then act as mirrors ofeach other for fault redundancy. In this configuration, these OUCH machines are able to accept orders andcancel requests, and any outbound messages will be simultaneously generated.

4.

Service Configuration

An OUCH trading service can be configured to accept and maintain multiple OUCH sessions per client.
However only one active connection is allowed to a particular OUCH machine per account.
For any client's OUCH account, the Cancel on Disconnect feature is always active. All open orders createdby an OUCH account which has lost connection to all OUCH hosts due to any reason, will be automaticallywithdrawn. For every withdrawn order an unsolicited cancellation message will be sent to the client uponconnection re-establishment.

5.

Data Types

Integer fields are unsigned big-endian (network byte order) binary encoded numbers.
Signed Integer fields are signed big-endian (network byte order) binary encoded numbers.
Alpha fields are left-justified and padded on the right with spaces.
Token fields are 4 byte Integer fields. They are sequential and increasing, and must be unique per OUCH
account within a trading day.
Price fields are 4 byte Signed Integer fields. When converted to fixed point number format they have 7 whole
number digits and 3 decimal places. The maximum representable value is 2,147,483.646 (7FFFFFFE hex)
and the minimum representable value is -2,147,483.648 (80000000 hex).
Quantity fields are 4 byte Integer fields with a maximum representable value of 2,147,483,647 (7FFFFFFF
hex).

6.

Inbound Messages

Inbound messages are sent from the client's application to the OUCH host. All inbound messages may berepeated benignly. This gives the client the ability to re-send any inbound message if it is uncertain whether
Japannext PTS received it in the case of a connection loss or an application error.
The idea of benign inbound message retransmission with end-to-end acknowledgment is fundamental to thefault redundancy implementation. If the client's connection ever fails, there is no way of knowing if pending
messages actually made it over the link before the failure. A robust OUCH client can safely re-send any3

OUCH Trading Specification for Bonds

2020-04-01

pending messages over a mirrored link without worrying about generating duplicates.
All inbound messages on an OUCH port are processed sequentially. This guarantees that if two orders areentered consecutively on the same connection, the first order entered will always be accepted first.

6.1 Enter Order Message
An Enter Order Message is used to enter a new order into the Japannext PTS execution system.
Every valid order sent is acknowledged by an Order Accepted Message. An Enter Order Message with an Order
Token out of sequence will be silently ignored.
NameOffset

LengthType

Comments

Message Type

01AlphaValue is O = Enter Order Message.

Order Token

14TokenMust be unique per OUCH account within a trading day and increasing.

Client Reference

510Alpha

Assigned by the client.
This field is forwarded to the clearing and settlement venues.
There is no validation of this field.

Buy/SellIndicator

151Alpha

Side of order.
Values:B = Buy
S = SellQuantity

164Integer

Number of bonds.

Orderbook Id

204Integer

Bond code per SICC definition.

Group244Alpha

Orderbook group identifier.
Values:DJGB = JGB MarketPrice

284Signed
Integer

Yield of the order.

Time in Force

324Integer

Specifies how long the order remains in effect.
Values:0 = Immediate
99999 = Day
Other values are not supported (order will be rejected).

Firm Id

364Integer

Identifier for the order entry firm.
This field should be set to zero unless specifying a client's MPID.
Also forwarded to the downstream systems if required.

Display401Alpha

Instructions for order handling.
Values:P = Post-only
Leave blank if unused.

Capacity

411Alpha

Designates the capacity of the firm placing the order.
Values:A = Agency
P = Principal

Minimum
Quantity

424Integer

Specifies the minimum acceptable quantity to execute.
Non zero values are only supported for immediate orders.

OrderClassification

46

1AlphaHigh Frequency Trading (HFT) order classification.
Values:
1 = Non HFT
3 = HFT market making strategy
4 = HFT arbitrage strategy
5 = HFT directional strategy
6 = HFT other strategy

4

OUCH Trading Specification for Bonds
Name
Cash Margin
TypeOffsetLength47

1TypeAlpha

2020-04-01

Comments
Cash margin type of the order.
Values:
1 = Cash

6.2 Replace Order Message
A Replace Order Message is used to modify an existing order. It requires two valid order tokens, an existing
token which must match an existing order for that account and a replacement token which must comply as
for the Enter Order Message.
A Replace Order Message will be silently ignored if the Existing Order Token is no longer live or theReplacement Order Token is out of sequence.
If the order associated with the Existing Order Token is live but the replace details (except the Replacement
Order Token) are invalid, the order will be canceled and removed from the book. In this case theReplacement Order Token is not consumed and may be reused.
The Quantity field on the Replace Order Message denotes the total quantity for the entire order chain. For
example:•An order is entered for a quantity of 100, it is validated and accepted.

•A quantity of 25 is executed.

•An additional quantity of 15 is executed.

•If the client wishes to replace the order and still be exposed for the balance of 60, then the Replace
Order Message must specify a quantity of 100 – the current balance plus the cumulative executedquantity.

An order may not be replaced with a new total quantity less than the cumulative executed quantity. An
attempt to do so results in the cancellation of the existing order.
For an order replaced with a new total quantity equal to the cumulative executed quantity, the replace is
accepted with state Dead.
NameOffset

LengthType

Comments

Message Type

01

Alpha

Value is U = Replace Order Message.

Existing Order
Token

14

Token

Must match exactly with that of the current live order.

Replacement
Order Token

54

Token

Must be unique per OUCH account within a trading day and increasing.

Quantity

94Integer

Total number of bonds for the entire order chain, that is, the desired balanceplus the cumulative number of bonds executed.

Price

134Signed
Integer

Yield of the order.

Time in Force

174Integer

Specifies how long the order remains in effect.
Values:0 = Immediate
99999 = Day
Other values are not supported (order will be rejected).

Display

211

Alpha

Instructions for order handling.
Values:P = Post-only
Leave blank if unused.

5

OUCH Trading Specification for Bonds
NameMinimumQuantityOffset

Length224

TypeInteger

2020-04-01

Comments
Specifies the minimum acceptable quantity to execute.
Non zero values are only supported for immediate orders.

6.3 Cancel Order Message
A Cancel Order Message is used to request that an order be canceled.
Note that the only acknowledgment to a Cancel Order Message is the resulting Order Canceled Message. There is no“too late to cancel” message and superfluous Cancel Order Messages are silently ignored.
NameOffset

Length

TypeComments

Message Type

01AlphaValue is X = Cancel Order Message.

Order Token

14TokenMust match exactly with that of the current live order.

Quantity

54Integer

Reserved.
Field will be ignored, although recommended to set to zero.

Outbound Sequenced Messages

7.

Outbound messages are generated by the OUCH host and received by the client's application.

7.1 System Event Message
A System Event Message signals a Japannext PTS system wide event.
NameOffset

Length

TypeComments

Message Type01

Alpha

Value is S = System Event Message.

Timestamp

1

8Integer

Number of nanoseconds past midnight.

System Event

91

Alpha

Refer to the System Events table below.

Table 1: System EventsEventDescription

SStart of Day – Always the first message. Indicates the market is open and ready tostart accepting orders.

EEnd of Day – Indicates the market is closed and will not accept any new orders.
There will be no further executions.

7.2 Order Accepted Message
An Order Accepted Message acknowledges the receipt and acceptance of a valid Enter Order Message. The data
fields from the Enter Order Message are echoed back in this message.
An Order Accepted Message is sent with state Dead for an immediate order which is accepted but fails toexecute. No additional messages will be sent for that order. Order state Dead means that the order wasaccepted and automatically canceled.
Name

OffsetLengthType

Comments

Message Type

01AlphaValue is A = Order Accepted Message.

Timestamp

18Integer

Number of nanoseconds past midnight.

Order Token

94Token

Order Token as entered.

6

OUCH Trading Specification for Bonds
Name

OffsetLengthType

Client Reference

1310Alpha

Client Reference as entered.

Buy/SellIndicator

231Alpha

Buy/Sell Indicator as entered.
Values:B = Buy
S = SellQuantity

244Integer

Number of bonds accepted.

Orderbook Id

284Integer

Orderbook identifier as entered.

Group324Alpha

Orderbook group identifier as entered.
Values:DJGB = JGB Market

Price

364Signed
Integer

Accepted yield of the order.

Time in Force

404Integer

Time in Force as accepted.
Values:0 = Immediate
99999 = Day

Firm Id

444Integer

Firm identifier as accepted.

Display48

1AlphaDisplay as accepted.
Values:P = Post-only
Blank if unused.

Capacity

49

1AlphaCapacity of the firm placing the order as entered.
Values:A = Agency
P = PrincipalOrder Number508Integer

Day unique reference number of the order.

MinimumQuantity

584Integer

The accepted minimum acceptable quantity to execute.

Order State621Alpha

Order state upon acceptance.
Values:
L = Live
D = DeadOrderClassification

631AlphaHigh Frequency Trading (HFT) order classification.
Values:
1 = Non HFT
3 = HFT market making strategy
4 = HFT arbitrage strategy
5 = HFT directional strategy
6 = HFT other strategy

Cash Margin
Type641AlphaCash margin type of the order.
Values:
1 = Cash

2020-04-01

Comments

7.3 Order Replaced MessageAn Order Replaced Message acknowledges the receipt and acceptance of a valid Replace Order Message. The data
fields from the Replace Order Message are echoed back in this message.
In the same manner as Order Accepted Messages, Order Replaced Messages sent with state Dead denote that a replace
was accepted and then automatically canceled.

7

OUCH Trading Specification for Bonds
NameType

2020-04-01

OffsetLengthComments

Message Type01

Alpha

Value is U = Order Replaced Message.

Timestamp18Integer

Number of nanoseconds past midnight.

Replacement
Order Token94Token

Replacement Order Token as entered.

Buy/SellIndicator

131Alpha

Buy/Sell Indicator as entered on the original order in the chain.
Values:B = Buy
S = SellQuantity

144Integer

Total number of bonds outstanding.

Orderbook Id

184Integer

Orderbook identifier as entered on the original order in the chain.

Group224Alpha

Orderbook group identifier as entered on the original order in the chain.
Values:DJGB = JGB Market

Price

264Signed
Integer

Accepted yield of the order.

Time in Force

304Integer

Time in Force as accepted.
Values:0 = Immediate
99999 = Day

Display341Alpha

Display as accepted.
Values:P = Post-only
Blank if unused.

Order Number

358Integer

Day unique reference number of the order.

Minimum
Quantity

434Integer

The accepted minimum acceptable quantity to execute.

Order State

47

1AlphaOrder state upon replacement.
Values:
L = Live
D = DeadPrevious Order
Token

48

4TokenOrder token of the replaced order.

7.4 Order Canceled Message
An Order Canceled Message informs that an order has been canceled. This could be acknowledging a Cancel Order
Message, or it could be the result of the order being canceled automatically.
Name

OffsetLengthType

CommentsMessage Type01Alpha

Value is C = Order Canceled Message.

Timestamp

18Integer

Number of nanoseconds past midnight.

Order Token

94Token

Order token of the canceled order.

Decrement
Quantity

134Integer

Number of bonds decremented from the order.
This number is incremental, not cumulative.

Order Canceled
Reason171Alpha

Reason the order was reduced or canceled.
Refer to the Order Canceled Reasons table below.

8OUCH Trading Specification for Bonds

2020-04-01

Table 2: Order Canceled ReasonsReasonDescriptionU

User requested the order to be canceled. Sent in response to a Cancel Order
Message or a Replace Order Message.

LUser logged off.

S

This order was manually canceled by a supervisory terminal. For example,
emergency withdraw per user's request or the user got suspended.

I

An order with 'Immediate' Time In Force was executed and with no further matches
available on the book the remaining quantity was canceled.

M

Order expired during match.

X

Invalid price.

Z

Invalid quantity.

N

Invalid minimum quantity.

Y

Invalid order type.

D

Invalid display type.

R

Order not allowed at this time.

F

Flow control is enabled and this OUCH port is being throttled.

GMargin order canceled due to margin restriction.

OOther.

7.5 Order AIQ Canceled Message
An Order AIQ Canceled Message informs that an order has been canceled by Japannext PTS trading system toprevent a self-trade. This is an extended version of the Order Canceled Message with specifics of the preventedtrade.
Name

OffsetLengthType

Comments

Message Type

01AlphaValue is D = Order AIQ Canceled Message.

Timestamp

18Integer

Number of nanoseconds past midnight.

Order Token

94Token

Order token of the canceled order.

Decrement
Quantity

134Integer

Number of bonds decremented from the order.
This number is incremental, not cumulative.

Order Canceled
Reason171Alpha

Reason the order was reduced or canceled.
Value is M = Order expired during match.

Quantity
Prevented fromTrading

184Integer

Number of bonds that would have executed if the trade had occurred.

Execution Price

224

SignedInteger

Yield at which the trade would have occurred.

Liquidity
Indicator

261Alpha

Identifies whether this would-be trade was a result of a liquidity provider
providing or liquidity taker taking the liquidity.
Values:A = Added (for the passive firm)
R = Removed (for the aggressor)

9OUCH Trading Specification for Bonds

2020-04-01

7.6 Order Executed with Counter Party Message
An Order Executed with Counter Party Message informs that all or part of an order has been executed.
NameOffsetLength

Type

Comments

Message Type

01AlphaValue is e = Order Executed with Counter Party Message.

Timestamp

18Integer

Number of nanoseconds past midnight.

Order Token

94Token

Order token of the executed order.

Executed
Quantity

134Integer

Incremental number of bonds executed.

Execution Price

174Signed
Integer

Yield at which the bonds were executed.

LiquidityIndicator

211Alpha

Identifies whether this trade was a result of a liquidity provider providing or
liquidity taker taking the liquidity.
Values:A = Added (for the passive firm)
R = Removed (for the aggressor)

Counter Party

2212AlphaIdentifies the counter party of the trade.

Match Number348Integer

Day unique reference number of the match.
The matching buy and sell executions have the same match number.

7.7 Order Rejected Message
An Order Rejected Message may be sent in response to an Enter Order Message if the order cannot be accepted.
NameOffset

LengthType

Comments

Message Type

01AlphaValue is J = Order Rejected Message.

Timestamp

1

8Integer

Number of nanoseconds past midnight.

Order Token

94

Token

Order token of the rejected order.

Order Rejected
Reason131

Alpha

Reason the order was rejected.
Refer to the Order Rejected Reasons table below.

Table 3: Order Rejected ReasonsReasonDescription

H

There is currently a trading halt so no orders can be accepted on this orderbook at
this time.

S

Invalid orderbook identifier.

X

Invalid price.

Z

Invalid quantity.

N

Invalid minimum quantity.

Y

Invalid order type.

D

Invalid display type.

R

Order not allowed at this time.

F

Flow control is enabled and this OUCH port is being throttled.

G

Invalid margin specification.

10

OUCH Trading Specification for Bonds
ReasonDescription

L

MPID not allowed for this port.

c

User does not have permission to enter an order on the given board.

OOther.

112020-04-01

OUCH Trading Specification for Bonds

2020-04-01

Revision History
DateVersionDescription

2016-12-05 1.0

Initial revision.

2017-10-26 1.1

Replaced Order Reference Number field name with Order Number.
Replaced Security Id field name with Orderbook Id.
Replaced Bonds with Quantity in data type descriptor and field names.
Replaced Yield with Price in data type descriptor and field names.

2017-11-08 1.2

Added Order Classification field to Enter Order Message and Accepted Message.

2017-12-18 1.3

Corrected order of Order Classification field.
Changed field names: Canceled Order Reason → Order Canceled Reason, Rejected Order Reason →Order Rejected Reason.
Changed message names: Accepted Message → Order Accepted Message, Replaced Message → Order
Replaced Message, Canceled Message → Order Canceled Message, AIQ Canceled Message → OrderAIQ Canceled Message, Executed Message → Order Executed Message, Rejected Message → Order
Rejected Message.

2019-02-21 1.4

Added Cash Margin Type field to Enter Order Message and Order Accepted Message.
Added “G” to Order Canceled Reasons and Order Rejected Reasons.

12