API v1 — Stable

Build on
LockLabs.

REST API, smart contract ABIs, on-chain events, and everything you need to integrate token locking into your DeFi project.

Quick Start

Get data in seconds

cURL
curl https://api.locklabs.org/locks \
  ?chain=ethereum \
  &owner=0xYourAddress
JavaScript / TypeScript
const res = await fetch(
  'https://api.locklabs.org/locks' +
  '?chain=ethereum&owner=0x...'
)
const { locks } = await res.json()
Base URLhttps://api.locklabs.orgNo auth required for read endpoints

REST API

API Endpoints

All endpoints return JSON. No API key required for public data.

GET
/stats

Global stats: lock counts and TVL by chain

GET
/locks/:chain/:id

Single lock details by chain and vault address

GET
/locks?chain=&owner=

List locks by chain and/or owner address

GET
/lp-locks?chain=&owner=

List LP locks by chain and/or owner

GET
/vesting?chain=&owner=

List vesting schedules by chain and/or owner

GET
/fee-quote?chain=&type=

Get current fee quote in native token for given lock type

GET
/health

API health and chain connectivity status

Full request/response schemas, pagination, filtering options, and error codes are available in the full API documentation (coming soon).

SDK

SDKs & Libraries

Type-safe clients for popular languages. Drop-in integration.

Soon
JS

JavaScript / TypeScript

Full-featured TypeScript SDK with lock creation, querying, and event listening.

npm install @locklabs/sdk
Soon
Py

Python

Python SDK for data science and bot integrations. Async-compatible.

pip install locklabs-sdk
OA

REST (OpenAPI)

OpenAPI 3.0 spec for generating clients in any language.

openapi.locklabs.org/spec.json

On-Chain

Smart Contract Addresses

All contracts are open source, audited by Hashlock, and verified on each chain explorer.

EthereumchainId: 1
LockFactory0x…
TokenLockVault (impl)0x…
LPLockVault (impl)0x…
FeeManager0x…
BNB ChainchainId: 56
LockFactory0x…
TokenLockVault (impl)0x…
LPLockVault (impl)0x…
FeeManager0x…
BasechainId: 8453
LockFactory0x…
TokenLockVault (impl)0x…
LPLockVault (impl)0x…
FeeManager0x…
PolygonchainId: 137
LockFactory0x…
TokenLockVault (impl)0x…
LPLockVault (impl)0x…
FeeManager0x…

Events

On-Chain Events

Index and react to lock lifecycle events emitted by LockLabs contracts.

LockCreated

Emitted when a new token or LP lock is created

LockExtended

Emitted when a lock duration is extended

LockOwnerTransferred

Emitted when lock ownership is transferred to a new address

LockWithdrawn

Emitted when tokens are withdrawn after unlock date

VestingCreated

Emitted when a vesting schedule is created

VestingClaimed

Emitted when a vesting beneficiary claims tokens

FeeUpdated

Emitted when fee manager updates fee amounts

AI Agents

Skills

Skills are markdown instruction files that give AI coding assistants full protocol awareness — fee model, chain IDs, API field names, contract interfaces, and invariants. Drop a skill into your agent config and it understands LockLabs without explanation.

locklabs-protocol

Core protocol rules: flat fee model ($9/$19/$29), TVL caps, admin timelock delays (7d/14d/48h), supported chains, and hard invariants.

FeesChainsTimelocksInvariants
locklabs-api

REST API endpoints, exact field names (feeWei, feeUsd, byChain), authentication, pagination patterns, and canonical constants.

EndpointsField namesAuth
locklabs-contracts

ABI fragments, event signatures (LockCreated, Withdrawn, AdminEarlyUnlockQueued), role constants, and deployed addresses on all 4 chains.

ABIsEventsRolesAddresses
Installation
Claude Codecp .agents/skills/locklabs-*.md ~/.claude/skills/
Cursorcp .agents/skills/locklabs-*.md .cursorrules/
Windsurf / Codeiumcp .agents/skills/locklabs-*.md .windsurfrules/
Any agent (manual)# Paste the skill file content into your system prompt or agent instructions

AI Agents

MCP Server

The LockLabs MCP (Model Context Protocol) server exposes lock data, fee quotes, and TVL as native tools. Any MCP-compatible agent — Claude, Cursor, Windsurf, or your own — can query LockLabs without writing API integration code.

Available Tools

get_fee_quote(chain, lockType)

Current fee in native token for a given chain and lock type.

get_lock(lockId, chain)

Full lock details: amount, owner, unlock date, status.

get_tvl(chain?)

Total value locked by chain or aggregate across all chains.

list_locks(owner?, chain?, page?)

Paginated list of locks with optional filters.

get_vesting_schedule(scheduleId, chain)

Vesting schedule details, claimed amount, and next unlock.

Setup

Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "locklabs": {
      "url": "https://api.locklabs.org/mcp"
    }
  }
}
Cursor.cursor/mcp.json (project root)
{
  "mcpServers": {
    "locklabs": {
      "url": "https://api.locklabs.org/mcp"
    }
  }
}
Claude Code (CLI).agents/mcp.json (project root)
{
  "mcpServers": {
    "locklabs": {
      "url": "https://api.locklabs.org/mcp"
    }
  }
}

MCP Server — Beta

The MCP server is available in beta. Tools for write operations (create lock, extend lock) require wallet authentication and are in development. Read tools (fee quotes, lock data, TVL) are fully available.

Start Building

Questions? Issues? Feature requests? Reach us directly.