This repository contains sample files demonstrating OpenAPI interactions in JavaScript that can be run in the browser. Each of the included samples is designed as standalone HTML with vanilla JS and no dependencies.
To try these samples yourself, download/clone this repo and load the HTML files locally on your browser. You can alternatively navigate to this interactive page to select the samples hosted directly online.
Samples run against Saxo's simulation environment and require an access token in order to function. Saxo provides 24-hour tokens on the Developer Portal, which is the easiest way to get started with the samples provided here. An account is required to generate a token, which can be created for free.
- Authentication
- Basics
- Instruments
- Order Placement
- Portfolio
- Account History
- Using websockets
Basic Price Streamer: Shows how to display prices for instruments and update them when an update is broadcasted. The connection health is monitored.
Basic Order Manager: A Vue.js app that runs in the browser, pulls out open orders of the logged-in client and displays them in a Vuetify table with sorting and filtering functionality. Includes a simple order blotter and an implementation of OAuth implicit flow to authenticate with the OpenAPI.
Suggestions? Comments? Reach us via Github or openapisupport@saxobank.com.