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
- 200 - account not found
{
"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
}
}
}
{
"success": true,
"data": {
"success": false,
"error": "account_not_found",
"detail": "No watermarks tracked for account 'UnknownAccount' — account isn't in your monitors table."
}
}
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, 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"
}
}
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
{
"success": true,
"data": {
"account": "DEMO12345678",
"watermarks": {
"pnlhigh": 13.25,
"netliqhigh": 74206.83,
"unrealhigh": 13.25
}
}
}
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 the three high-water marks 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.