Exercise Options
Exercise Options
Exercising an option via websocket is a multi-step flow requiring a series of handshake and confirmation requests. Developers should also maintain Live Order Updates during the exercise process to confirm final results.
Step 1: Initiate Exercise
Send the shs topic with the exercise argument and pass the option’s contract identifier in the CEX field.
Step 2: Receive Available Actions
The server responds with an acknowledgement followed by a message containing available user actions (such as "Submit" or "Cancel"), contract details, position information, and a tracking id. An in-the-money warning notification may also be received and should be noted but does not require a response.
Step 3: Submit the Exercise Request
After receiving the id from the prior response, send an inp topic with the exercise argument. Pass the id, set user_action to "submit", specify whether the exercise should be final with make_final, and provide the quantity to exercise via value.
Step 4: Handle Confirmation Warnings
If additional confirmation or warnings are required, a new message is delivered with a new id. Respond with the inp+exercise topic, passing the new id and "continue" as the user_action.
Step 5: Confirm Order via Live Order Updates
Once the exercise is confirmed, an order update is delivered via the sor websocket topic.

