The root service group's feature availability resource provides information of what features are available at any time. Features denote a group of endpoints, that can be accessed. If available, the endpoints behave as documented; if disabled Service Unavailable (HTTP status code: 503) is returned. The features that can be dynamically switched on and off are:
- News.
- Gainers/Losers
- Calendar
- Chart
Typical usage - Request/Response
The request/response scenario is covered by invoking a simple GET request towards the resource in order to obtain current status. It can
Example
Getting the current status is simply achieved by invoking the GET verb on the resource:
GET https://developer.saxobank.com/sim/openapi/root/v1/features/availability HTTP/1.1 authorization: BEARER token accept: application/json;
And in ie the case where Calendar is disabled but the other three resources are enabled, the response would be:
[ {"Feature": "News", "Available": True}, {"Feature": "GainersLosers", "Available": True}, {"Feature": "Calendar", "Available": False}, {"Feature": "Chart", "Available": True}, ]
Typical usage - Streaming
It is advantageous to subscribe to updates in feature availability. Subscription to modification in availability status for features follow the same pattern as in all other streaming scenarios in Saxo Bank OpenAPI, that is:
- Subscribe in order to get:
- A subscription key, that can be presented to the streaming endpoint
- A snapshot of the current status for feature availability
- Unsubscribe in order to stop listening to updates
For more details about how to utilize streaming, see this section about OpenAPI Streaming.
Example - subscribe
Subscribing is done by invoking the POST verb:
POST https://developer.saxobank.com/sim/openapi/root/v1/features/availability HTTP/1.1 authorization: BEARER token content-type: application/json; accept: application/json;
Example - unsubscribe
Unsibscribing is done by invoking the DELETE verb:
DELETE https://developer.saxobank.com/sim/openapi/root/v1/features/availability HTTP/1.1 authorization: BEARER token accept: application/json;