Broker API HubMenu

Saxo OpenAPI PUT /root/v1/sessions/capabilities

PUT/root/v1/sessions/capabilitiesversion v1Session and user

Change the trade level of the current session, which decides whether it can trade on quotes and receive real time data.

Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.

Independent and unofficialdeveloper.saxochecked

Read on Saxo's own reference page on 12 Oct 2026: method, path, parameters and response fields. No response body is documented: the page says the change is accepted and carried out afterwards. The values TradeLevel can take were not read. Saxo lists the permission needed as Read.

Parameters

NameInTypeDescription
Content-TyperequiredheaderstringSend application/json on a request with a body.
TradeLevelbodystringThe trade level to switch the session to.

Authentication headers

NameTypeDescription
AuthorizationrequiredstringOAuth 2.0 bearer access token. In SIM you can use a 24 hour token from the Saxo developer portal. Placeholder only: never paste a real token into this site.

Request

Written from the method, path and parameters recorded on this page, against the demo host. Not executed against a live or demo account. Credentials are read from environment variables on your own machine and are never entered on this site. The request builder writes these same snippets, from the same record.

This call takes a request body. The record marks no body field as required, so the samples send an empty JSON object with a Content-Type of application/json (in Python, passing json= sets that header). Add the fields the call needs from the parameters above before the request can succeed.

Python
# Set SAXO_SIM_TOKEN as an environment variable first. Never paste real values into code.
# Optional and not shown: body fields TradeLevel.
import os
import requests

BASE_URL = "https://gateway.saxobank.com/sim/openapi"  # the demo host
headers = {
    "Authorization": "Bearer " + os.environ["SAXO_SIM_TOKEN"],
    "Content-Type": "application/json",
}
body = {}
resp = requests.put(BASE_URL + "/root/v1/sessions/capabilities", headers=headers, json=body, timeout=10)
resp.raise_for_status()
print(resp.json())
JavaScript
// Set SAXO_SIM_TOKEN as an environment variable first. Never paste real values into code.
// Optional and not shown: body fields TradeLevel.
// Run as a module, for example a .mjs file, on a Node version that has fetch built in.
const BASE_URL = "https://gateway.saxobank.com/sim/openapi"; // the demo host
const res = await fetch(BASE_URL + "/root/v1/sessions/capabilities", {
  method: "PUT",
  headers: {
    "Authorization": "Bearer " + process.env.SAXO_SIM_TOKEN,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
console.log(await res.json());
curl
# Set SAXO_SIM_TOKEN as an environment variable first. Never paste real values into code.
# Optional and not shown: body fields TradeLevel.
curl -X PUT "https://gateway.saxobank.com/sim/openapi/root/v1/sessions/capabilities" \
  -H "Authorization: Bearer $SAXO_SIM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Response

No mock response is recorded for this endpoint. Where the record says why, or names the fields of the reply, it does so in the note at the top of this page. That is a statement about this record, not about what the API returns: read the shape of the reply in the official reference.

Limits that apply at Saxo OpenAPI

LimitValueScopeSource
Headline limit120/min per session, per service groupsessiondeveloper.saxochecked

Saxo API errors you may meet

All Saxo API error codes, including 137 more not listed here.