# V3 CFMM

### Ticks

## Get all initialised ticks for a pool

<mark style="color:blue;">`GET`</mark> `https://api.plenty.network/config/ticks`

This endpoint returns an array of objects where each object represents an initialised tick in a pool, its next and previous ticks, square root price at it, real price in both token x and y and net liquidity at it.

#### Query Parameters

| Name                                   | Type   | Description                  |
| -------------------------------------- | ------ | ---------------------------- |
| pool<mark style="color:red;">\*</mark> | String | Tezos address of the v3 pool |

{% tabs %}
{% tab title="200: OK Successfully returns all ticks" %}

```typescript
[
  {
    tick: string;
    prev: string;
    next: string;
    sqrtPrice: string;
    realPriceX: string;
    realPriceY: string;
    liquidityNet: string;
  }
]
```

{% endtab %}
{% endtabs %}

## Get the witness of a particular tick

<mark style="color:blue;">`GET`</mark> `https://api.plenty.network/config/ticks`

This endpoint returns an object with a single field i.e. the witness of the provided tick

#### Query Parameters

| Name                                        | Type     | Description                                |
| ------------------------------------------- | -------- | ------------------------------------------ |
| witnessOf<mark style="color:red;">\*</mark> | Interger | The tick for which the witness is required |

{% tabs %}
{% tab title="200: OK Successfully returned tick witness" %}

```
{
  witness: string;
}
```

{% endtab %}

{% tab title="400: Bad Request Provided tick is not a number of not in range" %}

{% endtab %}
{% endtabs %}

### Positions

## Get all v3 positions of a specific Tezos address

<mark style="color:blue;">`GET`</mark> `https://api.plenty.network/v3/positions`

This endpoint returns an array of objects where each object contains information about a position, the pool it belongs to, the tick boundaries, the liquidity and cumulative fee growth values.&#x20;

#### Query Parameters

| Name                                      | Type   | Description               |
| ----------------------------------------- | ------ | ------------------------- |
| address<mark style="color:red;">\*</mark> | String | Tezos address of the user |

{% tabs %}
{% tab title="200: OK Successfully returned list of positions" %}

```typescript
[
  {
    key_id: string; // Big_map key id
    amm: string; // Pool to which the position belongs
    owner: string;
    upper_tick_index: string;
    lower_tick_index: string;
    liquidity: string;
    fee_growth_inside_last_x: string; // Fee cumulatives
    fee_growth_inside_last_y: string;
  };
]
```

{% endtab %}
{% endtabs %}


---

# 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.api.plenty.network/endpoints/v3-cfmm.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.
