# get\_total\_supply

This on-chain view returns total amount of LP tokens in a specific liquidity pool (pair). Also can return a list of responses for a list of requests.

### Call parameters

```pascaligo
type token_id_t         is nat

type total_supply_req_t is token_id_t

list(total_supply_req_t)
```

<table><thead><tr><th width="150">Field</th><th width="202.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>total_supply_req_t</td><td>token_id_t (nat)</td><td>Pair ID for which you need to get LP tokens total supply</td></tr></tbody></table>

### Return type

```pascaligo
type token_id_t         is nat

type total_supply_req_t is token_id_t

type total_supply_res_t is [@layout:comb] record [
  request                 : total_supply_req_t;
  total_supply            : nat;
]

list(total_supply_res_t)
```

#### total\_supply\_res\_t

<table><thead><tr><th width="150">Field</th><th width="152.00000000000003">Type</th><th>Description</th></tr></thead><tbody><tr><td>request</td><td>total_supply_req_t (nat)</td><td>Pair ID for which you need to get LP tokens total supply</td></tr><tr><td>total_supply</td><td>nat</td><td>Amount of LP tokens in a liquidity pool (pair)</td></tr></tbody></table>

### Usage

{% tabs %}
{% tab title="🌮 Taquito" %}

```javascript
const dexCoreAddress = "KT1...";
const params = [0, 1, 15];
const viewCaller = "tz1...";
const dexCore = await tezos.contract.at(dexCoreAddress);
const totalSupply = await dexCore.contract.contractViews.get_total_supply(params).executeView({ viewCaller: viewCaller });
```

{% endtab %}
{% endtabs %}

### Errors

* `108` - pair (pool) with the specified `token_id` not listed.
