> For the complete documentation index, see [llms.txt](https://www.notbank.com/learn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.notbank.com/learn/api-reference/websocket-api/system.md).

# System

### Ping

**Permissions:** Public\
**Call Type:** Synchronous

Keepalive, can be used to avoid getting session timeout.

#### Request

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

```javascript
import Notbank from 'notbank'
// websocket connection code ...

await client.getSystemService().ping();

```

{% endtab %}

{% tab title="Java" %}

```java
var response = client.getSystemService().ping().get();
```

{% endtab %}

{% tab title="Python" %}

```python
client.ping()
```

{% endtab %}

{% tab title="Json" %}

```json
{
  "m": 0,
  "i": 0,
  "n": "Ping",
  "o": "{}"
}
```

{% endtab %}
{% endtabs %}

No request payload required.

#### Response

```json
{
  "m": 1,
  "i": 0,
  "n": "Ping",
  "o": "{
    \"msg\": \"PONG\"
  }"
}

```

| Key | Value                                                                             |
| --- | --------------------------------------------------------------------------------- |
| msg | **string**. PONG means Ping request was successful and the gateway has responded. |

### HealthCheck

**Permissions:** Public\
**Call Type:** Synchronous

Gets Exchange's services overall health.

#### Request

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

```javascript
import Notbank from 'notbank'
// websocket connection code ...

await client.getSystemService().healthCheck();

```

{% endtab %}

{% tab title="Java" %}

```java
var response = client.getSystemService().healthCheck().get();
```

{% endtab %}

{% tab title="Python" %}

```python
client.health_check()
```

{% endtab %}

{% tab title="Json" %}

```json
{
  "m": 0,
  "i": 0,
  "n": "HealthCheck",
  "o": "{}"
}
```

{% endtab %}
{% endtabs %}

No request payload required.

#### Response

```json
{
  "m": 1,
  "i": 0,
  "n": "HealthCheck",
  "o": "{
    \"result\": true,
    \"errormsg\": null,
    \"errorcode\": 0,
    \"detail\": \"running: {\\\"ExchangeId\\\":1,\\\"Data1\\\":638169552829684050,\\\"Data2\\\":1,\\\"OmsId\\\":0,\\\"GatewayIn\\\":638169552829684082,\\\"OmsIn\\\":638169552829719513,\\\"MatchingEngineIn\\\":638169552829860044,\\\"OmsOut\\\":638169552829872324,\\\"GatewayOut\\\":638169552829928412,\\\"RoundTripTimeMic\\\":24436}\"
  }"
}

```

| Key       | Value                                                                                                                                                                                                                                                                                                         |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| result    | **boolean**. A successful request returns true; and unsuccessful request (an error condition) returns false.                                                                                                                                                                                                  |
| errormsg  | **string**. A successful request returns null; the *errormsg* parameter for an unsuccessful request returns one of the following messages: Not Authorized (errorcode 20), Invalid Request (errorcode 100), Operation Failed (errorcode 101), Server Error (errorcode 102), Resource Not Found (errorcode 104) |
| errorcode | **integer**. A successful request returns 0. An unsuccessful request returns one of the *errorcodes* shown in the *errormsg* list.                                                                                                                                                                            |
| detail    | **string**. A string description of the status of the exchange, plus the json string representation of the health detail defined below                                                                                                                                                                        |

**health detail**

| Key              | Value                                                                         |
| ---------------- | ----------------------------------------------------------------------------- |
| ExchangeId       | **integer**. the ID of the Exchange.                                          |
| Data1            | **long integer**. The timestamp when the request was first processed, in UTC. |
| Data2            | **long integer**. Default is 1.                                               |
| OmsId            | **long integer**. Default is 0.                                               |
| GatewayIn        | **long integer**. The timestamp when the request was first processed, in UTC. |
| OmsIn            | **long integer**. The timestamp when the request was first processed, in UTC. |
| MatchingEngineIn | **long integer**. The timestamp when the request was first processed, in UTC. |
| OmsOut           | **long integer**. The timestamp when the check on OMS finished, in UTC.       |
| GatewayOut       | **long integer**. The timestamp when the check on Gateway finished.           |
| RoundTripTimeMic | **long integer**. The duration of all the checks, in milliseconds.            |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.notbank.com/learn/api-reference/websocket-api/system.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
