API
Overview
The Market Data API provides access to real-time cryptocurrency market data through a combination of DexScreener and CoinGecko integrations. All requests are proxied through our webapp endpoint for rate limiting and error handling.
Endpoints
Market Data Endpoint
Query Parameters
type
: The type of data to fetchticker
- Token lookup by symbolca
- Token lookup by contract addresstrending
- Trending Solana tokenslatest
- Latest Solana pairsboosted
- Boosted Solana tokens
address
: Token symbol or address (required for ticker/ca types)
Response Format
Data Types
TokenData
Error Handling
All endpoints follow a consistent error response format:
Common error codes:
400
- Missing or invalid parameters404
- Token not found500
- Server error
Retry Logic
Maximum 3 retry attempts
Exponential backoff (1s, 2s, 3s)
Clear error messages on failure
Best Practices
Error Handling
Implement proper error catching
Handle network failures gracefully
Provide meaningful error messages
Rate Limiting
Respect API rate limits
Implement backoff strategies
Handle rate limit errors appropriately
Data Processing
Filter by Solana chain where applicable
Sort by appropriate metrics (volume, liquidity)
Format numbers for display
Related Documentation
CoinGecko Market Data
Fetches market data from CoinGecko for major cryptocurrencies.
Query Parameters
type
(optional): Data type to fetchmarket
(default) - Top 50 by market captrending
- Trending coins
Response Format
Example Requests
Top Market Cap
Trending Coins
Error Codes
500
- Server error or CoinGecko API error
TradingView Chart Data
Processes trading pair symbols for TradingView chart integration.
Query Parameters
symbol
(required): Trading pair symbol (e.g., "BTCUSD")
Response Format
Example Request
Error Codes
400
- Missing or invalid symbol500
- Processing error
Data Types
Token Data
DEX Pair Data
Rate Limiting
DexScreener: Standard rate limits apply
CoinGecko: Free tier rate limits apply
Cache implemented for frequent requests
Error Handling
All endpoints follow a consistent error response format:
Common error scenarios:
Invalid parameters
Token not found
Rate limit exceeded
External API errors
Network issues
Best Practices
Caching
Cache responses when possible
Respect cache headers
Implement retry logic
Rate Limiting
Implement backoff strategies
Cache frequently accessed data
Monitor usage limits
Error Handling
Implement proper error catching
Provide meaningful error messages
Log errors appropriately
Security
Validate input parameters
Sanitize responses
Monitor for abuse
Related Documentation
Last updated