/openapi-samples-js

Saxo Bank OpenAPI samples in JavaScript

Primary LanguageJavaScriptApache License 2.0Apache-2.0

OpenAPI JavaScript Sample Repository

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 dependecies.

To try these samples yourself, download/clone this repo and load the HTML files locally, or navigate to this interactive page to run the samples directly online.

Requirements

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.

Table of Contents

  1. Authentication
  2. Instruments
  3. Order Placement
  4. Using websockets
  5. Batch Requests
  6. Error handling