# Coinglass Heatmap (`feng0928/coinglass-heatmap`) Actor

Coinglass Heatmap

- **URL**: https://apify.com/feng0928/coinglass-heatmap.md
- **Developed by:** [Feng](https://apify.com/feng0928) (community)
- **Categories:** Automation
- **Stats:** 31 total users, 2 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Coinglass Liquidation Heatmap

Capture high-resolution screenshots of cryptocurrency liquidation heatmaps from [Coinglass](https://www.coinglass.com/pro/futures/LiquidationHeatMap).

### What does this Actor do?

This Actor uses Playwright to navigate to Coinglass and capture liquidation heatmap screenshots for any supported cryptocurrency trading pair. The heatmap visualizes liquidation clusters at different price levels, helping traders identify key support/resistance zones.

**Key features:**

- High-resolution screenshots (2560x1440 @ 2x scale)
- Smart canvas rendering detection for optimal image quality
- Supports 20+ exchanges and multiple quote currencies
- Flexible time range selection (12h to 1 year)
- Returns publicly accessible image URL

### Input

| Field | Type | Description | Default |
|-------|------|-------------|---------|
| `coin` | string | Cryptocurrency symbol (e.g., BTC, ETH, SOL) | `BTC` |
| `exchange` | string | Exchange name | `Binance` |
| `quoteCurrency` | string | Quote currency (USDT, USD, USDC) | `USDT` |
| `timeRange` | string | Time range for the heatmap | `24h` |
| `headless` | boolean | Run browser in headless mode | `true` |

#### Supported Exchanges

Binance, OKX, Bybit, Bitget, MEXC, Gate, HTX, Hyperliquid, BingX, Deribit, Bitfinex, KuCoin, Bitmex, Kraken, Coinbase, CoinEx, dYdX, WhiteBIT, LBank, Bitunix, Crypto.com

#### Time Range Options

| Value | Description |
|-------|-------------|
| `12h` | 12 Hours |
| `24h` | 24 Hours |
| `48h` | 48 Hours |
| `3d` | 3 Days |
| `1w` | 1 Week |
| `2w` | 2 Weeks |
| `1m` | 1 Month |
| `3m` | 3 Months |
| `6m` | 6 Months |
| `1y` | 1 Year |

### Output

The Actor outputs a JSON object with the following fields:

```json
{
  "success": true,
  "coin": "BTC",
  "exchange": "Binance",
  "quoteCurrency": "USDT",
  "timeRange": "24h",
  "filename": "Binance_BTCUSDT_24h_20241215_120000.png",
  "url": "https://api.apify.com/v2/key-value-stores/.../records/...",
  "timestamp": "20241215_120000"
}
```

The screenshot is stored in the default Key-Value Store and the `url` field contains a publicly accessible link to the image.

### Example Usage

#### Default (BTC/USDT on Binance, 24h)

```json
{
  "coin": "BTC"
}
```

#### ETH on OKX, 1 week

```json
{
  "coin": "ETH",
  "exchange": "OKX",
  "quoteCurrency": "USDT",
  "timeRange": "1w"
}
```

#### SOL on Bybit, 3 days

```json
{
  "coin": "SOL",
  "exchange": "Bybit",
  "quoteCurrency": "USDT",
  "timeRange": "3d"
}
```

### Use Cases

- **Trading Analysis**: Monitor liquidation levels for potential price reversals
- **Market Research**: Track liquidation distribution across different timeframes
- **Automated Reports**: Schedule periodic heatmap captures for trading dashboards
- **Social Media**: Share liquidation insights with your audience

### Limitations

- Requires Coinglass website to be accessible
- The trading pair must exist on the selected exchange
- Screenshot quality depends on successful canvas rendering

### Example Output

![BTC Liquidation Heatmap](https://api.apify.com/v2/key-value-stores/cyC3mXxMEbUkbhjgh/records/OKX_BTCUSDT_1w_20251215_133757.png?signature=1IalJFL4h0GYpG2Jy64To)

# Actor input Schema

## `coin` (type: `string`):

Cryptocurrency symbol (e.g., BTC, ETH, SOL)

## `exchange` (type: `string`):

Exchange name

## `quoteCurrency` (type: `string`):

Quote currency for the trading pair

## `timeRange` (type: `string`):

Time range for the heatmap

## `headless` (type: `boolean`):

Run browser in headless mode

## Actor input object example

```json
{
  "coin": "BTC",
  "exchange": "Binance",
  "quoteCurrency": "USDT",
  "timeRange": "24h",
  "headless": true
}
```

# Actor output Schema

## `screenshot` (type: `string`):

No description

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("feng0928/coinglass-heatmap").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("feng0928/coinglass-heatmap").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call feng0928/coinglass-heatmap --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=feng0928/coinglass-heatmap",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/jaJH6DTPqRb3aIAVy/builds/nEWgHgCai0tDqCkM0/openapi.json
