Saxo Bank to remove certain resources from OpenAPI
Multi-asset investment specialist Saxo Bank plans to remove certain resources from its OpenAPI on or after November 2022.
The …/details resources in the Portfolio Service Group will be deprecated from OpenAPI on or after November 1, 2022. This change will affect the following resources:
- port/v1/positions/{PositionId}/details
- port/v1/netpositions/{NetPositionId}/details
- port/v1/orders/{OrderId}/details
- port/v1/closedpositions/{ClosedPositionId}/details
Consumers currently relying on these services are advised to switch to the base single-entity resource (such as port/v1/positions/{PositionId}). Fields previously available in the …/details routes have been migrated to appropriate FieldGroups in the single-entity resource. This allows for seamless transition. In addition, data can now be retrieved in bulk or consumed using a streaming subscription.
The Portfolio Service Group in OpenAPI currently offers a …/details resource in 4 locations: positions, netpositions, orders, and closedpositions.
The …/details endpoints are a convenience resource that automatically adds all available FieldGroups to the response object, in addition to a “Details” FieldGroup that is not otherwise available (such as PositionDetails). Three changes are made in order to deprecate this feature:
- Fields available in the “Details” FieldGroups have been migrated to either the “Base” or “View” FieldGroups, or added to a new FieldGroup altogether.
- Fields available in the “Details” FieldGroups now support streaming.
- The …/details route is made redundant, and will consequently be deprecated.
The …/details endpoints expose useful data, but the resource only allows for single-entity GET request and doesn’t support streaming. Only very few specific fields are available in …/details that would otherwise not be accessible in the single-entity (or bulk) resources. Moving these specific fields over to the non-details resources yields the following benefits:
- Requests can now be made in bulk with all fields that were previously available in …/details added to every entity in the collection response. This can potentially save a large number of requests being made to OpenAPI, as the client application no longer has to send a request to …/details for every individual entity.
- Single-entity requests can use FieldGroups to specify which data should be returned (instead of all data) which reduces bandwidth usage.
- Streaming is now supported for all fields that were previously only available as static GET responses from …/details, which allows for interactive display of details such as trade costs converted to the base currency of the account in real-time (see the new “Costs” FieldGroup in (Net/Closed)Positions).
- Removing …/details simplifies OpenAPI and clears up otherwise confusing design where a certain FieldGroup is only available under a specific route, instead of offering all FieldGroups directly on the base resource.
If your application requests a …/details resource, the work required to adapt to this change is minimal and will make your application leaner. Because the …/details resource requires the ID of the entity to be known in advance, a request has already been made to the collection endpoint (or data is received on a streaming connection). With the above changes, you are now able to retrieve all data previously available only in the …/details route directly in the collection response (or in the streaming snapshot).
Saxo Bank’s OpenAPI offers:
- Access to all resources and functionality required to build a high-performance multi-asset trading platform.
- Better integration with Saxo Bank for partners and affiliates through a growing set of resources, such as Saxo’s Onboarding API.
Saxo regularly updates its solutions. Earlier in August, Saxo Bank released a new version of its OpenAPI, enhancing the AutoTrading and Portfolio service groups.