# GET Watermarks

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

<mark style="color:green;">`GET`</mark> `/v1/api/accounts/{account}/watermarks`

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Path Parameters**

| Name      | Type   | Required                                 | Description         |
| --------- | ------ | ---------------------------------------- | ------------------- |
| `account` | string | <mark style="color:red;">Required</mark> | Account name in NT8 |

**Code Examples**

{% tabs %}
{% tab title="Python" %}

```python
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}")
```

{% endtab %}
{% endtabs %}

***

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "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
    }
  }
}

```

{% endtab %}
{% endtabs %}

{% hint style="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 `{}`
{% endhint %}

#### 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.

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