# Token Layer API ## Docs - [API Reference](https://docs.tokenlayer.network/api-reference.md): Reference for Token Layer REST endpoints and generated OpenAPI docs - [Claim fee rewards (batch)](https://docs.tokenlayer.network/api-reference/fees/claim-fee-rewards.md): Generates batch transactions to claim fee rewards from the FeesVault contract using withdrawBatch. - [Claim fee rewards (batch)](https://docs.tokenlayer.network/api-reference/fees/claim-fee-rewards-batch.md): Generates batch transactions to claim fee rewards from the FeesVault contract using withdrawBatch. - [Get user fee balances](https://docs.tokenlayer.network/api-reference/fees/get-user-fee-balances.md): Get authenticated user's fee balances across all types and currencies - [Get user fee distribution history](https://docs.tokenlayer.network/api-reference/fees/get-user-fee-distribution-history.md): Get paginated history of fee distributions for authenticated user - [Get fee earnings leaderboard](https://docs.tokenlayer.network/api-reference/leaderboard/get-fee-earnings-leaderboard.md): Get ranked leaderboard of top earners across all tokens and chains - [Get user portfolio](https://docs.tokenlayer.network/api-reference/portfolio/get-user-portfolio.md): Retrieves the authenticated user's complete token portfolio including: - All tokens owned by the user across all chains - Per-chain balance breakdown for each token - Token metadata (name, symbol, logo, etc.) - Available chains where each token is deployed - [Create protocol referral code](https://docs.tokenlayer.network/api-reference/referrals/create-protocol-referral-code.md): Create a custom protocol-level referral code for users who have traded over $10,000. The code can be shared with others to establish referral relationships. - [Enter protocol referral code](https://docs.tokenlayer.network/api-reference/referrals/enter-protocol-referral-code.md): Enter a referral code to establish a referral relationship. The code owner becomes your referrer for protocol-level benefits. - [Check token ownership](https://docs.tokenlayer.network/api-reference/tokens/check-token-ownership.md): Checks if a user owns a specific token by querying token balances across chains. Returns ownership status and balance with caching for performance. - [Get info data](https://docs.tokenlayer.network/api-reference/tokens/get-info-data.md): Generic read-oriented endpoint for info handlers. - [Get liquidity pool data](https://docs.tokenlayer.network/api-reference/tokens/get-liquidity-pool-data.md): Get liquidity pool data for a token including supply, reserves, weight, graduation status and progress. Note: The first 6 seconds (equivalent in blocks) of trading has increased anti-sniping fees ranging from 80% to 1%, decreasing linearly by block. - [Get token price quote](https://docs.tokenlayer.network/api-reference/tokens/get-token-price-quote.md): Get a price quote for buying or selling tokens. Automatically uses the appropriate protocol: - **Token Layer BondingCurve** for non-graduated tokens - **UniswapV3** for graduated tokens - [Get tokens list](https://docs.tokenlayer.network/api-reference/tokens/get-tokens-list.md): Retrieves a list of tokens with filtering options (trending, new, popular, top_posts). Supports optional hashtag filtering and pagination. - [Get tokens list with trading metrics (v2)](https://docs.tokenlayer.network/api-reference/tokens/get-tokens-list-with-trading-metrics-v2.md): Retrieves a list of tokens with comprehensive trading metrics. - [Get user token balance](https://docs.tokenlayer.network/api-reference/tokens/get-user-token-balance.md): Get authenticated user's balance for a specific token. - [Search for token](https://docs.tokenlayer.network/api-reference/tokens/search-for-token.md): Search for a token by: - **Token UUID** (internal token ID from tokens table) - **Token Layer ID** (bytes32 format: 0x... with 64 hex characters) - **Contract address** (0x... with 40 hex characters for EVM or base58 for Solana) - **Token symbol** (uppercase, e.g., BTC, ETH) - **… - [Create new token transaction](https://docs.tokenlayer.network/api-reference/transactions/create-new-token-transaction.md): Creates a new token on-chain. This endpoint prepares and optionally executes the blockchain transaction to deploy a new token contract with specified parameters. - [Execute token-layer action](https://docs.tokenlayer.network/api-reference/transactions/execute-token-layer-action.md): Generic action endpoint for Token Layer handlers. - [Send blockchain transaction](https://docs.tokenlayer.network/api-reference/transactions/send-blockchain-transaction.md): Sends a blockchain transaction using Privy's server-side SDK. - [Trade tokens (buy or sell)](https://docs.tokenlayer.network/api-reference/transactions/trade-tokens-buy-or-sell.md): Prepares a transaction to buy or sell tokens. Supports multiple trade types: - **Buy exact input**: Spend specific USD amount - **Buy exact output**: Receive specific token amount - **Sell exact input**: Sell specific token amount - **Sell exact output**: Receive specific USD amount - [Mint USD testnet tokens](https://docs.tokenlayer.network/api-reference/utilities/mint-usd-testnet-tokens.md): Prepares a transaction to mint USD testnet tokens (e.g., USDC) on supported chains. This is a testnet-only function for development and testing purposes. Returns transaction data that the frontend can execute via the user's wallet. - [Builder Codes](https://docs.tokenlayer.network/builder-codes.md): Build applications and earn fees on orders you facilitate - [Creators](https://docs.tokenlayer.network/creators.md): Earn fees from every trade of tokens you create - [Earn with Token Layer](https://docs.tokenlayer.network/earn.md): Multiple ways to earn fees and rewards on Token Layer - [Token Layer Action Guide](https://docs.tokenlayer.network/guides/token-layer-actions.md): Action-first guide for /token-layer with register and createToken flows. - [TypeScript SDK](https://docs.tokenlayer.network/integrations/sdk-typescript.md): Typed client for Token Layer action and info flows - [Token Layer CLI](https://docs.tokenlayer.network/integrations/token-layer-cli.md): Scriptable Rust CLI for Token Layer actions, profiles, and market reads - [Launchpad](https://docs.tokenlayer.network/launchpad.md): Customizable bonding curves and token launch mechanics - [Example Prompts](https://docs.tokenlayer.network/mcp-examples.md): Ready-to-use prompts for common Token Layer MCP tasks - [MCP Quickstart](https://docs.tokenlayer.network/mcp-quickstart.md): Get started with Token Layer MCP server in minutes - [MCP Server](https://docs.tokenlayer.network/mcp-server.md): Connect Token Layer to AI assistants via Model Context Protocol - [MCP Tools Reference](https://docs.tokenlayer.network/mcp-tools.md): Complete guide to all available Token Layer MCP tools - [Anti-Sniping Protection](https://docs.tokenlayer.network/onboarding/anti-sniping-fees.md): Understand how Token Layer protects new token launches from snipers - [How to Launch Tokens](https://docs.tokenlayer.network/onboarding/launch-tokens.md): Learn how to create and launch your own tokens on Token Layer - [Testnet Guide](https://docs.tokenlayer.network/onboarding/testnet.md): Test Token Layer features on testnet before using mainnet - [How to Trade](https://docs.tokenlayer.network/onboarding/trade.md): Learn how to buy and sell tokens on Token Layer - [How to Transfer Tokens Across Chains](https://docs.tokenlayer.network/onboarding/transfer-tokens.md): Learn how to move your tokens between different blockchain networks - [Protocol Referrals](https://docs.tokenlayer.network/protocol-referrals.md): Earn 10% of fees from users you refer to Token Layer - [Quickstart](https://docs.tokenlayer.network/quickstart.md): Choose the fastest way to integrate with Token Layer - [Risk](https://docs.tokenlayer.network/risks.md): Important risk disclosures before using Token Layer - [Supported Networks](https://docs.tokenlayer.network/supported-networks.md): Blockchains supported by Token Layer - [Supported Stablecoins](https://docs.tokenlayer.network/supported-stablecoins.md): Stablecoins accepted on Token Layer for trading - [Token Layer - The Ultimate Launchpad](https://docs.tokenlayer.network/token-layer.md): A censorship-resistant cross-chain public token infrastructure - [Token Primitives](https://docs.tokenlayer.network/token-primitives.md): Core token types and concepts on Token Layer - [Token Referrals](https://docs.tokenlayer.network/token-referrals.md): Earn 30% of creator fees when someone buys a token you referred ## OpenAPI Specs - [openapi](https://docs.tokenlayer.network/openapi.yaml)