# Endpoints

The HyperTracker API provides access to real-time and historical data from the Hyperliquid ecosystem.

Developers and analysts can explore wallets, positions, leaderboards, referrals, and HYPE token metrics through a unified data interface. Standard requests return 500 results by default, keeping your data flow manageable.

### Base Endpoint

```
https://ht-api.coinmarketman.com
```

All requests use HTTPS and require the header:

```
Authorization: Bearer <token>
```

### How to Connect

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

```
curl --location 'https://ht-api.coinmarketman.com/api/external/segments' \
  --header 'Authorization: Bearer YOUR_API_TOKEN' \
  --header 'Accept: application/json'
```

{% endtab %}

{% tab title="JavaScript" %}

```
const API_TOKEN = 'YOUR_API_TOKEN';

const res = await fetch(
  'https://ht-api.coinmarketman.com/api/external/segments',
  {
    headers: {
      Authorization: `Bearer ${API_TOKEN}`,
      Accept: 'application/json'
    }
  }
);

if (!res.ok) {
  throw new Error(`Request failed: ${res.status} ${res.statusText}`);
}

const data = await res.json();

console.log(data);
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

API_TOKEN = "YOUR_API_TOKEN"

url = "https://ht-api.coinmarketman.com/api/external/segments"

headers = {
    "Authorization": f"Bearer {API_TOKEN}",
    "Accept": "application/json",
}

response = requests.get(url, headers=headers)
response.raise_for_status()

data = response.json()

print(data)
```

{% endtab %}
{% endtabs %}

Replace YOUR\_API\_TOKEN with the key generated in your API Dashboard.

Once your token is added, run the example request from your terminal or preferred development environment to confirm authentication and connection to the API.

### Authentication

Every request must include a valid JWT Bearer Token in the header.

```
Authorization: Bearer eyJhbGciOiJ...
```

*Invalid or missing tokens return a 401 Unauthorized error.*

### Response Format

All responses are returned in JSON.

```
{"status":"success","data":[...]}
```

Errors follow the same structure:

```
{"status":"error","message":"Unauthorized"}
```


---

# 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.coinmarketman.com/endpoints.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.
