To facilitate a better separation of instruments with different properties, Saxo Bank has decided to redefine the AssetType enumeration. In the following we will refer to this refined definition as "Extended AssetTypes".
If we were to enforce this, it would be a breaking change, so currently we will only introduce the new definition for new applications., created after Nov 1st 2021.
What are Extended AssetTypes?
Extended AssetTypes are created to make the AssetTypes more granular. The AssetType “Stock” contained not only equities, but also different types of funds. The universe became so big over time, creating the need to be more precise, for example when searching for instruments and handling them in a more specific (or correct) way. To support this we have now split the "old" AssetType "Stock" into “Stock”, “ETC” (Exchange-Traded Commodity), “ETF” (Exchange-Traded Funds), “ETN” (Exchange-Traded Notes), “Funds” and “Rights”. We have done the same for their "Cfd" equivalents.
An overview is provided below:
When your application calls OpenAPI, the API will check if your application has been configured to work with the new extended AssetType definition. By definition all applications created prior to Nov 1 2021 are configured to operate with the old definition and applications created after Nov 2021 will be created to work with the new definition.
Taking Advantage of the new AssetType definition
The new asset type definition will be present across all OpenAPI endpoints.
Searching for Instruments
The biggest difference and benefit of switching to Extended AssetTypes will be noted when searching for instruments. Limiting a search to just "Stock" will lead to a smaller search result. To get the old behavior (that we don't expect you will want) your code will have to provide the full range of the new AssetTypes.
Searching according to the old configuration:
Similar search after the new configuration is applied:
Effect on other OpenAPI Endpoints
Other OpenAPI endpoints will also follow the new definition, so:
- Of course the list of instruments from the search to /ref/instruments above will also return AssetType="Etf" or "Etf" or "Etn" rather than just "Stock" when applicable.
- The AssetTypes of open orders, open and closed positions in the Portfolio service group will do the same.
- And the same will apply across all other service groups, Account History, AutoTrading, Client Services, Chart, ... Trading etc. etc.
Migrating a Legacy Application
You can try out Extended AssetTypes with a legacy app, by adding a header to the request (oapi-x-extasset header). This header has the same effect as the app setting for Extended AssetTypes, so you can test the behavior with your app.
See the example on Extended AssetTypes for a demo.
To make the migration easier, instruments with a new AssetType can be referred both by Stock and ETF, for example when placing an order.
If - after through testing - you decide that you would like to switch your application to the Extended AssetType definition:
- If you are a partner and Saxo has configured your application, please reach out to us to request a configuration change.
- If you are an individual developer, please use the self service capability of the developer portal to create a new application (after Nov 1st).
The timeline for the roll out of this feature is provided below:
|Support for oapi-x-extasset header|
If the calling application includes this header, OpenAPI will support Extended Assettypes.
You may provide this header directly from your application, but the header is also supported in the Explorer on the developer portal.
|Developer portal configured to support Extended AssetTypes||The developer portal will be configured as an app supporting Exteneded Assettypes. This means that the new asset types will be shown at relevant places in the documentation. The API's will also start respecting the Extended AssetType definition when you interact with it through the explorer.||Nov 1st. 2021|
|New applications are created to support Extended AssetTypes.|
New applications created through the self service part of the developer portal will be configured for Extended AssetTypes.
By default new partner applications created by Saxo will also be created to support Extended AssetTypes.
|Nov 1st. 2021|