Skip to content

Futures Service

Igor Sazonov edited this page Jul 12, 2026 · 1 revision

The FuturesService provides access to Coinglass futures market data, including open interest, funding rates, liquidations, and long/short ratios. It is accessed via client.Futures.

Initialization

client := coinglass.NewClient("YOUR_API_KEY")
ctx := context.Background()

Supported Coins & Markets

Get Supported Coins

coins, err := client.Futures.SupportedCoins(ctx)

Get Supported Exchange Pairs

pairs, err := client.Futures.SupportedExchangePairs(ctx, &coinglass.SupportedExchangePairsParams{
    Exchange: coinglass.StringPtr("Binance"),
})

Get Coins Markets

markets, err := client.Futures.CoinsMarkets(ctx, &coinglass.CoinsMarketsParams{
    Symbol: coinglass.StringPtr("BTC"),
})

Get Pairs Markets

pairs, err := client.Futures.PairsMarkets(ctx, &coinglass.PairsMarketsParams{
    Symbol: coinglass.StringPtr("BTC"),
})

Open Interest

Open Interest History (OHLC)

oi, err := client.Futures.OpenInterestHistory(ctx, &coinglass.OIHistoryParams{
    Symbol:   "BTC",
    Interval: "1d",
    Limit:    coinglass.IntPtr(30),
})

Open Interest by Exchange

exchangeOI, err := client.Futures.OpenInterestExchangeList(ctx, &coinglass.OIExchangeListParams{
    Symbol:   "BTC",
    Interval: "1h",
})

Funding Rates

Funding Rate History (OHLC)

rates, err := client.Futures.FundingRateHistory(ctx, &coinglass.FundingRateHistoryParams{
    Symbol:   "BTC",
    Interval: "8h",
})

Funding Rate by Exchange

exchangeRates, err := client.Futures.FundingRateExchangeList(ctx, &coinglass.FundingRateExchangeListParams{
    Symbol:   "BTC",
    Interval: "8h",
})

Funding Rate Arbitrage Opportunities

arb, err := client.Futures.FundingRateArbitrage(ctx, &coinglass.FundingRateArbitrageParams{
    Symbol: coinglass.StringPtr("BTC"),
})

Liquidations

Liquidation History

liqs, err := client.Futures.LiquidationHistory(ctx, &coinglass.LiquidationHistoryParams{
    Symbol:   "BTC",
    Pair:     "BTCUSDT",
    Interval: "1h",
})

Liquidation Heatmap

// model can be 1, 2, or 3
heatmap, err := client.Futures.LiquidationHeatmap(ctx, 1, &coinglass.LiquidationHeatmapParams{
    Symbol:   "BTC",
    Interval: "1d",
})

Long/Short Ratios

Global Long/Short Ratio History

ls, err := client.Futures.LongShortRatioHistory(ctx, &coinglass.LongShortRatioParams{
    Symbol:   "BTC",
    Interval: "1h",
})

Top Trader Long/Short Ratio History

topLs, err := client.Futures.TopLongShortRatioHistory(ctx, &coinglass.LongShortRatioParams{
    Symbol:   "BTC",
    Interval: "1h",
})

Other Endpoints

  • PriceChangeList(ctx)
  • LiquidationAggregatedHistory(ctx, params)
  • LiquidationCoinList(ctx, params)
  • LiquidationMap(ctx, params)
  • OrderbookHistory(ctx, params)
  • LargeOrders(ctx, params)
  • TakerBuySellHistory(ctx, params)
  • WhaleAlert(ctx, params)