OpenAPI for Excel

This simple tutorial utilizes our reference data and info prices services to query for the listed option contract UIC that is necessary to retrieve prices for said contract.

Retrieving UICs for instruments that fall under the StockOption, StockIndexOption, FuturesOption, and CfdIndexOption asset type categories is not as simple as it is for other categories, such a stocks or futures themselves. This tutorial seeks to outline and simply the steps needed to retrieve the prices for specific options. 

It is important to note that Contract Option Roots are not instruments per se (i.e. you cannot trade a or hold a position in them), but they represent a collection of strongly related option instruments. Root IDs are used to identify Contract Option Roots, and these cannot be used interchangeably with UICs. Option instruments, in addition to their Option Root Identifier and AssetType, are also identified by whether the contract is a Put or Call and, their Strike value. Futures options (and stock and index options) will have a unique UIC for each contract variation. 

No VBA is used here, rather the formula tool from the add-in is used to retrieve results. It is built using similar logic to Tutorial 1, so that will not be reexplained here. 


Firstly, two different endpoints from the reference data service are used to query for listed option root identifiers based on a chosen asset type and keyword(s), and to query for the UICs for specific options that fall within the option space defined by the option root identifier. 

Option Root Search Endpoint: https://www.developer.saxo/openapi/referencedocs/ref/v1/instruments/get__ref

Option Contract UIC Search Endpoint: https://www.developer.saxo/openapi/referencedocs/ref/v1/instruments/get__ref__contractoptionspaces_optionrootid 


The filters at the top of the "Option Space and Specific Options" table can be used to easily find which option you seek the UIC for.

The UIC is what is needed to retrieve prices for listed options, using the /infoprices service – the option root cannot be used. 

For price retrieval, the listed option type and your chosen UIC(s) can be entered to retrieve prices: 

Endpoint used: https://www.developer.saxo/openapi/referencedocs/trade/v1/infoprices/get__trade__list