OpenAPI for Excel
2018-11-14, Gid van der Ven

Endpoint revisions

With the deprecation of /subscriptions/active endpoints, which are replaced by the shortened /subscriptions endpoints, users of Saxo Bank's Open API functionality in Excel are strongly recommended to update their spreadsheets accordingly. The new syntax does not change underlying functionality and hence the only modification concerns the request URL.

The following endpoints will be deprecated:

Old endpointAlternative
chart/v1/charts/subscriptions/activechart/v1/charts/subscriptions
port/v1/accounts/subscriptions/activeport/v1/accounts/subscriptions
port/v1/balances/subscriptions/activeport/v1/balances/subscriptions
port/v1/closedpositions/subscriptions/activeport/v1/closedpositions/subscriptions
port/v1/exposure/instruments/subscriptions/activeport/v1/exposure/instruments/subscriptions
port/v1/exposure/instruments/subscriptions/activeport/v1/exposure/instruments/subscriptions
port/v1/netpositions/subscriptions/activeport/v1/netpositions/subscriptions
port/v1/orders/subscriptions/activeport/v1/orders/subscriptions
port/v1/positions/subscriptions/activeport/v1/positions/subscriptions
root/v1/sessions/events/subscriptions/activeroot/v1/sessions/events/subscriptions
trade/v1/infoprices/subscriptions/activetrade/v1/infoprices/subscriptions
trade/v1/messages/subscriptions/activetrade/v1/messages/subscriptions
trade/v1/optionschain/subscriptions/activetrade/v1/optionschain/subscriptions
trade/v1/prices/subscriptions/activetrade/v1/prices/subscriptions

Updating Excel formulas

As the required alterations are relatively minor, most Excel users can update all formulas in their spreadsheets by running Find and Replace as below:

And Refresh formulas:

This procedure should be applied to each sheet individually and is safe to use unless the literal phrase "/subscriptions/active" is used outside of the context of Open API formulas.

Updating VBA

Similarly, in case any of the old endpoints are used in custom VBA modules/macros, running Replace within each module updates functionality accordingly:

Please note: Excel is likely to misbehave after formulas are updated. Refreshing formulas might not always solve this. Consider saving the workbook, closing Excel and logging into OpenAPI on a fresh session.