moralis_solana_token_api_json.json•15.3 kB
{
"moralis_solana_token_api": {
"base_url": "https://solana-gateway.moralis.io/api",
"authentication": {
"method": "API_KEY",
"header": "X-API-Key",
"description": "API key required for all requests"
},
"endpoints": {
"get_token_metadata": {
"method": "GET",
"path": "/token/{network}/{address}/metadata",
"description": "Get token metadata including name, symbol, decimals, and supply",
"parameters": {
"network": {
"type": "string",
"description": "Network identifier (mainnet, devnet)",
"required": true
},
"address": {
"type": "string",
"description": "Token mint address",
"required": true
}
},
"response": {
"address": "string",
"name": "string",
"symbol": "string",
"decimals": "number",
"logo": "string",
"thumbnail": "string",
"verified_collection": "boolean",
"possible_spam": "boolean",
"total_supply": "string",
"current_supply": "string"
}
},
"get_token_price": {
"method": "GET",
"path": "/token/{network}/{address}/price",
"description": "Get current token price in USD and native SOL",
"parameters": {
"network": {
"type": "string",
"description": "Network identifier",
"required": true
},
"address": {
"type": "string",
"description": "Token mint address",
"required": true
}
},
"response": {
"tokenName": "string",
"tokenSymbol": "string",
"tokenLogo": "string",
"tokenDecimals": "number",
"nativePrice": {
"value": "string",
"decimals": "number",
"name": "string",
"symbol": "string"
},
"usdPrice": "number",
"usdPriceFormatted": "string",
"24hrPercentChange": "number",
"exchangeAddress": "string",
"exchangeName": "string"
}
},
"get_token_balances": {
"method": "GET",
"path": "/account/{network}/{address}/tokens",
"description": "Get SPL token balances for a wallet",
"parameters": {
"network": {
"type": "string",
"description": "Network identifier",
"required": true
},
"address": {
"type": "string",
"description": "Wallet address",
"required": true
},
"cursor": {
"type": "string",
"description": "Pagination cursor",
"required": false
},
"limit": {
"type": "number",
"description": "Results limit (max 100)",
"required": false
}
},
"response": {
"tokens": [
{
"associatedTokenAddress": "string",
"mint": "string",
"name": "string",
"symbol": "string",
"logo": "string",
"thumbnail": "string",
"decimals": "number",
"amount": "string",
"amountRaw": "string",
"usdValue": "number",
"usdValueFormatted": "string"
}
],
"cursor": "string",
"hasNextPage": "boolean"
}
},
"get_token_holders": {
"method": "GET",
"path": "/token/{network}/{address}/holders",
"description": "Get token holder statistics and distribution",
"parameters": {
"network": {
"type": "string",
"description": "Network identifier",
"required": true
},
"address": {
"type": "string",
"description": "Token mint address",
"required": true
},
"limit": {
"type": "number",
"description": "Results limit",
"required": false
},
"cursor": {
"type": "string",
"description": "Pagination cursor",
"required": false
}
},
"response": {
"totalHolders": "number",
"totalSupply": "string",
"holders": [
{
"ownerAddress": "string",
"amount": "string",
"amountRaw": "string",
"percentage": "number",
"usdValue": "number"
}
],
"cursor": "string",
"hasNextPage": "boolean"
}
},
"get_token_swaps": {
"method": "GET",
"path": "/token/{network}/{address}/swaps",
"description": "Get swap transactions for a token",
"parameters": {
"network": {
"type": "string",
"description": "Network identifier",
"required": true
},
"address": {
"type": "string",
"description": "Token mint address",
"required": true
},
"from_date": {
"type": "string",
"description": "Start date (ISO 8601)",
"required": false
},
"to_date": {
"type": "string",
"description": "End date (ISO 8601)",
"required": false
},
"limit": {
"type": "number",
"description": "Results limit",
"required": false
}
},
"response": {
"swaps": [
{
"signature": "string",
"slot": "number",
"blockTime": "string",
"swapper": "string",
"tokenIn": {
"mint": "string",
"symbol": "string",
"amount": "string",
"usdValue": "number"
},
"tokenOut": {
"mint": "string",
"symbol": "string",
"amount": "string",
"usdValue": "number"
},
"dex": "string",
"priceImpact": "number"
}
],
"cursor": "string",
"hasNextPage": "boolean"
}
},
"get_token_pairs": {
"method": "GET",
"path": "/token/{network}/{address}/pairs",
"description": "Get trading pairs and liquidity data for a token",
"parameters": {
"network": {
"type": "string",
"description": "Network identifier",
"required": true
},
"address": {
"type": "string",
"description": "Token mint address",
"required": true
}
},
"response": {
"pairs": [
{
"pairAddress": "string",
"dex": "string",
"baseToken": {
"mint": "string",
"name": "string",
"symbol": "string",
"decimals": "number"
},
"quoteToken": {
"mint": "string",
"name": "string",
"symbol": "string",
"decimals": "number"
},
"liquidity": {
"usd": "number",
"base": "string",
"quote": "string"
},
"volume24h": "number",
"priceChange24h": "number"
}
]
}
},
"get_trending_tokens": {
"method": "GET",
"path": "/discovery/trending",
"description": "Get trending tokens on Solana",
"parameters": {
"limit": {
"type": "number",
"description": "Results limit (max 100)",
"required": false
},
"time_period": {
"type": "string",
"description": "Time period (1h, 24h, 7d)",
"required": false
}
},
"response": {
"tokens": [
{
"mint": "string",
"name": "string",
"symbol": "string",
"logo": "string",
"price": "number",
"priceChange": "number",
"volume24h": "number",
"marketCap": "number",
"liquidity": "number",
"trending_score": "number"
}
]
}
},
"search_tokens": {
"method": "GET",
"path": "/discovery/search",
"description": "Search for tokens by name, symbol or address",
"parameters": {
"query": {
"type": "string",
"description": "Search query",
"required": true
},
"limit": {
"type": "number",
"description": "Results limit (max 100)",
"required": false
},
"filter": {
"type": "string",
"description": "Filter options (pump_fun, raydium, etc.)",
"required": false
}
},
"response": {
"tokens": [
{
"mint": "string",
"name": "string",
"symbol": "string",
"logo": "string",
"price": "number",
"marketCap": "number",
"verified": "boolean",
"possible_spam": "boolean"
}
]
}
},
"get_pump_fun_tokens": {
"method": "GET",
"path": "/discovery/pump-fun",
"description": "Get Pump.fun tokens data",
"parameters": {
"status": {
"type": "string",
"description": "Token status (bonding, graduated, all)",
"required": false
},
"sort_by": {
"type": "string",
"description": "Sort criteria (created_at, market_cap, volume)",
"required": false
},
"limit": {
"type": "number",
"description": "Results limit",
"required": false
}
},
"response": {
"tokens": [
{
"mint": "string",
"name": "string",
"symbol": "string",
"description": "string",
"image": "string",
"created_timestamp": "number",
"raydium_pool": "string",
"complete": "boolean",
"virtual_sol_reserves": "string",
"virtual_token_reserves": "string",
"total_supply": "string",
"website": "string",
"telegram": "string",
"twitter": "string",
"bonding_curve": "string",
"associated_bonding_curve": "string",
"creator": "string",
"market_cap": "number",
"reply_count": "number",
"last_reply": "number",
"nsfw": "boolean",
"market_id": "string",
"inverted": "boolean",
"is_currently_live": "boolean",
"king_of_the_hill_timestamp": "number"
}
]
}
},
"get_portfolio": {
"method": "GET",
"path": "/account/{network}/{address}/portfolio",
"description": "Get comprehensive wallet portfolio including tokens and NFTs",
"parameters": {
"network": {
"type": "string",
"description": "Network identifier",
"required": true
},
"address": {
"type": "string",
"description": "Wallet address",
"required": true
}
},
"response": {
"nativeBalance": {
"lamports": "string",
"solana": "number"
},
"tokens": [
{
"mint": "string",
"name": "string",
"symbol": "string",
"logo": "string",
"decimals": "number",
"amount": "string",
"usdValue": "number"
}
],
"nfts": [
{
"mint": "string",
"name": "string",
"uri": "string",
"collectionAddress": "string",
"verified": "boolean"
}
],
"totalUsdValue": "number"
}
},
"get_ohlcv_data": {
"method": "GET",
"path": "/token/{network}/{address}/ohlcv",
"description": "Get OHLCV candlestick data for token price charts",
"parameters": {
"network": {
"type": "string",
"description": "Network identifier",
"required": true
},
"address": {
"type": "string",
"description": "Token mint address",
"required": true
},
"timeframe": {
"type": "string",
"description": "Timeframe (1m, 5m, 15m, 1h, 4h, 1d)",
"required": true
},
"from_date": {
"type": "string",
"description": "Start date",
"required": false
},
"to_date": {
"type": "string",
"description": "End date",
"required": false
}
},
"response": {
"data": [
{
"timestamp": "number",
"open": "number",
"high": "number",
"low": "number",
"close": "number",
"volume": "number"
}
]
}
}
},
"supported_networks": [
"mainnet",
"devnet"
],
"supported_dexes": [
"Raydium",
"Orca",
"Meteora",
"Pump.fun",
"Jupiter",
"Serum"
],
"rate_limits": {
"free_tier": {
"requests_per_minute": 25,
"requests_per_day": 25000
},
"pro_tier": {
"requests_per_minute": 100,
"requests_per_day": 100000
}
},
"features": {
"real_time_data": true,
"historical_data": true,
"pump_fun_support": true,
"nft_support": true,
"tradingview_integration": true,
"webhook_support": true,
"multi_chain_support": false
},
"example_requests": {
"get_token_metadata": {
"url": "https://solana-gateway.moralis.io/api/token/mainnet/So11111111111111111111111111111111111111112/metadata",
"method": "GET",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
},
"get_token_price": {
"url": "https://solana-gateway.moralis.io/api/token/mainnet/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v/price",
"method": "GET",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
},
"search_tokens": {
"url": "https://solana-gateway.moralis.io/api/discovery/search?query=BONK&limit=10",
"method": "GET",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
}