# Saxo OpenAPI POST /trade/v1/prices/subscriptions

Independent and unofficial. Not affiliated with or endorsed by any broker or platform named here. Educational only: nothing here is advice, and nothing here recommends a broker or a trade.

This is the markdown version of https://openbrokerapi.com/brokers/saxo/endpoints/prices-subscribe, written from the same records as that page.

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.

Sets up a streaming price subscription on one instrument and returns an initial snapshot. Updates then arrive on your WebSocket connection under the same ContextId and ReferenceId.

- Request: `POST /trade/v1/prices/subscriptions`
- Version: v1
- Group: Prices
- Status: verified. Source: [developer.saxo](https://www.developer.saxo/openapi/referencedocs/trade/v1/prices/post__trade__subscriptions), checked 2026-10-12.
- Official reference: https://www.developer.saxo/openapi/referencedocs/trade/v1/prices/post__trade__subscriptions

Note: Needs an open WebSocket connection with the same ContextId (see Saxo's streaming guide). Saxo lists 409 on this call when the subscription limit is exceeded, and 404 for an unknown instrument. 503 Service Unavailable is also listed. Saxo's parameter table for this call has no required or optional column; the required flags here are our reading of Saxo's descriptions and example request, not markers on Saxo's page. Method, path and parameter names were re-read on Saxo's reference page for this call on 12 Oct 2026 and agree with this record. That page does not mark which parameters are required, so the required flags here were not re-checked, and the mock reply was not compared field by field.

## Parameters

- `ContextId` (in body, type string, required, not confirmed): Id of your streaming connection; letters, digits, dash and underscore, up to 50 characters.
- `ReferenceId` (in body, type string, required, not confirmed): Your own id for this subscription; up to 50 characters.
- `Arguments` (in body, type object, required, not confirmed): PriceRequest: AccountKey, Uic, AssetType, Amount and optional FieldGroups.
- `RefreshRate` (in body, type integer, optional): Optional minimum time in milliseconds between updates.
- `Format` (in body, type string, optional): Media type of updates, application/json or application/x-protobuf.

The required marks on this page are this site's reading of secondary material, as the note above says. Which fields the API insists on is not confirmed on the provider's own reference.

### Authentication headers

- `Authorization` (type string, required, not confirmed): OAuth 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 at https://openbrokerapi.com/tools/request-builder writes these same snippets, from the same record.

This call takes a request body. The samples send it as JSON with a placeholder for each of the 3 body fields the record marks as required, a mark that is not confirmed. Each placeholder has to be replaced with a real value before the request can succeed.

### Python

```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: body fields RefreshRate, Format.
import os
import requests

BASE_URL = "https://gateway.saxobank.com/sim/openapi"  # the demo host
headers = {
    "Authorization": "Bearer " + os.environ["SAXO_SIM_TOKEN"],
}
body = {"ContextId": "...", "ReferenceId": "...", "Arguments": {}}
resp = requests.post(BASE_URL + "/trade/v1/prices/subscriptions", headers=headers, json=body, timeout=10)
resp.raise_for_status()
print(resp.json())
```

### JavaScript

```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: body fields RefreshRate, Format.
// 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 + "/trade/v1/prices/subscriptions", {
  method: "POST",
  headers: {
    "Authorization": "Bearer " + process.env.SAXO_SIM_TOKEN,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"ContextId": "...", "ReferenceId": "...", "Arguments": {}}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
console.log(await res.json());
```

### curl

```bash
# 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: body fields RefreshRate, Format.
curl -X POST "https://gateway.saxobank.com/sim/openapi/trade/v1/prices/subscriptions" \
  -H "Authorization: Bearer $SAXO_SIM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ContextId": "...", "ReferenceId": "...", "Arguments": {}}'
```

## Response

A mock response. The values are invented, so check field names against the [official reference](https://www.developer.saxo/openapi/referencedocs/trade/v1/prices/post__trade__subscriptions).

```json
{
  "_mock": true,
  "ContextId": "MOCKCONTEXT01",
  "ReferenceId": "MOCKREF01",
  "RefreshRate": 1000,
  "InactivityTimeout": 30,
  "Format": "application/json",
  "State": "Active",
  "Snapshot": {
    "Uic": 12345,
    "AssetType": "Stock",
    "LastUpdated": "2000-01-01T09:00:00Z",
    "Quote": {
      "Bid": 10,
      "Ask": 10.02,
      "Mid": 10.01
    }
  }
}
```

## Response schema, HTTP 201

Every field this site's OpenAPI file for Saxo OpenAPI (https://openbrokerapi.com/specs/saxo.json) declares for this response.

- `ContextId` (string): Not recorded
- `ReferenceId` (string): Not recorded
- `RefreshRate` (integer): Not recorded
- `InactivityTimeout` (integer): Not recorded
- `Format` (string): Not recorded
- `State` (string): Not recorded
- `Snapshot` (object): Not recorded
  - `Uic` (integer): Not recorded
  - `AssetType` (string): Not recorded
  - `LastUpdated` (string): Not recorded
  - `Quote` (object): Not recorded
    - `Bid` (number): Not recorded
    - `Ask` (number): Not recorded
    - `Mid` (number): Not recorded

Status: verified. Source: [developer.saxo](https://www.developer.saxo/openapi/referencedocs/trade/v1/prices/post__trade__subscriptions), checked 2026-10-04.

## Limits that apply at Saxo OpenAPI

- Headline limit: 120/min per session, per service group
  - Scope: session
  - Status: verified. Source: [developer.saxo](https://www.developer.saxo/openapi/learn/rate-limiting), checked 2026-09-18.
  - Note: Per session per service group; 1 order per second per session.

## More on the Saxo API

- [All Saxo API endpoints](https://openbrokerapi.com/brokers/saxo/endpoints): 68 documented, grouped by what they do.
- [Saxo API quickstart](https://openbrokerapi.com/brokers/saxo/quickstart)
- [All Saxo API error codes](https://openbrokerapi.com/errors/saxo)
- [Saxo API page](https://openbrokerapi.com/brokers/saxo): The full record: access, authentication, limits and the source for each.
- [Saxo API as an OpenAPI file](https://openbrokerapi.com/specs/saxo.json): Generated from these endpoint records. Independent and unofficial.

## Licence and how to cite

The records behind this page are all rights reserved. This file is the page itself, at its own address, in another format. It is not part of the CC BY 4.0 downloads listed at https://openbrokerapi.com/data. Quote from it with a link to the page.

Cite as: Saxo OpenAPI POST /trade/v1/prices/subscriptions. Broker API Hub, https://openbrokerapi.com/brokers/saxo/endpoints/prices-subscribe, newest check 2026-10-12.

Where you rely on a single figure, cite the source and the checked date printed beside it as well. Where this page and a broker's own documentation differ, the documentation wins.
