Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| developers:predictionmarkets [2026/08/27 16:18] – [Example: Lost (Long Position, Settles at 0)] chris | developers: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. | ||
| </ | </ | ||
| - | |||
| - | ===== 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: | ||
| - | |||
| - | ==== 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/ | ||
| - | // Fields to highlight: | ||
| - | // | ||
| - | // | ||
| - | // | ||
| - | // | ||
| - | // | ||
| - | </ | ||
| - | |||
| - | ==== Example: Lost (Long Position, Settles at 0) ==== | ||
| - | |||
| - | <code javascript> | ||
| - | // [TBD -- WebSocket order update JSON/ | ||
| - | // Fields to highlight: | ||
| - | // | ||
| - | // | ||
| - | // | ||
| - | // | ||
| - | // | ||
| - | </ | ||
| - | |||
| - | ==== Example: Won (Short Position, Settles at 0) ==== | ||
| - | |||
| - | <code javascript> | ||
| - | // [TBD -- WebSocket order update JSON/ | ||
| - | // Fields to highlight: | ||
| - | // | ||
| - | // | ||
| - | // | ||
| - | // | ||
| - | // | ||
| - | </ | ||
| ===== FIX API ===== | ===== FIX API ===== | ||
| Line 100: | Line 52: | ||
| ==== Key FIX Tags ==== | ==== Key FIX Tags ==== | ||
| - | ^ Tag ^ Field Name | + | ^ Tag ^ Field Name ^ Settlement Value ^ |
| - | | 35 | MsgType | + | | 1 | Account |
| - | | 39 | OrdStatus | + | | 8 | BeginString |
| - | | 54 | Side | + | | 9 | BodyLength |
| - | | 44 | + | | 10 | CheckSum |
| - | | 40 | + | | 11 | ClOrdID |
| - | | 32 | + | | 14 | CumQty |
| - | | 150 | ExecType | + | | 17 | ExecID |
| - | | 55 | + | | 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 | ||
| + | | 55 | ||
| + | | 56 | ||
| + | | 59 | TimeInForce | ||
| + | | 60 | ||
| + | | 97 | ||
| + | | 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) ==== | ==== Example: Won (Long Position, Settles at 1) ==== | ||
| < | < | ||
| - | << 8 : 1=ExampleAccount01=FIX.4.29=45210=17811=9FF38429-7D9F-4679-ABFE-1E878588FE0514=117=9FF38429-7D9F-4679-ABFE-1E878588FE05_0_T21=131=132=134=11635=837=9FF38429-7D9F-4679-ABFE-1E878588FE0538=139=248=XKLSH_POp KXBTC15M-26MAY181515-1549=test50=T4FIX52=20260518-19:15:30.10154=255=KXBTC15M56=TradeBook59=060=20260518-19:15:30.09897=Y107=BTC price up in next 15 mins?150=F151=0167=OPT200=202605201=1204=0207=KLSH_POp447=D448=Administrator452=44453=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: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=452|35=8] EXECUTION: | + | [9=451|35=8] EXECUTION: |
| </ | </ | ||
| Line 127: | Line 108: | ||
| < | < | ||
| - | << 8 : 1=ExampleAccount018=FIX.4.29=45210=06811=5AA0C947-59AF-4ED7-809E-44852D51D8E414=117=5AA0C947-59AF-4ED7-809E-44852D51D8E4_0_T21=131=032=134=16135=837=5AA0C947-59AF-4ED7-809E-44852D51D8E438=139=248=XKLSH_POp KXBTC15M-26MAY181600-0049=test50=T4FIX52=20260518-20:00:10.89854=155=KXBTC15M56=TradeBook59=060=20260518-20:00:10.89897=Y107=BTC price up in next 15 mins?150=F151=0167=OPT200=202605201=1204=0207=KLSH_POp447=D448=Administrator452=44453=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: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=452|35=8] EXECUTION: | + | [9=451|35=8] EXECUTION: |
| </ | </ | ||