LootLens API
The LootLens Analytics endpoint provides institutional-grade market analysis for CS2, Dota 2, and Steam Community Market items. This feature is exclusive to Ultra tier subscribers and unlocks powerful trading insights backed by 90 days of price history.
---
Unlike the basic price endpoint which returns current prices, the Analytics endpoint provides:
1. 90-Day Price History - Complete historical data tracking
2. Statistical Analysis - Min, max, average, median, and percentiles
3. Trend Detection - Bullish, bearish, or sideways market trends
4. Volatility Scoring - Risk assessment for investment decisions
5. AI Buy Signals - Actionable trading recommendations
6. Price Change Tracking - 24h, 7d, and 30d percentage changes
---
GET /default/LootLens/analytics
| Parameter | Type | Required | Default | Description |
| `game` | string | No | `730` | Steam AppID (730=CS2, 570=Dota 2, 440=TF2) |
| `item` | string | **Yes** | - | Market hash name of the item |
| `currency` | string | No | `USD` | Currency code (USD, EUR, GBP, etc.) |
curl --request GET \ --url 'https://lootlens-real-time-game-market-data.p.rapidapi.com/default/LootLens/analytics?item=AK-47%20%7C%20Redline%20(Field-Tested)¤cy=USD'
---
{
"current_price": 8.45,
"currency": "USD",
"currency_symbol": "$",
"data_points": 127,
"date_range": {
"from": "2024-10-01T00:00:00",
"to": "2025-01-10T15:30:00"
},
"statistics": {
"min": 7.12,
"max": 9.87,
"average": 8.34,
"median": 8.29,
"percentile_25": 7.89,
"percentile_75": 8.78
},
"trend": {
"direction": "bullish",
"strength": 67.5,
"change_percent": 6.75
},
"volatility": {
"score": 12.4,
"rating": "medium"
},
"buy_signal": {
"recommendation": "buy",
"confidence": 70,
"reasoning": "Current price ($8.45) is at 53th percentile"
},
"price_changes": {
"24h": 1.2,
"7d": -3.5,
"30d": 8.3
},
"disclaimer": "This analysis is for informational purposes only and should not be considered financial advice."
}
---
| Field | Description | How to Use |
| `min` | Lowest price in 90-day history | Good entry point reference |
| `max` | Highest price in 90-day history | Potential exit target |
| `average` | Mean price over period | Fair value benchmark |
| `median` | Middle price (50th percentile) | True market center |
| `percentile_25` | Lower quartile (25%) | Strong buy zone |
| `percentile_75` | Upper quartile (75%) | Potential overpriced zone |
Trading Insight: If current price is below percentile_25, it's historically cheap. Above percentile_75 means it's expensive relative to recent history.
---
Trading Insight: A strong bullish trend (70+ strength) suggests momentum is building. Consider buying. A strong bearish trend suggests selling or waiting.
---
Calculated as coefficient of variation (standard deviation / mean × 100):
Trading Insight: Low volatility items are safer long-term holds. High volatility items offer arbitrage opportunities but carry more risk.
---
| Recommendation | Percentile Range | Confidence | Action |
| `strong_buy` | 0-25th | 85% | Excellent entry point |
| `buy` | 25-50th | 70% | Good value |
| `hold` | 50-75th | 50% | Fair price, wait for dip |
| `overpriced` | 75-100th | 30% | Sell or avoid |
Trading Insight: The system compares current price to historical distribution. A "strong_buy" means the item is in the bottom 25% of its price range - historically a great deal.
---
| Period | Interpretation |
| `24h` | Short-term momentum (day trading) |
| `7d` | Weekly trend (swing trading) |
| `30d` | Monthly trend (position trading) |
Trading Insight:
---
if analytics['buy_signal']['recommendation'] == 'strong_buy':
if analytics['volatility']['rating'] == 'low':
# Safe value buy
buy_item()
Logic: Buy items that are historically cheap AND stable. Lower risk, steady returns.
---
if analytics['trend']['direction'] == 'bullish':
if analytics['trend']['strength'] > 60:
if analytics['price_changes']['7d'] > 0:
# Riding the wave
buy_item()
Logic: Buy items with strong upward momentum. Riskier but higher potential returns.
---
if analytics['trend']['direction'] == 'bearish':
if analytics['current_price'] <= analytics['statistics']['percentile_25']:
if analytics['volatility']['rating'] != 'high':
# Catching falling knives (carefully)
buy_item()
Logic: Buy items that have fallen but are near historical lows. Wait for reversal.
---
if analytics['volatility']['rating'] == 'high':
if analytics['current_price'] <= analytics['statistics']['percentile_25']:
# High risk, high reward
buy_for_quick_flip()
Logic: High volatility items swing rapidly. Buy at lows, sell quickly at highs.
---
{
"error": "Analytics feature is available on Ultra tier only. Upgrade at https://rapidapi.com/apiarylabs/api/lootlens-real-time-game-market-data"
}
Solution: Upgrade to Ultra tier subscription.
---
{
"error": "Insufficient price history for analytics. Check back after more data is collected."
}
Reason: Item has fewer than 2 price records. Analytics requires historical data.
Solution: Wait for system to collect more data (happens automatically on all price lookups).
---
async def analyze_item(ctx, item_name):
"""!analyze AK-47 | Redline (Field-Tested)"""
analytics = get_analytics(item_name)
embed = discord.Embed(title=f"Analytics: {item_name}", color=get_signal_color(analytics))
# Current Price
embed.add_field(
name="Current Price",
value=f"{analytics['currency_symbol']}{analytics['current_price']}",
inline=True
)
# Buy Signal
signal = analytics['buy_signal']
embed.add_field(
name="Trading Signal",
value=f"**{signal['recommendation'].upper()}** ({signal['confidence']}%)",
inline=True
)
# Trend
trend = analytics['trend']
embed.add_field(
name="Trend",
value=f"{trend['direction'].title()} ({trend['strength']:.0f}% strength)",
inline=True
)
# Price Changes
changes = analytics['price_changes']
embed.add_field(
name="Price Changes",
value=f"24h: {changes['24h']:+.1f}%\n7d: {changes['7d']:+.1f}%\n30d: {changes['30d']:+.1f}%",
inline=False
)
# Reasoning
embed.set_footer(text=signal['reasoning'])
await ctx.send(embed=embed)
---
import time
def trading_loop():
"""Monitor items and auto-trade based on analytics"""
watchlist = [
'AK-47 | Redline (Field-Tested)',
'AWP | Asiimov (Field-Tested)',
'M4A4 | Howl (Field-Tested)'
]
while True:
for item in watchlist:
analytics = get_analytics(item)
# Strong buy signal + low volatility = safe buy
if (analytics['buy_signal']['recommendation'] == 'strong_buy' and
analytics['volatility']['rating'] == 'low'):
print(f"BUY SIGNAL: {item} at {analytics['current_price']}")
execute_purchase(item, analytics['current_price'])
# Overpriced + bearish trend = sell
elif (analytics['buy_signal']['recommendation'] == 'overpriced' and
analytics['trend']['direction'] == 'bearish'):
print(f"SELL SIGNAL: {item} at {analytics['current_price']}")
execute_sale(item, analytics['current_price'])
time.sleep(300) # Check every 5 minutes
---
def analyze_portfolio(items):
"""Calculate portfolio volatility and risk"""
total_value = 0
high_risk_items = []
for item in items:
analytics = get_analytics(item)
item_value = analytics['current_price'] * item['quantity']
total_value += item_value
# Flag high-risk holdings
if analytics['volatility']['rating'] == 'high':
risk = {
'item': item['name'],
'value': item_value,
'volatility': analytics['volatility']['score'],
'recommendation': 'Consider selling if overpriced'
}
high_risk_items.append(risk)
print(f"Total Portfolio Value: ${total_value:.2f}")
print(f"High Risk Items: {len(high_risk_items)}")
for risk in high_risk_items:
print(f" - {risk['item']}: ${risk['value']} (Volatility: {risk['volatility']}%)")
---
Important: The analytics provided by LootLens are for informational purposes only and should not be considered financial advice.
Market conditions can change rapidly. Use analytics as ONE tool in your decision-making process, not the only tool.
---
Having trouble with analytics?
---
---
Upgrade to Ultra today and start making data-driven trading decisions!