Saxo OpenAPI GET /hist/v1/transactions
Lists historical transactions, such as trades, within a date range for a client or account. Filter by transaction type, asset type or instrument.
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.
Part of Saxo's Account History (hist) service group. Saxo lists 400 for an invalid date range, and 503. Saxo's page describes no required parameters explicitly; which combination of ClientKey or AccountKeys and dates the server insists on was not confirmed. 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
| Name | In | Type | Description |
|---|---|---|---|
| ClientKey | query | string | Client to return history for, from GET /port/v1/clients/me. |
| AccountKeys | query | string | Account keys to limit the result to. |
| FromDate | query | string | Start of the period (date). |
| ToDate | query | string | End of the period (date). |
| TransactionType | query | string | Transaction type to return. |
| AssetTypes | query | string | Comma separated asset types. |
| Uics | query | string | Comma separated Uics. |
| $skip | query | integer | Number of entries to skip from the start of the collection. |
| $top | query | integer | Number of entries to return from the start of the collection. |
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
| Name | Type | Description |
|---|---|---|
| Authorizationrequired, not confirmed | string | 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 writes these same snippets, from the same record.
Python
# Set SAXO_SIM_TOKEN as an environment variable first. Never paste real values into code.
# Optional and not shown: query parameters ClientKey, AccountKeys, FromDate, ToDate, TransactionType, AssetTypes, Uics, $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"],
}
resp = requests.get(BASE_URL + "/hist/v1/transactions", headers=headers, 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: query parameters ClientKey, AccountKeys, FromDate, ToDate, TransactionType, AssetTypes, Uics, $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 + "/hist/v1/transactions", {
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. # Optional and not shown: query parameters ClientKey, AccountKeys, FromDate, ToDate, TransactionType, AssetTypes, Uics, $skip, $top. curl -X GET "https://gateway.saxobank.com/sim/openapi/hist/v1/transactions" \ -H "Authorization: Bearer $SAXO_SIM_TOKEN"
Response
A mock response. The values are invented, so check field names against the official reference.
{
"_mock": true,
"Data": [
{
"AccountId": "MOCK-ACC-01",
"TradeId": "MOCK-TRADE-0001",
"TransactionType": "Trade",
"Date": "2000-01-01T00:00:00Z",
"Currency": "EUR",
"BookedAmount": -10,
"Instrument": {
"Symbol": "MOCK:xmock",
"Uic": 12345,
"AssetType": "Stock"
}
}
],
"MaxRows": 1000
}Response schema, HTTP 200
Every field this site's OpenAPI file for Saxo OpenAPI declares for this response.
| Field | Type | Description |
|---|---|---|
| Data | array of objects | Not recorded |
| AccountId | string | Not recorded |
| TradeId | string | Not recorded |
| TransactionType | string | Not recorded |
| Date | string | Not recorded |
| Currency | string | Not recorded |
| BookedAmount | number | Not recorded |
| Instrument | object | Not recorded |
| Symbol | string | Not recorded |
| Uic | integer | Not recorded |
| AssetType | string | Not recorded |
| MaxRows | integer | Not recorded |
developer.saxochecked
Limits that apply at Saxo OpenAPI
| Limit | Value | Scope | Source |
|---|---|---|---|
| Headline limit | 120/min per session, per service group | session | developer.saxochecked |
Saxo API errors you may meet
- HTTP 409 (duplicate order)HTTP 409. An identical order was sent within a rolling 15 second window and was rejected.
- HTTP 426HTTP 426. Upgrade Required.
- HTTP 429HTTP 429. Rate limit exceeded: 120 requests per minute per session per service group, 1 order per second per session, or 10,000,000 per day per app.
- ActiveFollowerCannotDoManualTradeHTTP 400. Opening or closing a position is not allowed on an active strategy account.
- AlgoOrderTimeBeforeExchangeOpenHTTP 400. An algo order parameter carries a time before the exchange opens.
- AmountBelowMinimumLotSizeHTTP 400. The order size is below the exchange's minimum lot size.
All Saxo API error codes, including 137 more not listed here.