The Option Chain price subscription, is a specialized bulk price subscription, made specifically to support implementation of a traditional options chain like this one (from SaxoTrader GO):
It will provide structural data for setting up the entire board for an instrument (such as all the expiries and all available strikes for the selected expiries) and stream prices and other price-data for the strikes in a "window" like the expanded expiry shown in the options board above. The options board subscription also enables the ability to move (scroll) the window within an expiry change the number of strikes in the window, as well as add or remove windows for other expiries.
The Options Board subscription supports the following asset types:
- FxBinaryOption (short for a combination of FxNoTouchOption / FxOneTouchOption)
The special case of Binary Options
In the options board subscription, we have decided to include Fx Binary Options, even though they do not strictly fit into the same terminology as other options. This is the cause of a number of compromises in the contract, which we will try to address here.
For Binary Options, the sides are not called "Put" and "Call" but are instead "OneTouch" and "NoTouch" and to represent two the different option types. We keep using the term "Strike" across all types of options, even though it is really the "Barrier" for the one-touch and no-touch options - this naming enables the implementing application to keep the same parameters both when controlling the window, and while navigating the overall results.
The structure of an Options Chain
In general our options chain consists of a list of Expires, consisting of a list of Strikes, which again is made up from one or two Sides. The sides are where the price details for the individual options are updated, and so each of the sides can be considered a separate price subscription. While the overall structure of the returned data is the same for all option types, there are some differences, the major being that Fx Binary Options don't have sides called "Put" and "Call" but instead use "OneTouch" and "NoTouch" as their sides instead. Besides this, the difference is in what fields are available in the sides.
Since some options chains contain thousands of strikes, simply returning every update for every side in the entire chain would put an unacceptably high load on both the server and the client we have introduced a "window" which indicates a number of strikes that receives price updates. This window can be moved and expanded up to a total of 100 strikes, and can be used to represent either just a subset of s single expiry, or whatever can be fit on the screen at the same time, and ensures that neither client nor server drowns in the flood of price updates.
When starting a subscription, the snapshot contains basic information on all expiries, in order to provider the structurual overview of what can be selected or expanded. The expiry or expiries that are in the visible window, also contain basic information for all the strikes of that expiry, to enable setting up scrolling mechanics within the selected or expanded expiry itself. Those strikes that are part of the window also include their sides, with prices and market information, but only those.
The structure of an options board response
At the root of the options board response snapshot, we have the list of expiries, the number of expiries in the list and the timestamp.
Due to the differences in the the contract for the various supported asset types, the response contains the assetType, to help parse the structure.
An expiry consists of the necessary info to display the expiry (Expiry date and the number of days to expiry), the expiry index, used for referring to the expiry in subsequent calls, and in subscription updates. It also contains the mid strike price, and the total number of strikes and of course the list of strikes themselves.
The list of expiries contain an entry for every expiry that exists for the instrument, but an expiry only contains any strikes if it was specified as part of the "window" that shows option data. The "StrikeCount" is the number of strike elements in the list, so for basic expiry entries that have no strikes included, the count will be 0 although there are strikes for that expiry (if it is marked as part of the window).
If the expiry is part of a window, the StrikeWindowStartIndex will contain the index of the strike that contains the first part of the window.
A strike consist of an Index and a Strike price, ans well as the mid volatility percentage for the strike price. If the strike is part of the window, it will also include a Put and/or a Call side (for ETOs and Fx Vanilla Options) or a OneTouch and/or NoTouch side. One of the sides can be null, as not all sides will be covered by options, but a Strike will always have at least one side.
The strike side contains the actual price information. For a given option type, both sides in the strikes will be identical, but the fields in a side, varies with the type of option.
Note that you will not receive quotable prices from the options chain price subscription, so for trading the options, it is recommended that the application starts a regular price subscription, when the user indicates that he wants to trade an option from the board.
Request and reply
Starting an options chain subscription, is much like starting a price subscription, and naturally adheres to the OpenApi subscription format. The simplest request only specifies the Identifier (it is not a uic, since ETO chains are started based on their option root id) and the AssetType.
The request is sent as a POST request to the URL /trade/v1/optionschain/subscriptions/active.
It is also possible to specify AccountKey & Amount to get more "targeted" prices. In order to control the size and position of the window, it is possible to specify the amount of strikes per expiry (in MaxStrikesPerExpiry) and set expiriy and strike using the Expiries collection:
By adding a given expiry (specified by its Index) to the collection, you indicate that you want a window of the specified size from that expiry - without specifying a strike start index, the window is centered arout the "At The Money" price. If you specify a strike start index, the window will start at that strike index, and have the specified size.
It is possible to add as many expiries you want to the list, but if the total number of strikes (#expiries * maxStrikesPerExpiry) exceeds the fixed limit of 100 strikes, the request will fail.
The minimum refreshrate for an OptionsChain subscription is 2000ms.
The response could look like this:
Moving or resizing the window
The window is moved or resized by sending a PATCH request to the trade/v1/optionschain/subscriptions/active/<contextid>/<referenceid> url. The request can only contain MaxStrikesPerIndex and/or list of Expiries:
Moving the window will start pushing updates for the new section specified, and will update the old sections with null for the sides, as these are no longer part of the window.
Reset At The Money
It is also possible to reset all windows to around their "At the money" price, by sending a PUT request to the url trade/v1/subscriptions/<contextId>/<referenceId>/ResetATM. This will not change the expiries, but all windows within the previously set expiries, will be centered aroud the "At the money" price for the expiry, just as if their StrikeStartIndex had been changed using a PATCH request as decribed above.
Fields included in the "sides" for various types of options
|Fx Vanilla Option||FxBinaryOption|
|Put / Call||Put / Call||OneTouch / NoTouch|
|Greeks||x - If the exchange provides it|