The orders_activity table stores snapshots of recent trade activity - a real-time feed of actual purchases and new listings as they happen on the Steam Market.Data Source:itemordersactivity API endpointUpdate Frequency: Real-time (seconds)Use Case: Monitor trading velocity, detect price movements, track market sentiment
-- Fast lookup for latest activityCREATE INDEX idx_activity_item_time ON orders_activity(market_hash_name, timestamp DESC);-- Time-based queriesCREATE INDEX idx_activity_timestamp ON orders_activity(timestamp DESC);
SELECT date(timestamp) AS day, json_each.value ->> '$.action' AS action_type, COUNT(*) AS occurrencesFROM orders_activity, json_each(parsed_activities)WHERE market_hash_name = 'AK-47 | Redline (Field-Tested)' AND timestamp > datetime('now', '-7 days')GROUP BY date(timestamp), action_typeORDER BY day DESC, occurrences DESC;
SELECT strftime('%H', timestamp) AS hour_of_day, AVG(activity_count) AS avg_activity, SUM(activity_count) AS total_activityFROM orders_activityWHERE market_hash_name = 'AK-47 | Redline (Field-Tested)' AND timestamp > datetime('now', '-30 days')GROUP BY strftime('%H', timestamp)ORDER BY avg_activity DESC;