# Ping

### Endpoint URL

This API Function checks connectivity and validates the API key authentication with the OpenAlgo platform

```http
Local Host   :  POST http://127.0.0.1:5000/api/v1/ping
Ngrok Domain :  POST https://<your-ngrok-domain>.ngrok-free.app/api/v1/ping
Custom Domain:  POST https://<your-custom-domain>/api/v1/ping
```

### Sample API Request

```json
{ 
"apikey": "<your_app_apikey>" 
}
```

### Sample API Response

```json
{
  "data": {
    "broker": "upstox",
    "message": "pong"
  },
  "status": "success"
}
```

### Request Body

| Parameters | Description | Mandatory/Optional | Default Value |
| ---------- | ----------- | ------------------ | ------------- |
| apikey     | App API key | Mandatory          | -             |

### Response Fields

| Field   | Type   | Description                                        |
| ------- | ------ | -------------------------------------------------- |
| status  | string | Status of the request (success/error)              |
| message | string | Response message ("pong" on successful connection) |
| broker  | string | Name of the connected broker                       |

### Error Response

```json
{ 
"status": "error", "message": "Invalid openalgo apikey" 
}
```

Notes

1. Use this endpoint to verify API connectivity before making other API calls
2. Validates that the API key is correctly configured and active
3. Returns the broker name associated with the validated API key
4. Rate limited to 10 requests per second (configurable via API\_RATE\_LIMIT)
5. Useful for health checks and monitoring API availability


---

# 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://docs.openalgo.in/api-documentation/v1/accounts-api/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.
