Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| developers:predictionmarkets [2026/04/29 19:45] – created chad | developers:predictionmarkets [2026/08/27 19:07] (current) – chris | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | Comin soon | + | ====== Prediction Markets ====== |
| + | |||
| + | Prediction markets on the T4 platform are binary-outcome instruments that settle at either **0** or **1** (expressed as a price). This page explains how to interpret settlement messages so your application can correctly determine the outcome of a prediction market trade. | ||
| + | |||
| + | ===== Overview ===== | ||
| + | |||
| + | Unlike traditional futures contracts, prediction market instruments resolve to one of two discrete values at expiration: | ||
| + | |||
| + | * **1** -- The event occurred; the " | ||
| + | * **0** -- The event did not occur; the " | ||
| + | |||
| + | When a prediction market settles, the T4 platform generates a synthetic order update on the **opposite side** of your position at the settlement price. Your application should watch for this message to determine whether a held position resolved in or out of the money. | ||
| + | |||
| + | ===== Settlement Mechanics ===== | ||
| + | |||
| + | ==== How Settlement Works ==== | ||
| + | |||
| + | At market expiration, T4 will evaluate the outcome and issue a closing order update for each open position. The message will always be: | ||
| + | |||
| + | * **Side** -- Opposite of your open position (long positions receive a sell; short positions receive a buy). | ||
| + | * **Price** -- Either **0** (lost) or **1** (won), expressed in the instrument' | ||
| + | * **Order Type** -- '' | ||
| + | * **Quantity** -- Equal to your open position size. | ||
| + | |||
| + | ==== Outcome Matrix ==== | ||
| + | |||
| + | ^ Your Position ^ Settlement Price ^ Outcome ^ | ||
| + | | Long | 1 | Won -- event occurred | | ||
| + | | Long | 0 | Lost -- event did not occur | | ||
| + | | Short | 1 | Lost -- event occurred | | ||
| + | | Short | 0 | Won -- event did not occur | | ||
| + | |||
| + | ===== Identifying a Settlement Message ===== | ||
| + | |||
| + | Your application should identify a settlement message by checking for the following combination of fields in an order update: | ||
| + | |||
| + | - The instrument is a prediction market type. See [[developers: | ||
| + | - The order update represents a closing fill (opposite side of the open position). | ||
| + | - Price is exactly **0** or **1**. | ||
| + | - Order type is '' | ||
| + | |||
| + | <WRAP callout> | ||
| + | **Note:** Settlement messages are generated by the platform and do not represent a resting order in the book. They will not appear in the order book feed and should be treated as system-generated close events. | ||
| + | </ | ||
| + | |||
| + | ===== FIX API ===== | ||
| + | |||
| + | Settlement is communicated via an **Execution Report (tag 35=8)** on the FIX session. The report will reflect the closing fill at the settlement price. | ||
| + | |||
| + | For full FIX tag definitions see [[developers: | ||
| + | |||
| + | ==== Key FIX Tags ==== | ||
| + | |||
| + | ^ Tag ^ Field Name ^ Settlement Value ^ | ||
| + | | 1 | Account | ||
| + | | 8 | BeginString | ||
| + | | 9 | BodyLength | ||
| + | | 10 | CheckSum | ||
| + | | 11 | ClOrdID | ||
| + | | 14 | CumQty | ||
| + | | 17 | ExecID | ||
| + | | 21 | HandlInst | ||
| + | | 31 | LastPx | ||
| + | | 32 | LastQty | ||
| + | | 34 | MsgSeqNum | ||
| + | | 35 | MsgType | ||
| + | | 37 | OrderID | ||
| + | | 38 | OrderQty | ||
| + | | 39 | OrdStatus | ||
| + | | 40 | OrdType | ||
| + | | 44 | Price | 0 or 1 | | ||
| + | | 48 | SecurityID | ||
| + | | 49 | SenderCompID | ||
| + | | 50 | SenderSubID | ||
| + | | 52 | SendingTime | ||
| + | | 54 | Side | Opposite of open position (1=Buy, 2=Sell) | | ||
| + | | 55 | Symbol | ||
| + | | 56 | TargetCompID | ||
| + | | 59 | TimeInForce | ||
| + | | 60 | TransactTime | ||
| + | | 97 | LocateReqd | ||
| + | | 107 | SecurityDesc | ||
| + | | 151 | LeavesQty | ||
| + | | 167 | SecurityType | ||
| + | | 200 | MaturityMonthYear | ||
| + | | 201 | PutOrCall | ||
| + | | 204 | CustOrderCapacity | ||
| + | | 207 | SecurityExchange | ||
| + | | 447 | PartyIDSource | ||
| + | | 448 | PartyID | ||
| + | | 452 | PartyRole | ||
| + | | 453 | NoPartyIDs | ||
| + | ==== Example: Won (Long Position, Settles at 1) ==== | ||
| + | |||
| + | < | ||
| + | << 8 : 1=ExampleAccount| 8=FIX.4.2 | 9=451 | 10=180 | 11=CB7ED23B-1D2F-4652-BE77-DF16DB3ED854 | 14=1 | 17=CB7ED23B-1D2F-4652-BE77-DF16DB3ED854_0_T | 21=1 | 31=0 | 32=1 | 34=70 | 35=8 | 37=CB7ED23B-1D2F-4652-BE77-DF16DB3ED854 | 38=1 | 39=2 | 48=Contract Ticker | 49=test | 50=T4FIX | 52=20260827-15: | ||
| + | [9=451|35=8] EXECUTION: Market **SELL 1@1** | Order=CB7ED23B-1D2F-4652-BE77-DF16DB3ED854 | Filled=1/ | ||
| + | </ | ||
| + | |||
| + | ==== Example: Lost (Long Position, Settles at 0) ==== | ||
| + | |||
| + | < | ||
| + | << 8 : 1=ExampleAccount| 8=FIX.4.2 | 9=451 | 10=180 | 11=CB7ED23B-1D2F-4652-BE77-DF16DB3ED854 | 14=1 | 17=CB7ED23B-1D2F-4652-BE77-DF16DB3ED854_0_T | 21=1 | 31=0 | 32=1 | 34=70 | 35=8 | 37=CB7ED23B-1D2F-4652-BE77-DF16DB3ED854 | 38=1 | 39=2 | 48=Contract Ticker | 49=test | 50=T4FIX | 52=20260827-15: | ||
| + | [9=451|35=8] EXECUTION: Market **SELL 1@0** | Order=CB7ED23B-1D2F-4652-BE77-DF16DB3ED854 | Filled=1/ | ||
| + | </ | ||
| + | |||
| + | ==== Example: Won (Short Position, Settles at 0) ==== | ||
| + | |||
| + | < | ||
| + | << 8 : 1=ExampleAccount| 8=FIX.4.2 | 9=451 | 10=180 | 11=CB7ED23B-1D2F-4652-BE77-DF16DB3ED854 | 14=1 | 17=CB7ED23B-1D2F-4652-BE77-DF16DB3ED854_0_T | 21=1 | 31=0 | 32=1 | 34=70 | 35=8 | 37=CB7ED23B-1D2F-4652-BE77-DF16DB3ED854 | 38=1 | 39=2 | 48=Contract Ticker | 49=test | 50=T4FIX | 52=20260827-15: | ||
| + | [9=451|35=8] EXECUTION: Market **BUY 1@0** | Order=CB7ED23B-1D2F-4652-BE77-DF16DB3ED854 | Filled=1/ | ||
| + | </ | ||
| + | |||
| + | ===== P&L Calculation ===== | ||
| + | |||
| + | Settlement P&L for a prediction market position is straightforward: | ||
| + | |||
| + | * **P&L per contract** = (Settlement Price - Entry Price) * Contract Multiplier * Quantity | ||
| + | * For a long at entry price 0.60 settling at 1: (1 - 0.60) * [multiplier] * qty = profit | ||
| + | * For a long at entry price 0.60 settling at 0: (0 - 0.60) * [multiplier] * qty = loss | ||
| + | |||
| + | <WRAP callout> | ||
| + | **Note:** Confirm the contract multiplier for each prediction market instrument via the [[developers: | ||
| + | </ | ||
| + | |||