Data Encyclopedia
HomeCharts
  • Welcome & Product Overview
  • Getting Started
  • Tutorials and Examples
    • Tutorials
      • Python API Client Walkthrough
      • Getting Started With Market Data
      • Getting Started With Futures Data
      • Aggregating Options Data
      • Examining Orderbook Depth
      • Aggregating Orderbook Depth to Create Liquidity Metrics
      • Comparing Stablecoin Prices Using Different Pricing Methods
      • Comparing Volumes of Exchanges and Assets
      • Creating Custom Network Data Metrics Using ATLAS
      • Applying Different Types of Marketcap Metrics
      • Comparing the Dominance of Mining Pools Using ATLAS
      • Using Staking Metrics to Get Yield and Staked Supply
      • Granular Insights On Chain Using Hourly Network Data Metrics
      • Exploring Options, Open Interest, and Volatility Data
      • Calculating Total Value Locked in Liquidity Pools using DEX Data
      • Calculating DEX Liquidity Pool Fees and Volumes
      • Analyzing DeFi Protocol Balance Sheets
    • How To Guides
      • How To Export Data
      • How To Migrate From Catalog to Catalog V2 and Reference Data
      • How To Use the Coin Metrics API Efficiently
    • Dashboard Examples
  • Packages
    • CM Labs
    • Coin Metrics Community Data
  • Access Our Data
    • API Reference
    • API Conventions
      • Catalog V1 to Catalog V2 Migration
    • Python API Client
    • R API Client
    • Coverage
    • Status Page
  • Data Visualization
    • Charting Tool
      • Formula Builder
      • Correlation Tool
      • Embedded Charts
      • Troubleshooting
    • Dashboard
      • Troubleshooting
    • CMTV Charts (Labs)
      • Troubleshooting
    • Atlas Explorer
  • Network Data
    • Network Data Pro Overview
      • Availability
        • Asset Completion Time
      • Addresses
        • Active Addresses
        • Address Balances
        • New Addresses
      • Economics
        • Mining
        • Valuation
      • Exchange
        • Deposits
        • Exchange Supply
        • Net Flows
        • Transaction Count
        • Withdrawals
      • Fees and Revenue
        • Fees
        • Revenue
      • Market
        • Market Capitalization
        • Price
        • Profitability
        • Returns
        • Volatility
      • Key Risk Indicator (KRI) Feed
        • Blocks
        • Block Attributes
        • Block Size
        • Block Times
        • Empty Blocks
        • Fees
        • Outputs
        • Rewards
        • Feerates
        • Hashrate
        • Transaction Feerates
        • Transaction Fees
        • Transaction Sizes
        • Transactions
      • Mining
        • Balances
        • Difficulty
        • Exchange Flows
        • Flows
        • Hardware Hash Rate
        • Hash Rate
      • Network Usage
        • Blocks
        • Contracts
        • Profitability
        • UTXOs
        • Blobs
      • Staking
        • Consensus Health
        • Flows
        • Penalty Metrics
        • Slashing Metrics
        • Validator Supply
        • Stakers
        • Yield
      • Supply
        • Active Supply
        • Addresses with Balance
        • Burnt Supply
        • Current Supply
        • Free Float Supply
        • Future Expected Supply
        • Miner Revenue
        • Profitability
        • Revived Supply
        • Shielded Supply
        • Supply Issuance
        • Staking Supply
      • Transactions
        • Blobs
        • Contracts
        • Token Transactions
        • Transactions
        • Transfer Value
        • Transfers
        • Velocity
      • Wallets
        • Active Wallets
        • Wallet Balances
    • Atlas Overview
      • Accounts
      • Account Balance
      • Blocks
        • Full Block
      • Transactions
        • Full Transaction
          • Full Transaction Info for Block
      • Balance Updates
    • Methodologies
      • Normalizing Block Times
    • DeFi Overview
      • Decentralized Exchange Data
      • DeFi Balance Sheets
      • DeFi FAQs
    • Tagging Meta Data
    • Transaction Tracker
    • CM Labs
      • Mining Pool Monitor Overview
        • Mining Pool Monitor API Fields
      • Reorg & Fork Tracker Overview
        • Reorg & Fork Tracker Tracker API Fields
    • Deprecated
      • Mempool Monitor
      • WatchTower Alerts Overview - DEPRECATED
        • WatchTower Alerts - DEPRECATED
          • Ethereum Proof-of-Stake Alerts - DEPRECATED
            • Missed Slot Alert - DEPRECATED
            • Fast Increase in Transaction Count Alert - DEPRECATED
            • Fast Decrease in Transaction Count Alert - DEPRECATED
            • Fast Decrease in Base Fees - DEPRECATED
            • Fast Increase in Base Fees - DEPRECATED
            • Fast Decrease in Priority Fees (Tips) Alert - DEPRECATED
            • Fast Increase in Priority Fees (Tips) Alert - DEPRECATED
            • Decrease in Active Addresses Alert - DEPRECATED
            • Increase in Active Addresses Alert - DEPRECATED
            • Decrease in Total Block Fees Alert - DEPRECATED
            • Increase in Total Block Fees Alert - DEPRECATED
          • DeFi Alerts - DEPRECATED
            • Smart Contract Admin Change Alert - DEPRECATED
            • Admin Change with Issuance Event Alert - DEPRECATED
            • Admin Change with Large Issuance Event Alert - DEPRECATED
          • Mining Alerts - DEPRECATED
            • Unknown Miner Predominance Alert - DEPRECATED
            • Mining Pool Conflict Alert - DEPRECATED
            • Persistent Mining Pool Conflict Alert - DEPRECATED
            • Hashrate Decrease Alert - DEPRECATED
            • 1-Block Difficulty Decrease - DEPRECATED
          • Blockchain Alerts - DEPRECATED
            • 1 Block Reorg Alert - DEPRECATED
            • 2 Block Reorg Alert - DEPRECATED
            • 3 Block Reorg Alert - DEPRECATED
            • Satoshi Coins Spent - DEPRECATED
            • Vintage Coins Spent - DEPRECATED
            • Slow Block Alert - DEPRECATED
            • 1 Consecutive Empty Block Alert - DEPRECATED
            • 2 Consecutive Empty Blocks Alert - DEPRECATED
            • 3 Consecutive Empty Blocks Alert - DEPRECATED
            • 6 Consecutive Empty Blocks Alert - DEPRECATED
          • Mempool Alerts - DEPRECATED
            • Mempool Disruption Alert - DEPRECATED
            • Mempool Size 90% Alert - DEPRECATED
            • Mempool Size 95% Alert - DEPRECATED
            • Mempool Size 99% Alert - DEPRECATED
            • Mempool Size 100% Alert - DEPRECATED
            • Mempool Congestion Alert - DEPRECATED
        • WatchTower API Fields - DEPRECATED
    • Network Data Glossary
    • Network Data FAQs
  • Market Data
    • Market Data Overview
      • Basis
      • Candles
      • Contract Prices
      • Funding Rates
        • Funding Rates
        • Predicted Funding Rates
        • Aggregated Futures Funding Rate
        • Cumulative Futures Funding Rate
      • Greeks
      • Institution Metrics
        • Grayscale
          • Shares Outstanding
          • Market Price
          • Net Asset Value
          • Coin Per Share
          • Total Assets
      • Liquidations
        • Market Level Liquidations
        • Liquidation Metrics
      • Liquidity
        • Bid-Ask Spread Percent
        • Order Book Depth
        • Slippage
      • Market Metadata
      • Open Interest
        • Market Level Open Interest
        • Reported Open Interest
      • Orderbooks
      • Quotes
      • Trades
      • Volatility
        • Market Implied Volatility
        • Implied Volatility
        • Realized Volatility
      • Volume
        • Trusted Volume
        • Reported Volume
    • CM Prices
      • Reference Rate
      • Principal Market Price (USD)
      • Principal Market (USD)
    • Methodologies
      • Coin Metrics Prices Policies
      • Coin Metrics Prices Methodology
      • Trusted Exchange Framework
    • Market Data FAQs
      • CM Prices FAQs
      • Trusted Exchange Framework FAQs
  • Index Data
    • Index Overview
      • Index Timeseries
        • Index Levels
        • Index Candles
        • Index Constituents
    • Policies & Charters
      • CMBI Index Policies
      • Governance Committees
    • Methodologies
      • Fork Legitimacy Framework
      • Adjusted Free Float Supply Methodology
      • Candidate Market Guidelines
    • Fact Sheets
      • CMBI Single Asset Series Fact Sheet
      • CMBI Multi Asset Series Fact Sheet
      • CMBI Total Market Series Fact Sheet
      • CMBI Mining Series Fact Sheet
    • Indexes Glossary
    • Index FAQs
  • Reference Data
    • datonomy Overview
      • Taxonomy for Assets
      • Taxonomy Metadata for Assets
      • datonomy FAQs
    • Profiles Overview
      • Asset Profiles
      • Network Profiles
    • Security Master Overview
      • Assets
      • Markets
    • Methodologies
      • Guiding Principles and Methodology for datonomy
  • BITTENSOR
    • Precog Methodology
      • Point Forecast Ranking
      • Interval Forecast Ranking
      • Interval Score Examples
      • Miner Weight from Rank
