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/08/27 16:52] – [Key FIX Tags] chrisdevelopers:predictionmarkets [2026/10/20 13:03] (current) – chad
Line 1: Line 1:
-====== THIS PAGE IS UNDER CONSTRUCTION ====== 
- 
- 
- 
 ====== Prediction Markets ====== ====== Prediction Markets ======
  
Line 24: Line 20:
   * **Side** -- Opposite of your open position (long positions receive a sell; short positions receive a buy).   * **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's native price format. See [[developers:systempricing|System Price Format]].   * **Price** -- Either **0** (lost) or **1** (won), expressed in the instrument's native price format. See [[developers:systempricing|System Price Format]].
-  * **Order Type** -- ''[TBD -- settlement order type tag/value]''+  * **Order Type** -- Options Settlement. FIX: ''40=S''. WebSocket API: ''PRICE_TYPE_OPTIONS_SETTLEMENT''.
   * **Quantity** -- Equal to your open position size.   * **Quantity** -- Equal to your open position size.
  
Line 42: Line 38:
   - The order update represents a closing fill (opposite side of the open position).   - The order update represents a closing fill (opposite side of the open position).
   - Price is exactly **0** or **1**.   - Price is exactly **0** or **1**.
-  - Order type is ''[TBD]''.+  - Order type is Options Settlement (FIX ''40=S''; WebSocket API ''PRICE_TYPE_OPTIONS_SETTLEMENT'').
  
 <WRAP callout> <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. **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> 
- 
-==== Example: Lost (Long Position, Settles at 0) ==== 
- 
-<code javascript> 
-// [TBD -- WebSocket order update JSON/Protobuf example] 
-// Fields to highlight: 
-//   side:       Sell 
-//   price:      0 
-//   order_type: [TBD settlement type] 
-//   qty:        1 
-//   status:     [TBD] 
-</code> 
- 
-==== 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 115: Line 67:
 | 37  | OrderID            | Identifier assigned by broker/exchange for the settlement order | | 37  | OrderID            | Identifier assigned by broker/exchange for the settlement order |
 | 38  | OrderQty           | Total quantity of the settlement order | | 38  | OrderQty           | Total quantity of the settlement order |
-| 39  | OrdStatus          | [TBD] | +| 39  | OrdStatus          | Order Status | 
-| 40  | OrdType            | [TBD -- settlement order type] | +| 40  | OrdType            | ''S'' (Options Settlement) | 
-| 44  | Price              | 0 or 1 |+| 44  | Price              | Settlement price: 0 or 1 |
 | 48  | SecurityID         | Identifier for the underlying contract/instrument | | 48  | SecurityID         | Identifier for the underlying contract/instrument |
 | 49  | SenderCompID       | Identifier of the sending firm/system | | 49  | SenderCompID       | Identifier of the sending firm/system |
Line 128: Line 80:
 | 60  | TransactTime       | Timestamp of the actual transaction/execution | | 60  | TransactTime       | Timestamp of the actual transaction/execution |
 | 97  | LocateReqd         | Whether a locate was required (relevant for short positions) | | 97  | LocateReqd         | Whether a locate was required (relevant for short positions) |
-| 107 | SecurityDesc       | Human-readable name/description of the contract |+| 107 | SecurityDesc       | Name of the contract |
 | 151 | LeavesQty          | Remaining quantity left to be filled (0 once fully settled) | | 151 | LeavesQty          | Remaining quantity left to be filled (0 once fully settled) |
 | 167 | SecurityType       | Type of instrument (e.g., option) being settled | | 167 | SecurityType       | Type of instrument (e.g., option) being settled |
Line 139: Line 91:
 | 452 | PartyRole          | Role of the identified party in the settlement process | | 452 | PartyRole          | Role of the identified party in the settlement process |
 | 453 | NoPartyIDs         | Number of party ID entries included in the message | | 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>
-<< 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=Y | 107=Example Contract Name | 150=F | 151=0 | 167=OPT | 200=202608 | 201=1 | 204=0 | 207=Exchange Name | 447=D | 448=Administrator | 452=44 | 453=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=1 | 32=1 | 34=70 | 35=8 | 37=CB7ED23B-1D2F-4652-BE77-DF16DB3ED854 | 38=1 | 39=2 | 40=S | 44=1 | 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=Y | 107=Example Contract Name | 150=F | 151=0 | 167=OPT | 200=202608 | 201=1 | 204=0 | 207=Exchange Name | 447=D | 448=Administrator | 452=44 | 453=1 | 
-[9=451|35=8] EXECUTION: Market **SELL 1@1** | Order=CB7ED23B-1D2F-4652-BE77-DF16DB3ED854 | Filled=1/1@0 | Remaining=0 | Status=Filled+[9=451|35=8] EXECUTION: Market **SELL 1@1** | Order=CB7ED23B-1D2F-4652-BE77-DF16DB3ED854 | Filled=1/1@1 | Remaining=0 | Status=Filled
 </code> </code>
  
Line 149: Line 103:
  
 <code> <code>
-<< 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=Y | 107=Example Contract Name | 150=F | 151=0 | 167=OPT | 200=202608 | 201=1 | 204=0 | 207=Exchange Name | 447=D | 448=Administrator | 452=44 | 453=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 | 40=S | 44=0 | 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=Y | 107=Example Contract Name | 150=F | 151=0 | 167=OPT | 200=202608 | 201=1 | 204=0 | 207=Exchange Name | 447=D | 448=Administrator | 452=44 | 453=1 |
 [9=451|35=8] EXECUTION: Market **SELL 1@0** | Order=CB7ED23B-1D2F-4652-BE77-DF16DB3ED854 | Filled=1/1@0 | Remaining=0 | Status=Filled [9=451|35=8] EXECUTION: Market **SELL 1@0** | Order=CB7ED23B-1D2F-4652-BE77-DF16DB3ED854 | Filled=1/1@0 | Remaining=0 | Status=Filled
 </code> </code>
Line 156: Line 110:
  
 <code> <code>
-<< 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=Y | 107=Example Contract Name | 150=F | 151=0 | 167=OPT | 200=202608 | 201=1 | 204=0 | 207=Exchange Name | 447=D | 448=Administrator | 452=44 | 453=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 | 40=S | 44=0 | 48=Contract Ticker | 49=test | 50=T4FIX | 52=20260827-15:15:45.148 | 54=1 | 55=Market | 56=TradeBook | 59=0 | 60=20260827-15:15:45.147 | 97=Y | 107=Example Contract Name | 150=F | 151=0 | 167=OPT | 200=202608 | 201=1 | 204=0 | 207=Exchange Name | 447=D | 448=Administrator | 452=44 | 453=1 |
 [9=451|35=8] EXECUTION: Market **BUY 1@0** | Order=CB7ED23B-1D2F-4652-BE77-DF16DB3ED854 | Filled=1/1@0 | Remaining=0 | Status=Filled [9=451|35=8] EXECUTION: Market **BUY 1@0** | Order=CB7ED23B-1D2F-4652-BE77-DF16DB3ED854 | Filled=1/1@0 | Remaining=0 | Status=Filled
 </code> </code>
  • developers/predictionmarkets.1787849572.txt.gz
  • Last modified: 2026/08/27 16:52
  • by chris