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

{
"success": true,
"data": {
"account": "Sim101",
"watermarks": {
"pnlhigh": 13.25,
"netliqhigh": 74206.83,
"unrealhigh": 13.25
},
"stats": {
"pnl": -37.33,
"total": -37.33,
"unrealized": -42.68,
"poscount": 2,
"netliq": 74176.25,
"pnlhigh": 13.25,
"netliqhigh": 74206.83,
"unrealhigh": 13.25
}
}
}

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, as shown above. 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"
}
}