Exercise Options
The operation to exercise via Client Portal is quite involved, and requires that users confirm details across multiple websocket requests.
To initiate the process, developers must make a handshake request passing the “exercise” argument. Then, users will pass in their Option’s ConID to the “CEX” field.
Developers should also maintain Live Order Updates while exercising options to confirm final results.
This will initially respond with the acknowledgement of the topic.
You will then receive additional messages about the available options to proceed with, including “Cancel” or “Submit”. This will also offer contract information, position information, and an ID to track the request with.
We may also receive a warning notification about this Option exercise, such as in-the-money warnings. This do not need to be suppressed or replied to; however, they should be noted by the trader as they come through.
After receiving our second listed message above, we can construct our exercise request. This will use the “inp” topic, along with the exercise argument once again.
Within the brackets, we will pass the “user_input” as our action, and then the data field will contian the order parameters. This will include our ID, which we retrieved from our prior shs+exercise response. We’ll then pass “submit” as our user_action, and then pass our exercise options.
The critical values to observe here are whether you would like your exercise to be final, with “make_final”:true. We also submit our quantity of options to exercise with the “value” parameter. In this case, we are exercising 5 shares.
If there are any additional confirmation/warnings then they will be provided on a new message, including a new “id” value.
As we noticed above, we now would need to request that our exercise continue for id 7 again using the inp+exercise topic.
Once the developer submits the new ID with “continue” as their user_action, they will see the order submitted in the SOR websocket.

