CoinGlass API Complete Guide
Nội dung liên quan

CoinGlass API Complete Guide



CoinGlass API is an all-in-one cryptocurrency market data solution covering derivatives, options, spot markets, ETFs, on-chain data, and hundreds of market indicators.
It supports L2/L3 order books, real-time WebSocket streaming, long-term stable operation, and pricing starting as low as $35/month, making it ideal for developers, quantitative traders, and institutional users.

1️⃣ Derivatives Data Module

CoinGlass API provides professional-grade coverage of core derivatives market metrics, including perpetual swaps, futures, and trading behavior data.

🔥 Main Data Categories (Based on the latest V4 API structure)

Note: The CoinGlass API documentation has been fully upgraded toVersion 4 (V4).
All previous legacy API versions are deprecated and no longer supported. Please refer exclusively to the V4 documentation for integration.

📊 Open Interest

/api/futures/openInterest/ohlc-history — Open interest OHLC history

/api/futures/openInterest/aggregated-history — Aggregated open interest history

/api/futures/openInterest/exchange-list — Exchange-level open interest list

💡 Use case: Identify capital crowding and evaluate trend strength.
CoinGlass-API

⚖️ Funding Rate

/api/futures/fundingRate/ohlc-history — Funding rate OHLC history

/api/futures/fundingRate/oi-weight-ohlc-history — OI-weighted funding rate

/api/futures/fundingRate/exchange-list — Funding rates by exchange

💡 Use case: Measure long/short holding costs and hedging sentiment.
CoinGlass-API

🧨 Liquidations

/api/futures/liquidation/history — Liquidation history

/api/futures/liquidation/aggregated-history — Liquidations by contract & asset

/api/futures/liquidation/heatmap/model2 — Liquidation heatmap & visual models

💡 Use case: Detect forced liquidation risks and potential support/resistance zones.
CoinGlass-API

📈 Long/Short Ratios & Trade Behavior

/api/futures/global-long-short-account-ratio/history — Global long/short account ratio

/api/futures/top-long-short-account-ratio/history — Top trader long/short ratio

/api/futures/taker-buy-sell-volume/history — Taker buy/sell volume history

💡 Useful for sentiment analysis and trend reversal signals.
CoinGlass-API

2️⃣ Spot Market & Asset Data

CoinGlass API also offers comprehensive spot market data:

📉 Spot Prices & Market Status

/api/spot/coins-markets — Spot asset market data

/api/spot/pairs-markets — Trading pair market data

/api/spot/price/history — Historical spot prices

📊 Order Book & Large Orders

/api/spot/orderbook/history — Order book heatmap history

/api/spot/orderbook/large-limit-order — Large limit orders

/api/spot/large-limit-order-history — Historical large orders

💡 Helps identify key liquidity zones.
CoinGlass-API

📦 Large Trades & Taker Volume

/api/spot/taker-buy-sell-volume/history — Taker buy/sell volume

/api/spot/aggregated-taker-buy-sell-volume/history — Aggregated taker statistics

3️⃣ Options Market Data

CoinGlass API connects to global crypto options markets with professional-grade metrics:

/api/option/info — Detailed options information

/api/option/exchange-oi-history — Options open interest history

/api/option/exchange-vol-history — Options volume history

💡 Highly valuable for structured volatility research and risk management.
CoinGlass-API

4️⃣ ETF Data (Exclusive Global Coverage)

CoinGlass is the first platform in the industry to systematically provide crypto ETF data, including historical and real-time capital flows.

📌 Main Endpoints

/api/bitcoin/etf/list — Bitcoin ETF list

/api/bitcoin/etf/flow-history — BTC ETF inflow/outflow history

/api/ethereum/etf/list — Ethereum ETF list

/api/ethereum/etf/flow-history — ETH ETF fund flows

Also supports Solana, XRP, and other ETF historical flow data.
CoinGlass-API

5️⃣ On-Chain Data

CoinGlass API synchronizes on-chain activity and exchange reserve data:

/api/exchange/balance/list — Exchange balance list

/api/exchange/balance/chart — Exchange balance trends

/api/exchange/chain/tx/list — On-chain transfer records (ERC-20)

These indicators are widely used to monitor exchange inflows/outflows and whale activity.
CoinGlass-API

6️⃣ Market & Technical Indicators

CoinGlass API provides hundreds of indicators covering spot, derivatives, and macro sentiment analysis.

📊 Derivatives & Trading Indicators

RSI, MACD, BOLL, MA

CGDI, CDRI (whale & depth indicators)

Futures basis

📈 Spot & Macro Indicators

Coinbase Premium Index

Bitfinex margin long/short ratio

Fear & Greed Index

Bitcoin Rainbow Chart & market cycle indicators

💡 These indicators can be directly used for strategy signal generation and sentiment monitoring.
CoinGlass-API

7️⃣ Real-Time Data (WebSocket)

CoinGlass WebSocket supports multiple real-time data streams:

Liquidation order flow

Futures trade executions

Other real-time market events

📌 WebSocket endpoints and data schemas are detailed in the official documentation.
CoinGlass-API

8️⃣ API Usage Examples (Latest Interface)

⚙️ Note: Latest API base URL:

https://open-api-v4.coinglass.com/


All responses are returned in JSON format.

REST Example: BTC Perpetual Open Interest History
import requests

BASE_URL = "https://open-api-v4.coinglass.com"/
API_KEY = "YOUR_API_KEY"

headers = {
"CG-API-KEY": API_KEY,
"Accept": "application/json"
}

params = {
"symbol": "BTC",
"interval": "1d",
"limit": 30
}

url = f"{BASE_URL}/api/futures/openInterest/ohlc-history"
response = requests.get(url, headers=headers, params=params)
print(response.json())

Get BTC ETF Flow History
import requests

url = "https://open-api-v4.coinglass.com/api/bitcoin/etf/flow-history%22
headers = {"CG-API-KEY": "YOUR_API_KEY"}
params = {"interval": "1w", "limit": 24}

print(requests.get(url, headers=headers, params=params).json())

WebSocket Example: Subscribe to Real-Time Liquidations
const ws = new WebSocket("wss://open-api-v4.coinglass.com/ws");

ws.onopen = () => {
ws.send(JSON.stringify({
op: "subscribe",
args: ["liquidationOrders"]
}));
};

ws.onmessage = (event) => {
console.log(JSON.parse(event.data));
};

9️⃣ Official Documentation & Resources

📘 CoinGlass API V4 Documentation (EN / CN)
https://docs.coinglass.com/v4.0/reference/getting-started-with-your-api

📜 Endpoint Overview
https://docs.coinglass.com/reference/endpoint-overview

🔑 API Key & Pricing
https://www.coinglass.com/pricing

Use Coinglass APP
Get a better and more comprehensive user experience