Coinglass Liquidation Heatmap
Pricing
Pay per event
Coinglass Liquidation Heatmap
Captures high-resolution CoinGlass liquidation heatmap screenshots with Playwright. Supports custom coin, chart type, dimensions, and wait time. Saves images to Key-Value Store and returns direct URLs with full metadata in the dataset.
Pricing
Pay per event
Rating
0.0
(0)
Developer

Mahmoud Alhamdo
Actor stats
0
Bookmarked
4
Total users
0
Monthly active users
4 days ago
Last modified
Categories
Share
CoinGlass Liquidation Heatmap Capture
An Apify Actor that captures CoinGlass liquidation heatmap charts as PNG screenshots. The actor navigates to CoinGlass liquidation heatmap pages and captures high-quality screenshots of the heatmap canvas.
Features
- π Capture CoinGlass liquidation heatmaps for any cryptocurrency
- π― Automatic canvas detection and capture
- πΌοΈ High-resolution PNG screenshots
- π¦ Base64 encoded images in dataset output
- βοΈ Fully compatible with Apify platform
- π Can run locally or in the cloud
- π¨ Support for custom viewport sizes
- β±οΈ Configurable wait times for page loading
Prerequisites
- Python 3.8+ (for local development)
- Apify account (for cloud deployment)
- Git (for version control)
Local Development
1. Install Dependencies
# Install Python dependenciespip install -r requirements.txt# Install Playwright browsersplaywright install chromium
2. Run Locally with Apify SDK
The actor uses Apify SDK which works automatically in local environment:
# Run the actor (Apify CLI automatically reads storage/key_value_stores/default/INPUT.json)apify run# Or specify custom input fileapify run --input storage/key_value_stores/default/INPUT.json
3. Local Storage
When running locally, Apify SDK automatically creates:
storage/key_value_stores/default/- Screenshots stored herestorage/datasets/default/- Dataset JSON files stored here
4. Test Input Example
Create storage/key_value_stores/default/INPUT.json file:
{"coin": "SOL","type": "symbol","width": 1920,"height": 1080,"waitTime": 5,"headless": false}
Note:
- Apify SDK works automatically in local mode - no API token required for local testing
- On Apify platform, input is provided via Actor input in the console
Input Schema
| Field | Type | Default | Description |
|---|---|---|---|
coin | string | "SOL" | Cryptocurrency symbol (e.g., SOL, BTC, ETH) |
type | string | "symbol" | Chart type (usually "symbol") |
width | integer | 1920 | Screenshot width in pixels (800-3840) |
height | integer | 1080 | Screenshot height in pixels (600-2160) |
waitTime | integer | 5 | Time to wait for page to fully load before screenshot (in seconds, 1-30) |
outputFileName | string | null | Custom filename (auto-generated if not provided) |
headless | boolean | false (locally) | Run browser in headless mode (hidden). Default: false locally, true on Apify platform |
Output
The actor saves:
- Screenshot: PNG image in Apify Key-Value store
- Metadata: JSON record in Apify Dataset with:
- Coin symbol, type, URL
screenshotBase64: Base64 encoded image string (ready to use)screenshotDataUrl: Data URL format (data:image/png;base64,...)- Screenshot URL and key (for direct access)
- Timestamp
Example output:
{"coin": "SOL","type": "symbol","url": "https://www.coinglass.com/pro/futures/LiquidationHeatMap?coin=SOL&type=symbol","width": 1920,"height": 1080,"screenshotBase64": "iVBORw0KGgoAAAANSUhEUgAA...","screenshotDataUrl": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...","screenshotUrl": "https://api.apify.com/v2/key-value-stores/.../coinglass_SOL_2024-01-01T12-00-00.png","screenshotKey": "coinglass_SOL_2024-01-01T12-00-00.png","timestamp": "2024-01-01T12:00:00.000Z"}
Supported Coins
The actor supports all cryptocurrencies available on CoinGlass, including:
- SOL (Solana)
- BTC (Bitcoin)
- ETH (Ethereum)
- BNB (Binance Coin)
- And many more...
GitHub Setup & Deployment
1. Initialize Git Repository
# Initialize git (if not already done)git init# Add all filesgit add .# Create initial commitgit commit -m "Initial commit: CoinGlass heatmap capture actor"
2. Push to GitHub
# Create a new repository on GitHub, then:git remote add origin https://github.com/YOUR_USERNAME/coinglass-heatmap-capture.gitgit branch -M maingit push -u origin main
3. Deploy to Apify
Option A: Deploy from GitHub (Recommended)
- Go to Apify Console
- Click "Create new" β "Actor"
- Select "Deploy from GitHub"
- Connect your GitHub account
- Select the repository:
coinglass-heatmap-capture - Apify will automatically build and deploy your actor
Option B: Deploy via CLI
# Login to Apifyapify login# Build the actorapify build# Push to Apifyapify push
4. Configure GitHub Actions (Optional)
The project includes a GitHub Actions workflow (.github/workflows/deploy.yml) that automatically:
- Installs dependencies
- Builds the actor
- Pushes to Apify on every push to
mainbranch
Setup:
- Go to your GitHub repository
- Navigate to Settings β Secrets and variables β Actions
- Add a new secret named
APIFY_TOKENwith your Apify API token - Get your token from: Apify Settings β Integrations
Project Structure
coinglass-heatmap-capture/βββ src/β βββ main.py # Main actor logicβ βββ __init__.pyβ βββ __main__.pyβββ .actor/β βββ actor.json # Apify actor configurationβ βββ input_schema.json # Input schema definitionβ βββ dataset_schema.json # Dataset output schemaβ βββ output_schema.json # Output schemaβββ storage/ # Local storage (gitignored)β βββ datasets/ # Local dataset storageβ βββ key_value_stores/ # Local key-value storageβββ requirements.txt # Python dependenciesβββ Dockerfile # Docker image for Apify platformβββ .gitignore # Git ignore rulesβββ README.md # This fileβββ AGENTS.md # AI agent instructions
How It Works
- Launch Browser: Opens Chromium via Playwright
- Navigate: Goes to CoinGlass liquidation heatmap URL with specified coin
- Wait for Canvas: Waits for the heatmap canvas to load and render
- Capture: Takes PNG screenshot of the canvas element
- Save: Stores screenshot in Key-Value store and metadata (with base64) in Dataset
Troubleshooting
Canvas Not Found
- Increase
waitTimevalue to allow more time for page loading - Check if CoinGlass is accessible from your network
- Verify the coin symbol is correct
Screenshot Quality
- Increase
widthandheightfor higher resolution - Ensure
waitTimeis sufficient for chart to fully render
Page Not Loading
- Check internet connection
- Verify CoinGlass website is accessible
- Increase timeout values if needed
License
ISC
Support
For issues and questions:
- Check Apify Documentation
- Visit Apify Community
- Review CoinGlass Terms of Service
Note: This actor is for educational and personal use. Ensure compliance with CoinGlass's Terms of Service when using this tool.