# Query Modes

## Mode 1: Pagination (Entity Lists)

Applicable to trading pairs, institution lists, news feeds, and other non-time-series data. The following parameters are common to all endpoints marked as **paginated** and will not be repeated per endpoint.

| Parameter  | Type    | Required | Default | Description                  |
| ---------- | ------- | -------- | ------- | ---------------------------- |
| page       | integer | No       | 1       | Page number, starting from 1 |
| page\_size | integer | No       | 20      | Items per page, max 100      |

**Paginated response structure:**

```json
{
    "list": [ ... ],
    "page": 1,
    "page_size": 20,
    "total": 542
}
```

## Mode 2: Time Window (Time-Series Data)

Applicable to klines, ETF historical net inflow data, and other time-series data. The following parameters are common to all endpoints marked as **time window** and will not be repeated per endpoint.

| Parameter   | Type    | Required | Description                                                              |
| ----------- | ------- | -------- | ------------------------------------------------------------------------ |
| start\_time | long    | No       | Start time, millisecond Unix timestamp                                   |
| end\_time   | long    | No       | End time, millisecond Unix timestamp                                     |
| limit       | integer | No       | Maximum number of records returned (see each endpoint for its max value) |

* Data is returned in ascending chronological order. If the number of records in the time range exceeds `limit`, the earliest `limit` records are returned.
* **Pagination**: Use `timestamp + 1` from the last record of the previous response as `start_time` for the next request.
* When neither `start_time` nor `end_time` is provided, the most recent `limit` records are returned by default.

**Endpoint-specific availability**

| Data Type                 | Availability                                                                         |
| ------------------------- | ------------------------------------------------------------------------------------ |
| Klines                    | Only `1d` interval is supported. Query range is limited to the most recent 3 months. |
| ETF historical net inflow | Query range is limited to the most recent 1 month.                                   |
| Feeds time filters        | `start_time` and `end_time` only support the most recent 7 days.                     |

**Time-series response structure:**

```json
[
    { ... }
]
```

## General Conventions

* All timestamp fields are **UTC millisecond** Unix timestamps (e.g. `1710000000000`)
* All monetary fields are denominated in **USD** by default
* All field names follow **snake\_case** convention


---

# 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://sosovalue-1.gitbook.io/sosovalue-api-doc/query-modes.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.
