developers:predictionmarkets

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
developers:predictionmarkets [2026/05/18 17:32] – [Example: Lost (Long Position, Settles at 0)] chrisdevelopers:predictionmarkets [2026/08/27 19:07] (current) chris
Line 1: Line 1:
-====== THIS PAGE IS UNDER CONSTRUCTION ====== 
- 
- 
- 
 ====== Prediction Markets ====== ====== Prediction Markets ======
  
Line 47: Line 43:
 **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. **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.
 </WRAP> </WRAP>
- 
-===== WebSocket API ===== 
- 
-Settlement is communicated via the standard order update message on the Trading API WebSocket feed. Subscribe to the account feed and watch for order updates matching the criteria above. 
- 
-For full message field definitions see [[developers:websocket:messages|Message Reference]] and [[developers:websocket:orders|Order Routing]]. 
- 
-==== Example: Won (Long Position, Settles at 1) ==== 
- 
-The following is an example order update received when a long position of 1 contract settles in the money. 
- 
-<code javascript> 
-// [TBD -- WebSocket order update JSON/Protobuf example] 
-// Fields to highlight: 
-//   side:       Sell 
-//   price:      1 
-//   order_type: [TBD settlement type] 
-//   qty:        1 
-//   status:     [TBD] 
-</code> 
- 
-<< 8 : 1=ExampleAccount018=FIX.4.29=45110=24711=D22EB472-F0B2-49CC-9E69-0EB4F8B2310114=117=D22EB472-F0B2-49CC-9E69-0EB4F8B23101_0_T21=131=032=134=6835=837=D22EB472-F0B2-49CC-9E69-0EB4F8B2310138=139=248=XKLSH_POp KXBTC15M-26MAY181300-0049=test50=T4FIX52=20260518-17:00:26.60754=255=KXBTC15M56=TradeBook59=060=20260518-17:00:26.60697=Y107=BTC price up in next 15 mins?150=F151=0167=OPT200=202605201=1204=0207=KLSH_POp447=D448=Administrator452=44453=1 
-[9=451|35=8] EXECUTION: KXBTC15M SELL 1@0 | Order=D22EB472-F0B2-49CC-9E69-0EB4F8B23101 | Filled=1/1@0 | Remaining=0 | Status=Filled 
-==== Example: Won (Short Position, Settles at 0) ==== 
- 
-<code javascript> 
-// [TBD -- WebSocket order update JSON/Protobuf example] 
-// Fields to highlight: 
-//   side:       Buy 
-//   price:      0 
-//   order_type: [TBD settlement type] 
-//   qty:        1 
-//   status:     [TBD] 
-</code> 
  
 ===== FIX API ===== ===== FIX API =====
Line 90: Line 52:
 ==== Key FIX Tags ==== ==== Key FIX Tags ====
  
-^ Tag ^ Field Name   ^ Settlement Value ^ +^ Tag ^ Field Name        ^ Settlement Value ^ 
-| 35  | MsgType      | 8 (Execution Report) | +| 1   | Account            | Account holding the position being settled | 
-| 39  | OrdStatus    [TBD] +| 8   | BeginString        | FIX protocol version in use | 
-| 54  | Side         | Opposite of open position (1=Buy, 2=Sell) | +| 9   | BodyLength         | Number of bytes in message body | 
-44  Price        0 or 1 +| 10  | CheckSum           | Three-digit checksum for message validation | 
-40  OrdType      [TBD -- settlement order type] +| 11  | ClOrdID            | Client-assigned order identifier for the settlement order | 
-32  LastQty      Position size being closed +| 14  | CumQty             | Cumulative quantity filled so far | 
-150 ExecType     [TBD] +| 17  | ExecID             | Unique identifier for this execution | 
-55  Symbol       | Prediction market instrument identifier | +| 21  | HandlInst          | Order handling instruction (automated, no intervention) | 
 +| 31  | LastPx             | Price of the last fill; 0 or 1 for settlement | 
 +| 32  | LastQty            | Position size being closed | 
 +| 34  | MsgSeqNum          | Sequence number of this message in the session | 
 +| 35  | MsgType            | 8 (Execution Report) 
 +| 37  | OrderID            | Identifier assigned by broker/exchange for the settlement order | 
 +| 38  | OrderQty           | Total quantity of the settlement order 
 +| 39  | OrdStatus          Order Status | 
 +| 40  | OrdType            | Order Type | 
 +| 44  | Price              | 0 or 1 | 
 +| 48  | SecurityID         | Identifier for the underlying contract/instrument | 
 +| 49  | SenderCompID       | Identifier of the sending firm/system | 
 +| 50  | SenderSubID        | Sub-identifier of the sending system | 
 +| 52  | SendingTime        | Timestamp the message was sent 
 +| 54  | Side               | Opposite of open position (1=Buy, 2=Sell) | 
 +55  Symbol             Prediction market instrument identifier 
 +56  TargetCompID       Identifier of the receiving firm/system | 
 +| 59  | TimeInForce        | Duration the settlement order remains valid 
 +60  TransactTime       Timestamp of the actual transaction/execution 
 +97  LocateReqd         Whether a locate was required (relevant for short positions) 
 +107 SecurityDesc       | Name of the contract | 
 +| 151 | LeavesQty          | Remaining quantity left to be filled (0 once fully settled) | 
 +| 167 | SecurityType       | Type of instrument (e.g., option) being settled | 
 +| 200 | MaturityMonthYear  | Contract expiration month/year | 
 +| 201 | PutOrCall          | Indicates whether contract is a put or call | 
 +| 204 | CustOrderCapacity  | Capacity in which the order was entered (customer/firm) | 
 +| 207 | SecurityExchange   | Exchange where the contract is listed/settled | 
 +| 447 | PartyIDSource      | Source/type of identifier used for the party 
 +| 448 | PartyID            | Identifier of the party involved in settlement (e.g., administrator) | 
 +| 452 | PartyRole          | Role of the identified party in the settlement process | 
 +| 453 | NoPartyIDs         | Number of party ID entries included in the message |
 ==== Example: Won (Long Position, Settles at 1) ==== ==== Example: Won (Long Position, Settles at 1) ====
  
 <code> <code>
