# POST Ping

```
POST https://api.swaycharts.io/dxsca-web/ping
```

For clients authenticated with [basic authentication](/sway-charts-api-documentation/rest-api-specification/authentication-and-authorization/post-create-session-token.md) resets the session expiration timeout

Since in certain authentication types there is a timeout after which the session is considered expired, there is a risk that a client who is not active may run into situation when he's not able to trade as fast as needed due to a sudden need to re-authenticate. To avoid such issues, this request can be used to periodically "ping" the server without actually doing anything to indicate that the session is still active and should not expire. There is no need to use this API if HMAC Authentication is used.

```
Empty request

Authorization header should be included in case of basic authentication
```

```json
// Response

{
    "sessionToken": "Authentication token to be used in all further requests",
    "timeout": "Time interval after which token expires due to inactivity"
}
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sway-technologies.gitbook.io/sway-charts-api-documentation/rest-api-specification/authentication-and-authorization/post-ping.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
