GET Watermarks

Returns the high watermarks used by the Account Management module

Returns the high-water mark 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.

This endpoint is server-side only and does not make an RPC call to the NinjaTrader add-on. The data is read from CrossTrade's session cache, which means it responds instantly and does not require the add-on to be connected at the time of the request.

Retrieve watermark info from Account Management

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

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

circle-info

If the account has no active monitor or no P&L data has been reported for the current session, the watermarks and stats objects will be empty {}

WebSocket API

This request can also be made over the WebSocket API. The account path parameter is passed inside args. Note: this endpoint is handled server-side and does not require the NinjaTrader add-on to be connected.

Last updated