Powered by GitBook
On this page

Was this helpful?

  1. Market Data
  2. Market Data Overview
  3. Liquidations

Market Level Liquidations

/timeseries/market-liquidations

PreviousLiquidationsNextLiquidation Metrics

Last updated 11 months ago

Was this helpful?

Definition

Exchanges which offer futures markets utilize a risk management system that will attempt to close a user’s position before the point at which the user begins to owe more than what is in the user's account. The trade or order that closes the user's position is referred to as a liquidation.

Details

Futures contracts enable market participants to trade with leverage – that is, market participants are allowed to have a position with notional value greater than the amount of money they have in their account. This raises the possibility that market participants can lose more money than have in their account. To address this possibility, exchanges which offer futures products have a liquidation system that will attempt to close a market participant’s position before the point at which the market participant begins to owe more than what is in their account.

A simplified example illustrates the process. Suppose a trader deposits $100 into an exchange and buys $10,000 worth of Bitcoin perpetual contracts resulting in a leverage of 100x. Also, suppose the current price of Bitcoin is $10,000. If the price declines to $9,900 (the “bankruptcy price”), the trader would be bankrupt. Therefore, the exchange sets the liquidation price for this trader’s position at $9,925 (the “liquidation price”). If the price declines to this liquidation price, the exchange will forcibly initiate a sell liquidation order to attempt to close the trader’s position.

