Skip to main content
GET
Get Trading Stats

Overview

Retrieve detailed trading statistics and performance metrics for a specific user. This endpoint provides insights into trading volume, profitability, frequency, and protocol usage, making it perfect for building trading dashboards and analytics.
Use this endpoint to display user trading performance, calculate risk scores, and provide insights into trading behavior patterns.

Parameters

string
required
User identity (ZKS ID or wallet address)
ZKS ID is recommended for better performance and user experience
string
Time period for statistics
  • 7d - Last 7 days
  • 30d - Last 30 days (default)
  • 90d - Last 90 days
  • 1y - Last year
  • all - All time
number
Filter by specific blockchain
  • 1 - Ethereum mainnet
  • 137 - Polygon
  • 56 - BSC
  • 42161 - Arbitrum
  • 10 - Optimism
  • 250 - Fantom
  • 43114 - Avalanche
boolean
Include detailed breakdown by protocol and asset (default: true)

Response

boolean
Indicates if the request was successful
string
Resolved wallet address
string
ZKS ID if available, null otherwise
object
Comprehensive trading statistics
string
ISO 8601 timestamp of the response

Examples

Response Example

Use Cases

1. Trading Dashboard

Create a comprehensive trading dashboard:

2. Risk Assessment

Analyze trading risk:

3. Protocol Analysis

Analyze trading by protocol:

4. Time-based Analysis

Analyze trading patterns over time:

5. Performance Comparison

Compare with market benchmarks:

Best Practices

1. Cache Trading Stats

Trading stats can be cached for short periods:

2. Real-time Updates

Subscribe to trading updates:

3. Batch Analysis

Analyze multiple users:

4. Historical Comparison

Compare different time periods:

Troubleshooting

”No trading data found”

Cause: User has no trading activity or invalid timeframe. Solution:
  • Check if the user has any trading activity
  • Try a longer timeframe
  • Verify the identity is correct

”Invalid timeframe”

Cause: Unsupported timeframe value. Solution:
  • Use supported timeframes: 7d, 30d, 90d, 1y, all
  • Check for typos

”Chain not supported”

Cause: Unsupported chain ID. Solution:
  • Use supported chain IDs: 1, 137, 56, 42161, 10, 250, 43114
  • Check chain ID format

Rate Limits

Trading stats requests are subject to rate limits:
  • Free tier: 60 requests per minute
  • Starter tier: 300 requests per minute
  • Professional tier: 1,000 requests per minute
  • Enterprise tier: Custom limits
Implement caching to reduce API calls.