moralis_solana_wallet_api_json.json•16.5 kB
{
"moralis_solana_wallet_api": {
"base_url": "https://solana-gateway.moralis.io/api",
"description": "Moralis Solana Wallet API for comprehensive wallet analysis and portfolio tracking",
"authentication": {
"method": "API_KEY",
"header": "X-API-Key",
"description": "API key required for all requests"
},
"endpoints": {
"get_native_balance": {
"method": "GET",
"path": "/account/{network}/{address}/balance",
"description": "Get native SOL balance for a wallet address",
"parameters": {
"network": {
"type": "string",
"description": "Network identifier (mainnet, devnet)",
"required": true,
"enum": ["mainnet", "devnet"]
},
"address": {
"type": "string",
"description": "Wallet address",
"required": true
}
},
"response": {
"lamports": "string",
"solana": "number"
}
},
"get_token_balances": {
"method": "GET",
"path": "/account/{network}/{address}/tokens",
"description": "Get SPL token balances for a wallet address",
"parameters": {
"network": {
"type": "string",
"description": "Network identifier",
"required": true,
"enum": ["mainnet", "devnet"]
},
"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,
"default": 100
}
},
"response": {
"tokens": [
{
"associatedTokenAddress": "string",
"mint": "string",
"name": "string",
"symbol": "string",
"logo": "string",
"thumbnail": "string",
"decimals": "number",
"amount": "string",
"amountRaw": "string",
"usdValue": "number",
"usdValueFormatted": "string",
"possible_spam": "boolean",
"verified_collection": "boolean"
}
],
"cursor": "string",
"hasNextPage": "boolean"
}
},
"get_portfolio": {
"method": "GET",
"path": "/account/{network}/{address}/portfolio",
"description": "Get comprehensive wallet portfolio including tokens, NFTs, and native balance",
"parameters": {
"network": {
"type": "string",
"description": "Network identifier",
"required": true,
"enum": ["mainnet", "devnet"]
},
"address": {
"type": "string",
"description": "Wallet address",
"required": true
}
},
"response": {
"nativeBalance": {
"lamports": "string",
"solana": "number"
},
"tokens": [
{
"associatedTokenAddress": "string",
"mint": "string",
"name": "string",
"symbol": "string",
"logo": "string",
"thumbnail": "string",
"decimals": "number",
"amount": "string",
"amountRaw": "string",
"usdValue": "number",
"usdValueFormatted": "string",
"possible_spam": "boolean",
"verified_collection": "boolean"
}
],
"nfts": [
{
"associatedTokenAddress": "string",
"mint": "string",
"name": "string",
"uri": "string",
"symbol": "string",
"amount": "string",
"amountRaw": "string",
"decimals": "number",
"collectionAddress": "string",
"collectionName": "string",
"verified": "boolean",
"metaplex": {
"metadataUri": "string",
"masterEdition": "boolean",
"isMutable": "boolean",
"primarySaleHappened": "boolean",
"sellerFeeBasisPoints": "number",
"updateAuthority": "string"
}
}
],
"totalUsdValue": "number"
}
},
"get_nft_balances": {
"method": "GET",
"path": "/account/{network}/{address}/nft",
"description": "Get NFT balances for a wallet address",
"parameters": {
"network": {
"type": "string",
"description": "Network identifier",
"required": true,
"enum": ["mainnet", "devnet"]
},
"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,
"default": 100
}
},
"response": {
"nfts": [
{
"associatedTokenAddress": "string",
"mint": "string",
"name": "string",
"uri": "string",
"symbol": "string",
"amount": "string",
"amountRaw": "string",
"decimals": "number",
"collectionAddress": "string",
"collectionName": "string",
"verified": "boolean",
"metaplex": {
"metadataUri": "string",
"masterEdition": "boolean",
"isMutable": "boolean",
"primarySaleHappened": "boolean",
"sellerFeeBasisPoints": "number",
"updateAuthority": "string",
"creators": [
{
"address": "string",
"verified": "boolean",
"share": "number"
}
]
}
}
],
"cursor": "string",
"hasNextPage": "boolean"
}
},
"get_wallet_token_transfers": {
"method": "GET",
"path": "/account/{network}/{address}/tokens/transfers",
"description": "Get token transfer history for a wallet address",
"parameters": {
"network": {
"type": "string",
"description": "Network identifier",
"required": true,
"enum": ["mainnet", "devnet"]
},
"address": {
"type": "string",
"description": "Wallet 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 (max 100)",
"required": false,
"default": 100
},
"cursor": {
"type": "string",
"description": "Pagination cursor",
"required": false
}
},
"response": {
"transfers": [
{
"signature": "string",
"slot": "number",
"blockTime": "string",
"fromAddress": "string",
"toAddress": "string",
"mint": "string",
"amount": "string",
"amountRaw": "string",
"decimals": "number",
"tokenName": "string",
"tokenSymbol": "string",
"transferType": "string"
}
],
"cursor": "string",
"hasNextPage": "boolean"
}
},
"get_wallet_nft_transfers": {
"method": "GET",
"path": "/account/{network}/{address}/nft/transfers",
"description": "Get NFT transfer history for a wallet address",
"parameters": {
"network": {
"type": "string",
"description": "Network identifier",
"required": true,
"enum": ["mainnet", "devnet"]
},
"address": {
"type": "string",
"description": "Wallet 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 (max 100)",
"required": false,
"default": 100
},
"cursor": {
"type": "string",
"description": "Pagination cursor",
"required": false
}
},
"response": {
"transfers": [
{
"signature": "string",
"slot": "number",
"blockTime": "string",
"fromAddress": "string",
"toAddress": "string",
"mint": "string",
"amount": "string",
"name": "string",
"symbol": "string",
"transferType": "string"
}
],
"cursor": "string",
"hasNextPage": "boolean"
}
},
"get_wallet_profitability": {
"method": "GET",
"path": "/wallets/{network}/{address}/profitability",
"description": "Get detailed profitability metrics for a wallet",
"parameters": {
"network": {
"type": "string",
"description": "Network identifier",
"required": true,
"enum": ["mainnet", "devnet"]
},
"address": {
"type": "string",
"description": "Wallet address",
"required": true
}
},
"response": {
"address": "string",
"totalPnlUsd": "number",
"totalPnlPercentage": "number",
"totalBuyVolumeUsd": "number",
"totalSellVolumeUsd": "number",
"totalTradesCount": "number",
"totalBuysCount": "number",
"totalSellsCount": "number",
"avgHoldingPeriodInDays": "number",
"avgBuyAmountUsd": "number",
"avgSellAmountUsd": "number",
"avgPnlPerTradeUsd": "number",
"avgPnlPerTradePercentage": "number",
"winRate": "number",
"tokens": [
{
"mint": "string",
"name": "string",
"symbol": "string",
"pnlUsd": "number",
"pnlPercentage": "number",
"buyVolumeUsd": "number",
"sellVolumeUsd": "number",
"tradesCount": "number",
"avgHoldingPeriodInDays": "number"
}
]
}
},
"get_wallet_swaps": {
"method": "GET",
"path": "/wallets/{network}/{address}/swaps",
"description": "Get swap transaction history for a wallet",
"parameters": {
"network": {
"type": "string",
"description": "Network identifier",
"required": true,
"enum": ["mainnet", "devnet"]
},
"address": {
"type": "string",
"description": "Wallet 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 (max 100)",
"required": false,
"default": 100
},
"cursor": {
"type": "string",
"description": "Pagination cursor",
"required": false
}
},
"response": {
"swaps": [
{
"signature": "string",
"slot": "number",
"blockTime": "string",
"swapper": "string",
"tokenIn": {
"mint": "string",
"symbol": "string",
"name": "string",
"amount": "string",
"amountRaw": "string",
"usdValue": "number"
},
"tokenOut": {
"mint": "string",
"symbol": "string",
"name": "string",
"amount": "string",
"amountRaw": "string",
"usdValue": "number"
},
"dex": "string",
"priceImpact": "number",
"fees": {
"amount": "string",
"mint": "string",
"usdValue": "number"
}
}
],
"cursor": "string",
"hasNextPage": "boolean"
}
}
},
"supported_networks": [
"mainnet",
"devnet"
],
"supported_token_standards": [
"SPL",
"NFT",
"cNFT (Compressed NFT)",
"SFT (Semi-Fungible Token)"
],
"rate_limits": {
"free_tier": {
"requests_per_minute": 25,
"requests_per_day": 25000
},
"pro_tier": {
"requests_per_minute": 100,
"requests_per_day": 100000
},
"enterprise_tier": {
"requests_per_minute": "unlimited",
"requests_per_day": "unlimited"
}
},
"features": {
"real_time_balances": true,
"historical_data": true,
"portfolio_tracking": true,
"profitability_analysis": true,
"nft_support": true,
"compressed_nft_support": true,
"transfer_history": true,
"swap_analytics": true,
"spam_detection": true,
"usd_valuations": true
},
"example_requests": {
"get_native_balance": {
"url": "https://solana-gateway.moralis.io/api/account/mainnet/9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM/balance",
"method": "GET",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
},
"get_token_balances": {
"url": "https://solana-gateway.moralis.io/api/account/mainnet/9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM/tokens",
"method": "GET",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
},
"get_portfolio": {
"url": "https://solana-gateway.moralis.io/api/account/mainnet/9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM/portfolio",
"method": "GET",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
},
"get_nft_balances": {
"url": "https://solana-gateway.moralis.io/api/account/mainnet/9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM/nft",
"method": "GET",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
},
"get_wallet_profitability": {
"url": "https://solana-gateway.moralis.io/api/wallets/mainnet/9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM/profitability",
"method": "GET",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
},
"error_responses": {
"400": {
"description": "Bad Request - Invalid parameters"
},
"401": {
"description": "Unauthorized - Invalid API key"
},
"404": {
"description": "Not Found - Wallet address not found"
},
"429": {
"description": "Too Many Requests - Rate limit exceeded"
},
"500": {
"description": "Internal Server Error"
}
}
}
}