SolStats API
A comprehensive API that provides detailed analytics and metrics for any Solana wallet address.
Overview
The SolStats API enables developers to access comprehensive analytics about any Solana wallet address. This API integrates with blockchain data sources to compute various metrics including portfolio value, ROI, trading patterns, risk assessment, and more.
The API is designed to be simple to use while providing detailed insights that can be integrated into portfolio tracking applications, trading platforms, or analytics dashboards.
https://api.solstats.co/
Authentication
The SolStats API is currently publicly accessible and does not require authentication. However, it's subject to rate limiting to ensure fair usage and service stability.
Rate Limits
To ensure service stability and prevent abuse, the API enforces the following rate limits:
Endpoint | Rate Limit |
---|---|
Index (/ ) |
60 requests per minute |
Wallet Metrics (/api/wallet-metrics ) |
20 requests per minute |
Test Rate Limit (/test-rate-limit ) |
5 requests per minute |
Default (all endpoints) | 200 requests per day, 50 requests per hour |
When a rate limit is exceeded, the API returns a 429 Too Many Requests
status code with details about the limit that was exceeded.
Wallet Metrics Endpoint
This endpoint retrieves comprehensive metrics for a specified Solana wallet address.
Parameters
Name | Type | Description |
---|---|---|
wallet required | string | The Solana wallet address to analyze. |
sol_price optional | number | Custom SOL price in USD to use for calculations. If not provided, the current price from CoinGecko is used. |
Example Request
Response Fields
The API now returns the metrics directly as a JSON object. Below are some of the key metrics included in the response:
Field | Type | Description |
---|---|---|
Wallet_Address | string | The wallet address that was analyzed |
Portfolio_Value_USD | number | Total value of all assets in the wallet in USD |
SOL_Balance | number | Amount of SOL tokens in the wallet |
ROI | number | Overall return on investment percentage |
Trading_Style | string | Identified trading style based on trading patterns |
Risk_Score | number | Overall risk score (0-100, higher means riskier) |
Analysis_Time | string | Timestamp when the analysis was completed |
Interactive Demo
Example Response
Test Rate Limit Endpoint
A simple endpoint for testing rate limiting functionality. It returns a timestamp along with a simple message.
Example Response
API Status Endpoint
Returns basic information about the API and the current Solana price.
Example Response
Metrics Reference
The API provides a comprehensive set of metrics for wallet analysis. Below is a detailed description of each metric returned in the response.
Portfolio Metrics
Metric | Type | Description |
---|---|---|
Portfolio_Value_USD | number | Total value of all assets in the wallet converted to USD |
SOL_Balance | number | Amount of SOL tokens (including wrapped SOL) in the wallet |
Total_Tokens | number | Total number of unique token types in the wallet |
Top10_Current_Holdings | array | List of the 10 most valuable tokens currently held in the wallet |
Performance Metrics
Metric | Type | Description |
---|---|---|
ROI | number | Overall return on investment percentage |
ROI_1d | number | Return on investment percentage over the last 24 hours |
ROI_7d | number | Return on investment percentage over the last 7 days |
ROI_30d | number | Return on investment percentage over the last 30 days |
Realized_Gains | number | Total profit/loss from all closed positions (in USD) |
Unrealized_Gains | number | Estimated profit/loss from currently open positions (in USD) |
Trading Metrics
Metric | Type | Description |
---|---|---|
Winrate | number | Percentage of profitable trades out of all trades |
Win_Rate_1d | number | Percentage of profitable trades in the last 24 hours |
Win_Rate_7d | number | Percentage of profitable trades in the last 7 days |
Win_Rate_30d | number | Percentage of profitable trades in the last 30 days |
Trading_Style | string | Identified trading style based on trading patterns (e.g., "Swing Trader", "Day Trader") |
Average_Holding_Time_min | number | Average time (in minutes) tokens are held before selling |
Avg_Buy_Size | number | Average size of buy transactions in USD |
Avg_Profit_Per_Trade_Pct | number | Average percentage profit on winning trades |
Avg_Loss_Per_Trade_Pct | number | Average percentage loss on losing trades |
Risk Metrics
Metric | Type | Description |
---|---|---|
Risk_Score | number | Overall risk score based on trading behavior (0-100, higher means riskier) |
Farming_Attempts | number | Number of identified yield farming positions |
Farming_Ratio_Percentage | number | Percentage of trading activity dedicated to yield farming |
Biggest_Win_PnL_USD | number | Largest profit made from a single trade (in USD) |
Biggest_Win_ROI_% | number | Largest percentage return made from a single trade |
Biggest_Win_Token | string | Token address that generated the largest win |
Biggest_Win_Token_Name | string | Name of the token that generated the largest win |
Biggest_Loss_PnL_USD | number | Largest loss made from a single trade (in USD) |
Biggest_Loss_ROI_% | number | Largest percentage loss made from a single trade |
Biggest_Loss_Token | string | Token address that generated the largest loss |
Biggest_Loss_Token_Name | string | Name of the token that generated the largest loss |
Avg_Risk_Last_10_Tokens | number | Average risk score of the last 10 traded tokens (0-10, higher means riskier) |
Median_Risk_Last_10_Tokens | number | Median risk score of the last 10 traded tokens |
Avg_MC_Last_10_Tokens | number | Average market capitalization of the last 10 traded tokens (in USD) |
Median_MC_Last_10_Tokens | number | Median market capitalization of the last 10 traded tokens (in USD) |
Token Holdings Data Structure
Each item in the Top10_Current_Holdings
array contains the following fields:
Field | Type | Description |
---|---|---|
address | string | The token's contract address |
balance | number | Amount of the token held |
name | string | Token name |
risk_score | number | Risk assessment score for the token (0-10, higher means riskier) |
symbol | string | Token symbol |
value_usd | number | Current value of token holdings in USD |