Skip to main content

GET Watermarks

Retrieve watermark info from Account Management NT8​

Returns the Account Manager's current-session high-water marks and current PnL statistics for a monitored account. Watermarks track the peak realized and unrealized P/L values during a session and are used by the Account Manager's kill switch logic to determine when thresholds have been breached.

The watermark lookup is server-side and does not make an RPC call to the NinjaTrader add-on. The data is read from CrossTrade's session cache. However, the current NT8 REST and WebSocket authentication path checks the add-on channel before this handler runs, so the add-on must still be connected to access this endpoint.

Endpoint​

GET /v1/api/accounts/{account}/watermarks

Headers​

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Path parameters​

NameTypeRequiredDescription
accountstringRequiredAccount name in NT8

Code examples​

import requests

token = 'my-secret-token'
url = "https://app.crosstrade.io/v1/api/accounts/Sim101/watermarks"
headers = {
"Authorization": f"Bearer {token}",
"Content-Type": "application/json"
}

try:
response = requests.get(url, headers=headers)
print(f"Response Code: {response.status_code}, Response Text: {response.text}")
except Exception as e:
print(f"An error occurred: {e}")

Response​

// Check data.error too: an unknown monitor can return HTTP 200 with data.success: false.
{
"success": true,
"data": {
"account": "Sim101",
"watermarks": {
"pnlhigh": 13.25,
"netliqhigh": 74206.83,
"unrealhigh": 13.25
},
"stats": {
"pnl": -37.33,
"total": -37.33,
"realized": 5.35,
"unrealized": -42.68,
"poscount": 2,
"netliq": 74176.25,
"pnlhigh": 13.25,
"netliqhigh": 74206.83,
"unrealhigh": 13.25,
"commission": 0,
"pendingCommission": null,
"commissionTemplate": null,
"session": 20261027
}
}
}

Success field types​

FieldTypeDescription
successbooleanOuter request succeeded; inspect data too.
dataobjectMonitor result.
data.accountstringAccount name on a successful lookup.
data.watermarks, data.statsobjectMay be empty before session activity.
data.watermarks.pnlhigh, data.watermarks.netliqhigh, data.watermarks.unrealhighfloatSession high-water marks.
data.stats.pnl, data.stats.total, data.stats.realized, data.stats.unrealized, data.stats.netliq, data.stats.commissionfloatCurrent monetary figures.
data.stats.pnlhigh, data.stats.netliqhigh, data.stats.unrealhighfloatRepeated high-water marks.
data.stats.poscount, data.stats.sessionintegerPosition count and YYYYMMDD session.
data.stats.pendingCommission, data.stats.commissionTemplatenull in capturesNon-null variants not yet observed.
data.successbooleanPresent and false on an inner failure.
data.error, data.detailstringInner failure code and explanation, when present.

Platform nuances​

info

The account must have a non-deleted Account Manager monitor. An unknown or unmonitored account reports account_not_found. The current REST wrapper returns that handler error inside the outer {"success": true, "data": ...} envelope with HTTP 200. For an existing monitor with no P&L data in the current session, watermarks and stats are empty {}.

Although the lookup itself is server-side, disconnected NT8 REST or WebSocket clients are rejected by the connected add-on channel gate before the lookup runs.

WebSocket API​

This request can also be made over the WebSocket API. The account path parameter is passed inside args.

{
"action": "rpc",
"id": "my-request-id",
"api": "GetWatermarks",
"args": {
"account": "Sim101"
}
}