-[TBD -- FIX Execution Report example message] +<< 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:15:45.148 | 54=2 | 55=Market 56=TradeBook 59=60=20260827-15:15:45.147 | 97=Y | 107=Example Contract Name | 150=151=167=OPT | 200=202608 | 201=1 | 204=0 | 207=Exchange Name | 447=D | 448=Administrator | 452=44 | 453=1 | 
-8=FIX.4.2|35=8|49=[SenderCompID]|56=[TargetCompID]| +[9=451|35=8EXECUTION: Market **SELL 1@1** | Order=CB7ED23B-1D2F-4652-BE77-DF16DB3ED854 | Filled=1/1@0 | Remaining=0 | Status=Filled
-54=2|44=1|40=[TBD]|32=1|39=[TBD]|150=[TBD]|55=[Symbol]|10=[checksum]+
 </code> </code>
  
Line 111: Line 101:
  
 <code> <code>
-[TBD -- FIX Execution Report example message] +<< 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:15:45.148 | 54=2 | 55=Market | 56=TradeBook | 59=0 | 60=20260827-15:15:45.147 97=107=Example Contract Name | 150=151=167=OPT | 200=202608 | 201=1 | 204=0 | 207=Exchange Name | 447=D | 448=Administrator | 452=44 | 453=1 | 
-8=FIX.4.2|35=8|49=[SenderCompID]|56=[TargetCompID]| +[9=451|35=8EXECUTION: Market **SELL 1@0** | Order=CB7ED23B-1D2F-4652-BE77-DF16DB3ED854 | Filled=1/1@0 | Remaining=0 | Status=Filled
-54=2|44=0|40=[TBD]|32=1|39=[TBD]|150=[TBD]|55=[Symbol]|10=[checksum]+
 </code> </code>
  
Line 119: Line 108:
  
 <code> <code>
-[TBD -- FIX Execution Report example message] +<< 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:15:45.148 | 54=55=Market | 56=TradeBook | 59=0 | 60=20260827-15:15:45.147 97=107=Example Contract Name | 150=151=167=OPT | 200=202608 | 201=1 | 204=0 | 207=Exchange Name | 447=D | 448=Administrator | 452=44 | 453=1 | 
-8=FIX.4.2|35=8|49=[SenderCompID]|56=[TargetCompID]| +[9=451|35=8EXECUTION: Market **BUY 1@0** | Order=CB7ED23B-1D2F-4652-BE77-DF16DB3ED854 | Filled=1/1@0 | Remaining=0 | Status=Filled
-54=1|44=0|40=[TBD]|32=1|39=[TBD]|150=[TBD]|55=[Symbol]|10=[checksum]+
 </code> </code>
  
  • developers/predictionmarkets.1779125543.txt.gz
  • Last modified: 2026/05/18 17:32
  • by chris