Broker API HubMenu

Saxo OpenAPI GET /port/v1/netpositions

GET/port/v1/netpositionsversion v1Positions

Lists net positions for a client, an account group or an account, with filters by instrument. Each can carry its sub positions if you ask for them.

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. The reply is a paged feed: Data holds the entries and __next links to the next page. The page also lists ExpiryDate, PutCall, Strike, LowerBarrier, UpperBarrier and ValueDate, each used only to tell option or forward positions apart. Saxo lists the permission needed as Read.

Parameters

NameInTypeDescription
ClientKeyrequiredquerystringKey of the client the positions belong to. Read yours from GET /port/v1/clients/me.
AccountKeyquerystringNarrow the reply to one account's positions.
AccountGroupKeyquerystringNarrow the reply to one account group's positions.
NetPositionIdquerystringReturn this one net position.
AssetTypequerystringFilter by asset type.
UicqueryintegerFilter by instrument, by its Uic.
FieldGroupsquerystringWhich data to return. Default NetPositionBase,NetPositionView. Add SubPositions for the positions inside each.
StrategyGroupingEnabledquerybooleanTrue to group positions by strategy. Default false.
WatchlistIdquerystringReturn only net positions in instruments on this watchlist.
$skipqueryintegerNumber of entries to skip from the start of the collection.
$topqueryintegerNumber of entries to return from the start of the collection.

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.

Python
# Set SAXO_SIM_TOKEN as an environment variable first. Never paste real values into code.
# Replace each {placeholder}, "..." and 0 with a real value before running.
# Optional and not shown: query parameters AccountKey, AccountGroupKey, NetPositionId, AssetType, Uic, FieldGroups, StrategyGroupingEnabled, WatchlistId, $skip, $top.
import os
import requests

BASE_URL = "https://gateway.saxobank.com/sim/openapi"  # the demo host
headers = {
    "Authorization": "Bearer " + os.environ["SAXO_SIM_TOKEN"],
}
params = {"ClientKey": "{ClientKey}"}
resp = requests.get(BASE_URL + "/port/v1/netpositions", headers=headers, params=params, 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.
// Replace each {placeholder}, "..." and 0 with a real value before running.
// Optional and not shown: query parameters AccountKey, AccountGroupKey, NetPositionId, AssetType, Uic, FieldGroups, StrategyGroupingEnabled, WatchlistId, $skip, $top.
// 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 + "/port/v1/netpositions" + "?ClientKey={ClientKey}", {
  method: "GET",
  headers: {
    "Authorization": "Bearer " + process.env.SAXO_SIM_TOKEN,
  },
});
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.
# Replace each {placeholder}, "..." and 0 with a real value before running.
# Optional and not shown: query parameters AccountKey, AccountGroupKey, NetPositionId, AssetType, Uic, FieldGroups, StrategyGroupingEnabled, WatchlistId, $skip, $top.
curl -X GET "https://gateway.saxobank.com/sim/openapi/port/v1/netpositions?ClientKey={ClientKey}" \
  -H "Authorization: Bearer $SAXO_SIM_TOKEN"

Response

A mock response. The values are invented, so check field names against the official reference.

{
  "_mock": true,
  "__count": 1,
  "Data": [
    {
      "NetPositionId": "MOCK_Stock"
    }
  ]
}

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.