Get Trading History
Trading
Get Trading History
Get detailed trading history for a user
GET
Get Trading History
Overview
Retrieve comprehensive trading history including individual trades, transactions, and performance metrics. This endpoint provides detailed transaction data perfect for building trading analytics, tax reporting, and performance tracking.Parameters
User identity (ZKS ID or wallet address)
ZKS ID is recommended for better performance and user experience
Number of trades to return (default: 50, max: 1000)
Number of trades to skip for pagination (default: 0)
Time period for trades
7d- Last 7 days30d- Last 30 days90d- Last 90 days1y- Last yearall- All time (default)
Filter by specific protocol
uniswap- Uniswapsushiswap- SushiSwap1inch- 1inchcurve- Curvebalancer- Balancerpancakeswap- PancakeSwap
Filter by asset symbol (e.g., ETH, USDC, WBTC)
Filter by specific blockchain
1- Ethereum mainnet137- Polygon56- BSC42161- Arbitrum10- Optimism250- Fantom43114- Avalanche
Filter by trade type
swap- Token swapsliquidity- Liquidity provision/removallending- Lending/borrowingstaking- Staking operationsyield- Yield farming
Sort trades by field
timestamp- By timestamp (default)value- By trade valuepnl- By profit/lossvolume- By volume
Sort order
desc- Descending (default)asc- Ascending
Response
Indicates if the request was successful
Resolved wallet address
ZKS ID if available, null otherwise
Array of trade objects
Pagination information
Trading summary for the period
ISO 8601 timestamp of the response
Examples
Response Example
Use Cases
1. Trading Analytics Dashboard
Create a comprehensive trading analytics dashboard:2. Trade Analysis
Analyze individual trades:3. Protocol Analysis
Analyze trading by protocol:4. Asset Analysis
Analyze trading by asset:5. Time-based Analysis
Analyze trading patterns over time:Best Practices
1. Pagination
Handle large trading histories with pagination:2. Filtering
Implement efficient filtering:3. Caching
Cache trading history for performance:4. Real-time Updates
Subscribe to new trades:Related Endpoints
- Get Trading Stats - Trading statistics
- Get Trading Leaderboard - Top traders
- Get Score - Overall ZKScore
Troubleshooting
”No trading history found”
Cause: User has no trading activity or filters are too restrictive. Solution:- Remove filters to see all trades
- Check if the user has any trading activity
- Try a longer timeframe
”Invalid protocol”
Cause: Unsupported protocol value. Solution:- Use supported protocols: uniswap, sushiswap, 1inch, curve, balancer, pancakeswap
- Check for typos
”Invalid asset”
Cause: Unsupported asset symbol. Solution:- Use standard asset symbols (ETH, USDC, WBTC, etc.)
- Check for typos
Rate Limits
Trading history 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