Order Server Prompt
An Order Server Prompt is a client acknowledgement produced on the submission of an order that requires client interaction to proceed. Certain scenarios require that users acknowledge Server Prompts for orders where a client is offered more than a binary choice rather than the binary options from Order Reply Messages.
There are several steps that a user must implement to receive and acknowledge a server prompt. The scenario below demonstrates order submission while away from the market.
Initialize a websocket
For clients to interact with a Server Prompt messages, a websocket must be running prior to order submissions. The request identifier, reqId, required for the prompt acknowledgement is an unsolicited message delivered solely through the websocket.
It is recommended to include a request for sor+{} to receive Live Order Updates. This is not required; however, it does help with order status validation.
Submit an order
Submit an order as normal. In this scenario, submitting an order over the market price will result in the client being prompted about the Price Management Algo.
The order above triggered the following message. The Order Status of PendingSubmit is a potential indicator that acknowledgement of the Server Prompt is necessary.
Given the details shown, review websocket messages for content with 'topic': 'ntf'.
Capture Order Response Details
The Websocket receives the following binary json payloads for our order. In this scenario, both messages reference 'topic': 'ntf'. Notice that the first message is simply a warning, while the latter is relevant to our server prompt workflow. The most telling distinction of these values is the inclusion of 'reqId' within the 'args' list object.
From the latter message, the following attributes within the args list object must be retrieved:
'orderId'- This is used to distinguish our order and a required field in our next step.'reqId'- ThereqIdis used to identify the specific request, as multiple modification attempts may reference the same order object with Server Prompts only being relevant to select requests.'options'- The list of response details are passed within theoptionslist and define how the prompt should be acknowledged. In this scenario, we have the choices of ‘Use on this order’, ‘Always use’, ‘Do not use’. This example will approve the Price Management Algo only this time, so'Use on this order'should be stored for later use.
Pass details to Notification
With the details from the ntf message, the Server Prompt may be acknowledged through the /v1/api/iserver/notification endpoint. This is a POST request to /v1/api/iserver/notification with a json body containing the orderId, reqId, and text` values from our prior step.
A few important notes regarding these values:
- As with the original response from
ntf, note thatreqIdis a string of numbers rather than a direct integer value. textis equivalent to a single string entry fromoptions.
POST https://api.ibkr.com/v1/api/iserver/notification
Responding through the Server Prompt endpoint will return a status message to determine the transmission of the order. The plain-text response will appear as below.

