GET Watermarks
- NT8
- Tradovate
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
| Name | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
account | string | Required | Account name in NT8 |
Code examples
- Python
- JavaScript
- cURL
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}")
const token = 'my-secret-token';
const url = "https://app.crosstrade.io/v1/api/accounts/Sim101/watermarks";
fetch(url, {
method: "GET",
headers: {
"Authorization": `Bearer ${token}`,
"Content-Type": "application/json"
}
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
TOKEN="my-secret-token"
curl -X GET "https://app.crosstrade.io/v1/api/accounts/Sim101/watermarks" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
Response
- 200
- 401
- 408
- 429
- 500
// 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
}
}
}
{
"error": "Invalid bearer token"
}
{
"error": "Client not ready to receive requests, disconnected."
}
// retryAfter is integer seconds; also sent as Retry-After.
{
"error": "Rate limit exceeded",
"retryAfter": 1
}
{
"success": false,
"error": "internal_error"
}
Success field types
| Field | Type | Description |
|---|---|---|
success | boolean | Outer request succeeded; inspect data too. |
data | object | Monitor result. |
data.account | string | Account name on a successful lookup. |
data.watermarks, data.stats | object | May be empty before session activity. |
data.watermarks.pnlhigh, data.watermarks.netliqhigh, data.watermarks.unrealhigh | float | Session high-water marks. |
data.stats.pnl, data.stats.total, data.stats.realized, data.stats.unrealized, data.stats.netliq, data.stats.commission | float | Current monetary figures. |
data.stats.pnlhigh, data.stats.netliqhigh, data.stats.unrealhigh | float | Repeated high-water marks. |
data.stats.poscount, data.stats.session | integer | Position count and YYYYMMDD session. |
data.stats.pendingCommission, data.stats.commissionTemplate | null in captures | Non-null variants not yet observed. |
data.success | boolean | Present and false on an inner failure. |
data.error, data.detail | string | Inner failure code and explanation, when present. |
Platform nuances
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"
}
}
Retrieve watermark info from Account Management Tradovate
The same operation is available for linked Tradovate accounts. It returns the current-session P&L high-water marks maintained by the Tradovate Account Manager monitor engine.
Endpoint
GET /v1/api/tv/accounts/{account}/watermarks
Headers
| Name | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
account | string | Required | Tradovate account name, for example DEMO12345678 |
Code examples
- Python
- JavaScript
- cURL
import requests
token = 'my-secret-token'
url = "https://app.crosstrade.io/v1/api/tv/accounts/DEMO12345678/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}")
const token = 'my-secret-token';
const url = "https://app.crosstrade.io/v1/api/tv/accounts/DEMO12345678/watermarks";
fetch(url, {
method: "GET",
headers: {
"Authorization": `Bearer ${token}`,
"Content-Type": "application/json"
}
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
TOKEN="my-secret-token"
curl -X GET "https://app.crosstrade.io/v1/api/tv/accounts/DEMO12345678/watermarks" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
Response
- 200
- 400
- 401
- 403
- 429
- 500
- 502
- 503
{
"success": true,
"data": {
"account": "DEMO12345678",
"watermarks": {
"pnlhigh": 13.25,
"netliqhigh": 74206.83,
"unrealhigh": 13.25,
"perflogAt": 1793102400
}
}
}
{
"success": false,
"error": "unknown_account"
}
{
"success": false,
"error": "inactive_subscription"
}
{
"success": false,
"error": "tradovate_not_linked"
}
// retryAfter is integer seconds; also sent as Retry-After.
{
"success": false,
"error": "rate_limited",
"detail": "CrossTrade API rate limit exceeded (180 requests/min per user). Retry after 1s.",
"retryAfter": 1
}
{
"success": false,
"error": "internal_error"
}
{
"success": false,
"error": "tradovate_unavailable",
"detail": "Tradovate is temporarily unavailable. Please try again shortly."
}
{
"success": false,
"error": "temporarily_disabled"
}
Success field types
| Field | Type | Description |
|---|---|---|
success | boolean | true on success. |
data | object | Account watermark result. |
data.account | string | Account name. |
data.watermarks | object | Can be empty before monitor activity. |
data.watermarks.pnlhigh, data.watermarks.netliqhigh, data.watermarks.unrealhigh | float | Session monetary high-water marks. |
data.watermarks.perflogAt | integer | Optional performance-log time marker. |
Platform nuances
- No NinjaTrader add-on is involved. The call executes server-side against the Tradovate Web API, so it works even when NinjaTrader is closed.
- The response uses
{"success": true, "data": ...}. Thedataobject contains the account name and a nestedwatermarksobject from the Tradovate Account Manager monitor engine. watermarksis an empty object{}when a known Tradovate account has no monitor activity yet in the current session. An unknown account returns HTTP 400 with{"success": false, "error": "unknown_account"}.
See the Tradovate API overview for the full field grammar, mutation safety guarantees, and error table.