|
|
#!/bin/bash |
|
|
|
|
|
echo "Testing Crypto Intelligence Hub endpoints..." |
|
|
echo "" |
|
|
|
|
|
BASE_URL="${1:-http://localhost:7860}" |
|
|
|
|
|
echo "1. Testing /api/health" |
|
|
curl -s "$BASE_URL/api/health" | python3 -m json.tool |
|
|
echo "" |
|
|
|
|
|
echo "2. Testing /api/coins/top?limit=5" |
|
|
curl -s "$BASE_URL/api/coins/top?limit=5" | python3 -m json.tool | head -30 |
|
|
echo "" |
|
|
|
|
|
echo "3. Testing /api/market/stats" |
|
|
curl -s "$BASE_URL/api/market/stats" | python3 -m json.tool |
|
|
echo "" |
|
|
|
|
|
echo "4. Testing /api/sentiment/analyze" |
|
|
curl -s -X POST "$BASE_URL/api/sentiment/analyze" \ |
|
|
-H "Content-Type: application/json" \ |
|
|
-d '{"text":"Bitcoin is pumping to the moon!"}' | python3 -m json.tool |
|
|
echo "" |
|
|
|
|
|
echo "5. Testing /api/datasets/list" |
|
|
curl -s "$BASE_URL/api/datasets/list" | python3 -m json.tool | head -20 |
|
|
echo "" |
|
|
|
|
|
echo "6. Testing /api/models/list" |
|
|
curl -s "$BASE_URL/api/models/list" | python3 -m json.tool | head -30 |
|
|
echo "" |
|
|
|
|
|
echo "All tests completed!" |
|
|
echo "Open $BASE_URL/ in your browser to see the dashboard" |
|
|
|