# CIAN Yield Layer Points API

### Introduction

This API specification aims to enable DeFi projects to directly allocate points to this protocol’s address, eliminating the need to distribute points to individual users. By doing so, this protocol can better manage and unify the recording of points accumulation. Project teams must implement at least one of the two available query methods.

### Query Methods

#### Method 1: Fixed Interval Points Query

**Request Method**

`GET /points?address={address}`

(just an example)

**Request Parameters**

| Parameter | Type   | Required | Description         |
| --------- | ------ | -------- | ------------------- |
| address   | string | Yes      | User wallet address |

**Response Example**

```
{
    "points": [
        { "timestamp": 1709251200, "points": 90 },
        { "timestamp": 1709337600, "points": 100 }
    ]
}
```

or if you have several points to distribute,

```
{
    "points": [
        { "timestamp": 1709251200, "points_A": 90, "points_B": 90 },
        { "timestamp": 1709337600, "points_A": 100, "points_B": 90 }
    ]
}
```

**Description**

The interval must be no longer than one day.

***

#### Method 2: Timestamp-Based Points Query

**Request Method**

`GET /points?address={address}&timestamp={timestamp}`

(just an example)

**Request Parameters**

| Parameter | Type   | Required | Description                  |
| --------- | ------ | -------- | ---------------------------- |
| address   | string | Yes      | User wallet address          |
| timestamp | int    | Yes      | Query timestamp (in seconds) |

**Response Example**

```
{
    "points": 120
}
```

**Description**

The responses should vary from different timestamps input.

#### Additional

* The detailed info is not necessary, only the total points are needed.


---

# 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.cian.app/yieldlayer/for-builders-developer-documentation/cian-yield-layer-points-api.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.
