> For the complete documentation index, see [llms.txt](https://docs.lighter.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lighter.xyz/developers/integration-guides/manage-public-pools.md).

# Manage Public Pools

Something to keep in mind is that Lighter considers Public Pools as a special type of Subaccount, where multiple users in addition to its owner can deposit in exchange for pool shares. You can create up to 6 public pools per L1 address. Creation is gated to having traded $10M or more in paid volume (checked hourly). You can trade on it via API as you would with a subaccount: users can participate in Public Pools by creating and modifying them, but also mint and burn shares via API. The corresponding transaction types are:

* [TxTypeL2CreatePublicPool (10)](https://github.com/elliottech/lighter-python/blob/main/examples/public-pool/public_pool_create_modify.py)
* [TxTypeL2UpdatePublic Pool (11)](https://github.com/elliottech/lighter-python/blob/main/examples/public-pool/public_pool_create_modify.py)
* [TxL2TypeMintShares (18)](https://github.com/elliottech/lighter-python/blob/main/examples/public-pool/public_pool_deposit.py)
* [TxL2TypeBurnShares (19)](https://github.com/elliottech/lighter-python/blob/main/examples/public-pool/public_pool_withdraw.py)

In the hyperlinks, you can find the corresponding examples on the Python SDK using wrapper functions.

You can monitor your shares using the [account](https://docs.lighter.xyz/api/account) endpoint, the [publicPoolsMetadata](https://docs.lighter.xyz/api/account) endpoint, or any Websocket channel that contains the [PoolShares JSON](https://docs.lighter.xyz/api/websocket#poolshares-json). Note that `entry_usdc` represents the USDC used to acquire pool shares - if you're looking to get an accurate price per share to date, you can query the [publicPoolsMetadata](https://docs.lighter.xyz/api/account) endpoint using `account_id` plus one. Staking pools are to be considered similar to public pools in structure, wth `principal_amount` representing the number of coins staked.

This is what a request to fetch LLP's (281474976710654) metadata would look like:

```shell
curl --request GET \
     --url 'https://mainnet.zklighter.elliot.ai/api/v1/publicPoolsMetadata?index=281474976710655&limit=1' \
     --header 'accept: application/json'
```

The response will look like this:

```json
{
  "code": 200,
  "public_pools": [
    {
      "code": 0,
      "account_index": 281474976710654,
      "created_at": 1737098583,
      "master_account_index": 1,
      "account_type": 3,
      "name": "Lighter Liquidity Provider (LLP)",
      "l1_address": "0x0000000000000000000000000000000000000000",
      "annual_percentage_yield": 30.733724772746875,
      "sharpe_ratio": 5.004736993685667,
      "status": 0,
      "operator_fee": "0.0000",
      "total_asset_value": "693552603.614245",
      "total_shares": 208742636824
    }
  ]
}
```

If you provide `auth`, you can fetch your account's data as well from this endpoint without having to query the `account` one.

To obtain `price_per_share` you can then simply calculate `total_asset_value`/`total_shares`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.lighter.xyz/developers/integration-guides/manage-public-pools.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