API Endpoints

Individual market liquidations can be accessed using these endpoints:

  • timeseries/market-liquidations

curl --compressed "https://api.coinmetrics.io/v4/timeseries/market-liquidations?markets=binance-BTCUSDT-future&limit_per_market=1&api_key=<your_key>"
import requests
response = requests.get('https://api.coinmetrics.io/v4/timeseries/market-liquidations?markets=binance-BTCUSDT-future&limit_per_market=1&api_key=<your_key>').json()
print(response)
from coinmetrics.api_client import CoinMetricsClient

api_key = "<API_KEY>"
client = CoinMetricsClient(api_key)

print(
    client.get_market_liquidations(
        markets=["binance-BTCUSDT-future"], limit_per_market=5
    ).to_dataframe()
)

Example

{
  "data": [
    {
      "market": "binance-BTCUSDT-future",
      "time": "2020-10-10T15:44:42.105000000Z",
      "coin_metrics_id": "1602344682105000000",
      "amount": "0.045",
      "price": "11380.39",
      "type": "trade",
      "database_time": "2020-10-10T15:44:45.109122000Z",
      "side": "buy"
    },
    {
      "market": "binance-BTCUSDT-future",
      "time": "2020-10-10T15:45:37.067000000Z",
      "coin_metrics_id": "1602344737067000000",
      "amount": "0.004",
      "price": "11386",
      "type": "trade",
      "database_time": "2020-10-10T15:45:39.329348000Z",
      "side": "buy"
    }
  ]
}
  • market: The id of the market. Market ids use the following naming convention: exchangeName-baseAsset-quoteAsset-spot for spot markets, exchangeName-futuresSymbol-future for futures markets, and exchangeName-optionsSymbol-option for options markets. \

  • time: The exchange-reported time in ISO 8601 date-time format. Always with nanoseconds precision.\

  • coin_metrics_id: The id of a liquidation (unique per exchange). We are using exchange reported value if exchange reports a numeric liquidation id, otherwise we convert to numeric using Bijective mapping from exchange reported liquidation id’s string. For exchanges that do not report a liquidation id, we use multiple fields to create a unique liquidation id. \

  • amount: The amount that is liquidated in units of number of contracts.\

  • price: The price of the underlying base asset quoted in the underlying quote asset that the liquidation trade was executed at or liquidation order was set at.\

  • type: The liquidation type. trade means that the liquidation was executed. order means that the order was placed for the liquidation at the timestamp of the data entry but it wasn’t necessarily executed yet.\

  • database_time: The timestamp when the data was saved in the database in ISO 8601 date-time format with nanoseconds precision.\

  • side: The market order side of the trade or order that closes the liquidated position. buy means that an ask was removed from the book by an incoming buy order, sell means that a bid was removed from the book by an incoming sell order. We report the side of the trade or order that was used to close the position under liquidation -- not the side of the original position.

Frequently Asked Questions

What does the liquidation side represent?

We report the side of the trade or order that was used to close the position under liquidation -- not the side of the original position. For example, if a trader had a long position and the price suddenly declined that caused the trader's position to be liquidated, the result would be a liquidation with a side of sell.

