Top insider sells (this week)
Aggregate the top 10 companies by insider sell value over the last 7 days. Pure curl + jq, no SDK.
bash
#!/bin/bash
# Requires: curl, jq
API="https://sec-stream-io.lovable.app/api/public/v1"
KEY="${SECSTREAM_KEY:?Set SECSTREAM_KEY}"
# Pull recent insider rows for a watchlist of tickers in one batch call
curl -s -X POST "$API/filings/batch" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{
"tickers": ["AAPL","MSFT","GOOGL","TSLA","NVDA","META","AMZN","NFLX","CRM","ORCL"],
"type": "4",
"limit_per_ticker": 20,
"fields": "ticker,filed_at,transaction_code,total_value"
}' | jq '
[
.data.results | to_entries[] |
{ticker: .key,
sells: [.value[] | select(.transaction_code == "S") | .total_value // 0] | add // 0}
]
| sort_by(-.sells) | .[0:10]
'