Skip to main content
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.
Use this endpoint to display individual trades, analyze trading patterns, generate reports, and provide detailed transaction history to users.

Parameters

string
required
User identity (ZKS ID or wallet address)
ZKS ID is recommended for better performance and user experience
number
Number of trades to return (default: 50, max: 1000)
number
Number of trades to skip for pagination (default: 0)
string
Time period for trades
  • 7d - Last 7 days
  • 30d - Last 30 days
  • 90d - Last 90 days
  • 1y - Last year
  • all - All time (default)
string
Filter by specific protocol
  • uniswap - Uniswap
  • sushiswap - SushiSwap
  • 1inch - 1inch
  • curve - Curve
  • balancer - Balancer
  • pancakeswap - PancakeSwap
string
Filter by asset symbol (e.g., ETH, USDC, WBTC)
number
Filter by specific blockchain
  • 1 - Ethereum mainnet
  • 137 - Polygon
  • 56 - BSC
  • 42161 - Arbitrum
  • 10 - Optimism
  • 250 - Fantom
  • 43114 - Avalanche
string
Filter by trade type
  • swap - Token swaps
  • liquidity - Liquidity provision/removal
  • lending - Lending/borrowing
  • staking - Staking operations
  • yield - Yield farming
string
Sort trades by field
  • timestamp - By timestamp (default)
  • value - By trade value
  • pnl - By profit/loss
  • volume - By volume
string
Sort order
  • desc - Descending (default)
  • asc - Ascending

Response

boolean
Indicates if the request was successful
string
Resolved wallet address
string
ZKS ID if available, null otherwise
array
Array of trade objects
object
Pagination information
object
Trading summary for the period
string
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:

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
Implement caching to reduce API calls.