What determines the frequency of liquidations data?

There is no set time frequency for liquidations, since they are event-based just like trades or orders. Whenever an exchange liquidates a traders position, the data is pulled in real time. In theory, if the market is trading flat and not moving much in either direction, you won't see many liquidations, whereas if there is high volatility you'll see a higher frequency stream of liquidations.

Harmonization Discussion

Our liquidation data harmonizes liquidation data across various exchanges. Here we discuss some differences in how various exchanges report their liquidations data.

  • Liquidation orders versus liquidation trades: Some exchanges report “liquidations orders” in which they will report the creation of a liquidation order when a trader’s position initially enters liquidation. When a trader’s position enters liquidation, an exchange will typically enter a limit order at the price at which the trader will be bankruptcy price. The liquidation orders will show the amount of the position that is being liquidated and the liquidation price, but will not represent the matched trades that are executed as a result of the liquidation. Other exchanges will report “liquidation trades” which represent the actual matched trades as a result of a liquidation order but will not report liquidation orders. Some exchanges will report both liquidation orders and liquidation trades.\

  • Aggregated liquidation trades versus individual liquidation trades: For the exchanges that report liquidation trades, the exchange can report it in aggregated or individual format. Exchanges that report liquidation trades in aggregated format means that even if the liquidation involved several matched trades, the exchange will report it as one aggregated trade representing the sum of the amount liquidated and the average price of the liquidations. Other exchanges report liquidation trades in individual trade format such that one liquidation can be reported via multiple observations representing the multiple matched trades.\

  • Side of original position versus side of liquidation: Most exchanges report the side of the liquidation order or trade that is used to close the user's position (i.e. whether the liquidation was a buy or sell action to close the position). Some exchanges instead report the side of the original position that is under liquidation (i.e. whether the original position that is under liquidation was a long or short position). \

  • With original position data versus without original position data: Some exchanges report data about the position that is liquidated such as the original quantity and the original price that the position was entered into while others do not.\

  • With history versus without history: Similar to trades data, certain exchanges allow us to query historical liquidation data while others do not.

We harmonize the data in the following way:

  • If an exchange reports both liquidation orders and liquidation trades, we store both types of observations and differentiate the two types with the type column. \

  • Bybit is the only exchange in our coverage universe that reports the side of the original position under liquidation. Every other exchange reports the side of the liquidation. We adopt the convention of reporting the side of the liquidation, and we map Bybit's data to this convention by inverting the side reported by Bybit.

Known Data Issues

  • Liquidations data from Binance are missing from 2021-04-27 to 2021-05-11 due to a breaking change that was made to the Binance API on 2021-04-27. \

  • Our liquidations data from Binance for an approximately four month window is underreported due to a breaking change that was made to the Binance API on 2021-04-27. Prior to this date, Binance had reported every single liquidation. Our liquidations table was using the “last filled quantity” (and price), which was appropriate when all liquidations were reported. However, the change they implemented rendered their API to only report the latest liquidation within the last 1,000ms. As a result, our scrapers logic no longer fully captures every liquidation. We implemented a change to our scrapers on 2021-08-31. Rather than using the “last filled quantity” (and price), we will be using the total quantity of the liquidated orders that happened in that 1000ms interval (and the average price of that interval). Unfortunately, all liquidations data that was captured between 2021-05-11 and 2021-08-31 will remain underreported and there is no way for us to recover the data, as Binance does not permit the collection of historical liquidations. However, all liquidations that occurred before 2021-04-27 are still accurate. \

  • In rare instances where OKEx reports two adjacent liquidations with identical time, amount, and price, we only stored the first observation prior to 2021-09-21. This issue was corrected on 2021-09-21. \

  • Our liquidations data from BitMEX are underreported prior to 2021-09-20 due to rate limits imposed by the exchange. This issue was corrected on 2021-09-20. \

  • Our liquidations data from Bybit were interrupted for a period of 5 days between 2021-09-24 to 2021-09-29 due to a deprecation of their API endpoint. This issue was corrected on 2021-09-29.

Release History

Availability

The previous 24 hours of liquidations data is available through our community API. Community data is available via HTTP API only and is limited to 10 API requests per 6 seconds per IP address. All of our liquidations data is available through our professional API with higher rate limits.

Availability by Market Type

Type
Market Count

Futures

3817

Availability by Exchange

Exchange
Futures Market Count
Start Date

Binance

203

2019-09-10

Bitfinex

26

2019-08-01

BitMEX

77

2020-10-08

Bybit

30

2021-04-24

Deribit

62

2018-08-14

