OneSideReport
Enter a one-sided trade report into the System.
- Section: Transactions
- Related Message: OneSideReportReply
Both parties to a one-sided trade report may enter their side of the deal to produce a matched trade. Alternatively, one side can enter and the other side can confirm.
One-sided trade reports, once matched, appear as Orders in the System.
The two sides of a one-sided trade report will match and generate a trade if the Instrument, Price, Quantity and Tag fields all match, with one side being the Buy and the other being the Sell and the User fields matching the respective CounterParty fields on the other side.
Metadata
- Message Type: TransactionMessage
- Message Number: 1004
Inherited fields
| Name | Type | Size (bytes) | Description |
|---|---|---|---|
| MessageType | Integer (unsigned) | 2 | The unique identifier of this message. |
| ClientId | Integer (unsigned) | 4 | The unique identifier of a session with the server, returned in a successful LoginReply message. |
| RequestId | Integer (unsigned) | 4 | Within each session each message must be uniquely identified by this field. It must be monotonically increasing for the duration of the session. |
Fields
| Name | Type | Size (bytes) | Description |
|---|---|---|---|
| InstrumentMarket | Foreign key to InstrumentMarket | 8 | The Id of the InstrumentMarket for which the one-sided trade report is being entered. |
| User | Foreign key to User | 8 | If the one-sided trade report is being entered on behalf of another User, this is the Id for that User. Otherwise set to 0. |
| CounterParty | Foreign key to User | 8 | The Id of the counterparty User with whom the one-sided trade report was done. |
| CounterPartyShortName | String | 24 | The ShortName of the counterparty User with whom the one-sided trade report was done. |
| Side | One of OrderSide | 1 | Whether this is a Buy (0) or a Sell (1). |
| Type | Set of OrderType | 4 | |
| Price | Integer (signed) | 8 | The price for the Order. It is entered as an integer with the decimal places implied. The number of decimals is given by the PriceDecimals of the InstrumentMarket for the Order. |
| TotalQuantity | Integer (signed) | 8 | The quantity for the one-sided trade report. It is entered as an integer with the decimal places implied. The number of decimals is given by the QuantityDecimals of the InstrumentMarket for the one-sided trade report. |
| Account | Foreign key to Account | 8 | The Account for a netogiated deal is optional and may be specified either as an Id if Accounts are being maintained in the Matching Engine (using this field) or as a text code. This field is used if Account is specified as an Id, or set to 0 if not used. |
| AccountCode | String | 40 | The Account for a one-sided trade report may be specified as a plain-text code using this field. If the Account is non-zero then AccountCode will be ignored. |
| Tag | String | 50 | If the Instrument for which the one-sided trade report is being entered is a Tagged Instrument, Tag is the plain-text code that uniquely identifies the specific instance of the Instrument to be bought or sold. |
| ExpiryDate | Integer (signed) | 4 | The expiry date of the one-sided trade report as an integer in the form YYYYMMDD. If there is no expiry date, set to 0. The one-sided trade report must be matched by the counter party before it expires. |
| ExpiryTime | Integer (signed) | 4 | The expiry time of the one-sided trade report as an integer in the form HHMMDD. If there is no expiry date, set to 0. The one-sided trade report must be matched by the counter party before it expires. |
| LiveFor | Integer (unsigned) | 4 | If non-zero may be a number of seconds for which the one-sided trade report will remain live, must be less than number of seconds left in trading day. |
Permissions
OneSideReport
{
instrumentmarket: "test-im4",
side: OrderSide.Buy,
type: OrderType.GoodtillDate + OrderType.OneSideReport,
price: 1,
totalquantity: 1,
counterparty: "test-user5",
}
Permission Checks
| PermissionAction | Table | Scope | Index |
|---|---|---|---|
| ReportTrade | InstrumentMarket | Instance | 3 |
| View | Market | Instance | 0 |
| AllowBuyOrSell | Market | Instance | 0 |
Test file: OneSideReport