Version: 1.0.0
Introduction
The Solana API enables you to create, manage, and interact with tokens on the Solana blockchain, including advanced features for token lifecycle management, metadata, liquidity pools, fee management, and more. It enables seamless integration, all operations return serialized transactions for client-side signing, ensuring user custody and security.
Token Creation
Create SPL tokens on Solana using two supported standards:
- Token v1 (Original SPL Token Program):
- Create tokens with metadata support.
- Optionally revoke mint, freeze, or metadata authorities after creation.
- Attach a token image and description.
- Token v2 (Token-2022 Program):
- All v1 features, plus:
- Built-in metadata.
- Optional transfer fees (percentage and max fee).
- Enhanced authority management.
- All v1 features, plus:
Endpoints:
POST /api/tokens/v1– Create SPL Token (v1)POST /api/tokens/v2– Create SPL Token (v2)
Token Management
Comprehensive management of existing tokens:
- List Tokens:
- Retrieve all tokens (v1 and v2).
GET /api/tokens
- Retrieve all tokens (v1 and v2).
- Get Token Details:
- Retrieve metadata, supply, decimals, and more for a specific token by mint address.
GET /api/tokens/{tokenMintAddress}
- Retrieve metadata, supply, decimals, and more for a specific token by mint address.
- Update Metadata:
- Change token name, symbol, description, and image.
PUT /api/tokens/{tokenMintAddress}/metadata
- Change token name, symbol, description, and image.
- Burn Tokens:
- Destroy a specified amount of tokens from an account.
POST /api/tokens/{tokenMintAddress}/burn
- Destroy a specified amount of tokens from an account.
- Authority Management:
- Revoke mint, freeze, or metadata authorities.
PUT /api/tokens/{tokenMintAddress}/authority
- Revoke mint, freeze, or metadata authorities.
Token Locker
Lock tokens for vesting or delayed release:
- Get Locker Info:
- Retrieve the amount and release date of locked tokens for a user.
POST /api/tokens/{tokenMintAddress}/locker/info
- Retrieve the amount and release date of locked tokens for a user.
- Lock Tokens:
- Prepare a transaction to lock tokens until a given date.
POST /api/tokens/{tokenMintAddress}/locker/lock
- Prepare a transaction to lock tokens until a given date.
Liquidity Pools
Integrate with Pump AMM SDK to manage liquidity for your tokens:
- Create Pool:
- Establish a new liquidity pool with two tokens.
POST /api/liquidity/pool
- Establish a new liquidity pool with two tokens.
- Add Liquidity:
- Deposit LP tokens into an existing pool.
POST /api/liquidity/pool/{poolAddress}/add
- Deposit LP tokens into an existing pool.
- Remove Liquidity:
- Withdraw LP tokens from a pool.
POST /api/liquidity/pool/{poolAddress}/remove
- Withdraw LP tokens from a pool.
- List Pools:
- Retrieve paginated list of liquidity pools with optional filtering and cursor pagination.
GET /api/liquidity/pools
- Retrieve paginated list of liquidity pools with optional filtering and cursor pagination.
Transfer Fee Management
- Collect Transfer Fees:
- Withdraw accumulated transfer fees from Token-2022 tokens with fees enabled.
POST /api/tokens/{tokenMintAddress}/fee/collect
- Withdraw accumulated transfer fees from Token-2022 tokens with fees enabled.
Discount Codes
- Generate Discount Codes:
- Create codes that provide a 15% discount and a 10% referral bonus.
POST /api/discount
- Create codes that provide a 15% discount and a 10% referral bonus.
Service Fee Queries
- Get Service Fees:
- Retrieve the fee for any supported service by name.
GET /api/service/{serviceName}/fee
- Retrieve the fee for any supported service by name.
Transaction Verification
- Verify Blockchain Transactions:
- Check the status and confirmation of any transaction by ID.
GET /api/transactions/{transactionId}/verify
- Check the status and confirmation of any transaction by ID.
Blob Storage
- Token Images:
- Retrieve the image for a token by mint address.
GET /api/blob/image/{tokenMintAddress}
- Retrieve the image for a token by mint address.
- Token Metadata:
- Retrieve the full JSON metadata for a token.
GET /api/blob/metadata/{tokenMintAddress}
- Retrieve the full JSON metadata for a token.
Supported Operations Table
| Feature | Endpoint(s) | Description |
|---|---|---|
| List Tokens | /api/tokens/v1, /api/tokens | Paginated and full lists of tokens |
| Get Token Info | /api/tokens/{tokenMintAddress} | Get details for a specific token |
| Create Token (v1/v2) | /api/tokens/v1, /api/tokens/v2 | Create new SPL tokens |
| Update Metadata | /api/tokens/{tokenMintAddress}/metadata | Update name, symbol, description, image |
| Burn Tokens | /api/tokens/{tokenMintAddress}/burn | Burn tokens from an account |
| Manage Authorities | /api/tokens/{tokenMintAddress}/authority | Revoke mint/freeze/metadata authorities |
| Locker Info/Lock Tokens | /api/tokens/{tokenMintAddress}/locker/info, /lock | Manage token vesting/locking |
| Collect Transfer Fees | /api/tokens/{tokenMintAddress}/fee/collect | Withdraw transfer fees (Token-2022 only) |
| Create/Add/Remove Liquidity | /api/liquidity/pool, /add, /remove, /pools | Manage liquidity pools including paginated lists |
| Generate Discount Code | /api/discount | Create discount/referral codes |
| Get Service Fee | /api/service/{serviceName}/fee | Query service fee amounts |
| Verify Transaction | /api/transactions/{transactionId}/verify | Check transaction status on-chain |
| Get Token Image/Metadata | /api/blob/image/{tokenMintAddress}, /metadata | Retrieve token image and metadata |