FTX

824

2019-04-19

Huobi

1287

2020-07-10

Kraken

53

2020-12-09

OKEx

1255

2020-10-01

A sample of the liquidations data from the binance-BTCUSDT-future market from our API endpoint is provided below.

: Added liquidations for futures markets on Binance, Bitfinex, BitMEX, Deribit, FTX, Huobi, Kraken, and OKEx.\

: Added liquidations for futures markets on Bybit.

/timeseries/market-liquidations
CM MDF v2.2 on December 2, 2020
CM MDF v2.4 on September 1, 2021

Market liquidations

get

Returns liquidations for specified futures markets. Results are ordered by tuple (market, time). To fetch the next page of results use next_page_url JSON response field. Keep in mind that spot markets are not supported by this endpoint.

Authorizations
Query parameters
marketsstring[]Required

Comma separated list of markets or market patterns like exchange-* or exchange-*-spot or *USDT-future. Use the /catalog-all/markets endpoint for the full list of supported markets.

start_timestringOptional

Start of the time interval. This field refers to the time field in the response. Multiple formats of ISO 8601 are supported: 2006-01-20T00:00:00Z, 2006-01-20T00:00:00.000Z, 2006-01-20T00:00:00.123456Z, 2006-01-20T00:00:00.123456789Z, 2006-01-20, 20060120. Inclusive by default. UTC timezone by default. Z suffix is optional and timezone parameter has a priority over it. If start_time is omitted, response will include time series from the earliest time available.

end_timestringOptional

End of the time interval. This field refers to the time field in the response. Multiple formats of ISO 8601 are supported: 2006-01-20T00:00:00Z, 2006-01-20T00:00:00.000Z, 2006-01-20T00:00:00.123456Z, 2006-01-20T00:00:00.123456789Z, 2006-01-20, 20060120. Inclusive by default. UTC timezone by default. Z suffix is optional and timezone parameter has a priority over it. If end_time is omitted, response will include time series up to the latest time available.

start_inclusivebooleanOptional

Inclusive or exclusive corresponding start_* parameters.

Default: true
end_inclusivebooleanOptional

Inclusive or exclusive corresponding end_* parameters.

Default: true
timezonestringOptional

Timezone name for start_time and end_time timestamps. This parameter does not modify the output times, which are always UTC. Format is defined by TZ database.

Default: UTCExample: America/New_York
page_sizeinteger · int32 · min: 1 · max: 10000Optional

Number of items per single page of results. The value of this parameter is ignored if the endpoint supports the format parameter and its value is set to json_stream.

Default: 100
paging_fromstring · enumOptional

Where does the first page start, at the start of the interval or at the end. The value of this parameter is ignored if the endpoint supports the format parameter and its value is set to json_stream.

Default: endPossible values:
limit_per_marketinteger · int32Optional

How many entries per market result should contain. It is useful when multiple markets are requested.

prettybooleanOptional

Human-readable formatting of JSON responses.

Default: false
formatstring · enumOptional

Format of the response.

Default: jsonPossible values:
next_page_tokenstringOptional

Token for receiving the results from the next page of a query. Should not be used directly. To iterate through pages just use next_page_url response field.

Responses
200
Time series of market liquidations.
application/json
400
Market not found.
application/json
401
Requested resource requires authorization.
application/json
403
Requested resource is not available with supplied credentials.
application/json
414
Provided URI is too long. It must not be greater than 10000 symbols.
get
GET /v4/timeseries/market-liquidations HTTP/1.1
Host: api.coinmetrics.io
Accept: */*
{
  "data": [
    {
      "market": "binance-BTCUSDT-future",
      "time": "2020-10-10T15:44:42.105000000Z",
      "coin_metrics_id": "1602344682105000000",
      "amount": "0.045",
      "price": "11380.39",
      "type": "trade",
      "database_time": "2020-10-10T15:44:45.109122000Z",
      "side": "buy"
    },
    {
      "market": "binance-BTCUSDT-future",
      "time": "2020-10-10T15:45:37.067000000Z",
      "coin_metrics_id": "1602344737067000000",
      "amount": "0.004",
      "price": "11386",
      "type": "trade",
      "database_time": "2020-10-10T15:45:39.329348000Z",
      "side": "buy"
    }
  ]
}
  • Definition
  • Details
  • API Endpoints
  • GETMarket liquidations
  • Example
  • Frequently Asked Questions
  • What does the liquidation side represent?
  • What determines the frequency of liquidations data?
  • Harmonization Discussion
  • Known Data Issues
  • Release History
  • Availability
  • Availability by Market Type
  • Availability by Exchange