> ## Documentation Index
> Fetch the complete documentation index at: https://docs.struct.to/llms.txt
> Use this file to discover all available pages before exploring further.

# LP and token locks

> Read a pool's LP security, a token's locked supply, every lock behind them, unlock times and withdrawals.

Struct tracks two separate kinds of lock data:

| Summary | Describes | Built from |
| - | - | - |
| `lp_security` | How a **pool's liquidity** is held: burned, locked, permanently locked, claimable or free | LP token locks, position NFT locks and launchpad custodians of that pool |
| `supply_locks` | How much of a **token's supply** is locked | Locks of the token itself (team, vesting and treasury locks) |

Token supply locks never count toward a pool's LP lock percentage, and LP locks never count toward `supply_locks`.

Lock data currently covers Robinhood Chain (`chain_id` 4663).

## Where the summaries appear

| Response | `lp_security` | `supply_locks` |
| - | - | - |
| [Token by address](https://docs.struct.to/api-reference/token/token-by-address.md) and [tokens by address (batch)](https://docs.struct.to/api-reference/token/tokens-by-address-batch.md) | Returned pool | Requested token |
| [Token liquidity pools](https://docs.struct.to/api-reference/token-market/token-liquidity-pools.md) | Each pool | Not returned |
| [Address room](https://docs.struct.to/websockets/rooms/address.md) (`pool` dirty kind) | Subscribed pool | Listed token |

With short field names (`fields=short`, and WebSocket connections by default) they are `ls` and `sl`; see [short field names](#short-field-names). Each is omitted until it is available. Pulse and Trending rows also carry `lp_security` (`ls`).

`lp_security` is the only place LP figures are returned; the former root fields `lp_burn_percentage` (`lb`) and `lp_locked_percentage` (`ll`) are no longer served. The Pulse and Trending filters of the same names remain and read `lp_security`: `lp_burn_percentage` filters on `burned_percent`, and `lp_locked_percentage` on `locked_percent + permanent_locked_percent + claimable_percent`.

## LP security

```json theme={null}
"lp_security": {
  "burned_percent": 0.0,
  "locked_percent": 12.0,
  "permanent_locked_percent": 82.5,
  "claimable_percent": 3.1,
  "unlocked_percent": 2.4,
  "next_unlock": { "at": 1807574400000, "percent": 12.0 },
  "fully_unlocked_at": 1807574400000,
  "updated_at": 1791883798000,
  "block": 26259730,
  "lock_count": 3
}
```

The five percentages always add up to 100:

| Field | Share of the pool's liquidity that is… |
| - | - |
| `burned_percent` | Held by burn addresses, or in burned position NFTs |
| `locked_percent` | In timed or vesting locks that have not released yet, plus custodians that hold it with no unlock date |
| `permanent_locked_percent` | Never withdrawable: eternal locks and launchpad lockers that have no way to move the liquidity out |
| `claimable_percent` | Released by its lock (unlock time passed, or vested) but not yet withdrawn. Never counted as locked |
| `unlocked_percent` | Free: held by anyone else and withdrawable at any time |

* **V2 pools** measure shares of the LP token supply.
* **V3 and V4 pools** weight each position by the value of its principal at the current price, so the split can move with the price as positions go in and out of range.
* **Vesting locks** split pro rata: a position NFT or direct position that vests (for example a StonkBrokers box lock, linear from its start to its end) counts its vested and not yet withdrawn part as claimable and only the rest as locked. A pool 100% held by such a lock that is 5% vested shows 95% locked and 5% claimable.
* `next_unlock` is the earliest upcoming release and the share of the pool it releases.
* `fully_unlocked_at` is when every non-permanent lock has fully released. It is omitted when nothing is scheduled to unlock, or when a custodian with no unlock date holds part of the pool. Permanent locks do not affect it.
* `lock_count` is the number of locks and custodians behind the numbers. List them with [pool LP locks](https://docs.struct.to/api-reference/token-locks/pool-lp-locks.md).
* `block` is the block the figures reflect, and `updated_at` when they were last updated, in milliseconds.

## Supply locks

```json theme={null}
"supply_locks": {
  "locked_percent": 5.75,
  "permanent_locked_percent": 0.0,
  "claimable_percent": 0.25,
  "next_unlock": { "at": 1793404800000, "percent": 0.75 },
  "fully_unlocked_at": 1803772800000,
  "updated_at": 1790950896000,
  "block": 26148213,
  "lock_count": 2
}
```

Percentages are shares of the token's total supply. There is no burned or unlocked bucket: the rest of the supply is simply not locked. List the locks with [token supply locks](https://docs.struct.to/api-reference/token-locks/token-supply-locks.md).

## Listing locks

| Endpoint | Lists |
| - | - |
| [`GET /v1/token/locks`](https://docs.struct.to/api-reference/token-locks/token-supply-locks) | A token's supply locks (`token_address`) |
| [`GET /v1/token/pool-locks`](https://docs.struct.to/api-reference/token-locks/pool-lp-locks) | A pool's LP locks and custodians (`pool_id`) |
| [`GET /v1/token/owner-locks`](https://docs.struct.to/api-reference/token-locks/wallet-locks) | Token and LP locks a wallet can withdraw (`owner`) |
| [`GET /v1/token/lock-events`](https://docs.struct.to/api-reference/token-locks/lock-event-history) | Lock history of a token, pool or wallet |

The list endpoints share their parameters: `sort_by` (`unlock_at` or `amount`), `sort_order`, `active` (default `true`: only `locked`, `partially_unlocked` and `permanent` locks), `status`, `kind`, `include_withdrawn`, `limit` (default 50, at most 100) and `pagination_key`. `data` is the list of locks (or events), with the next page key in the top-level `pagination`.

```javascript theme={null}
const base = "https://staging-api.struct.to/v1";
const headers = { "X-API-Key": "YOUR_API_KEY" };

// 1. Read the pool's summary.
const token = await fetch(
  `${base}/token/address?chain_id=4663&token_address=0x39dBED3a2bd333467115dE45665cC57F813C4571`,
  { headers },
).then((r) => r.json());
const { pool_id, lp_security } = token.data;

// 2. List every lock behind it, soonest unlock first.
if (lp_security?.lock_count) {
  let paginationKey = null;
  do {
    const params = new URLSearchParams({ chain_id: "4663", pool_id });
    if (paginationKey) params.set("pagination_key", paginationKey);
    const page = await fetch(`${base}/token/pool-locks?${params}`, { headers }).then((r) => r.json());
    for (const lock of page.data) {
      console.log(lock.locker.name, lock.status, lock.share_percent, lock.unlock_at, lock.url);
    }
    paginationKey = page.pagination?.pagination_key ?? null;
  } while (paginationKey);
}
```

### Each lock

| Field | Meaning |
| - | - |
| `token_address` | The locked token (supply locks), or the LP token of a fungible LP lock. Absent for position NFTs |
| `pool_id` | The pool whose liquidity is locked (LP locks) |
| `locker` | `id` (slug such as `uncx`, `goplus`, `hoodlock` or a launchpad), display `name` (`UNCX Network`, `GoPlus`, `HoodLock`, or the launchpad protocol such as `PonsV2`), contract `address`, `kind` and `logo` when one is published |
| `lock_id` | The locker's own lock, deposit or vesting id. For custodians: the pool id, position id or locker |
| `owner` | The wallet that can withdraw. Absent for custodians |
| `position` | `type` (`token`, `lp_token`, `position_nft` or `direct_position`), `venue` (`v2`, `v3`, `v4`) and `position_id` for position NFTs |
| `amount`, `amount_raw` | Principal still locked: scaled by the token's decimals when known, and in raw integer units. Position locks have no amount |
| `share_percent` | Share of the pool or supply held by this lock, split into `locked_percent` and `claimable_percent` |
| `unlock_at` | First release time; absent when the lock never unlocks |
| `vesting` | For vesting locks: `start_at`, `end_at`, `next_step_at`, `cycle_seconds`, `cycle_percent`, `first_unlock_percent` and the amount already claimed |
| `url` | The lock's page on the locker's site, when the locker publishes per-lock pages |

`kind` describes the locker: `timed` locks release everything at `unlock_at`, `vesting` locks release in steps or linearly, `permanent` lockers never release, and `custodial` holders keep the liquidity with no unlock date.

### Status and unlock times

| `status` | Meaning |
| - | - |
| `locked` | Nothing has released yet |
| `partially_unlocked` | Part has released and can be claimed; the rest is still locked |
| `unlocked` | Everything has released but has not been withdrawn yet |
| `withdrawn` | The lock is empty. Hidden unless you pass `include_withdrawn=true` or `status=withdrawn` |
| `permanent` | Never withdrawable |

Unlocks need no transaction: when `unlock_at` (or a vesting step) passes, the lock's share moves from locked to claimable, its status changes, an `unlocked` event is recorded, and the pool's `lp_security` or the token's `supply_locks` is updated. Liquidity still counts as claimable, not unlocked, until it actually leaves the locker.

## Locker holders

In [token holders](https://docs.struct.to/api-reference/token-holders/token-holders.md), a holder that is a locker contract carries `locks`: what it holds of the token in locks (the token's supply locks, or the pair's LP locks when the token is a V2 LP token).

```json theme={null}
"locks": {
  "lock_count": 2,
  "locked_amount": 950.0,
  "locked_amount_raw": "950000000000000000000",
  "locked_percent": 0.095,
  "claimable_amount": 50.0,
  "claimable_amount_raw": "50000000000000000000",
  "claimable_percent": 0.005
}
```

`locked_*` is still locked (timed, vesting, permanent and custodial locks); `claimable_*` is vested or released but not yet withdrawn, and is never counted as locked. Percents are of the token's supply (0-100); `*_amount` is scaled by the token's decimals and `*_amount_raw` is in raw integer units. Holders that are not lockers omit `locks`.

## Lock events and withdrawals

[Lock event history](https://docs.struct.to/api-reference/token-locks/lock-event-history.md) returns every `created`, `extended`, `transferred`, `split`, `withdrawn`, `claimed` and `unlocked` event for one token, pool or wallet, newest first. History reaches back to locks created before this endpoint launched.

* `withdrawn` and `claimed` record what left the locker: `from` is the locker and `to` is the recipient, with the received `amount`.
* `transferred` records a new lock owner: `from` is the previous owner and `to` the new one.
* `unlocked` events happen at the unlock time itself, so they have no `hash`, and `confirmed_at` is the unlock time.
* `share_percent` is the moved share of the token's supply or the pool.

To watch for liquidity leaving its lockers, poll the pool's events and alert on `withdrawn`:

```javascript theme={null}
const params = new URLSearchParams({
  chain_id: "4663",
  pool_id: "0xEd50bDeeA8aDC232f159486192a4157281D722ff",
  from: String(Math.floor(Date.now() / 1000) - 3600),
});
const page = await fetch(`https://staging-api.struct.to/v1/token/lock-events?${params}`, {
  headers: { "X-API-Key": "YOUR_API_KEY" },
}).then((r) => r.json());
for (const event of page.data.filter((e) => e.event === "withdrawn")) {
  console.log(`${event.share_percent}% of the pool withdrawn to ${event.to}`, event.hash);
}
```

The [address room](https://docs.struct.to/websockets/rooms/address.md) pushes a `pool` update when a pool's `lp_security` or the token's `supply_locks` changes (`ls` / `sl` in the default short mode).

## Linking to the locker

Link each lock to `url` when it is present: it opens that lock on the locker's own site. When it is absent (launchpad custodians, and lockers without per-lock pages), link to the locker contract on the explorer instead, for example `https://robinhoodchain.blockscout.com/address/{locker.address}`. Label it with `locker.name` and show `locker.logo` when it is returned; otherwise use your own icon keyed by `locker.id`.

## Supported lockers on Robinhood Chain

| Locker (`locker.id`) | `kind` | Holds | Contract | Lock page (`url`) |
| - | - | - | - | - |
| UNCX (`uncx`) | `timed` | Uniswap V3 positions | `0xf28704c691290547924e2129d407da36bda8ce0f` | Yes |
| UNCX (`uncx`) | `timed` | Uniswap V4 positions | `0x128a800cbc615cc110bff16e475865c67631603a` | Yes |
| UNCX Token Vesting (`uncx`) | `vesting` | Tokens and V2 LP | `0xb31eaefa2a0bdc53df6d7a7f0f289b6ee1a8aaf3` | Yes |
| GoPlus TokenLocker (`goplus`) | `vesting` | Tokens and V2 LP | `0xf17a08a7d41f53b24ad07eb322cbbda2ebdec04b` | Yes |
| GoPlus UniV3LPLocker (`goplus`) | `timed` | Uniswap V3 positions | `0x25c9c4b56e820e0dea438b145284f02d9ca9bd52` | Yes |
| HoodLock (`hoodlock`) | `timed` | Tokens and V2 LP | `0xd0f7d8c6e9f6d80c297bebe4f7fd1b9c8125c32f` | Yes |
| Launchpad lockers (for example `pons`, `pons_v2`, `clanker`, `dyor`, `dyor_v3`, `noxa`, `doppler`, `o1`, `trench`, `virtuals`) | `permanent` or `custodial` | The launch liquidity: V3 / V4 positions, V2 LP, and leftover supply for some | Per launchpad, including per-launch contracts | No |

`locker.kind` on each lock reflects the specific lock: a UNCX or GoPlus vesting locker also holds plain timed locks. PinkSale and Team Finance lockers are not deployed on Robinhood Chain.

## Short field names

With `fields=short` (or `x-field-names: short`, and on WebSocket connections by default) the lock objects use these keys. The `pagination` envelope keeps its long keys.

| Long | Short | Where |
| - | - | - |
| `lp_security` / `supply_locks` | `ls` / `sl` | Token, pool and address room rows |
| `burned_percent` | `bp` | `lp_security` |
| `locked_percent` | `lp` | `lp_security`, `supply_locks`, lock entries, holder `locks` |
| `permanent_locked_percent` | `plp` | `lp_security`, `supply_locks` |
| `claimable_percent` | `cp` | `lp_security`, `supply_locks`, lock entries, holder `locks` |
| `unlocked_percent` | `up` | `lp_security` |
| `next_unlock` (`at`, `percent`) | `nu` (`t`, `pct`) | `lp_security`, `supply_locks` |
| `fully_unlocked_at` | `fua` | `lp_security`, `supply_locks` |
| `lock_count` | `lc` | `lp_security`, `supply_locks`, holder `locks` |
| `locks` (holder row) | `lks` | Token holders |
| `locked_amount` / `locked_amount_raw` | `la` / `lar` | Holder `locks` |
| `claimable_amount` / `claimable_amount_raw` | `cba` / `cbar` | Holder `locks` |
| `id` | `id` | Events |
| `chain_id` | `ci` | Entries, events |
| `token_address` | `ta` | Entries, events |
| `pool_id` | `p` | Entries, events |
| `locker` | `lk` | Entries, events |
| `locker.id`, `address`, `name`, `kind`, `logo` | `i`, `a`, `n`, `k`, `lg` | `locker` |
| `lock_id` | `li` | Entries, events |
| `owner` | `o` | Entries, events |
| `position` | `pos` | Entries, events |
| `position.type`, `venue`, `position_id` | `t`, `vn`, `pi` | `position` |
| `amount` / `amount_raw` | `a` / `ar` | Entries, events |
| `share_percent` | `s` | Entries, events |
| `status` | `st` | Entries |
| `unlock_at` | `ua` | Entries, events |
| `vesting` | `vs` | Entries |
| `start_at`, `end_at`, `next_step_at` | `sa`, `ea`, `ns` | `vesting` |
| `cycle_seconds`, `cycle_percent`, `first_unlock_percent` | `cys`, `cyp`, `fup` | `vesting` |
| `claimed_amount` / `claimed_amount_raw` | `cl` / `clr` | `vesting` |
| `url` | `ur` | Entries |
| `created_at` / `updated_at` | `ca` / `u` | Entries (`updated_at` also on the summaries) |
| `hash`, `block`, `confirmed_at` | `h`, `b`, `ca` | Events (`block` also on the summaries) |
| `event` | `ev` | Events |
| `from` / `to` | `fr` / `to` | Events |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.