This user guide serves as reference documentation and educational resource for Saxo Bank's OpenAPI for Excel add-in. New users are recommended to read through the subsections of this page in order to get to terms with the basics of OpenAPI for Excel. For a collection of samples and Excel snippets, please see the Tutorial Series.
Understanding Saxo Bank's OpenAPI for Excel add-in
OpenAPI for Excel is a a wrapper for Saxo Bank's OpenAPI, the gateway to the IT infrastructure that serves as the backbone of Saxo's next-generation trading platforms such as SaxoTraderGO. OpenAPI allows clients and partners to build custom trading applications that communicate directly with Saxo Bank's trading systems. The OpenAPI for Excel add-in is one of these applications, exposing the power of OpenAPI directly in Excel. The add-in closely follows the structure and syntax of the OpenAPI and is primarily intended to port functionality to Excel. Advanced knowledge of APIs is not required to start building applications in Excel, although users are advised to review the tutorial on the OpenAPI Developer Portal, which offers a useful, interactive introduction to the OpenAPI itself and the way interactions are structured. In addition, the OpenAPI Explorer is a highly useful to investigate endpoints and understand the required syntax for request parameters and the request body.
The OpenAPI for Excel add-in offers the following functionality:
- Fully integrated access to the OpenAPI through worksheet functions that can be used both within worksheets and through VBA. Functions include:
- Generic functions based on HTTP request/response functionality (GET, PUT, PATCH, POST, etc). These can be used for bare-bones API interactions.
- Utility functions to speed up basic operations such as obtaining account keys, automatically resizing arrays to output cells in worksheets, refreshing formulas, etc.
- Easy access to Saxo's simulation environment for testing, read-only access to LIVE accounts, and full trading functionality following approval (see here).
- Access to (live) market data for live prices, quotes, positions, watchlists, and charts. Also includes historical data though the /charts/ endpoint, see for instance this tutorial.
- Fully-fledged Formula Builder for easy construction of worksheet formulas and easy exploration of the broad functionality offered through the add-in. See here for more information.
The add-in is designed to be an open framework, with the intention to be as flexible as the underlying API. An extensive range of use cases is supported as a result, although building one from scratch can be ambitious. The Tutorial Series assists both newcomers and experienced Excel users with some basic building blocks and VBA code to overcome the challenge of a blank canvas. Some of the use cases that are served by the add-in include:
- Portfolio management solutions: maintain positions of multiple clients along differing strategies directly in Excel.
- Forex exposure control: monitor net FX positions live and trade automatically when exposure exceeds predefined limits.
- Reporting tools: pull in-depth trade logs, performance, portfolios etc. directly into Excel for easy report construction.
- Technical analysis: load (live) market data into Excel, build charts and studies, and trade immediately on real-time prices.
- Algo trading: automate trading by coupling VBA models directly to Saxo's trade infrastructure.
OpenAPI for Excel integrates readily with other Excel add-ins such as Thomson Reuters and the Bloomberg API. The add-in itself does not require macros to be enabled, although it should be stressed that in order to leverage the full potential of OpenAPI for Excel it is advised to create additional logic in VBA. Furthermore, users can log into OpenAPI for Excel and other Saxo Bank platforms simultaneously, which is demonstrated in the introductory Get Started in 5 Minutes or Less guide.